mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +01:00
Adds Round Canonicity to the game, and makes Storytellers able to edit round canonicity. (#22775)
To clear up when a round is canon, what type of canonicity it is and what exactly it entails, canonicity information has been added to the game. Through the Canon Panel, players can now see what exactly the current round's rules on character deaths, antags, and character interactions are. Additionally, this lets developers actually know _when_ exactly a round is canon, which will be very useful for persistence. Storytellers and admins can change the canonicity of the round in the panel as well. Some examples: <img width="400" height="600" alt="image" src="https://github.com/user-attachments/assets/e71d2b18-0741-4bc0-aa98-979bb696d8a6" /> <img width="400" height="600" alt="image" src="https://github.com/user-attachments/assets/29486039-7625-4443-af2e-3ac982727e5c" /> <img width="400" height="600" alt="image" src="https://github.com/user-attachments/assets/7522f5f0-4d4e-4bae-906e-2b07067af3a5" /> --------- Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it> Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: Wowzewow (Wezzy) <42310821+alsoandanswer@users.noreply.github.com>
This commit is contained in:
co-authored by
Matt Atlas
Wowzewow
parent
92e4ea7f7d
commit
b5314566d5
@@ -79,6 +79,8 @@ SUBSYSTEM_DEF(odyssey)
|
||||
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)]"]
|
||||
if(!SSticker.round_canon_admin_forced)
|
||||
SSticker.set_round_canon(scenario.scenario_canonicity_type, TRUE)
|
||||
|
||||
// Now that we actually have an odyssey, the subsystem can fire!
|
||||
can_fire = TRUE
|
||||
@@ -95,13 +97,13 @@ SUBSYSTEM_DEF(odyssey)
|
||||
ody_gamemode.required_players = scenario.min_player_amount
|
||||
ody_gamemode.required_enemies = scenario.min_actor_amount
|
||||
|
||||
//Setting the scenario_type variable for use here in UI info and chat notices.
|
||||
if(!length(scenario.possible_scenario_types))
|
||||
scenario.scenario_type = SCENARIO_TYPE_NONCANON
|
||||
//Setting the scenario_canonicity_type variable for use here in UI info and chat notices.
|
||||
if(!length(scenario.possible_scenario_canonicity_types))
|
||||
scenario.scenario_canonicity_type = /singleton/canonicity/limited
|
||||
else if(SSatlas.current_sector in ALL_EVENT_ONLY_SECTORS) // If we are in an exclusive event area for an arc (EG. The Horizon finds itself isolated and alone), we may not want canon odysseys spawning.
|
||||
scenario.scenario_type = SCENARIO_TYPE_NONCANON // Noncanon odysseys are fine though!
|
||||
scenario.scenario_canonicity_type = /singleton/canonicity/limited // Noncanon odysseys are fine though!
|
||||
else
|
||||
scenario.scenario_type = pick(scenario.possible_scenario_types)
|
||||
scenario.scenario_canonicity_type = pick(scenario.possible_scenario_canonicity_types)
|
||||
|
||||
site_landing_restricted = scenario.site_landing_restricted
|
||||
|
||||
@@ -153,7 +155,7 @@ SUBSYSTEM_DEF(odyssey)
|
||||
if(scenario)
|
||||
data["scenario_name"] = SSodyssey.scenario.name
|
||||
data["scenario_desc"] = SSodyssey.scenario.desc
|
||||
data["scenario_canonicity"] = SSodyssey.scenario.scenario_type == SCENARIO_TYPE_CANON ? "Canon" : "Non-Canon"
|
||||
data["scenario_canonicity"] = SSticker.round_canon.name
|
||||
data["is_storyteller"] = isstoryteller(user) || check_rights(R_ADMIN, FALSE, user)
|
||||
|
||||
if(length(scenario.roles))
|
||||
|
||||
@@ -36,6 +36,14 @@ SUBSYSTEM_DEF(statpanels)
|
||||
"Last Transfer Vote: [GLOB.last_transfer_vote ? time2text(GLOB.last_transfer_vote, "hh:mm") : "Never"]",
|
||||
"Next Port Visit: [SSatlas.current_sector.next_port_visit_string]"
|
||||
)
|
||||
|
||||
if(istype(SSticker.round_canon))
|
||||
global_data[++global_data.len] = list(
|
||||
"Round Canon: ",
|
||||
"[SSticker.round_canon.name]",
|
||||
"src=[REF(src)];open_canon_panel=1"
|
||||
)
|
||||
|
||||
if(eta_status)
|
||||
global_data += eta_status
|
||||
|
||||
@@ -100,6 +108,10 @@ SUBSYSTEM_DEF(statpanels)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/statpanels/Topic(href, href_list)
|
||||
if(href_list["open_canon_panel"])
|
||||
SSticker.round_canon.ui_interact(usr)
|
||||
|
||||
/datum/controller/subsystem/statpanels/proc/set_status_tab(client/target)
|
||||
if(!global_data)//statbrowser hasnt fired yet and we were called from immediate_send_stat_data()
|
||||
var/list/preliminary_stats = list("The server is initializing...")
|
||||
|
||||
@@ -71,6 +71,11 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/total_players_ready = 0
|
||||
var/list/ready_player_jobs
|
||||
|
||||
/// The round canonicity. Set by either admins or by the gamemode.
|
||||
var/singleton/canonicity/round_canon
|
||||
/// Round canon forced by admins in the lobby; prevents gamemodes from overriding.
|
||||
var/round_canon_admin_forced = FALSE
|
||||
|
||||
/datum/controller/subsystem/ticker/Initialize(timeofday)
|
||||
pregame()
|
||||
restart_timeout = GLOB.config.restart_timeout
|
||||
@@ -808,6 +813,18 @@ SUBSYSTEM_DEF(ticker)
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/set_round_canon(canon_type, pre_game = FALSE, announce = FALSE)
|
||||
round_canon = GET_SINGLETON(canon_type)
|
||||
if(!istype(round_canon))
|
||||
round_canon = GET_SINGLETON(/singleton/canonicity/limited)
|
||||
|
||||
if(pre_game)
|
||||
round_canon.pre_game_setup()
|
||||
|
||||
if(announce)
|
||||
var/announcement = SPAN_NOTICE("The round canonicity has been set to [SPAN_DANGER(round_canon.name)].<br> For more information, press the [round_canon.name] button in your Status panel.")
|
||||
to_world(EXAMINE_BLOCK_ODYSSEY(FONT_LARGE(announcement)))
|
||||
|
||||
#undef SETUP_OK
|
||||
#undef SETUP_REVOTE
|
||||
#undef SETUP_REATTEMPT
|
||||
|
||||
Reference in New Issue
Block a user