Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Combine roundstart intercept and security level announcements #1234

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions code/controllers/subsystem/security_level.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ SUBSYSTEM_DEF(security_level)
*
* Arguments:
* * new_level - The new security level that will become our current level
* * announce - Play the announcement, set FALSE if you're doing your own custom announcement to prevent duplicates
*/
/datum/controller/subsystem/security_level/proc/set_level(new_level)
/datum/controller/subsystem/security_level/proc/set_level(new_level, announce = TRUE)
new_level = istext(new_level) ? new_level : number_level_to_text(new_level)
if(new_level == current_security_level.name) // If we are already at the desired level, do nothing
return
Expand All @@ -42,7 +43,8 @@ SUBSYSTEM_DEF(security_level)
if(SSnightshift.can_fire && (selected_level.number_level >= SEC_LEVEL_RED || current_security_level.number_level >= SEC_LEVEL_RED))
SSnightshift.next_fire = world.time + 7 SECONDS // Fire nightshift after the security level announcement is complete

level_announce(selected_level, current_security_level.number_level) // We want to announce BEFORE updating to the new level
if(announce)
level_announce(selected_level, current_security_level.number_level) // We want to announce BEFORE updating to the new level

SSsecurity_level.current_security_level = selected_level

Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/dynamic/dynamic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,11 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets)

print_command_report(., "[command_name()] Status Summary", announce=FALSE)
if(greenshift)
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no credible threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", SSstation.announcer.get_rand_report_sound())
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no credible threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", SSstation.announcer.get_rand_report_sound(), color_override = "green")
else
priority_announce("A summary has been copied and printed to all communications consoles.", "Security level elevated.", ANNOUNCER_INTERCEPT)
if(SSsecurity_level.get_current_level_as_number() < SEC_LEVEL_BLUE)
SSsecurity_level.set_level(SEC_LEVEL_BLUE)
SSsecurity_level.set_level(SEC_LEVEL_BLUE, announce = FALSE)
priority_announce("[SSsecurity_level.current_security_level.elevating_to_announcement]\n\nA summary has been copied and printed to all communications consoles.", "Security level elevated.", ANNOUNCER_INTERCEPT, color_override = SSsecurity_level.current_security_level.announcement_color)

/// Generate the advisory level depending on the shown threat level.
/datum/game_mode/dynamic/proc/generate_advisory_level()
Expand Down
Loading