From 5dd1bc07c60219d4da7a8e5d639e237d8536916a Mon Sep 17 00:00:00 2001 From: Lin Date: Sat, 21 Dec 2019 22:44:09 +0000 Subject: [PATCH] Ports "Added TRAIT_DISK_VERIFIER, refactors how fake disk checks work slightly --- code/__DEFINES/traits.dm | 1 + code/modules/antagonists/ert/ert.dm | 6 ++++++ code/modules/antagonists/nukeop/equipment/nuclearbomb.dm | 9 +++++---- code/modules/antagonists/nukeop/nukeop.dm | 3 ++- code/modules/jobs/job_types/captain.dm | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 944fe63e..91d7f5a8 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -119,6 +119,7 @@ #define TRAIT_PARALYSIS_R_ARM "para-r-arm" #define TRAIT_PARALYSIS_L_LEG "para-l-leg" #define TRAIT_PARALYSIS_R_LEG "para-r-leg" +#define TRAIT_DISK_VERIFIER "disk-verifier" #define TRAIT_UNINTELLIGIBLE_SPEECH "unintelligible-speech" #define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism" #define TRAIT_STRONG_GRABBER "strong_grabber" diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm index 8e2f791b..3ba0c1b5 100644 --- a/code/modules/antagonists/ert/ert.dm +++ b/code/modules/antagonists/ert/ert.dm @@ -34,6 +34,12 @@ . = ..() name_source = GLOB.commando_names +/datum/antagonist/ert/deathsquad/apply_innate_effects(mob/living/mob_override) + ADD_TRAIT(owner, TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT) + +/datum/antagonist/ert/deathsquad/remove_innate_effects(mob/living/mob_override) + REMOVE_TRAIT(owner, TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT) + /datum/antagonist/ert/security // kinda handled by the base template but here for completion /datum/antagonist/ert/security/red diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index 3c9807c5..391692cf 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -611,10 +611,7 @@ This is here to make the tiles around the station mininuke change when it's arme if(!fake) return - var/ghost = isobserver(user) - var/captain = user.mind && user.mind.assigned_role == "Captain" - var/nukie = user.mind && user.mind.has_antag_datum(/datum/antagonist/nukeop) - if(ghost || captain || nukie) + if(isobserver(user) || HAS_TRAIT(user, TRAIT_DISK_VERIFIER) || (user.mind && HAS_TRAIT(user.mind, TRAIT_DISK_VERIFIER))) . += "The serial numbers on [src] are incorrect." /obj/item/disk/nuclear/attackby(obj/item/I, mob/living/user, params) @@ -653,3 +650,7 @@ This is here to make the tiles around the station mininuke change when it's arme /obj/item/disk/nuclear/fake fake = TRUE + +/obj/item/disk/nuclear/fake/obvious + name = "cheap plastic imitation of the nuclear authentication disk" + desc = "How anyone could mistake this for the real thing is beyond you." diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm index 65986105..72007973 100644 --- a/code/modules/antagonists/nukeop/nukeop.dm +++ b/code/modules/antagonists/nukeop/nukeop.dm @@ -24,11 +24,13 @@ var/mob/living/M = mob_override || owner.current M.mirrorcanloadappearance = TRUE //Also gives them the option to use a mirror to load their custom character. Good luck if they use a plasma. update_synd_icons_added(M) + ADD_TRAIT(owner, TRAIT_DISK_VERIFIER, NUKEOP_TRAIT) /datum/antagonist/nukeop/remove_innate_effects(mob/living/mob_override) var/mob/living/M = mob_override || owner.current M.mirrorcanloadappearance = FALSE update_synd_icons_removed(M) + REMOVE_TRAIT(owner, TRAIT_DISK_VERIFIER, NUKEOP_TRAIT) /datum/antagonist/nukeop/proc/equip_op() if(!ishuman(owner.current)) @@ -42,7 +44,6 @@ owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0) to_chat(owner, "You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!") owner.announce_objectives() - return /datum/antagonist/nukeop/on_gain() give_alias() diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index 61e3b409..592c3640 100644 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -22,7 +22,7 @@ Captain access = list() //See get_access() minimal_access = list() //See get_access() - mind_traits = list(TRAIT_CAPTAIN_METABOLISM) + mind_traits = list(TRAIT_CAPTAIN_METABOLISM, TRAIT_DISK_VERIFIER) blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)