From dbb6eb57bab2ca749a1e4f7091053468d8cd1bcf Mon Sep 17 00:00:00 2001 From: Molti Date: Sun, 15 Dec 2024 18:34:29 -0600 Subject: [PATCH 1/5] Update gamemode_subsystem.dm --- .../storytellers/gamemode_subsystem.dm | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/yogstation/code/modules/storytellers/gamemode_subsystem.dm b/yogstation/code/modules/storytellers/gamemode_subsystem.dm index b0b106c574e5..bbf956c3c736 100644 --- a/yogstation/code/modules/storytellers/gamemode_subsystem.dm +++ b/yogstation/code/modules/storytellers/gamemode_subsystem.dm @@ -594,12 +594,45 @@ SUBSYSTEM_DEF(gamemode) ) query_round_game_mode.Execute() qdel(query_round_game_mode) + if(report) + addtimer(CALLBACK(src, PROC_REF(send_intercept), 0), rand(600, 1800)) generate_station_goals() handle_post_setup_roundstart_events() handle_post_setup_points() roundstart_event_view = FALSE return TRUE +/datum/controller/subsystem/gamemode/proc/send_intercept() + var/intercepttext = "Central Command Status Summary
" + intercepttext += "Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \ + likely threats to appear in your sector." + var/list/report_weights = config.mode_false_report_weight.Copy() + report_weights[report_type] = 0 //Prevent the current mode from being falsely selected. + var/list/reports = list() + var/Count = 0 //To compensate for missing correct report + if(prob(65)) // 65% chance the actual mode will appear on the list + reports += config.mode_reports[report_type] + Count++ + for(var/i in Count to rand(3,5)) //Between three and five wrong entries on the list. + var/false_report_type = pickweightAllowZero(report_weights) + report_weights[false_report_type] = 0 //Make it so the same false report won't be selected twice + reports += config.mode_reports[false_report_type] + + reports = shuffle(reports) //Randomize the order, so the real one is at a random position. + + for(var/report in reports) + intercepttext += "
" + intercepttext += report + + intercepttext += generate_station_goal_report() + + if(CONFIG_GET(flag/auto_blue_alert)) + print_command_report(intercepttext, "Central Command Status Summary", announce=FALSE) + 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) + if(SSsecurity_level.get_current_level_as_number() < SEC_LEVEL_BLUE) + SSsecurity_level.set_level(SEC_LEVEL_BLUE) + else + print_command_report(intercepttext, "Central Command Status Summary") ///Handles late-join antag assignments /datum/controller/subsystem/gamemode/proc/make_antag_chance(mob/living/carbon/human/character) From 167ce44173cc0af39a208c3af570d2d7afd93509 Mon Sep 17 00:00:00 2001 From: Molti Date: Sun, 15 Dec 2024 18:34:37 -0600 Subject: [PATCH 2/5] Update gamemode_subsystem.dm --- yogstation/code/modules/storytellers/gamemode_subsystem.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/modules/storytellers/gamemode_subsystem.dm b/yogstation/code/modules/storytellers/gamemode_subsystem.dm index bbf956c3c736..7cf36c38b0b5 100644 --- a/yogstation/code/modules/storytellers/gamemode_subsystem.dm +++ b/yogstation/code/modules/storytellers/gamemode_subsystem.dm @@ -607,7 +607,7 @@ SUBSYSTEM_DEF(gamemode) intercepttext += "Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \ likely threats to appear in your sector." var/list/report_weights = config.mode_false_report_weight.Copy() - report_weights[report_type] = 0 //Prevent the current mode from being falsely selected. + report_weights["invalid"] = 0 //Prevent the current mode from being falsely selected. var/list/reports = list() var/Count = 0 //To compensate for missing correct report if(prob(65)) // 65% chance the actual mode will appear on the list From 112ce947954cee1b83a0027eb162296b7e50cef4 Mon Sep 17 00:00:00 2001 From: Molti Date: Sun, 15 Dec 2024 18:39:39 -0600 Subject: [PATCH 3/5] Update gamemode_subsystem.dm --- .../storytellers/gamemode_subsystem.dm | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/yogstation/code/modules/storytellers/gamemode_subsystem.dm b/yogstation/code/modules/storytellers/gamemode_subsystem.dm index 7cf36c38b0b5..367173e14bed 100644 --- a/yogstation/code/modules/storytellers/gamemode_subsystem.dm +++ b/yogstation/code/modules/storytellers/gamemode_subsystem.dm @@ -604,26 +604,7 @@ SUBSYSTEM_DEF(gamemode) /datum/controller/subsystem/gamemode/proc/send_intercept() var/intercepttext = "Central Command Status Summary
" - intercepttext += "Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \ - likely threats to appear in your sector." - var/list/report_weights = config.mode_false_report_weight.Copy() - report_weights["invalid"] = 0 //Prevent the current mode from being falsely selected. - var/list/reports = list() - var/Count = 0 //To compensate for missing correct report - if(prob(65)) // 65% chance the actual mode will appear on the list - reports += config.mode_reports[report_type] - Count++ - for(var/i in Count to rand(3,5)) //Between three and five wrong entries on the list. - var/false_report_type = pickweightAllowZero(report_weights) - report_weights[false_report_type] = 0 //Make it so the same false report won't be selected twice - reports += config.mode_reports[false_report_type] - - reports = shuffle(reports) //Randomize the order, so the real one is at a random position. - - for(var/report in reports) - intercepttext += "
" - intercepttext += report - + intercepttext += "Central Command has intercepted and is attempting to decode a Syndicate transmission with vital information regarding their movements in this station's sector." intercepttext += generate_station_goal_report() if(CONFIG_GET(flag/auto_blue_alert)) From 057ea162a5bb2dbb4752f590c4450ccb55154c7c Mon Sep 17 00:00:00 2001 From: Molti Date: Sun, 15 Dec 2024 18:40:47 -0600 Subject: [PATCH 4/5] Update gamemode_subsystem.dm --- yogstation/code/modules/storytellers/gamemode_subsystem.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/modules/storytellers/gamemode_subsystem.dm b/yogstation/code/modules/storytellers/gamemode_subsystem.dm index 367173e14bed..7a286d2f062e 100644 --- a/yogstation/code/modules/storytellers/gamemode_subsystem.dm +++ b/yogstation/code/modules/storytellers/gamemode_subsystem.dm @@ -609,7 +609,7 @@ SUBSYSTEM_DEF(gamemode) if(CONFIG_GET(flag/auto_blue_alert)) print_command_report(intercepttext, "Central Command Status Summary", announce=FALSE) - 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) + priority_announce("A summary has been copied and printed to all communications consoles.\n\n[generate_station_trait_report()]", "Enemy communication intercepted. Security level elevated.", ANNOUNCER_INTERCEPT) if(SSsecurity_level.get_current_level_as_number() < SEC_LEVEL_BLUE) SSsecurity_level.set_level(SEC_LEVEL_BLUE) else From 51145d85b500ff76e3c5095de1b5dff90c1ba463 Mon Sep 17 00:00:00 2001 From: Molti Date: Sun, 15 Dec 2024 18:45:04 -0600 Subject: [PATCH 5/5] Update gamemode_subsystem.dm --- yogstation/code/modules/storytellers/gamemode_subsystem.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/modules/storytellers/gamemode_subsystem.dm b/yogstation/code/modules/storytellers/gamemode_subsystem.dm index 7a286d2f062e..4948de208786 100644 --- a/yogstation/code/modules/storytellers/gamemode_subsystem.dm +++ b/yogstation/code/modules/storytellers/gamemode_subsystem.dm @@ -595,7 +595,7 @@ SUBSYSTEM_DEF(gamemode) query_round_game_mode.Execute() qdel(query_round_game_mode) if(report) - addtimer(CALLBACK(src, PROC_REF(send_intercept), 0), rand(600, 1800)) + addtimer(CALLBACK(src, PROC_REF(send_intercept)), rand(600, 1800)) generate_station_goals() handle_post_setup_roundstart_events() handle_post_setup_points()