1
0
Fork 0
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:
SmallJoker 2019-08-07 19:16:31 +02:00 committed by GitHub
parent 003af74213
commit e462a9a5ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);