Merge pull request #9732 from TDSSS/ody-stuff

New mech equipment: Jaws of life for Ody/Firefighter Ripley
This commit is contained in:
Mark Mak
2018-10-19 06:54:38 +08:00
committed by GitHub
8 changed files with 79 additions and 16 deletions
+5
View File
@@ -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_jaw))
return TRUE
return FALSE
/proc/iswire(O)
if(istype(O, /obj/item/stack/cable_coil))
return 1
+2 -2
View File
@@ -1024,7 +1024,7 @@ About the new airlock wires panel:
else if(locked)
to_chat(user, "<span class='warning'>The airlock's bolts prevent it from being forced!</span>")
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)
@@ -1041,7 +1041,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
@@ -519,3 +519,50 @@
for(var/reagent in processed_reagents)
reagents.add_reagent(reagent,amount)
chassis.use_power(energy_drain)
/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw
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 = "materials=2;engineering=2" //kind of sad, but identical to jaws of life
equip_cooldown = 15
energy_drain = 10
var/dam_force = 20
/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
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(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("<span class='notice'>[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.</span>", \
"<span class='notice'[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.</span>")
else
push_aside(chassis, M)//out of the way, I have people to save!
occupant_message("<span class='notice'>You gently push [target] out of the way.</span>")
chassis.visible_message("<span class='notice'>[chassis] gently pushes [target] out of the way.</span>")
/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
if(M.equipment.len < M.max_equip)
return TRUE
return FALSE
@@ -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("<span class='notice'>You push [target] out of the way.</span>")
chassis.visible_message("<span class='notice'>[chassis] pushes [target] out of the way.</span>")
return 1
+3 -9
View File
@@ -41,7 +41,7 @@
var/datum/effect_system/spark_spread/spark_system = new
var/lights = 0
var/lights_power = 6
var/emagged = 0
var/emagged = FALSE
//inner atmos
var/use_internal_tank = 0
@@ -851,14 +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)
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>")
/obj/mecha/emag_act(mob/user)
to_chat(user, "<span class='warning'>[src]'s ID slot rejects the card.</span>")
return
+1 -2
View File
@@ -42,5 +42,4 @@
A.remove_hud_from(H)
builtin_hud_user = 0
. = ..()
. = ..()
+10 -1
View File
@@ -180,4 +180,13 @@
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(mob/user)
if(!emagged)
emagged = TRUE
to_chat(user, "<span class='notice'>You slide the card through [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(user, "<span class='warning'>[src]'s ID slot rejects the card.</span>")
@@ -653,6 +653,15 @@
construction_time = 200
category = list("Exosuit Equipment")
/datum/design/medical_jaw
name = "Exosuit Medical Equipment (Rescue Jaw)"
id = "mech_medical_jaw"
build_type = MECHFAB
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")
/datum/design/mech_generator
name = "Exosuit Equipment (Plasma Generator)"
id = "mech_generator"