Fix set odyssey verb, add set odyssey canonicity verb. (#21687)

- The Set Odyssey Type verb now properly works, and can be used as soon
as the lobby starts.
 - Administrators can now manually change Odyssey canonicity.

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2026-01-03 20:28:14 +01:00
committed by GitHub
parent bec70fc624
commit 0829b0905e
5 changed files with 95 additions and 17 deletions
@@ -62,18 +62,20 @@ SUBSYSTEM_DEF(odyssey)
* If successful, makes the SS start firing.
*/
/datum/controller/subsystem/odyssey/proc/pick_odyssey()
var/list/singleton/scenario/all_scenarios = GET_SINGLETON_SUBTYPE_LIST(/singleton/scenario)
var/list/possible_scenarios = list()
for(var/singleton/scenario/S as anything in all_scenarios)
if((SSatlas.current_sector.name in S.sector_whitelist) || !length(S.sector_whitelist))
possible_scenarios[S] = S.weight
if(!scenario) //scenario can be forced with adminverb
var/list/singleton/scenario/all_scenarios = GET_SINGLETON_SUBTYPE_LIST(/singleton/scenario)
var/list/possible_scenarios = list()
for(var/singleton/scenario/S as anything in all_scenarios)
if((SSatlas.current_sector.name in S.sector_whitelist) || !length(S.sector_whitelist))
possible_scenarios[S] = S.weight
if(!length(possible_scenarios))
log_subsystem_odyssey("CRITICAL ERROR: No available odyssey for sector [SSatlas.current_sector.name]!")
log_and_message_admins(SPAN_DANGER(FONT_HUGE("CRITICAL ERROR: NO SITUATIONS ARE AVAILABLE FOR THIS SECTOR!")))
return FALSE
if(!length(possible_scenarios))
log_subsystem_odyssey("CRITICAL ERROR: No available odyssey for sector [SSatlas.current_sector.name]!")
log_and_message_admins(SPAN_DANGER(FONT_HUGE("CRITICAL ERROR: NO SITUATIONS ARE AVAILABLE FOR THIS SECTOR!")))
return FALSE
scenario = pickweight(possible_scenarios)
scenario = pickweight(possible_scenarios)
setup_scenario_variables()
var/list/possible_station_levels = SSmapping.levels_by_all_traits(list(ZTRAIT_STATION))
main_map = GLOB.map_sectors["[pick(possible_station_levels)]"]