mirror of
				https://github.com/HybridDog/nether-pack.git
				synced 2025-11-04 12:55:34 +01:00 
			
		
		
		
	allow disabling killing of people using the simple portal
This commit is contained in:
		@@ -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,8 +61,10 @@ 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.")
 | 
				
			||||||
 | 
							if obsidian_portal_kills then
 | 
				
			||||||
			player:set_hp(0)
 | 
								player:set_hp(0)
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
	update_background(player, true)
 | 
						update_background(player, true)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user