From 18216171e6222e5f963f1693055e48dc66ee6ff9 Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Thu, 4 Oct 2018 23:32:15 +0200
Subject: [PATCH 01/10] First work
---
code/__HELPERS/unsorted.dm | 5 +++
code/game/machinery/doors/airlock.dm | 10 +++---
.../mecha/equipment/tools/medical_tools.dm | 31 +++++++++++++++++++
3 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 1a9ccbe6c2b..4810be3f312 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1150,6 +1150,11 @@ var/global/list/common_tools = list(
return 1
return 0
+/proc/ispowertool(O)//used to check if a tool can force powered doors
+ if(istype(O, /obj/item/crowbar/power) || istype(O, /obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp/))
+ return 1
+ return 0
+
/proc/iswire(O)
if(istype(O, /obj/item/stack/cable_coil))
return 1
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index a076fcec8fd..0a4c6dc6ae9 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -670,12 +670,12 @@ About the new airlock wires panel:
return FALSE
//For the tools being used on the door. Since you don't want to call the attack_hand method if you're using hands. That would be silly
-//Also it's a bit inconsistent that when you access the panel you headbutt it. But not while crowbarring
+//Also it's a bit inconsistent that when you access the panel you headbutt it. But not while crowbarring
//Try to interact with the panel. If the user can't it'll try activating the door
/obj/machinery/door/airlock/proc/interact_with_panel(mob/user)
if(shock_user(user, 100))
return
-
+
if(panel_open)
if(security_level)
to_chat(user, "Wires are protected!")
@@ -1025,7 +1025,7 @@ About the new airlock wires panel:
else if(locked)
to_chat(user, "The airlock's bolts prevent it from being forced!")
else if(!welded && !operating)
- if(!beingcrowbarred) //being fireaxe'd
+ if(istype(I, /obj/item/twohanded/fireaxe)) //let's make this more specific
var/obj/item/twohanded/fireaxe/F = I
if(F.wielded)
spawn(0)
@@ -1042,7 +1042,7 @@ About the new airlock wires panel:
else
close(1)
- if(istype(I, /obj/item/crowbar/power))
+ if(ispowertool(I)) //jaws of life and rescue claw
if(isElectrified())
shock(user, 100)//it's like sticking a forck in a power socket
return
@@ -1325,7 +1325,7 @@ About the new airlock wires panel:
user.visible_message("[user] removes [note] from [src].", "You remove [note] from [src].")
playsound(src, 'sound/items/poster_ripped.ogg', 50, 1)
else return FALSE
- else
+ else
user.visible_message("[user] cuts down [note] from [src].", "You remove [note] from [src].")
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1)
note.forceMove(get_turf(user))
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index 9e3369f1af9..f296319d14d 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -521,3 +521,34 @@
reagents.add_reagent(reagent,amount)
chassis.use_power(energy_drain)
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp
+ 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
+ equip_cooldown = 15
+ energy_drain = 10
+ var/dam_force = 20
+
+
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp/action(atom/target)
+ if(!action_checks(target))
+ return
+ if(istype(target,/obj))
+ if(!istype(target,/obj/machinery/door))//early return if we're not trying to open a door
+ return
+ var/obj/machinery/door/D = target //the door we want to open
+ 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.")
+ 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
+
+
+
+
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 02/10] 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"
From e813260b97783c5ea4bd639a0e14bd7098cdd5d2 Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Sun, 7 Oct 2018 17:36:37 +0200
Subject: [PATCH 03/10] Last tweaks
---
code/game/mecha/equipment/tools/medical_tools.dm | 4 ++--
code/game/mecha/medical/odysseus.dm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index a649a96f39d..c337bf8462b 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -528,7 +528,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp
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
+ icon_state = "mecha_clamp" //can work, might use a blue resprite later but I think it works for now
origin_tech = "engineering=4;biotech=3"
equip_cooldown = 15
energy_drain = 10
@@ -539,7 +539,7 @@
if(!action_checks(target))
return
if(istype(target,/obj))
- if(!istype(target,/obj/machinery/door))//early return if we're not trying to open a door
+ if(!istype(target , /obj/machinery/door))//early return if we're not trying to open a door
return
var/obj/machinery/door/D = target //the door we want to open
D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index 3ed2c4cddef..a7eabc3316d 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -54,7 +54,7 @@
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.")
+ 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
From 9d6e1bd051516bf913b5571106122ccc46d7ba07 Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Mon, 8 Oct 2018 13:27:16 +0200
Subject: [PATCH 04/10] rename, changed chem, replaced usr with user
---
code/__HELPERS/unsorted.dm | 2 +-
code/game/mecha/equipment/tools/medical_tools.dm | 10 +++++-----
code/game/mecha/mecha.dm | 4 ++--
code/game/mecha/medical/odysseus.dm | 8 ++++----
code/game/mecha/working/ripley.dm | 6 +++---
.../modules/research/designs/mechfabricator_designs.dm | 8 ++++----
6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index e0c1ac5284d..b17431594d3 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1151,7 +1151,7 @@ var/global/list/common_tools = list(
return 0
/proc/ispowertool(O)//used to check if a tool can force powered doors
- if(istype(O, /obj/item/crowbar/power) || istype(O, /obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp/))
+ if(istype(O, /obj/item/crowbar/power) || istype(O, /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/))
return 1
return 0
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index 42451e12348..395c38517b8 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -524,9 +524,9 @@
reagents.add_reagent(reagent,amount)
chassis.use_power(energy_drain)
-/obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp
- name = "rescue clamp"
- desc = "Emergency rescue clamp, designed to help first responders reach their patients. Opens doors and removes obstacles."
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw
+ name = "rescue jaw"
+ desc = "Emergency rescue jaw, designed to help first responders reach their patients. Opens doors and removes obstacles."
icon_state = "mecha_clamp" //can work, might use a blue resprite later but I think it works for now
origin_tech = "engineering=4;biotech=3"
equip_cooldown = 15
@@ -534,7 +534,7 @@
var/dam_force = 20
-/obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/action(atom/target)
if(!action_checks(target))
return
if(istype(target,/obj))
@@ -542,7 +542,7 @@
return
var/obj/machinery/door/D = target //the door we want to open
D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function
- if(istype(target,/mob/living)) //interact with living beings
+ if(isliving(target)) //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. (unless it is emagged, of course)
if(chassis.emagged == 0)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index b45a340b319..b29c5bdde5a 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -851,8 +851,8 @@
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
-/obj/mecha/emag_act(user as mob)
- to_chat(usr, "The [src]'s ID slot rejects the card.")
+/obj/mecha/emag_act(mob/user)
+ to_chat(user, "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 a7eabc3316d..10216e3e84f 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -48,17 +48,17 @@
-/obj/mecha/medical/odysseus/emag_act(user as mob)
+/obj/mecha/medical/odysseus/emag_act(mob/user)
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("neurotoxin2", "Neurotoxin")
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.")
+ to_chat(user, "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.")
+ to_chat(user, "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 96c51e7f4ba..ae97d59ea3c 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -182,12 +182,12 @@
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
drill.equip_cooldown = initial(drill.equip_cooldown)
-/obj/mecha/working/ripley/emag_act(user as mob)
+/obj/mecha/working/ripley/emag_act(mob/user)
if(emagged == 0)
emagged = 1
- to_chat(usr, "You slide the card through the [src]'s ID slot.")
+ to_chat(user, "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(user, "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 4db352f7785..28ea2e91e49 100644
--- a/code/modules/research/designs/mechfabricator_designs.dm
+++ b/code/modules/research/designs/mechfabricator_designs.dm
@@ -653,12 +653,12 @@
construction_time = 200
category = list("Exosuit Equipment")
-/datum/design/medical_clamp
- name = "Exosuit Medical Equipment (Rescue Clamp)"
- id = "mech_medical_clamp"
+/datum/design/medical_jaw
+ name = "Exosuit Medical Equipment (Rescue Jaw)"
+ id = "mech_medical_jaw"
build_type = MECHFAB
req_tech = list("biotech" = 4, "engineering" = 4)
- build_path = /obj/item/mecha_parts/mecha_equipment/medical/rescue_clamp
+ build_path = /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw
materials = list(MAT_METAL=5000,MAT_GLASS=2000,MAT_DIAMOND=1500)
construction_time = 200
category = list("Exosuit Equipment")
From 8840753608b16e767970754deb92918b18aa2efe Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Mon, 8 Oct 2018 14:36:19 +0200
Subject: [PATCH 05/10] Added timer to struggling out of emagged sleeper
---
code/game/mecha/equipment/tools/medical_tools.dm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index 395c38517b8..c9f221600a4 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -88,9 +88,12 @@
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! ")
+ to_chat(patient, "[src]'s internal release level refuses to move. You look for a way out!")
chassis.visible_message("You hear someone bang against the inside of [chassis]'s sleeper.")//at least they'll notice your struggles.
- return
+ do_after(patient, 300, needhand = 0, target = chassis)//progress bar of your struggle to get free
+ if(!patient)//if the patient was removed, there's no need for this anymore. Otherwise move on to normal release.
+ return
+ to_chat(patient, "You finally manage to force open the sleeper's hatch. You are free!")
patient.forceMove(get_turf(src))
occupant_message("[patient] ejected. Life support functions disabled.")
log_message("[patient] ejected. Life support functions disabled.")
From a2b73fcf3179f3684142d9a5854bc5b65811018d Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Wed, 10 Oct 2018 19:54:27 +0200
Subject: [PATCH 06/10] Removed emag functionality from Ody ;_;
---
.../mecha/equipment/tools/medical_tools.dm | 31 ++++++-------------
code/game/mecha/medical/odysseus.dm | 21 +------------
2 files changed, 11 insertions(+), 41 deletions(-)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index c9f221600a4..c8bc3dfde98 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -87,13 +87,6 @@
/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, "[src]'s internal release level refuses to move. You look for a way out!")
- chassis.visible_message("You hear someone bang against the inside of [chassis]'s sleeper.")//at least they'll notice your struggles.
- do_after(patient, 300, needhand = 0, target = chassis)//progress bar of your struggle to get free
- if(!patient)//if the patient was removed, there's no need for this anymore. Otherwise move on to normal release.
- return
- to_chat(patient, "You finally manage to force open the sleeper's hatch. You are free!")
patient.forceMove(get_turf(src))
occupant_message("[patient] ejected. Life support functions disabled.")
log_message("[patient] ejected. Life support functions disabled.")
@@ -529,7 +522,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw
name = "rescue jaw"
- desc = "Emergency rescue jaw, designed to help first responders reach their patients. Opens doors and removes obstacles."
+ desc = "Emergency rescue jaws, designed to help first responders reach their patients. Opens doors and removes obstacles."
icon_state = "mecha_clamp" //can work, might use a blue resprite later but I think it works for now
origin_tech = "engineering=4;biotech=3"
equip_cooldown = 15
@@ -547,21 +540,17 @@
D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function
if(isliving(target)) //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. (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.", \
+ 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 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.")
+
+
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/can_attach(obj/mecha/M)
+ if(istype(M, /obj/mecha/medical) || istype(M, /obj/mecha/working/ripley/firefighter)) //Odys or firefighters
+ if(M.equipment.lenThe [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(user, "The [src]'s ID slot rejects the card.")
- return
-
-
+ . = ..()
\ No newline at end of file
From f205c03ea7ef532129789bd9caaa85dd8c99aec2 Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Thu, 11 Oct 2018 09:12:52 +0200
Subject: [PATCH 07/10] Spacing issues fixed
---
code/__HELPERS/unsorted.dm | 6 +++---
code/game/mecha/equipment/tools/medical_tools.dm | 14 +++++++-------
code/game/mecha/mecha.dm | 4 ++--
code/game/mecha/working/ripley.dm | 9 ++++-----
.../research/designs/mechfabricator_designs.dm | 5 ++---
5 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index b17431594d3..4a6dce09464 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1151,9 +1151,9 @@ var/global/list/common_tools = list(
return 0
/proc/ispowertool(O)//used to check if a tool can force powered doors
- if(istype(O, /obj/item/crowbar/power) || istype(O, /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/))
- return 1
- return 0
+ if(istype(O, /obj/item/crowbar/power) || istype(O, /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw))
+ return TRUE
+ return FALSE
/proc/iswire(O)
if(istype(O, /obj/item/stack/cable_coil))
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index c8bc3dfde98..c28523d80ed 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -524,7 +524,7 @@
name = "rescue jaw"
desc = "Emergency rescue jaws, designed to help first responders reach their patients. Opens doors and removes obstacles."
icon_state = "mecha_clamp" //can work, might use a blue resprite later but I think it works for now
- origin_tech = "engineering=4;biotech=3"
+ origin_tech = "materials=2;engineering=2" //kind of sad, but identical to jaws of life
equip_cooldown = 15
energy_drain = 10
var/dam_force = 20
@@ -533,8 +533,8 @@
/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/action(atom/target)
if(!action_checks(target))
return
- if(istype(target,/obj))
- if(!istype(target , /obj/machinery/door))//early return if we're not trying to open a door
+ if(istype(target, /obj))
+ if(!istype(target, /obj/machinery/door))//early return if we're not trying to open a door
return
var/obj/machinery/door/D = target //the door we want to open
D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function
@@ -544,13 +544,13 @@
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
- step_away(M,chassis)//out of the way, I have people to save!
+ 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.")
/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/can_attach(obj/mecha/M)
if(istype(M, /obj/mecha/medical) || istype(M, /obj/mecha/working/ripley/firefighter)) //Odys or firefighters
- if(M.equipment.lenThe [src]'s ID slot rejects the card.")
+ to_chat(user, "[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 ae97d59ea3c..407c9cd63dc 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -183,11 +183,10 @@
drill.equip_cooldown = initial(drill.equip_cooldown)
/obj/mecha/working/ripley/emag_act(mob/user)
- if(emagged == 0)
- emagged = 1
- to_chat(user, "You slide the card through the [src]'s ID slot.")
+ if(!emagged)
+ emagged = TRUE
+ to_chat(user, "You slide the card through [src]'s ID slot.")
playsound(loc, "sparks", 100, 1)
desc += "The mech's equipment slots spark dangerously!"
else
- to_chat(user, "The [src]'s ID slot rejects the card.")
- return
+ to_chat(user, "[src]'s ID slot rejects the card.")
diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm
index 28ea2e91e49..0253bb32055 100644
--- a/code/modules/research/designs/mechfabricator_designs.dm
+++ b/code/modules/research/designs/mechfabricator_designs.dm
@@ -657,9 +657,8 @@
name = "Exosuit Medical Equipment (Rescue Jaw)"
id = "mech_medical_jaw"
build_type = MECHFAB
- req_tech = list("biotech" = 4, "engineering" = 4)
- build_path = /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw
- materials = list(MAT_METAL=5000,MAT_GLASS=2000,MAT_DIAMOND=1500)
+ req_tech = list("materials" = 4, "engineering" = 6, "magnets" = 6) //now same as jaws of life
+ materials = list(MAT_METAL=5000,MAT_SILVER=2000,MAT_TITANIUM=1500)
construction_time = 200
category = list("Exosuit Equipment")
From 60367d688a7bbdcbd05efb872ab0f6c3ec34702a Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Thu, 11 Oct 2018 10:47:53 +0200
Subject: [PATCH 08/10] Pushing to the sides added
---
code/game/mecha/equipment/tools/medical_tools.dm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index c28523d80ed..ccb4e593078 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -544,10 +544,22 @@
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
- step_away(M, chassis)//out of the way, I have people to save!
+ push_aside(chassis, M)//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.")
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/proc/push_aside(obj/mecha/M, mob/living/L)
+ switch(get_dir(M, L))
+ if(NORTH, SOUTH)
+ if(prob(50))
+ step(L, WEST)
+ else
+ step(L, EAST)
+ if(WEST, EAST)
+ if(prob(50))
+ step(L, NORTH)
+ else
+ step(L, SOUTH)
/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/can_attach(obj/mecha/M)
if(istype(M, /obj/mecha/medical) || istype(M, /obj/mecha/working/ripley/firefighter)) //Odys or firefighters
From 19f925f52509c49c60355c3bfeb33daa8b72f8e7 Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Thu, 11 Oct 2018 18:24:57 +0200
Subject: [PATCH 09/10] added notice span
---
code/game/mecha/equipment/tools/medical_tools.dm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index ccb4e593078..9dc6c8e6f11 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -541,12 +541,12 @@
if(isliving(target)) //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 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.")
+ 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.", \
+ "")
else
push_aside(chassis, M)//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.")
+ occupant_message("You gently push [target] out of the way.")
+ chassis.visible_message("[chassis] gently pushes [target] out of the way.")
/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/proc/push_aside(obj/mecha/M, mob/living/L)
switch(get_dir(M, L))
From 611a069deba9cb5277f528d7ed1271cf1aca62fa Mon Sep 17 00:00:00 2001
From: TDSSS <32099540+TDSSS@users.noreply.github.com>
Date: Sun, 14 Oct 2018 15:00:15 +0200
Subject: [PATCH 10/10] added span class to ripley clamp too
---
code/game/mecha/equipment/tools/work_tools.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm
index ca327fe6ef7..29dd919aa58 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/game/mecha/equipment/tools/work_tools.dm
@@ -63,8 +63,8 @@
start_cooldown()
else
step_away(M,chassis)
- occupant_message("You push [target] out of the way.")
- chassis.visible_message("[chassis] pushes [target] out of the way.")
+ occupant_message("You push [target] out of the way.")
+ chassis.visible_message("[chassis] pushes [target] out of the way.")
return 1