Added check for creative mode

This commit is contained in:
npx 2017-03-01 10:58:01 +01:00
parent 35b14a5943
commit 8db93b5e65

View File

@ -334,7 +334,9 @@ local function nssm_register_weapon(name, def)
inventory_image = name.."_hand.png",
on_use = function(itemstack, placer, pointed_thing)
weapons_shot(itemstack, placer, pointed_thing, def.velocity, name)
itemstack:take_item()
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end,
on_drop = def.on_drop or function(itemstack, user, pointed_thing)