diff --git a/code/__DEFINES/_flags.dm b/code/__DEFINES/_flags.dm index 04929f16f24..323785844ee 100644 --- a/code/__DEFINES/_flags.dm +++ b/code/__DEFINES/_flags.dm @@ -234,12 +234,14 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ZAP_FUSION_FLAGS ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN #define ZAP_SUPERMATTER_FLAGS ZAP_GENERATES_POWER -///EMP will protect itself. +///Object will protect itself. #define EMP_PROTECT_SELF (1<<0) -///EMP will protect the contents from also being EMPed. +///Object will protect its contents from being EMPed. #define EMP_PROTECT_CONTENTS (1<<1) -///EMP will protect the wires. +///Object will protect its wiring from being EMPed. #define EMP_PROTECT_WIRES (1<<2) +///Don't indicate EMP protection in object examine text. +#define EMP_NO_EXAMINE (1<<3) ///Protects against all EMP types. #define EMP_PROTECT_ALL (EMP_PROTECT_SELF | EMP_PROTECT_CONTENTS | EMP_PROTECT_WIRES) diff --git a/code/datums/elements/empprotection.dm b/code/datums/elements/empprotection.dm index 93a48ea5d17..c0dacc7bf1f 100644 --- a/code/datums/elements/empprotection.dm +++ b/code/datums/elements/empprotection.dm @@ -18,10 +18,26 @@ /datum/element/empprotection/proc/getEmpFlags(datum/source, severity) SIGNAL_HANDLER - return flags + return (flags & EMP_PROTECT_ALL) /datum/element/empprotection/proc/get_examine_tags(atom/source, mob/user, list/examine_list) SIGNAL_HANDLER - if(flags) - examine_list["EMP-proof"] = "It is shielded against electromagnetic pulses." + if(flags & EMP_NO_EXAMINE) + return + + if(flags & EMP_PROTECT_ALL == EMP_PROTECT_ALL) + examine_list["EMP proof"] = "[source.p_They()] [source.p_are()] unaffected by electromagnetic pulses, and shields [source.p_their()] contents and wiring from them." + return + + if(flags & EMP_PROTECT_SELF) + examine_list["EMP resilient"] = "[source.p_They()] [source.p_are()] unaffected by electromagnetic pulses." + + if(flags & (EMP_PROTECT_CONTENTS|EMP_PROTECT_WIRES) == (EMP_PROTECT_CONTENTS|EMP_PROTECT_WIRES)) + examine_list["EMP blocking"] = "[source.p_They()] protects [source.p_their()] wiring and contents from electromagnetic pulses." + + else if(flags & EMP_PROTECT_CONTENTS) + examine_list["EMP blocking"] = "[source.p_They()] protects [source.p_their()] contents from electromagnetic pulses." + + else if(flags & EMP_PROTECT_WIRES) + examine_list["EMP blocking"] = "[source.p_They()] protects [source.p_their()] wiring from electromagnetic pulses." diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index a8e20505387..89af3fc1192 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -149,15 +149,15 @@ /obj/machinery/camera/proc/upgradeEmpProof(malf_upgrade, ignore_malf_upgrades) if(isEmpProof(ignore_malf_upgrades)) //pass a malf upgrade to ignore_malf_upgrades so we can replace the malf module with the normal one return //that way if someone tries to upgrade an already malf-upgraded camera, it'll just upgrade it to a normal version. - AddElement(/datum/element/empprotection, EMP_PROTECT_ALL) if(malf_upgrade) malf_emp_firmware_active = TRUE //don't add parts to drop, update icon, ect. reconstructing it will also retain the upgrade. malf_emp_firmware_present = TRUE //so the upgrade is retained after incompatible parts are removed. + AddElement(/datum/element/empprotection, EMP_PROTECT_ALL|EMP_NO_EXAMINE) else if(!emp_module) //only happens via upgrading in camera/attackby() emp_module = new(src) - if(malf_emp_firmware_active) - malf_emp_firmware_active = FALSE //make it appear like it's just normally upgraded so the icons and examine texts are restored. + malf_emp_firmware_active = FALSE //make it appear like it's just normally upgraded so the icons and examine texts are restored. + AddElement(/datum/element/empprotection, EMP_PROTECT_ALL) camera_upgrade_bitflags |= CAMERA_UPGRADE_EMP_PROOF @@ -165,6 +165,7 @@ if(ignore_malf_upgrades) //don't downgrade it if malf software is forced onto it. return RemoveElement(/datum/element/empprotection, EMP_PROTECT_ALL) + RemoveElement(/datum/element/empprotection, EMP_PROTECT_ALL|EMP_NO_EXAMINE) camera_upgrade_bitflags &= ~CAMERA_UPGRADE_EMP_PROOF /obj/machinery/camera/proc/isXRay(ignore_malf_upgrades) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 24057c27a34..e3e1e54f046 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -58,7 +58,7 @@ /obj/structure/emergency_shield/regenerating/Initialize(mapload) . = ..() - AddElement(/datum/element/empprotection, EMP_PROTECT_SELF) + AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_NO_EXAMINE) /obj/structure/emergency_shield/regenerating/Destroy() STOP_PROCESSING(SSobj, src) @@ -84,7 +84,7 @@ /obj/structure/emergency_shield/cult/Initialize(mapload) . = ..() - AddElement(/datum/element/empprotection, EMP_PROTECT_SELF) + AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_NO_EXAMINE) /obj/structure/emergency_shield/cult/narsie name = "sanguine barrier" diff --git a/code/modules/antagonists/malf_ai/malf_ai_modules.dm b/code/modules/antagonists/malf_ai/malf_ai_modules.dm index f5425593eff..6d5cd6d99bc 100644 --- a/code/modules/antagonists/malf_ai/malf_ai_modules.dm +++ b/code/modules/antagonists/malf_ai/malf_ai_modules.dm @@ -888,7 +888,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module/malf)) /datum/ai_module/malf/upgrade/upgrade_turrets/upgrade(mob/living/silicon/ai/AI) for(var/obj/machinery/porta_turret/ai/turret as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/porta_turret/ai)) - turret.AddElement(/datum/element/empprotection, EMP_PROTECT_ALL) + turret.AddElement(/datum/element/empprotection, EMP_PROTECT_ALL|EMP_NO_EXAMINE) turret.max_integrity = 200 turret.repair_damage(200) turret.lethal_projectile = /obj/projectile/beam/laser/heavylaser //Once you see it, you will know what it means to FEAR. diff --git a/code/modules/clothing/chameleon/chameleon_gun.dm b/code/modules/clothing/chameleon/chameleon_gun.dm index 4a282a3e75a..c1c17a8ae5a 100644 --- a/code/modules/clothing/chameleon/chameleon_gun.dm +++ b/code/modules/clothing/chameleon/chameleon_gun.dm @@ -16,7 +16,7 @@ /obj/item/gun/energy/laser/chameleon/Initialize(mapload) . = ..() - AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS) + AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS|EMP_NO_EXAMINE) // Init order shenanigans dictate we have to do this last so we can't just use `active_type` var/datum/action/item_action/chameleon/change/gun/gun_action = locate() in actions gun_action?.update_look(default_look) diff --git a/code/modules/clothing/chameleon/generic_chameleon_clothing.dm b/code/modules/clothing/chameleon/generic_chameleon_clothing.dm index a8f03b0b3f9..052b1ef2c57 100644 --- a/code/modules/clothing/chameleon/generic_chameleon_clothing.dm +++ b/code/modules/clothing/chameleon/generic_chameleon_clothing.dm @@ -3,7 +3,7 @@ do { \ var/datum/action/item_action/chameleon/change/_action = locate() in item.actions; \ _action?.emp_randomise(INFINITY); \ - item.AddElement(/datum/element/empprotection, EMP_PROTECT_SELF); \ + item.AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_NO_EXAMINE); \ } while(FALSE) // Cham jumpsuit diff --git a/code/modules/mining/lavaland/mining_loot/megafauna/colossus.dm b/code/modules/mining/lavaland/mining_loot/megafauna/colossus.dm index 10c37355495..a5c24eabb95 100644 --- a/code/modules/mining/lavaland/mining_loot/megafauna/colossus.dm +++ b/code/modules/mining/lavaland/mining_loot/megafauna/colossus.dm @@ -373,7 +373,7 @@ if(isanimal_or_basicmob(loc)) holder_animal = loc RegisterSignal(holder_animal, COMSIG_LIVING_DEATH, PROC_REF(on_holder_animal_death)) - AddElement(/datum/element/empprotection, EMP_PROTECT_ALL) + AddElement(/datum/element/empprotection, EMP_PROTECT_ALL|EMP_NO_EXAMINE) /obj/structure/closet/stasis/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs) . = ..() diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 388835b7a9a..a0986cc70ad 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -48,3 +48,6 @@ . += span_deadsay("[p_They()] look[p_s()] like its system is corrupted and requires a reset.") . += ..() + +/mob/living/silicon/robot/examine_descriptor(mob/user) + return "cyborg" diff --git a/code/modules/surgery/organs/internal/heart/heart_anomalock.dm b/code/modules/surgery/organs/internal/heart/heart_anomalock.dm index de2fc9626d6..1a259978a4c 100644 --- a/code/modules/surgery/organs/internal/heart/heart_anomalock.dm +++ b/code/modules/surgery/organs/internal/heart/heart_anomalock.dm @@ -39,7 +39,7 @@ return add_lightning_overlay(30 SECONDS) playsound(organ_owner, 'sound/items/eshield_recharge.ogg', 40) - organ_owner.AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS) + organ_owner.AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS|EMP_NO_EXAMINE) RegisterSignal(organ_owner, SIGNAL_ADDTRAIT(TRAIT_CRITICAL_CONDITION), PROC_REF(activate_survival)) RegisterSignal(organ_owner, COMSIG_ATOM_EMP_ACT, PROC_REF(on_emp_act)) @@ -48,7 +48,7 @@ if(!core) return UnregisterSignal(organ_owner, SIGNAL_ADDTRAIT(TRAIT_CRITICAL_CONDITION)) - organ_owner.RemoveElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS) + organ_owner.RemoveElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS|EMP_NO_EXAMINE) tesla_zap(source = organ_owner, zap_range = 20, power = 2.5e5, cutoff = 1e3) qdel(src) diff --git a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm index d8550c14055..4124e397ba7 100644 --- a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm @@ -195,10 +195,10 @@ /obj/item/mecha_parts/mecha_equipment/armor/antiemp_armor_booster/attach(obj/vehicle/sealed/mecha/new_mecha, attach_right) . = ..() - chassis.AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES) + chassis.AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES|EMP_NO_EXAMINE) /obj/item/mecha_parts/mecha_equipment/armor/antiemp_armor_booster/detach(atom/moveto) - chassis.RemoveElement(/datum/element/empprotection, EMP_PROTECT_WIRES) + chassis.RemoveElement(/datum/element/empprotection, EMP_PROTECT_WIRES|EMP_NO_EXAMINE) return ..() /obj/item/mecha_parts/mecha_equipment/armor/antiemp_armor_booster/clandestine