Make parachutes and headbars immortal

This commit is contained in:
Wuzzy 2019-09-15 12:55:39 +02:00
parent fd5caec63f
commit c6efdc9f10
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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()