diff --git a/code/game/objects/items/rcd/RCD.dm b/code/game/objects/items/rcd/RCD.dm index 951580514a4..1e531a2ddcc 100644 --- a/code/game/objects/items/rcd/RCD.dm +++ b/code/game/objects/items/rcd/RCD.dm @@ -610,6 +610,23 @@ return gundam.use_energy(amount * MASS_TO_ENERGY) return TRUE +/obj/item/construction/rcd/exosuit/detonate_pulse() + var/obj/item/mecha_parts/mecha_equipment/rcd/ourshell = loc + if(!istype(ourshell)) + return + ourshell.audible_message(span_danger("[ourshell] begins to vibrate and buzz loudly!"), \ + span_danger("[ourshell] begins vibrating violently!")) + // 5 seconds to get rid of it + addtimer(CALLBACK(src, PROC_REF(detonate_pulse_explode)), 5 SECONDS) + +/obj/item/construction/rcd/exosuit/detonate_pulse_explode() + var/obj/item/mecha_parts/mecha_equipment/rcd/ourshell = loc + explosion(ourshell, light_impact_range = 3, flame_range = 1, flash_range = 1) + if(owner) + ourshell.detach() + qdel(ourshell) + + #undef MASS_TO_ENERGY #undef FREQUENT_USE_DEBUFF_MULTIPLIER diff --git a/code/modules/antagonists/malf_ai/malf_ai_modules.dm b/code/modules/antagonists/malf_ai/malf_ai_modules.dm index 377caebf7ea..f2c6eb49eda 100644 --- a/code/modules/antagonists/malf_ai/malf_ai_modules.dm +++ b/code/modules/antagonists/malf_ai/malf_ai_modules.dm @@ -505,10 +505,11 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module/malf)) cooldown_period = 10 SECONDS /datum/action/innate/ai/destroy_rcds/Activate() - for(var/I in GLOB.rcd_list) - if(!istype(I, /obj/item/construction/rcd/borg)) //Ensures that cyborg RCDs are spared. - var/obj/item/construction/rcd/RCD = I - RCD.detonate_pulse() + for(var/potential_rcd in GLOB.rcd_list) + if(istype(potential_rcd, /obj/item/construction/rcd/borg)) //Ensures that cyborg RCDs are spared. + continue + var/obj/item/construction/rcd/definite_rcd = potential_rcd + definite_rcd.detonate_pulse() to_chat(owner, span_danger("RCD detonation pulse emitted.")) owner.playsound_local(owner, 'sound/machines/beep/twobeep.ogg', 50, 0)