From 88978209faad915fa16581c6734673ccf05f83a2 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 19 Dec 2019 16:42:25 +0100
Subject: [PATCH 1/2] Ports "Added TRAIT_DISK_VERIFIER, refactors how fake disk
checks work slightly"
---
code/__DEFINES/traits.dm | 3 +++
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 | 3 +--
5 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index d17db07b50..428d569531 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -118,6 +118,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_SOOTHED_THROAT "soothed-throat"
#define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism"
@@ -227,3 +228,5 @@
#define SLEEPING_CARP_TRAIT "sleeping_carp"
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
#define MADE_UNCLONEABLE "made-uncloneable"
+#define NUKEOP_TRAIT "nuke-op"
+#define DEATHSQUAD_TRAIT "deathsquad"
diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm
index 5968c7643a..a470316ce2 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)
+ owner.add_trait(TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
+
+/datum/antagonist/ert/deathsquad/remove_innate_effects(mob/living/mob_override)
+ owner.remove_trait(TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
+
/datum/antagonist/ert/security // kinda handled by the base template but here for completion
/datum/antagonist/ert/security/amber
diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm
index 8021ee5f08..e1c50a7cf5 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 4604439fc8..d343951d53 100644
--- a/code/modules/antagonists/nukeop/nukeop.dm
+++ b/code/modules/antagonists/nukeop/nukeop.dm
@@ -23,10 +23,12 @@
/datum/antagonist/nukeop/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
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
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 c6342e2154..40bfa0bbfa 100644
--- a/code/modules/jobs/job_types/captain.dm
+++ b/code/modules/jobs/job_types/captain.dm
@@ -20,8 +20,7 @@
access = list() //See get_access()
minimal_access = list() //See get_access()
- mind_traits = list(TRAIT_CAPTAIN_METABOLISM)
-// mind_traits = list(TRAIT_DISK_VERIFIER)
+ mind_traits = list(TRAIT_CAPTAIN_METABOLISM, TRAIT_DISK_VERIFIER)
display_order = JOB_DISPLAY_ORDER_CAPTAIN
From f1154bf840f9ec9b3819c273e5e8fb12823089ac Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 19 Dec 2019 16:45:08 +0100
Subject: [PATCH 2/2] wew
---
code/modules/antagonists/ert/ert.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm
index a470316ce2..0fb41cabc8 100644
--- a/code/modules/antagonists/ert/ert.dm
+++ b/code/modules/antagonists/ert/ert.dm
@@ -35,10 +35,10 @@
name_source = GLOB.commando_names
/datum/antagonist/ert/deathsquad/apply_innate_effects(mob/living/mob_override)
- owner.add_trait(TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
+ ADD_TRAIT(owner, TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
/datum/antagonist/ert/deathsquad/remove_innate_effects(mob/living/mob_override)
- owner.remove_trait(TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
+ REMOVE_TRAIT(owner, TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
/datum/antagonist/ert/security // kinda handled by the base template but here for completion