diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-08-07 19:16:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 19:16:31 +0200 |
commit | e462a9a5ef46776d974203bb44e0b89e8c980b29 (patch) | |
tree | 4562ef5587bd896890d843877031d5818de19bbc /src/tool.h | |
parent | 003af7421352ec1b8ba0d230b807862e1e4cc7e9 (diff) | |
download | minetest-e462a9a5ef46776d974203bb44e0b89e8c980b29.tar.gz minetest-e462a9a5ef46776d974203bb44e0b89e8c980b29.tar.bz2 minetest-e462a9a5ef46776d974203bb44e0b89e8c980b29.zip |
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
Diffstat (limited to 'src/tool.h')
-rw-r--r-- | src/tool.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tool.h b/src/tool.h index 00fae4881..d077b54ce 100644 --- a/src/tool.h +++ b/src/tool.h @@ -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); |