mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Unify wield item handling (#8677)
This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client
This commit is contained in:
parent
003af74213
commit
e462a9a5ef
14 changed files with 154 additions and 249 deletions
|
@ -170,9 +170,7 @@ public:
|
|||
{}
|
||||
|
||||
// Inventory and wielded item
|
||||
virtual Inventory* getInventory()
|
||||
{ return NULL; }
|
||||
virtual const Inventory* getInventory() const
|
||||
virtual Inventory *getInventory() const
|
||||
{ return NULL; }
|
||||
virtual InventoryLocation getInventoryLocation() const
|
||||
{ return InventoryLocation(); }
|
||||
|
@ -180,7 +178,7 @@ public:
|
|||
{}
|
||||
virtual std::string getWieldList() const
|
||||
{ return ""; }
|
||||
virtual int getWieldIndex() const
|
||||
virtual u16 getWieldIndex() const
|
||||
{ return 0; }
|
||||
virtual ItemStack getWieldedItem() const;
|
||||
virtual bool setWieldedItem(const ItemStack &item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue