From 31842995875d4d4b0c2a660f0fc4319190cf6de3 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:46:15 -0400 Subject: [PATCH] emp'd wire interface implants no longer hard stun (#29870) * emp'd wire interface implants no longer hard stun * Update code/datums/wires/wires.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> --- code/__HELPERS/trait_helpers.dm | 1 + code/_globalvars/traits.dm | 1 + code/datums/wires/wires.dm | 13 +++++++++++-- code/modules/surgery/organs/augments_internal.dm | 7 +++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index fe91339b0c5..add506a6415 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -259,6 +259,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_UNKNOWN "unknown" // The person with this trait always appears as 'unknown'. #define TRAIT_CRYO_DESPAWNING "cryo_despawning" // dont adminbus this please #define TRAIT_EXAMINE_HALLUCINATING "examine_hallucinating" +#define TRAIT_WIRE_BLIND "wire_blind" // This doesn't block someone from seeing wires or recalling their position, but randomizes name / function to the user /// Whether or not the user is in a MODlink call, prevents making more calls #define TRAIT_IN_CALL "in_call" diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index f66faea1536..4dd7f20bbe5 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -118,6 +118,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_SUBTREE_REQUIRED_OPERATIONAL_DATUM" = TRAIT_SUBTREE_REQUIRED_OPERATIONAL_DATUM, "TRAIT_RELAYING_ATTACKER" = TRAIT_RELAYING_ATTACKER, "TRAIT_LOUD" = TRAIT_LOUD, + "TRAIT_WIRE_BLIND" = TRAIT_WIRE_BLIND, ), /datum/mind = list( diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index c71e9683859..1055d2fb241 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -116,7 +116,14 @@ var/replaced_color = color var/color_name = color - if(color in replace_colors) // If this color is one that needs to be replaced using the colorblindness list. + if(HAS_TRAIT(user, TRAIT_WIRE_BLIND)) //You are going to be seeing colours, colourblind or not. And it is going to be WRONG + replaced_color = rgb(rand(1,255), rand(1,255), rand(1,255)) + var/list/fake_colour_chars = list("!", "@", "#", "$", "%", "^", "&", "*", "-", "?", "/") + color_name = "" + for(var/i in 1 to rand(5, 8)) + color_name += pick(fake_colour_chars) + + else if(color in replace_colors) // If this color is one that needs to be replaced using the colorblindness list. replaced_color = replace_colors[color] if(replaced_color in LIST_COLOR_RENAME) // If its an ugly written color name like "darkolivegreen", rename it to something like "dark green". color_name = LIST_COLOR_RENAME[replaced_color] @@ -131,6 +138,8 @@ "cut" = is_color_cut(color), // Whether the wire is cut or not. Used to display "cut" or "mend". "attached" = is_attached(color) // Whether or not a signaler is attached to this wire. )) + if(HAS_TRAIT(user, TRAIT_WIRE_BLIND)) // If the wires are here and your brain thinks they're there and your computer tells you over here, do you recall which one you pulsed? + wires_list = shuffle(wires_list) data["wires"] = wires_list // Get the information shown at the bottom of wire TGUI window, such as "The red light is blinking", etc. @@ -297,7 +306,7 @@ return null // even if you *think* you can see them, it's not guaranteed that you can. - if(HAS_TRAIT(holder, TRAIT_OBSCURED_WIRES)) + if(HAS_TRAIT(holder, TRAIT_OBSCURED_WIRES) || HAS_TRAIT(user, TRAIT_WIRE_BLIND)) var/list/fake_wire_chars = list("!", "@", "#", "$", "%", "^", "&", "*", "-", "?", "/") var/fake_wire_name = "" diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 7772ad14adc..92c0db4b3c1 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -301,6 +301,13 @@ REMOVE_TRAIT(M, TRAIT_SHOW_WIRE_INFO, "show_wire_info[UID()]") return ..() +/obj/item/organ/internal/cyberimp/brain/wire_interface/emp_act(severity) + if(!owner || emp_proof) + return + var/time_of_emp = world.time // This lets us be emp'd multiple times, applying the trait multiple times, extending the cooldown + ADD_TRAIT(owner, TRAIT_WIRE_BLIND, "emp'd_at_[time_of_emp]") + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(callback_remove_trait), owner, TRAIT_WIRE_BLIND, "emp'd_at_[time_of_emp]"), (2 MINUTES / severity)) + /obj/item/organ/internal/cyberimp/brain/wire_interface/hardened name = "Hardened Wire interface implant" desc = "This wire interface implant is actually wireless, to avoid issues with electromagnetic pulses."