1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Punchwear (improved) (#8959)

This commit is contained in:
sfan5 2019-09-22 22:12:21 +02:00 committed by GitHub
parent fec30e37ac
commit 70f9e1aafa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 73 additions and 31 deletions

View file

@ -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_)
{}