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 19:28:14 +00:00
committed by GitHub
co-authored by Matt Atlas
parent bec70fc624
commit 0829b0905e
5 changed files with 95 additions and 17 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ on:
env:
MACRO_COUNT: 0
GENDER_COUNT: 6
TO_WORLD_COUNT: 178
TO_WORLD_COUNT: 179
#These variables are filled from dependencies.sh inside the steps, DO NOT SET THEM HERE
BYOND_MAJOR: ""
@@ -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)]"]
+20 -5
View File
@@ -1403,10 +1403,6 @@ var/global/enabled_spooking = 0
if(!check_rights(R_ADMIN))
return
if(!SSticker.mode || !istype(SSticker.mode, /datum/game_mode/odyssey))
to_chat(usr, SPAN_WARNING("The gamemode either does not exist, or is not Odyssey."))
return
if(SSticker.current_state != GAME_STATE_SETTING_UP)
to_chat(usr, SPAN_WARNING("You need to use this verb while the game is still setting up!"))
return
@@ -1429,5 +1425,24 @@ var/global/enabled_spooking = 0
SSodyssey.scenario = chosen_scenario
log_and_message_admins("has manually set the Odyssey to [chosen_scenario.name]", usr)
feedback_add_details("admin_verb","SEST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","SEOT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/set_odyssey_canonicity()
set name = "Set Odyssey Canonicity"
set category = "Special Verbs"
if(!check_rights(R_ADMIN))
return
if(!SSodyssey.scenario)
to_chat(usr, SPAN_WARNING("There needs to be an Odyssey selected first! Use the Set Odyssey Type verb."))
return
var/canonicity = tgui_input_list(usr, "Set the Odyssey canonicity.", "Set Odyssey Canonicity", list(SCENARIO_TYPE_CANON, SCENARIO_TYPE_NONCANON))
if(!canonicity)
return
SSodyssey.scenario.scenario_type = canonicity
to_world(FONT_LARGE(EXAMINE_BLOCK_ODYSSEY(SPAN_NOTICE("The scenario canonicity has been changed to [SPAN_BOLD(canonicity)] by an administrator."))))
log_and_message_admins("has set the Odyssey canonicity to [canonicity]", usr)
feedback_add_details("admin_verb","SEOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+3 -1
View File
@@ -145,7 +145,8 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
/client/proc/fab_tip,
/client/proc/apply_sunstate,
/datum/admins/proc/ccannoucment,
/datum/admins/proc/set_odyssey
/datum/admins/proc/set_odyssey,
/datum/admins/proc/set_odyssey_canonicity
))
GLOBAL_LIST_INIT(admin_verbs_spawn, list(
@@ -408,6 +409,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/cmd_display_harddel_log,
/datum/admins/proc/ccannoucment,
/datum/admins/proc/set_odyssey,
/datum/admins/proc/set_odyssey_canonicity,
/client/proc/cmd_display_init_log,
/client/proc/cmd_generate_lag,
/client/proc/getruntimelog,
@@ -0,0 +1,59 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: MattAtlas
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "The Set Odyssey Type verb now properly works, and can be used as soon as the lobby starts."
- rscadd: "Administrators can now manually change Odyssey canonicity."