- Added the 'GiveInventory' method to the actor.
This will help cleaning up the item giving code. Returns a bool, in case the pickup failure might turn to be interesting in the future.
This commit is contained in:
parent
ed070cfe06
commit
7b35f32f3d
2 changed files with 60 additions and 0 deletions
|
|
@ -661,6 +661,10 @@ public:
|
|||
// Adds the item to this actor's inventory and sets its Owner.
|
||||
virtual void AddInventory (AInventory *item);
|
||||
|
||||
// Give an item to the actor and pick it up.
|
||||
// Returns true if the item pickup succeeded.
|
||||
virtual bool GiveInventory (PClassInventory *type, int amount, bool givecheat = false);
|
||||
|
||||
// Removes the item from the inventory list.
|
||||
virtual void RemoveInventory (AInventory *item);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue