diff options
author | sfan5 <sfan5@live.de> | 2019-09-22 22:12:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-22 22:12:21 +0200 |
commit | 70f9e1aafa6cd7a2b2d204609cab6cc26539cdb9 (patch) | |
tree | 7ae4b3532d6f7aee52b3c2c16628fe82c88775fa /src/tool.h | |
parent | fec30e37ac1d160a942777b05a7717b5395c4d99 (diff) | |
download | minetest-70f9e1aafa6cd7a2b2d204609cab6cc26539cdb9.tar.gz minetest-70f9e1aafa6cd7a2b2d204609cab6cc26539cdb9.tar.bz2 minetest-70f9e1aafa6cd7a2b2d204609cab6cc26539cdb9.zip |
Punchwear (improved) (#8959)
Diffstat (limited to 'src/tool.h')
-rw-r--r-- | src/tool.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tool.h b/src/tool.h index d077b54ce..59dd501f5 100644 --- a/src/tool.h +++ b/src/tool.h @@ -60,17 +60,20 @@ struct ToolCapabilities int max_drop_level; ToolGCMap groupcaps; DamageGroup damageGroups; + int punch_attack_uses; ToolCapabilities( - float full_punch_interval_=1.4, - int max_drop_level_=1, + float full_punch_interval_ = 1.4f, + int max_drop_level_ = 1, const ToolGCMap &groupcaps_ = ToolGCMap(), - const DamageGroup &damageGroups_ = DamageGroup() + const DamageGroup &damageGroups_ = DamageGroup(), + int punch_attack_uses_ = 0 ): full_punch_interval(full_punch_interval_), max_drop_level(max_drop_level_), groupcaps(groupcaps_), - damageGroups(damageGroups_) + damageGroups(damageGroups_), + punch_attack_uses(punch_attack_uses_) {} void serialize(std::ostream &os, u16 version) const; @@ -103,9 +106,9 @@ DigParams getDigParams(const ItemGroupList &groups, struct HitParams { s16 hp; - s16 wear; + u16 wear; - HitParams(s16 hp_=0, s16 wear_=0): + HitParams(s16 hp_ = 0, u16 wear_ = 0): hp(hp_), wear(wear_) {} |