From 5174cb08a6b12643d0c863a08c2f4f4000680e30 Mon Sep 17 00:00:00 2001 From: Putnam Date: Fri, 27 Dec 2019 22:45:06 -0800 Subject: [PATCH] Made war ops always allowed on teamwork, chaotic --- code/__DEFINES/citadel_defines.dm | 3 ++- .../gamemodes/dynamic/dynamic_storytellers.dm | 2 ++ .../nukeop/equipment/nuclear_challenge.dm | 20 ++++++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 4ad6acb4e3..75f4de5abc 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -126,4 +126,5 @@ #define RANKED_CHOICE_VOTING 2 // Dynamic storyteller stuff (see above, move later) -#define NO_ASSASSIN (1<<0) +#define NO_ASSASSIN (1<<0) +#define WAROPS_ALWAYS_ALLOWED (1<<1) diff --git a/code/game/gamemodes/dynamic/dynamic_storytellers.dm b/code/game/gamemodes/dynamic/dynamic_storytellers.dm index 7d6181fc7f..8fadb741c1 100644 --- a/code/game/gamemodes/dynamic/dynamic_storytellers.dm +++ b/code/game/gamemodes/dynamic/dynamic_storytellers.dm @@ -158,6 +158,7 @@ Property weights are: desc = "Chaos: high. Variation: high. Likely antags: clock cult, revs, wizard." property_weights = list("extended" = -1, "chaos" = 10) weight = 2 + flags = WAROPS_ALWAYS_ALLOWED var/refund_cooldown /datum/dynamic_storyteller/cowabunga/get_midround_cooldown() @@ -178,6 +179,7 @@ Property weights are: curve_centre = 2 curve_width = 1.5 weight = 2 + flags = WAROPS_ALWAYS_ALLOWED property_weights = list("valid" = 3, "trust" = 5) /datum/dynamic_storyteller/team/get_injection_chance() diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm index 0a223f8b10..b5ce5538e9 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm @@ -76,9 +76,10 @@ GLOBAL_VAR_INIT(war_declared, FALSE) CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY)) if(istype(SSticker.mode, /datum/game_mode/dynamic)) var/datum/game_mode/dynamic/mode = SSticker.mode - var/threat_spent = CONFIG_GET(number/dynamic_warops_cost) - mode.spend_threat(threat_spent) - mode.log_threat("Nuke ops spent [threat_spent] on war ops.") + if(!(mode.storyteller.flags & WAROPS_ALWAYS_ALLOWED)) + var/threat_spent = CONFIG_GET(number/dynamic_warops_cost) + mode.spend_threat(threat_spent) + mode.log_threat("Nuke ops spent [threat_spent] on war ops.") SSblackbox.record_feedback("amount", "nuclear_challenge_mode", 1) qdel(src) @@ -101,12 +102,13 @@ GLOBAL_VAR_INIT(war_declared, FALSE) return FALSE if(istype(SSticker.mode, /datum/game_mode/dynamic)) var/datum/game_mode/dynamic/mode = SSticker.mode - if(mode.threat_level < CONFIG_GET(number/dynamic_warops_requirement)) - to_chat(user, "Due to the dynamic space in which the station resides, you are too deep into Nanotrasen territory to reasonably go loud.") - return FALSE - else if(mode.threat < CONFIG_GET(number/dynamic_warops_cost)) - to_chat(user, "Due to recent threats on the station, Nanotrasen is looking too closely for a war declaration to be wise.") - return FALSE + if(!(mode.storyteller.flags & WAROPS_ALWAYS_ALLOWED)) + if(mode.threat_level < CONFIG_GET(number/dynamic_warops_requirement)) + to_chat(user, "Due to the dynamic space in which the station resides, you are too deep into Nanotrasen territory to reasonably go loud.") + return FALSE + else if(mode.threat < CONFIG_GET(number/dynamic_warops_cost)) + to_chat(user, "Due to recent threats on the station, Nanotrasen is looking too closely for a war declaration to be wise.") + return FALSE return TRUE /obj/item/nuclear_challenge/clownops