mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Pumps can now be unsecured by pipe wrenches (#7270)
This commit is contained in:
@@ -214,23 +214,25 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.iswrench())
|
||||
if (!W.iswrench() && !istype(W, /obj/item/weapon/pipewrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && use_power)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it too exerted due to internal pressure.</span>")
|
||||
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE && !istype(W, /obj/item/weapon/pipewrench))
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it's too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You struggle to unwrench \the [src] with your pipe wrench.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40/W.toolspeed, act_target = src))
|
||||
if (do_after(user, istype(W, /obj/item/weapon/pipewrench) ? 80/W.toolspeed : 40/W.toolspeed, act_target = src))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear ratchet.")
|
||||
"You hear a ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user