mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-14 15:11:05 +01:00
Don't wear weapons in creative mode
This commit is contained in:
parent
a9939b8e4b
commit
f97453b3d9
1 changed files with 2 additions and 2 deletions
|
@ -1879,9 +1879,9 @@ end
|
|||
punch_interval = tool_capabilities.full_punch_interval or 1.4
|
||||
end
|
||||
|
||||
if weapon:get_definition()
|
||||
if minetest.setting_getbool("creative_mode")
|
||||
and weapon:get_definition()
|
||||
and weapon:get_definition().tool_capabilities then
|
||||
|
||||
weapon:add_wear(floor((punch_interval / 75) * 9000))
|
||||
hitter:set_wielded_item(weapon)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue