Rename on_punch callback to avoid potential conflict with nodes

This commit is contained in:
stujones11
2017-04-21 18:33:30 +01:00
parent a11b3302e1
commit 1af0bb60f8
3 changed files with 6 additions and 6 deletions

View File

@ -90,7 +90,7 @@ Additional fields supported by 3d_armor:
on_unequip = <function>
on_destroy = <function>
on_damage = <function>
on_punch = <function>
on_punched = <function>
armor:register_armor_group(group, base)
@ -163,11 +163,11 @@ on_equip = func(player, index, stack)
on_unequip = func(player, index, stack)
on_destroy = func(player, index, stack)
on_damage = func(player, index, stack)
on_punch = func(player, hitter, time_from_last_punch, tool_capabilities)
on_punched = func(player, hitter, time_from_last_punch, tool_capabilities)
Notes:
`on_punch` is called every time a player is punched or takes damage, `hitter`,
`on_punched` is called every time a player is punched or takes damage, `hitter`,
`time_from_last_punch` and `tool_capabilities` can be `nil` and will be in the
case of fall damage, etc. When fire protection is enabled, hitter == "fire"
in the event of fire damage. Return `false` to override armor damage effects.