Fixes powertool sprites, fixes unfastening atmospheric devices

This commit is contained in:
atermonera
2022-02-05 14:18:10 -08:00
parent e960a4c18e
commit 61e12c7839
14 changed files with 22 additions and 18 deletions
+4 -4
View File
@@ -230,15 +230,15 @@ Pipelines + Other Objects -> Pipe network
// layer = initial(layer) + PIPE_LAYER_OFFSET(piping_layer)
/obj/machinery/atmospherics/default_deconstruction_wrench(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.get_tool_quality(TOOL_WRENCH))
if(!W.get_tool_quality(TOOL_WRENCH)) //TRUE, skip
return FALSE
if(!can_unwrench())
to_chat(user, "<span class='warnng'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
if(!can_unwrench()) // TRUE, skil
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
else
playsound(src, W.usesound, 50, 1, preference = /datum/client_preference/pickup_sounds)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
@@ -284,7 +284,7 @@
if (unlocked)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
#undef REGULATE_NONE
#undef REGULATE_INPUT
@@ -245,4 +245,4 @@ Thus, the two variables affect pump operation are set in New():
if (!(stat & NOPOWER) && use_power)
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
@@ -82,7 +82,7 @@
/obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(!W.get_tool_quality(TOOL_WRENCH))
return ..()
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
/obj/machinery/atmospherics/omni/attack_hand(user as mob)
if(..())
@@ -154,4 +154,4 @@
return TRUE
if(locate(/obj/machinery/portable_atmospherics, src.loc))
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W,user)
@@ -54,7 +54,7 @@
/obj/machinery/atmospherics/trinary/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.get_tool_quality(TOOL_WRENCH))
return ..()
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
// Housekeeping and pipe network stuff below
/obj/machinery/atmospherics/trinary/get_neighbor_nodes_for_init()
+1 -1
View File
@@ -332,7 +332,7 @@
if(istype(src, /obj/machinery/atmospherics/tvalve/digital))
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it's too complicated.</span>")
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
/obj/machinery/atmospherics/tvalve/mirrored
@@ -73,4 +73,4 @@
if (level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
@@ -163,5 +163,5 @@
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.get_tool_quality(TOOL_WRENCH))
return ..()
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
@@ -425,7 +425,7 @@
if (node && node.level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
#undef DEFAULT_PRESSURE_DELTA
@@ -273,7 +273,7 @@
if (node && node.level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
+1 -1
View File
@@ -293,7 +293,7 @@
if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
return TRUE
return default_deconstruction_wrench(user, W)
return default_deconstruction_wrench(W, user)
/obj/machinery/atmospherics/valve/examine(mob/user)