mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-30 23:15:32 +01:00 
			
		
		
		
	Abort if static_spawnpoint is an invalid setting instead of just giving an error log
This commit is contained in:
		| @@ -1,15 +1,13 @@ | |||||||
| -- Minetest: builtin/static_spawn.lua | -- Minetest: builtin/static_spawn.lua | ||||||
|  |  | ||||||
| local function warn_invalid_static_spawnpoint() | local static_spawnpoint_string = core.settings:get("static_spawnpoint") | ||||||
| 	if core.settings:get("static_spawnpoint") and | if static_spawnpoint_string and | ||||||
| 			not core.setting_get_pos("static_spawnpoint") then | 		static_spawnpoint_string ~= "" and | ||||||
| 		core.log("error", "The static_spawnpoint setting is invalid: \"".. | 		not core.setting_get_pos("static_spawnpoint") then | ||||||
| 				core.settings:get("static_spawnpoint").."\"") | 	error('The static_spawnpoint setting is invalid: "' .. | ||||||
| 	end | 			static_spawnpoint_string .. '"') | ||||||
| end | end | ||||||
|  |  | ||||||
| warn_invalid_static_spawnpoint() |  | ||||||
|  |  | ||||||
| local function put_player_in_spawn(player_obj) | local function put_player_in_spawn(player_obj) | ||||||
| 	local static_spawnpoint = core.setting_get_pos("static_spawnpoint") | 	local static_spawnpoint = core.setting_get_pos("static_spawnpoint") | ||||||
| 	if not static_spawnpoint then | 	if not static_spawnpoint then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user