mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
Fix DO+EI restart conditions (#1390)
* Fix DO+EI restart conditions * DOEI remove redundant condition
This commit is contained in:
parent
6b0cbf94a3
commit
91596c06bd
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user