From c6efdc9f109f7b790ed747471d6914fef6abc4ee Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 15 Sep 2019 12:55:39 +0200 Subject: [PATCH] Make parachutes and headbars immortal --- mods/headbars/init.lua | 1 + mods/parachute/init.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/mods/headbars/init.lua b/mods/headbars/init.lua index 8e6278b..2e5bdb4 100644 --- a/mods/headbars/init.lua +++ b/mods/headbars/init.lua @@ -53,6 +53,7 @@ minetest.register_entity( _wielder = nil, on_activate = function(self, staticdata) + self.object:set_armor_groups({immortal=1}) local name = staticdata local wielder = minetest.get_player_by_name(name) if wielder and wielder:is_player() then diff --git a/mods/parachute/init.lua b/mods/parachute/init.lua index 41c1089..8f99171 100644 --- a/mods/parachute/init.lua +++ b/mods/parachute/init.lua @@ -23,6 +23,9 @@ minetest.register_craftitem( inventory_image = "parachute_inventory.png", wield_image = "parachute_inventory.png", stack_max = 1, + on_activate = function(self) + self.object:set_armor_groups({immortal=1}) + end, on_use = function(itemstack, player, pointed_thing) local name = player:get_player_name()