From 8db93b5e651bc38ff43e77ae91a71d9de876d54b Mon Sep 17 00:00:00 2001 From: npx Date: Wed, 1 Mar 2017 10:58:01 +0100 Subject: [PATCH] Added check for creative mode --- nssm_weapons.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nssm_weapons.lua b/nssm_weapons.lua index 616f6ad..67308eb 100644 --- a/nssm_weapons.lua +++ b/nssm_weapons.lua @@ -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)