forked from mtcontrib/nether-pack
allow disabling killing of people using the simple portal
This commit is contained in:
parent
1003e8288c
commit
6245b9e4e1
@ -1,4 +1,7 @@
|
|||||||
--code copied from Pilzadam's nether mod and edited
|
--code copied from Pilzadam's nether mod and edited
|
||||||
|
|
||||||
|
-- kills the player if he uses PilzAdam portal
|
||||||
|
local obsidian_portal_kills = true
|
||||||
local portal_target = nether.buildings+1
|
local portal_target = nether.buildings+1
|
||||||
local damage_enabled = minetest.setting_getbool("enable_damage")
|
local damage_enabled = minetest.setting_getbool("enable_damage")
|
||||||
|
|
||||||
@ -58,7 +61,9 @@ local function player_to_nether(player, safe)
|
|||||||
save_nether_players()
|
save_nether_players()
|
||||||
if not safe then
|
if not safe then
|
||||||
minetest.chat_send_player(pname, "For any reason you arrived here. Type /nether_help to find out things like craft recipes.")
|
minetest.chat_send_player(pname, "For any reason you arrived here. Type /nether_help to find out things like craft recipes.")
|
||||||
player:set_hp(0)
|
if obsidian_portal_kills then
|
||||||
|
player:set_hp(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
update_background(player, true)
|
update_background(player, true)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user