From dd6c156ac653a988c1e68da1a0ca5b48942dc066 Mon Sep 17 00:00:00 2001 From: IonicCheese Date: Thu, 19 Feb 2026 13:38:38 -0800 Subject: [PATCH 1/2] Update mods/game/functions/init.lua Co-authored-by: CrazyladMT <247920740+CrazyladMT@users.noreply.github.com> --- mods/game/functions/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/game/functions/init.lua b/mods/game/functions/init.lua index 446fee8..b9115d2 100644 --- a/mods/game/functions/init.lua +++ b/mods/game/functions/init.lua @@ -132,7 +132,7 @@ function start_match(map) -- Start the match place_map(map or "forest") -- default to forest if no map is specified - if map_data == nil then + if not map_data then return "nope :(" end From 2061af0645913f6daa9a35c7c71e695860978cc4 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Thu, 19 Feb 2026 18:39:24 -0400 Subject: [PATCH 2/2] Fix a crash and use nil instead of a string in certain places --- mods/game/chatcommands/init.lua | 2 +- mods/game/functions/init.lua | 6 +++--- mods/game/maps/init.lua | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/game/chatcommands/init.lua b/mods/game/chatcommands/init.lua index 3dfd1d0..5286ec7 100644 --- a/mods/game/chatcommands/init.lua +++ b/mods/game/chatcommands/init.lua @@ -15,7 +15,7 @@ core.register_chatcommand("start", { local sucess = start_match(param) - if map_data == "nope :(" then + if not map_data then return false, "-!- Map not found!" end diff --git a/mods/game/functions/init.lua b/mods/game/functions/init.lua index 793cf6b..1e255c3 100644 --- a/mods/game/functions/init.lua +++ b/mods/game/functions/init.lua @@ -117,8 +117,8 @@ function start_match(map) -- Start the match map_data = place_map(map or "forest") -- default to forest if no map is specified - if map_data == "nope :(" then - return map_data + if not map_data then + return nil end set_match_state("pre_match") @@ -191,7 +191,7 @@ function end_match() -- End the match set_match_state("not_started") for _, player in pairs(core.get_connected_players()) do - player:set_pos -- name kept for backwards compat(spawn_pos) + player:set_pos(spawn_pos) player:get_inventory():set_list("main", {}) player:set_inventory_formspec([[ diff --git a/mods/game/maps/init.lua b/mods/game/maps/init.lua index b908757..8ad4878 100644 --- a/mods/game/maps/init.lua +++ b/mods/game/maps/init.lua @@ -7,7 +7,7 @@ function place_map(map) if map_list[i] == map then break elseif i == #map_list then - return "nope :(" + return nil end end