mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-26 22:56:33 +01:00
Merge pull request #8389 from Atermonera/tool_fixes_3
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)
|
||||
|
||||
@@ -1124,13 +1124,13 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
// The RNG with table/rollerbeds comes into play in do_surgery() so that fail_step() can be used instead.
|
||||
/proc/can_operate(mob/living/carbon/M, mob/living/user)
|
||||
// You can, technically, always operate on yourself after standing still. Inadvised, but you can.
|
||||
if(istype(user) && \
|
||||
return M.lying || \
|
||||
(
|
||||
M == user && \
|
||||
user.allow_self_surgery && \
|
||||
user.a_intent == I_HELP && \
|
||||
!M.isSynthetic())
|
||||
return TRUE
|
||||
return M.lying
|
||||
!M.isSynthetic()
|
||||
)
|
||||
|
||||
// Returns an instance of a valid surgery surface.
|
||||
/mob/living/proc/get_surgery_surface(mob/living/user)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/obj/item/weapon/material/knife = 50
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_SCREWDRIVER = 100)
|
||||
allowed_procs = list(TOOL_SCREWDRIVER = 100)
|
||||
|
||||
req_open = 0
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/obj/item/weapon/material/kitchen/utensil = 50
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_CROWBAR = 100)
|
||||
allowed_procs = list(TOOL_CROWBAR = 100)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
@@ -110,7 +110,7 @@
|
||||
/obj/item/weapon/material/kitchen/utensil = 50
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_CROWBAR = 100)
|
||||
allowed_procs = list(TOOL_CROWBAR = 100)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
@@ -237,7 +237,7 @@
|
||||
/obj/item/weapon/surgical/bonegel = 30, \
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_SCREWDRIVER = 100)
|
||||
allowed_procs = list(TOOL_SCREWDRIVER = 100)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
@@ -355,7 +355,7 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/decl/surgery_step/robotics/attach_organ_robotic
|
||||
allowed_procs = list(IS_SCREWDRIVER = 100)
|
||||
allowed_procs = list(TOOL_SCREWDRIVER = 100)
|
||||
|
||||
min_duration = 100
|
||||
max_duration = 120
|
||||
@@ -405,7 +405,7 @@
|
||||
|
||||
/decl/surgery_step/robotics/install_mmi
|
||||
allowed_tools = list(
|
||||
/obj/item/device/mmi = 100
|
||||
/obj/item/device/mmi = 100
|
||||
)
|
||||
|
||||
min_duration = 60
|
||||
@@ -487,7 +487,7 @@
|
||||
|
||||
/decl/surgery_step/robotics/install_nymph
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/holder/diona = 100
|
||||
/obj/item/weapon/holder/diona = 100
|
||||
)
|
||||
|
||||
min_duration = 60
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
/obj/item/weapon/tool/hydraulic_cutter
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, compressed through the magic of science."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "jaws_pry"
|
||||
item_state = "jawsoflife"
|
||||
matter = list(MAT_METAL=150, MAT_SILVER=50)
|
||||
@@ -82,5 +83,6 @@
|
||||
playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
|
||||
set_tool_quality(TOOL_CROWBAR, state ? TOOL_QUALITY_GOOD : TOOL_QUALITY_NONE)
|
||||
set_tool_quality(TOOL_WIRECUTTER, state ? TOOL_QUALITY_NONE : TOOL_QUALITY_GOOD)
|
||||
icon_state = state ? "jaws_pry" : "jaws_cutter"
|
||||
to_chat(user, "<span class='notice'>You attach the [state ? "prying" : "cutting"] jaws to [src].</span>")
|
||||
state = !state
|
||||
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
/obj/item/weapon/tool/powerdrill
|
||||
name = "hand drill"
|
||||
desc = "A simple powered hand drill."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "drill_screw"
|
||||
item_state = "drill"
|
||||
matter = list(MAT_STEEL = 150, MAT_SILVER = 50)
|
||||
@@ -126,5 +127,6 @@
|
||||
playsound(src,'sound/items/change_drill.ogg',50,1)
|
||||
set_tool_quality(TOOL_SCREWDRIVER, state ? TOOL_QUALITY_GOOD : TOOL_QUALITY_NONE)
|
||||
set_tool_quality(TOOL_WRENCH, state ? TOOL_QUALITY_NONE : TOOL_QUALITY_GOOD)
|
||||
state = !state
|
||||
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
|
||||
icon_state = state ? "drill_screw" : "drill_bolt"
|
||||
to_chat(user, "<span class='notice'>You attach the [state ? "screw" : "bolt"] driver bit to [src].</span>")
|
||||
state = !state
|
||||
Reference in New Issue
Block a user