Fixed Odyssey subsystem processing even when there's no Odyssey scenario running (#20207)

Fixed Odyssey subsystem processing even when there's no Odyssey scenario
running
This commit is contained in:
Fluffy
2024-11-29 20:21:01 +00:00
committed by GitHub
parent bdb872865b
commit ce1707c9a0
2 changed files with 63 additions and 1 deletions
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(odyssey)
name = "Odyssey"
init_order = INIT_ORDER_ODYSSEY
runlevels = RUNLEVELS_PLAYING
can_fire = FALSE //We process only if we are running an odyssey scenario, this is set to TRUE by `pick_odyssey()`
/// The selected scenario singleton.
var/singleton/scenario/scenario
@@ -74,9 +75,12 @@ SUBSYSTEM_DEF(odyssey)
scenario = pickweight(possible_scenarios)
setup_scenario_variables()
// Now that we actually have an odyssey, the subsystem can fire!
var/list/possible_station_levels = SSmapping.levels_by_all_traits(list(ZTRAIT_STATION))
main_map = GLOB.map_sectors["[pick(possible_station_levels)]"]
// Now that we actually have an odyssey, the subsystem can fire!
can_fire = TRUE
return TRUE
/**