From 4252ef606d1eb40fa14d3ad56712e4c2fbe8a6fb Mon Sep 17 00:00:00 2001 From: Putnam Date: Sun, 27 Sep 2020 15:28:24 -0700 Subject: [PATCH] Added policy config for sentient pyro slimes (no actual policy) --- code/__DEFINES/configuration.dm | 2 ++ code/game/objects/effects/anomalies.dm | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/configuration.dm b/code/__DEFINES/configuration.dm index e9881677ba..20c1df2ec7 100644 --- a/code/__DEFINES/configuration.dm +++ b/code/__DEFINES/configuration.dm @@ -18,3 +18,5 @@ #define POLICYCONFIG_ON_DEFIB_INTACT "ON_DEFIB_INTACT" /// Displayed to defibbed/revival surgery'd patients after the memory loss time threshold #define POLICYCONFIG_ON_DEFIB_LATE "ON_DEFIB_LATE" +/// Displayed to pyroclastic slimes on spawn +#define POLICYCONFIG_ON_PYROCLASTIC_SENTIENT "PYROCLASTIC_SLIME" diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 7e3a5205de..9d6d034364 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -291,7 +291,19 @@ S.rabid = TRUE S.amount_grown = SLIME_EVOLUTION_THRESHOLD S.Evolve() - offer_control(S,POLL_IGNORE_SENTIENCE_POTION) + var/list/candidates = pollCandidatesForMob("Do you want to play as a pyroclastic anomaly slime?",ROLE_SENTIENCE,null,ROLE_SENTIENCE,100,S,POLL_IGNORE_SENTIENCE_POTION) + if(length(candidates)) + var/mob/C = pick(candidates) + message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(S)])") + C.transfer_ckey(S, FALSE) + var/list/policies = CONFIG_GET(keyed_list/policyconfig) + var/policy = policies[POLICYCONFIG_ON_PYROCLASTIC_SENTIENT] + if(policy) + to_chat(S,policy) + return TRUE + else + message_admins("No ghosts were willing to take control of [ADMIN_LOOKUPFLW(S)])") + return FALSE /////////////////////