diff --git a/locale/en/redmew_maps.cfg b/locale/en/redmew_maps.cfg index 39772729..b47cbcd4 100644 --- a/locale/en/redmew_maps.cfg +++ b/locale/en/redmew_maps.cfg @@ -177,5 +177,5 @@ biters_disabled=Launching the first [item=satellite] has killed all the biters. win=Congratulations! The map has been won. Restart the map with /restart satellite_launch=Launch another __1__ [item=satellite] to win the map. biters_disabled_k2=Launching the first [item=satellite] has killed all the biters. Build and activate the Intergalactic Transceiver to win the map. -biters_disabled_ei=Launching the first [item=satellite] has killed all the biters. Launch more satellites to the asteroids to unloch the final age. +biters_disabled_ei=Launching the first [item=satellite] has killed all the biters. Launch more Exploration Satellites to the asteroids to unlock the final age. biters_disabled_py=Launching the first [item=satellite] has killed all the biters. Research [technology-name=pyrrhic] to win the game. diff --git a/map_gen/maps/danger_ores/modules/rocket_launched_exotic_industries.lua b/map_gen/maps/danger_ores/modules/rocket_launched_exotic_industries.lua index b3c324bf..96b16244 100644 --- a/map_gen/maps/danger_ores/modules/rocket_launched_exotic_industries.lua +++ b/map_gen/maps/danger_ores/modules/rocket_launched_exotic_industries.lua @@ -6,7 +6,6 @@ local ShareGlobals = require 'map_gen.maps.danger_ores.modules.shared_globals' return function() ShareGlobals.data.biters_disabled = false ShareGlobals.data.map_won = false - ShareGlobals.data.show_reset_message = true local function disable_biters() if ShareGlobals.data.biters_disabled then @@ -21,7 +20,7 @@ return function() local message = table.concat { 'Launching the first satellite has killed all the biters. ', - 'Launch more satellites to the asteroids to unloch the final age' + 'Launch more Exploration Satellites to the asteroids to unlock the final age' } game.print({'danger_ores.biters_disabled_ei'}) Server.to_discord_bold(message) @@ -57,19 +56,17 @@ return function() return end + if not game.finished_but_continuing then + return + end + ShareGlobals.data.map_won = true local message = 'Congratulations! The map has been won. Restart the map with /restart' game.print({'danger_ores.win'}) Server.to_discord_bold(message) end - local function on_win_condition_met() - if ShareGlobals.show_reset_message and game.finished_but_continuing then - win() - end - end - - Event.on_nth_tick(60 * 17, on_win_condition_met) + Event.on_nth_tick(60 * 17, win) Event.add(defines.events.on_rocket_launched, rocket_launched) end