From c949829183c07d0c7026bdf4c58473d8bc87f294 Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Fri, 5 Oct 2018 01:25:53 +0200
Subject: [PATCH] Emagging added.
---
.../mecha/equipment/tools/medical_tools.dm | 25 ++++++++++++++-----
code/game/mecha/mecha.dm | 8 +-----
code/game/mecha/medical/odysseus.dm | 18 +++++++++++++
code/game/mecha/working/ripley.dm | 12 ++++++++-
.../designs/mechfabricator_designs.dm | 10 ++++++++
5 files changed, 59 insertions(+), 14 deletions(-)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index f296319d14d..a649a96f39d 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -87,6 +87,10 @@
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/go_out()
if(!patient)
return
+ if(chassis.emagged)//you won't escape this easily...
+ to_chat(patient, " The [src]'s internal release level refuses to move. You are trapped! ")
+ chassis.visible_message("You hear someone bang against the inside of [chassis]'s sleeper.")//at least they'll notice your struggles.
+ return
patient.forceMove(get_turf(src))
occupant_message("[patient] ejected. Life support functions disabled.")
log_message("[patient] ejected. Life support functions disabled.")
@@ -525,6 +529,7 @@
name = "rescue clamp"
desc = "Emergency rescue clamp, designed to help first responders reach their patients. Opens doors and removes obstacles."
icon_state = "mecha_clamp" //placeholder for now, add icons later
+ origin_tech = "engineering=4;biotech=3"
equip_cooldown = 15
energy_drain = 10
var/dam_force = 20
@@ -540,15 +545,23 @@
D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function
if(istype(target,/mob/living)) //interact with living beings
var/mob/living/M = target
- if(chassis.occupant.a_intent == INTENT_HARM)//the patented, medical rescue claw is incapable of doing harm. Worry not.
- target.visible_message("[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides kick in.", \
- "[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides kick in.")
+ if(chassis.occupant.a_intent == INTENT_HARM)//the patented, medical rescue claw is incapable of doing harm. Worry not. (unless it is emagged, of course)
+ if(chassis.emagged == 0)
+ target.visible_message("[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.", \
+ "[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.")
+ else
+ M.take_overall_damage(dam_force)//shamelessly stolen from Ripley code. No oxy loss though.
+ if(!M)
+ return
+ M.updatehealth()
+ target.visible_message("[chassis] brutally punches [target].", \
+ "[chassis] brutally punches [target].",\
+ "You hear something crack.")
+ add_attack_logs(chassis.occupant, M, "Mech-punched with [src] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
+ start_cooldown()
else
step_away(M,chassis)//out of the way, I have people to save!
occupant_message("You gently push [target] out of the way.")
chassis.visible_message("[chassis] gently pushes [target] out of the way.")
- return 1
-
-
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index dd7993247b1..b45a340b319 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -852,13 +852,7 @@
/obj/mecha/emag_act(user as mob)
- if(istype(src, /obj/mecha/working/ripley) && emagged == 0)
- emagged = 1
- to_chat(usr, "You slide the card through the [src]'s ID slot.")
- playsound(loc, "sparks", 100, 1)
- desc += "The mech's equipment slots spark dangerously!"
- else
- to_chat(usr, "The [src]'s ID slot rejects the card.")
+ to_chat(usr, "The [src]'s ID slot rejects the card.")
return
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index 333c05fdd5d..3ed2c4cddef 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -44,3 +44,21 @@
. = ..()
+
+
+
+
+/obj/mecha/medical/odysseus/emag_act(user as mob)
+ if(emagged == 0)
+ emagged = 1
+ for(var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/I in equipment) //you get some juicy traitor chems for this...
+ I.add_known_reagent("initropidril", "Initropidril")
+ I.add_known_reagent("sarin", "Sarin")
+ to_chat(usr, "The [src]'s speaker chimes in a distorted voice \"First...do harm.\" as you swipe the card through the ID slot.")
+ playsound(loc, "sparks", 100, 1)
+ desc += "The mech's movement is sudden and jerky!"
+ else
+ to_chat(usr, "The [src]'s ID slot rejects the card.")
+ return
+
+
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index d29bf2ae460..96c51e7f4ba 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -180,4 +180,14 @@
else
step_in = 5
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
- drill.equip_cooldown = initial(drill.equip_cooldown)
\ No newline at end of file
+ drill.equip_cooldown = initial(drill.equip_cooldown)
+
+/obj/mecha/working/ripley/emag_act(user as mob)
+ if(emagged == 0)
+ emagged = 1
+ to_chat(usr, "You slide the card through the [src]'s ID slot.")
+ playsound(loc, "sparks", 100, 1)
+ desc += "The mech's equipment slots spark dangerously!"
+ else
+ to_chat(usr, "The [src]'s ID slot rejects the card.")
+ return
diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm
index 1589b78438b..4db352f7785 100644
--- a/code/modules/research/designs/mechfabricator_designs.dm
+++ b/code/modules/research/designs/mechfabricator_designs.dm
@@ -653,6 +653,16 @@
construction_time = 200
category = list("Exosuit Equipment")
+/datum/design/medical_clamp
+ name = "Exosuit Medical Equipment (Rescue Clamp)"
+ id = "mech_medical_clamp"
+ build_type = MECHFAB
+ req_tech = list("biotech" = 4, "engineering" = 4)
+ build_path = /obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp
+ materials = list(MAT_METAL=5000,MAT_GLASS=2000,MAT_DIAMOND=1500)
+ construction_time = 200
+ category = list("Exosuit Equipment")
+
/datum/design/mech_generator
name = "Exosuit Equipment (Plasma Generator)"
id = "mech_generator"