Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit dbb6eb5

Browse files
committed
Update gamemode_subsystem.dm
1 parent 5aacf30 commit dbb6eb5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

yogstation/code/modules/storytellers/gamemode_subsystem.dm

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,12 +594,45 @@ SUBSYSTEM_DEF(gamemode)
594594
)
595595
query_round_game_mode.Execute()
596596
qdel(query_round_game_mode)
597+
if(report)
598+
addtimer(CALLBACK(src, PROC_REF(send_intercept), 0), rand(600, 1800))
597599
generate_station_goals()
598600
handle_post_setup_roundstart_events()
599601
handle_post_setup_points()
600602
roundstart_event_view = FALSE
601603
return TRUE
602604

605+
/datum/controller/subsystem/gamemode/proc/send_intercept()
606+
var/intercepttext = "<b><i>Central Command Status Summary</i></b><hr>"
607+
intercepttext += "<b>Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \
608+
likely threats to appear in your sector.</b>"
609+
var/list/report_weights = config.mode_false_report_weight.Copy()
610+
report_weights[report_type] = 0 //Prevent the current mode from being falsely selected.
611+
var/list/reports = list()
612+
var/Count = 0 //To compensate for missing correct report
613+
if(prob(65)) // 65% chance the actual mode will appear on the list
614+
reports += config.mode_reports[report_type]
615+
Count++
616+
for(var/i in Count to rand(3,5)) //Between three and five wrong entries on the list.
617+
var/false_report_type = pickweightAllowZero(report_weights)
618+
report_weights[false_report_type] = 0 //Make it so the same false report won't be selected twice
619+
reports += config.mode_reports[false_report_type]
620+
621+
reports = shuffle(reports) //Randomize the order, so the real one is at a random position.
622+
623+
for(var/report in reports)
624+
intercepttext += "<hr>"
625+
intercepttext += report
626+
627+
intercepttext += generate_station_goal_report()
628+
629+
if(CONFIG_GET(flag/auto_blue_alert))
630+
print_command_report(intercepttext, "Central Command Status Summary", announce=FALSE)
631+
priority_announce("A summary has been copied and printed to all communications consoles.\n\n[generate_station_trait_announcement()]", "Enemy communication intercepted. Security level elevated.", ANNOUNCER_INTERCEPT)
632+
if(SSsecurity_level.get_current_level_as_number() < SEC_LEVEL_BLUE)
633+
SSsecurity_level.set_level(SEC_LEVEL_BLUE)
634+
else
635+
print_command_report(intercepttext, "Central Command Status Summary")
603636

604637
///Handles late-join antag assignments
605638
/datum/controller/subsystem/gamemode/proc/make_antag_chance(mob/living/carbon/human/character)

0 commit comments

Comments
 (0)