Emagging added.

This commit is contained in:
TDSSS
2018-10-05 01:25:53 +02:00
parent 18216171e6
commit c949829183
5 changed files with 59 additions and 14 deletions
@@ -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, "<span class = 'userdanger'> The [src]'s internal release level refuses to move. You are trapped! </span>")
chassis.visible_message("<span class='warning'>You hear someone bang against the inside of [chassis]'s sleeper.</span>")//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("<span class='danger'>[chassis] brutally punches [target].</span>", \
"<span class='userdanger'>[chassis] brutally punches [target].</span>",\
"<span class='italics'>You hear something crack.</span>")
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
+1 -7
View File
@@ -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, "<span class='notice'>You slide the card through the [src]'s ID slot.</span>")
playsound(loc, "sparks", 100, 1)
desc += "</br><span class='danger'>The mech's equipment slots spark dangerously!</span>"
else
to_chat(usr, "<span class='warning'>The [src]'s ID slot rejects the card.</span>")
to_chat(usr, "<span class='warning'>The [src]'s ID slot rejects the card.</span>")
return
+18
View File
@@ -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, "<span class='notice'>The [src]'s speaker chimes in a distorted voice \"First...do harm.\" as you swipe the card through the ID slot.</span>")
playsound(loc, "sparks", 100, 1)
desc += "</br><span class='danger'>The mech's movement is sudden and jerky!</span>"
else
to_chat(usr, "<span class='warning'>The [src]'s ID slot rejects the card.</span>")
return
+11 -1
View File
@@ -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)
drill.equip_cooldown = initial(drill.equip_cooldown)
/obj/mecha/working/ripley/emag_act(user as mob)
if(emagged == 0)
emagged = 1
to_chat(usr, "<span class='notice'>You slide the card through the [src]'s ID slot.</span>")
playsound(loc, "sparks", 100, 1)
desc += "</br><span class='danger'>The mech's equipment slots spark dangerously!</span>"
else
to_chat(usr, "<span class='warning'>The [src]'s ID slot rejects the card.</span>")
return
@@ -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"