mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38: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
|
@ -25,6 +25,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "itemgroup.h"
|
||||
#include <json/json.h>
|
||||
|
||||
struct ItemDefinition;
|
||||
|
||||
struct ToolGroupCap
|
||||
{
|
||||
std::unordered_map<int, float> times;
|
||||
|
@ -132,3 +134,5 @@ PunchDamageResult getPunchDamage(
|
|||
const ItemStack *punchitem,
|
||||
float time_from_last_punch
|
||||
);
|
||||
|
||||
f32 getToolRange(const ItemDefinition &def_selected, const ItemDefinition &def_hand);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue