1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 09:25:37 +02: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:
SmallJoker
2019-08-07 19:16:31 +02:00
committed by GitHub
parent 003af74213
commit e462a9a5ef
14 changed files with 154 additions and 249 deletions

View File

@@ -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);