diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 4dd3c56d12f..6ce486bdc05 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_jaw)) + return TRUE + return FALSE + /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 0fd3d27d3d4..4c98d61d27a 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1024,7 +1024,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) @@ -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 diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index a8e854467a2..9dc6c8e6f11 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -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("[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.") + +/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 diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index b63bb4fc40c..d119469d55a 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 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 41f60361831..d4650aa1bbb 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -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, "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.") +/obj/mecha/emag_act(mob/user) + to_chat(user, "[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..d0fcb0f99be 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -42,5 +42,4 @@ A.remove_hud_from(H) builtin_hud_user = 0 - . = ..() - + . = ..() \ No newline at end of file diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index d29bf2ae460..407c9cd63dc 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -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) \ No newline at end of file + drill.equip_cooldown = initial(drill.equip_cooldown) + +/obj/mecha/working/ripley/emag_act(mob/user) + 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, "[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 1589b78438b..0253bb32055 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -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"