From 757c634670ee058f43f5bc4de7fe54014c331b59 Mon Sep 17 00:00:00 2001 From: Irafas Date: Sun, 1 Jul 2018 21:53:43 +0100 Subject: [PATCH] Admin spawnable version of the Death Ripley that actually inflicts damage and can rip arms off (#38663) * On Harm intent causes damage * Doesnt push people away when attacking them in harm intent * removed emtpy line * Revert "removed emtpy line" This reverts commit 992bd05631f4d8d1b6a6aa851cd35137c4e94c73. * Now rips both arms off Unless only the left arm is missing, in which case nothing happens and im not sure why. If the right arm is missing though the left arm is still ripped off. * Fixes issues with null values and such added if statements that check if the affected limbs are null. Also added the attack to the logs. * Makes a "proper" version of the death clamp Creates a "proper" version of the death clamp that causes damage. Also added a "proper" version of the Death Ripley that includes said death clamp. * ShizCalev's change requests -Uses TRUE instead of 1. -Used less stupid naming conventions and made the objects improper nouns (why did I even make them proper?) -Gives a detailed log of which limbs were dismembered * Cyberboss's requested changes -Moved variable declaration -Playsound changed -Added equipment.Cut() to initialization --- code/game/mecha/equipment/tools/work_tools.dm | 48 +++++++++++++++++-- code/game/mecha/working/ripley.dm | 12 +++++ 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 3a047b20a1e..bc781d1f079 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -78,6 +78,14 @@ name = "\improper KILL CLAMP" desc = "They won't know what clamped them!" energy_drain = 0 + dam_force = 0 + var/real_clamp = FALSE + +/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real + desc = "They won't know what clamped them! This time for real!" + energy_drain = 10 + dam_force = 20 + real_clamp = TRUE /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target) if(!action_checks(target)) @@ -108,11 +116,41 @@ if(M.stat == DEAD) return if(chassis.occupant.a_intent == INTENT_HARM) - target.visible_message("[chassis] destroys [target] in an unholy fury.", \ - "[chassis] destroys [target] in an unholy fury.") - if(chassis.occupant.a_intent == INTENT_DISARM) - target.visible_message("[chassis] rips [target]'s arms off.", \ - "[chassis] rips [target]'s arms off.") + if(real_clamp) + M.take_overall_damage(dam_force) + if(!M) + return + M.adjustOxyLoss(round(dam_force/2)) + M.updatehealth() + target.visible_message("[chassis] destroys [target] in an unholy fury.", \ + "[chassis] destroys [target] in an unholy fury.") + add_logs(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") + else + target.visible_message("[chassis] destroys [target] in an unholy fury.", \ + "[chassis] destroys [target] in an unholy fury.") + else if(chassis.occupant.a_intent == INTENT_DISARM) + if(real_clamp) + var/mob/living/carbon/C = target + var/play_sound = FALSE + var/limbs_gone = "" + var/obj/item/bodypart/affected = C.get_bodypart(BODY_ZONE_L_ARM) + if(affected != null) + affected.dismember(damtype) + play_sound = TRUE + limbs_gone = ", [affected]" + affected = C.get_bodypart(BODY_ZONE_R_ARM) + if(affected != null) + affected.dismember(damtype) + play_sound = TRUE + limbs_gone = "[limbs_gone], [affected]" + if(play_sound) + playsound(src, get_dismember_sound(), 80, TRUE) + target.visible_message("[chassis] rips [target]'s arms off.", \ + "[chassis] rips [target]'s arms off.") + add_logs(chassis.occupant, M, "dismembered of[limbs_gone],", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") + else + target.visible_message("[chassis] rips [target]'s arms off.", \ + "[chassis] rips [target]'s arms off.") else step_away(M,chassis) target.visible_message("[chassis] tosses [target] like a piece of paper.") diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 21ecc26905e..629de2f697f 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -88,6 +88,18 @@ var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill ME.attach(src) +/obj/mecha/working/ripley/deathripley/real + desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE. FOR REAL" + +/obj/mecha/working/ripley/deathripley/real/Initialize() + . = ..() + for(var/obj/item/mecha_parts/mecha_equipment/E in equipment) + E.detach() + qdel(E) + equipment.Cut() + var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real + ME.attach(src) + /obj/mecha/working/ripley/mining desc = "An old, dusty mining Ripley." name = "\improper APLU \"Miner\""