mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-25 06:06:34 +01:00
Fixes powertool sprites, fixes unfastening atmospheric devices
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user