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
This commit is contained in:
Irafas
2018-07-01 22:53:43 +02:00
committed by AnturK
parent 09a22ee20e
commit 757c634670
2 changed files with 55 additions and 5 deletions
+43 -5
View File
@@ -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("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
if(chassis.occupant.a_intent == INTENT_DISARM)
target.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>", \
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")
if(real_clamp)
M.take_overall_damage(dam_force)
if(!M)
return
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
add_logs(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
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("<span class='danger'>[chassis] rips [target]'s arms off.</span>", \
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")
add_logs(chassis.occupant, M, "dismembered of[limbs_gone],", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
target.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>", \
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")
else
step_away(M,chassis)
target.visible_message("[chassis] tosses [target] like a piece of paper.")
+12
View File
@@ -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\""