From d4fa53d9cab17deabfcbea90f2b4bed5888e78ab Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Mon, 21 Nov 2016 22:23:27 -0500 Subject: [PATCH] Fixes clockcult round end stats showing up when they shouldn't (#21658) * round end code is magic * br --- code/__DEFINES/misc.dm | 5 ++- code/controllers/subsystem/ticker.dm | 6 ++++ code/game/gamemodes/clock_cult/clock_cult.dm | 34 +++++++++++--------- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index a121b12e5f9..e057b3a93b1 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -581,4 +581,7 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define REVS_WIN 17 #define REVS_LOSE 18 #define WIZARD_KILLED 19 -#define STATION_NUKED 20 \ No newline at end of file +#define STATION_NUKED 20 +#define CLOCK_SUMMON 21 +#define CLOCK_SILICONS 22 +#define CLOCK_PROSELYTIZATION 23 diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 95b26b7f4fa..3e69feca0bc 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -628,6 +628,12 @@ var/datum/subsystem/ticker/ticker news_message = "Tensions have flared with the Wizard's Federation following the death of one of their members aboard [station_name()]." if(STATION_NUKED) news_message = "[station_name()] activated its self destruct device for unknown reasons. Attempts to clone the Captain so he can be arrested and executed are under way." + if(CLOCK_SUMMON) + news_message = "The garbled messages about hailing a mouse and strange energy readings from [station_name()] have been discovered to be an ill-advised, if thorough, prank by a clown." + if(CLOCK_SILICONS) + news_message = "The project started by [station_name()] to upgrade their silicon units with advanced equipment have been largely successful, though they have thus far refused to release schematics in a violation of company policy." + if(CLOCK_PROSELYTIZATION) + news_message = "The burst of energy released near [station_name()] has been confirmed as merely a test of a new weapon. However, due to an unexpected mechanical error, their communications system has been knocked offline." if(news_message) send2otherserver(news_source, news_message,"News_Report") \ No newline at end of file diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 677898f02f9..95f48780daa 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -201,26 +201,28 @@ Credit where due: surviving_servants++ clockwork_explanation = "Ensure that [required_escapees] servant(s) of Ratvar escape from [station_name()].
[surviving_servants] managed to escape!" if(surviving_servants >= required_escapees) + ticker.news_report = CULT_ESCAPE return TRUE - return FALSE if(CLOCKCULT_SILICONS) var/total_silicons = 0 var/valid_silicons = 0 - var/successful = FALSE for(var/mob/living/silicon/S in mob_list) //Only check robots and AIs if(isAI(S) || iscyborg(S)) total_silicons++ if(is_servant_of_ratvar(S) || S.stat == DEAD) valid_silicons++ + clockwork_explanation = "Ensure that all active silicon-based lifeforms on [station_name()] are servants of Ratvar and Application scripture is unlocked.
\ + [valid_silicons]/[total_silicons] silicons were killed or converted!" var/list/scripture_states = scripture_unlock_check() if(valid_silicons >= total_silicons && scripture_states[SCRIPTURE_APPLICATION]) - successful = TRUE - clockwork_explanation = "Ensure that all active silicon-based lifeforms on [station_name()] are servants of Ratvar and Application scripture is unlocked.
\ - [valid_silicons]/[total_silicons] silicons were killed or converted!
" - return successful + ticker.news_report = CLOCK_SILICONS + return TRUE if(CLOCKCULT_GATEWAY) - return ratvar_awakens - return FALSE //This shouldn't ever be reached, but just in case it is + if(ratvar_awakens) + ticker.news_report = CLOCK_SUMMON + return TRUE + ticker.news_report = CULT_FAILURE + return FALSE /datum/game_mode/clockwork_cult/declare_completion() ..() @@ -245,13 +247,15 @@ Credit where due: else text += "Ratvar's servants have failed!" feedback_set_details("round_end_result", "loss - servants failed their objective ([clockwork_objective])") - text += "
The servants' objective was:
[clockwork_explanation]
" - text += "
Ratvar's servants had [clockwork_caches] Tinkerer's Caches." - text += "
Construction Value(CV) was: [clockwork_construction_value]" - var/list/scripture_states = scripture_unlock_check() - for(var/i in scripture_states) - if(i != SCRIPTURE_DRIVER) - text += "
[i] scripture was: [scripture_states[i] ? "UN":""]LOCKED" + if(clockwork_gateway_activated && clockwork_objective != CLOCKCULT_GATEWAY) + ticker.news_report = CLOCK_PROSELYTIZATION + text += "
The servants' objective was:
[clockwork_explanation]" + text += "
Ratvar's servants had [clockwork_caches] Tinkerer's Caches." + text += "
Construction Value(CV) was: [clockwork_construction_value]" + var/list/scripture_states = scripture_unlock_check() + for(var/i in scripture_states) + if(i != SCRIPTURE_DRIVER) + text += "
[i] scripture was: [scripture_states[i] ? "UN":""]LOCKED" if(servants_of_ratvar.len) text += "
Ratvar's servants were:" for(var/datum/mind/M in servants_of_ratvar)