From c3e749d5146ab8f21149ec78ae1c739165e6b62d Mon Sep 17 00:00:00 2001 From: hanakocz Date: Mon, 11 Dec 2023 23:44:18 +0100 Subject: [PATCH] move restart order to not repeat same world selections --- maps/journey/functions.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/maps/journey/functions.lua b/maps/journey/functions.lua index 7d4d1fd5..f8bf6bbc 100644 --- a/maps/journey/functions.lua +++ b/maps/journey/functions.lua @@ -792,11 +792,7 @@ local function roll_bonus_goods(journey, trait, amount) end function Public.set_world_selectors(journey) - if journey.restart_from_scenario then - Public.restart_server(journey) - end local surface = game.surfaces.mothership - local x = Constants.reroll_selector_area.left_top.x + 3.2 journey.reroll_selector.texts = { rendering.draw_text{ @@ -979,7 +975,10 @@ function Public.set_world_selectors(journey) destroy_teleporter(journey, game.surfaces.nauvis, Constants.mothership_teleporter_position) destroy_teleporter(journey, surface, Constants.mothership_teleporter_position) - + if journey.restart_from_scenario then + Public.restart_server(journey) + end + Server.to_discord_embed('World ' .. journey.world_number + 1 .. ' selection has started!') Public.set_minimum_to_vote(journey) journey.importing = false