From 52c4e47a3bce67f4eeba9583e4db0f9e61d8422f Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 23 May 2022 04:13:57 +0200 Subject: [PATCH] [MIRROR] puts emp shields on some syndie and admin modsuits, adds advanced emp shields [MDB IGNORE] (#13819) * Puts emp shields on some syndie and admin modsuits, adds advanced emp shields (#67152) * puts emp shields on some syndie and admin modsuits, adds advanced emp shields * contractor updates Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> --- code/modules/mod/mod_control.dm | 2 +- code/modules/mod/mod_types.dm | 8 ++++++-- code/modules/mod/modules/modules_general.dm | 17 +++++++++++++++-- code/modules/uplink/uplink_items/nukeops.dm | 11 +++++------ .../contractor/code/items/modsuit/modsuit.dm | 5 ++++- .../contractor/code/items/modsuit/modules.dm | 4 ++++ 6 files changed, 35 insertions(+), 12 deletions(-) diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm index f0a4851eb8b..fbb66e4b108 100644 --- a/code/modules/mod/mod_control.dm +++ b/code/modules/mod/mod_control.dm @@ -429,7 +429,7 @@ if(. & EMP_PROTECT_CONTENTS) return selected_module?.on_deactivation(display_message = TRUE) - wearer.apply_damage(10 / severity, BURN, spread_damage=TRUE) + wearer.apply_damage(5 / severity, BURN, spread_damage=TRUE) to_chat(wearer, span_danger("You feel [src] heat up from the EMP, burning you slightly.")) if(wearer.stat < UNCONSCIOUS && prob(10)) wearer.emote("scream") diff --git a/code/modules/mod/mod_types.dm b/code/modules/mod/mod_types.dm index c8a569c4b68..342449e545e 100644 --- a/code/modules/mod/mod_types.dm +++ b/code/modules/mod/mod_types.dm @@ -146,6 +146,7 @@ applied_cell = /obj/item/stock_parts/cell/super initial_modules = list( /obj/item/mod/module/storage/syndicate, + /obj/item/mod/module/emp_shield, /obj/item/mod/module/magnetic_harness, /obj/item/mod/module/jetpack, /obj/item/mod/module/pathfinder, @@ -171,6 +172,7 @@ req_access = list(ACCESS_SYNDICATE) initial_modules = list( /obj/item/mod/module/storage/syndicate, + /obj/item/mod/module/emp_shield, /obj/item/mod/module/magnetic_harness, /obj/item/mod/module/jetpack/advanced, /obj/item/mod/module/flashlight, @@ -205,7 +207,7 @@ initial_modules = list( /obj/item/mod/module/storage/large_capacity, /obj/item/mod/module/energy_shield/wizard, - /obj/item/mod/module/emp_shield, + /obj/item/mod/module/emp_shield/advanced, ) /obj/item/mod/control/pre_equipped/prototype @@ -302,7 +304,7 @@ initial_modules = list( /obj/item/mod/module/storage/bluespace, /obj/item/mod/module/welding, - /obj/item/mod/module/emp_shield, + /obj/item/mod/module/emp_shield/advanced, /obj/item/mod/module/magnetic_harness, /obj/item/mod/module/jetpack, ) @@ -315,6 +317,7 @@ /obj/item/mod/module/storage/bluespace, /obj/item/mod/module/hat_stabilizer, /obj/item/mod/module/magnetic_harness, + /obj/item/mod/module/emp_shield/advanced, ) /obj/item/mod/control/pre_equipped/timeline @@ -347,6 +350,7 @@ applied_core = /obj/item/mod/core/infinite initial_modules = list( /obj/item/mod/module/storage/bluespace, + /obj/item/mod/module/emp_shield/advanced, /obj/item/mod/module/welding, /obj/item/mod/module/stealth/ninja, /obj/item/mod/module/quick_carry/advanced, diff --git a/code/modules/mod/modules/modules_general.dm b/code/modules/mod/modules/modules_general.dm index 8773296aa42..fbcf26394e7 100644 --- a/code/modules/mod/modules/modules_general.dm +++ b/code/modules/mod/modules/modules_general.dm @@ -189,8 +189,8 @@ /obj/item/mod/module/emp_shield name = "MOD EMP shield module" desc = "A field inhibitor installed into the suit, protecting it against feedback such as \ - electromagnetic pulses that would otherwise damage the electronic systems of the suit or devices on the wearer. \ - However, it will take from the suit's power to do so. Luckily, your PDA already has one of these." + electromagnetic pulses that would otherwise damage the electronic systems of the suit or it's modules. \ + However, it will take from the suit's power to do so." icon_state = "empshield" complexity = 1 idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 @@ -202,6 +202,19 @@ /obj/item/mod/module/emp_shield/on_uninstall(deleting = FALSE) mod.RemoveElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_WIRES|EMP_PROTECT_CONTENTS) +/obj/item/mod/module/emp_shield/advanced + name = "MOD advanced EMP shield module" + desc = "An advanced field inhibitor installed into the suit, protecting it against feedback such as \ + electromagnetic pulses that would otherwise damage the electronic systems of the suit or electronic devices on the wearer, \ + including augmentations. However, it will take from the suit's power to do so." + complexity = 2 + +/obj/item/mod/module/emp_shield/advanced/on_suit_activation() + mod.wearer.AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS) + +/obj/item/mod/module/emp_shield/advanced/on_suit_deactivation(deleting) + mod.wearer.RemoveElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS) + ///Flashlight - Gives the suit a customizable flashlight. /obj/item/mod/module/flashlight name = "MOD flashlight module" diff --git a/code/modules/uplink/uplink_items/nukeops.dm b/code/modules/uplink/uplink_items/nukeops.dm index cbdf254bf61..daa73c1331f 100644 --- a/code/modules/uplink/uplink_items/nukeops.dm +++ b/code/modules/uplink/uplink_items/nukeops.dm @@ -638,12 +638,11 @@ cost = 15 purchasable_from = UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS -/datum/uplink_item/suits/energy_shield - name = "MODsuit Energy Shield Module" - desc = "An energy shield module for a MODsuit. The shields can handle up to three impacts \ - within a short duration and will rapidly recharge while not under fire." - item = /obj/item/mod/module/energy_shield - cost = 15 +/datum/uplink_item/suits/emp_shield + name = "MODsuit Advanced EMP Shield Module" + desc = "An advanced EMP shield module for a MODsuit. It protects your entire body from electromagnetic pulses." + item = /obj/item/mod/module/emp_shield/advanced + cost = 5 purchasable_from = UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS /datum/uplink_item/suits/injector diff --git a/modular_skyrat/modules/contractor/code/items/modsuit/modsuit.dm b/modular_skyrat/modules/contractor/code/items/modsuit/modsuit.dm index 92189cf1b2a..7c5cc8973a5 100644 --- a/modular_skyrat/modules/contractor/code/items/modsuit/modsuit.dm +++ b/modular_skyrat/modules/contractor/code/items/modsuit/modsuit.dm @@ -10,6 +10,7 @@ /obj/item/mod/module/flashlight, /obj/item/mod/module/dna_lock, /obj/item/mod/module/magnetic_harness, + /obj/item/mod/module/emp_shield, ) /obj/item/mod/control/pre_equipped/contractor/upgraded @@ -20,14 +21,16 @@ /obj/item/mod/module/dna_lock, /obj/item/mod/module/magnetic_harness, /obj/item/mod/module/baton_holster/preloaded, + /obj/item/mod/module/emp_shield, ) /obj/item/mod/control/pre_equipped/contractor/upgraded/adminbus initial_modules = list( /obj/item/mod/module/storage/syndicate, /obj/item/mod/module/jetpack/advanced, - /obj/item/mod/module/springlock/contractor, + /obj/item/mod/module/springlock/contractor/no_complexity, /obj/item/mod/module/baton_holster/preloaded, + /obj/item/mod/module/emp_shield, ) // For the prefs menu diff --git a/modular_skyrat/modules/contractor/code/items/modsuit/modules.dm b/modular_skyrat/modules/contractor/code/items/modsuit/modules.dm index 20ab225d7db..996daad6099 100644 --- a/modular_skyrat/modules/contractor/code/items/modsuit/modules.dm +++ b/modular_skyrat/modules/contractor/code/items/modsuit/modules.dm @@ -93,3 +93,7 @@ /obj/item/mod/module/springlock/on_suit_deactivation(deleting = FALSE) return + +/// This exists for the adminbus contractor modsuit. Do not use otherwise +/obj/item/mod/module/springlock/contractor/no_complexity + complexity = 0