From a18a9c5f70a6849afd8dd060e2dfdaac56c94679 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 27 Feb 2017 23:45:26 +0100 Subject: [PATCH] Make TNT entity immortal --- mods/ITEMS/mcl_tnt/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index 2f6435eac3..3762d64a0a 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -1,6 +1,7 @@ local function spawn_tnt(pos, entname) - minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,}) - return minetest.add_entity(pos, entname) + minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,}) + local tnt = minetest.add_entity(pos, entname) + tnt:set_armor_groups({immortal=1}) end local function activate_if_tnt(nname, np, tnt_np, tntr)