What was supposed to be another straightforward major system overhaul that once again spiraled out of control (#8220)

* get_tool_quality has numerical meaning

* Basic tools set tool quality

* Toolspeed is replaced by tool quality checks

* Addresses assorted results from live test

* Extra cleanup
This commit is contained in:
Atermonera
2022-01-16 15:52:55 -08:00
committed by GitHub
parent 0232be9531
commit 4d8c43f106
312 changed files with 1902 additions and 2271 deletions

View File

@@ -160,8 +160,8 @@ Pipelines + Other Objects -> Pipe network
var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air() var/datum/gas_mixture/env_air = loc.return_air()
if((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE) if((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
return 0 return FALSE
return 1 return TRUE
// Deconstruct into a pipe item. // Deconstruct into a pipe item.
/obj/machinery/atmospherics/proc/deconstruct() /obj/machinery/atmospherics/proc/deconstruct()
@@ -228,3 +228,21 @@ Pipelines + Other Objects -> Pipe network
// pixel_x = PIPE_PIXEL_OFFSET_X(piping_layer) // pixel_x = PIPE_PIXEL_OFFSET_X(piping_layer)
// pixel_y = PIPE_PIXEL_OFFSET_Y(piping_layer) // pixel_y = PIPE_PIXEL_OFFSET_Y(piping_layer)
// layer = initial(layer) + PIPE_LAYER_OFFSET(piping_layer) // 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))
return FALSE
if(!can_unwrench())
to_chat(user, "<span class='warnng'>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)))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
add_fingerprint(user)
return TRUE

View File

@@ -91,7 +91,7 @@
return 1 return 1
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 75, 1) playsound(src, W.usesound, 75, 1)
anchored = !anchored anchored = !anchored
user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \ user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \

View File

@@ -279,23 +279,12 @@
add_fingerprint(usr) add_fingerprint(usr)
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if (unlocked) if (unlocked)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>") to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear ratchet.")
deconstruct()
#undef REGULATE_NONE #undef REGULATE_NONE
#undef REGULATE_INPUT #undef REGULATE_INPUT

View File

@@ -240,20 +240,9 @@ Thus, the two variables affect pump operation are set in New():
update_icon() update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if (!(stat & NOPOWER) && use_power) if (!(stat & NOPOWER) && use_power)
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>") to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear ratchet.")
deconstruct()

View File

@@ -80,21 +80,9 @@
update_icon() update_icon()
/obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(!W.is_wrench()) if(!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
return default_deconstruction_wrench(user, W)
if(!can_unwrench())
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
playsound(src, W.usesound, 50, 1)
if(do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/omni/attack_hand(user as mob) /obj/machinery/atmospherics/omni/attack_hand(user as mob)
if(..()) if(..())

View File

@@ -147,22 +147,11 @@
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if(!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if (connected_device) if(connected_device)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], dettach \the [connected_device] first.</span>") to_chat(user, "<span class='warning'>You cannot unwrench \the [src], dettach \the [connected_device] first.</span>")
return 1 return TRUE
if (locate(/obj/machinery/portable_atmospherics, src.loc)) if(locate(/obj/machinery/portable_atmospherics, src.loc))
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()

View File

@@ -52,20 +52,9 @@
update_icon() update_icon()
/obj/machinery/atmospherics/trinary/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/trinary/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
// Housekeeping and pipe network stuff below // Housekeeping and pipe network stuff below
/obj/machinery/atmospherics/trinary/get_neighbor_nodes_for_init() /obj/machinery/atmospherics/trinary/get_neighbor_nodes_for_init()

View File

@@ -327,23 +327,13 @@
go_to_side() go_to_side()
/obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if(!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if (istype(src, /obj/machinery/atmospherics/tvalve/digital)) if(istype(src, /obj/machinery/atmospherics/tvalve/digital))
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it's too complicated.</span>") to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it's too complicated.</span>")
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warnng'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/tvalve/mirrored /obj/machinery/atmospherics/tvalve/mirrored
icon_state = "map_tvalvem0" icon_state = "map_tvalvem0"

View File

@@ -67,21 +67,10 @@
return 1 return 1
/obj/machinery/atmospherics/unary/heat_exchanger/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/unary/heat_exchanger/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
var/turf/T = src.loc var/turf/T = src.loc
if (level==1 && isturf(T) && !T.is_plating()) if (level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>") to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1 return TRUE
if (!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()

View File

@@ -161,14 +161,7 @@
update_icon() update_icon()
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
return default_deconstruction_wrench(user, W)
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()

View File

@@ -381,7 +381,7 @@
var/obj/item/weapon/weldingtool/WT = W var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user)) if (WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>Now welding the vent.</span>") to_chat(user, "<span class='notice'>Now welding the vent.</span>")
if(do_after(user, 20 * WT.toolspeed)) if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.isOn()) return if(!src || !WT.isOn()) return
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(!welded) if(!welded)
@@ -416,27 +416,16 @@
update_icon() update_icon()
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if (!(stat & NOPOWER) && use_power) if (!(stat & NOPOWER) && use_power)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>") to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
return 1 return TRUE
var/turf/T = src.loc var/turf/T = src.loc
if (node && node.level==1 && isturf(T) && !T.is_plating()) if (node && node.level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>") to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
#undef DEFAULT_PRESSURE_DELTA #undef DEFAULT_PRESSURE_DELTA

View File

@@ -264,27 +264,17 @@
update_icon() update_icon()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if (!(stat & NOPOWER) && use_power) if (!(stat & NOPOWER) && use_power)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>") to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
return 1 return TRUE
var/turf/T = src.loc var/turf/T = src.loc
if (node && node.level==1 && isturf(T) && !T.is_plating()) if (node && node.level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>") to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user) /obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
. = ..() . = ..()

View File

@@ -19,7 +19,7 @@
var/datum/pipe_network/network_node2 var/datum/pipe_network/network_node2
/obj/machinery/atmospherics/valve/open /obj/machinery/atmospherics/valve/open
open = 1 open = TRUE
icon_state = "map_valve1" icon_state = "map_valve1"
/obj/machinery/atmospherics/valve/update_icon(animation) /obj/machinery/atmospherics/valve/update_icon(animation)
@@ -61,7 +61,7 @@
network_node1 = new_network network_node1 = new_network
if(new_network.normal_members.Find(src)) if(new_network.normal_members.Find(src))
return 0 return FALSE
new_network.normal_members += src new_network.normal_members += src
@@ -89,9 +89,10 @@
node2 = null node2 = null
/obj/machinery/atmospherics/valve/proc/open() /obj/machinery/atmospherics/valve/proc/open()
if(open) return 0 if(open)
return FALSE
open = 1 open = TRUE
update_icon() update_icon()
if(network_node1&&network_node2) if(network_node1&&network_node2)
@@ -99,17 +100,17 @@
network_node2 = network_node1 network_node2 = network_node1
if(network_node1) if(network_node1)
network_node1.update = 1 network_node1.update = TRUE
else if(network_node2) else if(network_node2)
network_node2.update = 1 network_node2.update = TRUE
return 1 return TRUE
/obj/machinery/atmospherics/valve/proc/close() /obj/machinery/atmospherics/valve/proc/close()
if(!open) if(!open)
return 0 return FALSE
open = 0 open = FALSE
update_icon() update_icon()
if(network_node1) if(network_node1)
@@ -119,7 +120,7 @@
build_network() build_network()
return 1 return TRUE
/obj/machinery/atmospherics/valve/proc/normalize_dir() /obj/machinery/atmospherics/valve/proc/normalize_dir()
if(dir==3) if(dir==3)
@@ -141,9 +142,7 @@
/obj/machinery/atmospherics/valve/process() /obj/machinery/atmospherics/valve/process()
..() ..()
. = PROCESS_KILL return PROCESS_KILL
return
/obj/machinery/atmospherics/valve/atmos_init() /obj/machinery/atmospherics/valve/atmos_init()
normalize_dir() normalize_dir()
@@ -199,7 +198,7 @@
if(network_node2 == old_network) if(network_node2 == old_network)
network_node2 = new_network network_node2 = new_network
return 1 return TRUE
/obj/machinery/atmospherics/valve/return_network_air(datum/pipe_network/reference) /obj/machinery/atmospherics/valve/return_network_air(datum/pipe_network/reference)
return null return null
@@ -229,7 +228,7 @@
/obj/machinery/atmospherics/valve/digital/Destroy() /obj/machinery/atmospherics/valve/digital/Destroy()
unregister_radio(src, frequency) unregister_radio(src, frequency)
. = ..() return ..()
/obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob) /obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob)
return src.attack_hand(user) return src.attack_hand(user)
@@ -240,20 +239,20 @@
if(!src.allowed(user)) if(!src.allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>") to_chat(user, "<span class='warning'>Access denied.</span>")
return return
..() return ..()
/obj/machinery/atmospherics/valve/digital/open /obj/machinery/atmospherics/valve/digital/open
open = 1 open = TRUE
icon_state = "map_valve1" icon_state = "map_valve1"
/obj/machinery/atmospherics/valve/digital/power_change() /obj/machinery/atmospherics/valve/digital/power_change()
var/old_stat = stat var/old_stat = stat
..() . = ..()
if(old_stat != stat) if(old_stat != stat)
update_icon() update_icon()
/obj/machinery/atmospherics/valve/digital/update_icon() /obj/machinery/atmospherics/valve/digital/update_icon()
..() . = ..()
if(!powered()) if(!powered())
icon_state = "valve[open]nopower" icon_state = "valve[open]nopower"
@@ -270,7 +269,7 @@
/obj/machinery/atmospherics/valve/digital/receive_signal(datum/signal/signal) /obj/machinery/atmospherics/valve/digital/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id)) if(!signal.data["tag"] || (signal.data["tag"] != id))
return 0 return FALSE
switch(signal.data["command"]) switch(signal.data["command"])
if("valve_open") if("valve_open")
@@ -286,25 +285,16 @@
close() close()
else else
open() open()
return TRUE
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user)) if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>") to_chat(user, "<span class='warning'>Access denied.</span>")
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(user, W)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/valve/examine(mob/user) /obj/machinery/atmospherics/valve/examine(mob/user)
. = ..() . = ..()

View File

@@ -114,26 +114,17 @@
return ..() return ..()
if(istype(W,/obj/item/device/pipe_painter)) if(istype(W,/obj/item/device/pipe_painter))
return 0 return FALSE
if (!W.is_wrench()) if (!W.get_tool_quality(TOOL_WRENCH))
return ..() return ..()
var/turf/T = src.loc var/turf/T = src.loc
if (level==1 && isturf(T) && !T.is_plating()) if (level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>") to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1 return TRUE
if(!can_unwrench()) return default_deconstruction_wrench(W, user)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 10 * W.toolspeed))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/pipe/proc/change_color(var/new_color) /obj/machinery/atmospherics/pipe/proc/change_color(var/new_color)
//only pass valid pipe colors please ~otherwise your pipe will turn invisible //only pass valid pipe colors please ~otherwise your pipe will turn invisible

View File

@@ -256,12 +256,6 @@ var/global/list/##LIST_NAME = list();\
#define MATRIX_Vulp_Colorblind list(0.50, 0.40, 0.10, 0.50, 0.40, 0.10, 0, 0.20, 0.80) #define MATRIX_Vulp_Colorblind list(0.50, 0.40, 0.10, 0.50, 0.40, 0.10, 0, 0.20, 0.80)
#define MATRIX_Taj_Colorblind list(0.40, 0.20, 0.40, 0.40, 0.60, 0, 0.20, 0.20, 0.60) #define MATRIX_Taj_Colorblind list(0.40, 0.20, 0.40, 0.40, 0.60, 0, 0.20, 0.20, 0.60)
// Tool substitution defines
#define IS_SCREWDRIVER "screwdriver"
#define IS_CROWBAR "crowbar"
#define IS_WIRECUTTER "wirecutter"
#define IS_WRENCH "wrench"
// Diagonal movement // Diagonal movement
#define FIRST_DIAG_STEP 1 #define FIRST_DIAG_STEP 1

View File

@@ -12,10 +12,26 @@
#define TOOL_RETRACTOR "retractor" #define TOOL_RETRACTOR "retractor"
#define TOOL_HEMOSTAT "hemostat" #define TOOL_HEMOSTAT "hemostat"
#define TOOL_CAUTERY "cautery" #define TOOL_CAUTERY "cautery"
#define TOOL_DRILL "drill" #define TOOL_SDRILL "surgical_drill"
#define TOOL_SCALPEL "scalpel" #define TOOL_SCALPEL "scalpel"
#define TOOL_SAW "saw" #define TOOL_CSAW "circ_saw"
#define TOOL_BONESET "bonesetter" #define TOOL_BONESET "bonesetter"
#define TOOL_KNIFE "knife" #define TOOL_KNIFE "knife"
#define TOOL_BLOODFILTER "bloodfilter" #define TOOL_BLOODFILTER "bloodfilter"
#define TOOL_ROLLINGPIN "rollingpin" #define TOOL_ROLLINGPIN "rollingpin"
#define TOOL_BONEGEL "bonegel"
#define TOOL_FIXVEIN "fixovein"
#define TOOL_BONECLAMP "boneclamp"
#define TOOL_NANOPASTE "nanopaste"
#define TOOL_FISHING "fishing rod"
#define TOOL_WOODCUT "axe"
// Divisor for use time. Higher value = better
#define TOOL_QUALITY_NONE 0
#define TOOL_QUALITY_WORST 0.125
#define TOOL_QUALITY_POOR 0.25
#define TOOL_QUALITY_MEDIOCRE 0.5
#define TOOL_QUALITY_STANDARD 1
#define TOOL_QUALITY_DECENT 2
#define TOOL_QUALITY_GOOD 4
#define TOOL_QUALITY_BEST 8

View File

@@ -148,11 +148,11 @@ var/global/list/string_slot_flags = list(
var/datum/sprite_accessory/marking/M = new path() var/datum/sprite_accessory/marking/M = new path()
body_marking_styles_list[M.name] = M body_marking_styles_list[M.name] = M
//Surgery Steps - Initialize all /datum/surgery_step into a list //Surgery Steps - Initialize all /decl/surgery_step into a list
paths = typesof(/datum/surgery_step)-/datum/surgery_step paths = subtypesof(/decl/surgery_step)
for(var/T in paths) for(var/T in paths)
var/datum/surgery_step/S = new T var/decl/surgery_step/S = new T
surgery_steps += S surgery_steps += S // TODO: Actually treat this like a decl
sort_surgeries() sort_surgeries()
//List of job. I can't believe this was calculated multiple times per tick! //List of job. I can't believe this was calculated multiple times per tick!

View File

@@ -142,19 +142,24 @@ Proc for attack log creation, because really why not
else else
return pick("chest", "groin") return pick("chest", "groin")
/proc/do_mob(mob/user , mob/target, time = 30, target_zone = 0, uninterruptible = FALSE, progress = TRUE, ignore_movement = FALSE) /proc/do_mob(mob/user , mob/target, delay = 30, target_zone = 0, uninterruptible = FALSE, progress = TRUE, ignore_movement = FALSE)
if(delay < 0)
return FALSE
if(!user || !target) if(!user || !target)
return 0 return FALSE
if(delay == 0)
return TRUE
var/user_loc = user.loc var/user_loc = user.loc
var/target_loc = target.loc var/target_loc = target.loc
var/holding = user.get_active_hand() var/holding = user.get_active_hand()
var/datum/progressbar/progbar var/datum/progressbar/progbar
if (progress) if (progress)
progbar = new(user, time, target) progbar = new(user, delay, target)
var/endtime = world.time+time
var/starttime = world.time var/starttime = world.time
var/endtime = starttime + delay
. = TRUE . = TRUE
while (world.time < endtime) while (world.time < endtime)
stoplag(1) stoplag(1)
@@ -190,10 +195,12 @@ Proc for attack log creation, because really why not
qdel(progbar) qdel(progbar)
/proc/do_after(mob/user, delay, atom/target = null, needhand = TRUE, progress = TRUE, incapacitation_flags = INCAPACITATION_DEFAULT, ignore_movement = FALSE, max_distance = null) /proc/do_after(mob/user, delay, atom/target = null, needhand = TRUE, progress = TRUE, incapacitation_flags = INCAPACITATION_DEFAULT, ignore_movement = FALSE, max_distance = null)
if(delay < 0)
return FALSE
if(!user) if(!user)
return 0 return FALSE
if(!delay) if(!delay)
return 1 //Okay. Done. return TRUE //Okay. Done.
var/atom/target_loc = null var/atom/target_loc = null
if(target) if(target)
target_loc = target.loc target_loc = target.loc
@@ -212,9 +219,9 @@ Proc for attack log creation, because really why not
if (progress) if (progress)
progbar = new(user, delay, target) progbar = new(user, delay, target)
var/endtime = world.time + delay
var/starttime = world.time var/starttime = world.time
. = 1 var/endtime = starttime + delay
. = TRUE
while (world.time < endtime) while (world.time < endtime)
stoplag(1) stoplag(1)
if(progress) if(progress)

View File

@@ -1069,32 +1069,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
loc = loc.loc loc = loc.loc
return null return null
/proc/get_turf_or_move(turf/location)
return get_turf(location)
//Quick type checks for some tools
var/global/list/common_tools = list(
/obj/item/stack/cable_coil,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wirecutters,
/obj/item/device/multitool,
/obj/item/weapon/tool/crowbar)
/proc/istool(O)
if(O && is_type_in_list(O, common_tools))
return 1
return 0
/proc/is_wire_tool(obj/item/I) /proc/is_wire_tool(obj/item/I)
if(istype(I, /obj/item/device/multitool) || I.is_wirecutter()) return I.get_tool_quality(TOOL_MULTITOOL) || \
return TRUE I.get_tool_quality(TOOL_WIRECUTTER) || \
if(istype(I, /obj/item/device/assembly/signaler)) istype(I, /obj/item/device/assembly/signaler)
return TRUE
return
/proc/is_hot(obj/item/W as obj) /proc/is_hot(obj/item/W as obj)
switch(W.type) switch(W.type)
@@ -1126,24 +1104,6 @@ var/global/list/common_tools = list(
else else
return 0 return 0
//Whether or not the given item counts as sharp in terms of dealing damage
/proc/is_sharp(obj/O as obj)
if(!O)
return FALSE
if(O.sharp)
return TRUE
if(O.edge)
return TRUE
return FALSE
//Whether or not the given item counts as cutting with an edge in terms of removing limbs
/proc/has_edge(obj/O as obj)
if(!O)
return FALSE
if(O.edge)
return TRUE
return FALSE
//Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape. //Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape.
/proc/can_puncture(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? /proc/can_puncture(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
if(!W) if(!W)
@@ -1151,7 +1111,7 @@ var/global/list/common_tools = list(
if(W.sharp) if(W.sharp)
return TRUE return TRUE
return ( \ return ( \
W.is_screwdriver() || \ W.get_tool_quality(TOOL_SCREWDRIVER) || \
istype(W, /obj/item/weapon/pen) || \ istype(W, /obj/item/weapon/pen) || \
istype(W, /obj/item/weapon/weldingtool) || \ istype(W, /obj/item/weapon/weldingtool) || \
istype(W, /obj/item/weapon/flame/lighter/zippo) || \ istype(W, /obj/item/weapon/flame/lighter/zippo) || \
@@ -1160,27 +1120,17 @@ var/global/list/common_tools = list(
istype(W, /obj/item/weapon/shovel) \ istype(W, /obj/item/weapon/shovel) \
) )
/proc/is_surgery_tool(obj/item/W as obj)
return ( \
istype(W, /obj/item/weapon/surgical/scalpel) || \
istype(W, /obj/item/weapon/surgical/hemostat) || \
istype(W, /obj/item/weapon/surgical/retractor) || \
istype(W, /obj/item/weapon/surgical/cautery) || \
istype(W, /obj/item/weapon/surgical/bonegel) || \
istype(W, /obj/item/weapon/surgical/bonesetter)
)
// check if mob is lying down on something we can operate him on. // check if mob is lying down on something we can operate him on.
// The RNG with table/rollerbeds comes into play in do_surgery() so that fail_step() can be used instead. // 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) /proc/can_operate(mob/living/carbon/M, mob/living/user)
. = M.lying // You can, technically, always operate on yourself after standing still. Inadvised, but you can.
if(istype(user) && \
if(user && M == user && user.allow_self_surgery && user.a_intent == I_HELP) // You can, technically, always operate on yourself after standing still. Inadvised, but you can. M == user && \
user.allow_self_surgery && \
if(!M.isSynthetic()) user.a_intent == I_HELP && \
. = TRUE !M.isSynthetic())
return TRUE
return . return M.lying
// Returns an instance of a valid surgery surface. // Returns an instance of a valid surgery surface.
/mob/living/proc/get_surgery_surface(mob/living/user) /mob/living/proc/get_surgery_surface(mob/living/user)

View File

@@ -85,8 +85,10 @@
if(istype(item, /obj/item/stack)) if(istype(item, /obj/item/stack))
var/obj/item/stack/stack = item var/obj/item/stack/stack = item
.["other"][item.type] += stack.amount .["other"][item.type] += stack.amount
else if(item.tool_qualities) else if(LAZYLEN(item.tool_qualities))
.["tool_qualities"] |= item.tool_qualities for(var/tool_quality in item.tool_qualities)
if(.["tool_qualities"][tool_quality] < item.tool_qualities[tool_quality])
.["tool_qualities"][tool_quality] = item.tool_qualities[tool_quality]
.["other"][item.type] += 1 .["other"][item.type] += 1
else else
if(istype(item, /obj/item/weapon/reagent_containers)) if(istype(item, /obj/item/weapon/reagent_containers))
@@ -161,10 +163,10 @@
present_qualities[behavior] = TRUE present_qualities[behavior] = TRUE
available_tools[contained_item.type] = TRUE available_tools[contained_item.type] = TRUE
for(var/behavior in contained_item.tool_qualities) for(var/behavior in contained_item.tool_qualities)
present_qualities[behavior] = TRUE present_qualities[behavior] = max(present_qualities[behavior], contained_item.tool_qualities[behavior])
for(var/quality in surroundings["tool_behaviour"]) for(var/quality in surroundings["tool_behaviour"])
present_qualities[quality] = TRUE present_qualities[quality] = max(present_qualities[quality], surroundings[quality])
for(var/path in surroundings["other"]) for(var/path in surroundings["other"])
available_tools[path] = TRUE available_tools[path] = TRUE

View File

@@ -1,29 +0,0 @@
/obj/item
var/list/tool_qualities
/// Used to check for a specific tool quality on an item.
/// Returns TRUE or FALSE depending on whether `tool_quality` is found.
/obj/item/proc/has_tool_quality(tool_quality)
return !!LAZYFIND(tool_qualities, tool_quality)
/* Legacy Support */
/// DEPRECATED PROC: DO NOT USE IN NEW CODE
/obj/item/proc/is_screwdriver()
return has_tool_quality(TOOL_SCREWDRIVER)
/// DEPRECATED PROC: DO NOT USE IN NEW CODE
/obj/item/proc/is_wrench()
return has_tool_quality(TOOL_WRENCH)
/// DEPRECATED PROC: DO NOT USE IN NEW CODE
/obj/item/proc/is_crowbar()
return has_tool_quality(TOOL_CROWBAR)
/// DEPRECATED PROC: DO NOT USE IN NEW CODE
/obj/item/proc/is_wirecutter()
return has_tool_quality(TOOL_WIRECUTTER)
/// DEPRECATED PROC: DO NOT USE IN NEW CODE
/obj/item/proc/is_multitool()
return has_tool_quality(TOOL_MULTITOOL)

View File

@@ -34,31 +34,17 @@
if(valid_step) if(valid_step)
if(custom_action(valid_step, I, user)) if(custom_action(valid_step, I, user))
next_step() next_step()
return 1 return TRUE
return 0 return FALSE
/datum/construction/proc/is_right_key(var/obj/item/I) // returns current step num if I is of the right type. /datum/construction/proc/is_right_key(var/obj/item/I) // returns current step num if I is of the right type.
var/list/L = steps[steps.len] var/list/L = steps[steps.len]
switch(L["key"]) if(istype(I, L["key"]) || I.get_tool_quality(L["key"]))
if(IS_SCREWDRIVER)
if(I.is_screwdriver())
return steps.len
if(IS_CROWBAR)
if(I.is_crowbar())
return steps.len
if(IS_WIRECUTTER)
if(I.is_wirecutter())
return steps.len
if(IS_WRENCH)
if(I.is_wrench())
return steps.len
if(istype(I, L["key"]))
return steps.len return steps.len
return 0 return 0
/datum/construction/proc/custom_action(step, I, user) /datum/construction/proc/custom_action(step, I, user)
return 1 return TRUE
/datum/construction/proc/check_all_steps(var/obj/item/I,mob/user as mob) //check all steps, remove matching one. /datum/construction/proc/check_all_steps(var/obj/item/I,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++) for(var/i=1;i<=steps.len;i++)
@@ -69,8 +55,8 @@
listclearnulls(steps); listclearnulls(steps);
if(!steps.len) if(!steps.len)
spawn_result() spawn_result()
return 1 return TRUE
return 0 return FALSE
/datum/construction/proc/spawn_result() /datum/construction/proc/spawn_result()
@@ -105,33 +91,10 @@
/datum/construction/reversible/is_right_key(var/obj/item/I) // returns index step /datum/construction/reversible/is_right_key(var/obj/item/I) // returns index step
var/list/L = steps[index] var/list/L = steps[index]
if(I.get_tool_quality(L["key"]))
switch(L["key"])
if(IS_SCREWDRIVER)
if(I.is_screwdriver())
return FORWARD
if(IS_CROWBAR)
if(I.is_crowbar())
return FORWARD
if(IS_WIRECUTTER)
if(I.is_wirecutter())
return FORWARD
if(IS_WRENCH)
if(I.is_wrench())
return FORWARD return FORWARD
switch(L["backkey"]) if(I.get_tool_quality(L["backkey"]))
if(IS_SCREWDRIVER)
if(I.is_screwdriver())
return BACKWARD
if(IS_CROWBAR)
if(I.is_crowbar())
return BACKWARD
if(IS_WIRECUTTER)
if(I.is_wirecutter())
return BACKWARD
if(IS_WRENCH)
if(I.is_wrench())
return BACKWARD return BACKWARD
if(istype(I, L["key"])) if(istype(I, L["key"]))
@@ -145,8 +108,8 @@
if(diff) if(diff)
if(custom_action(index, diff, I, user)) if(custom_action(index, diff, I, user))
update_index(diff) update_index(diff)
return 1 return TRUE
return 0 return FALSE
/datum/construction/reversible/custom_action(index, diff, I, user) /datum/construction/reversible/custom_action(index, diff, I, user)
return 1 return TRUE

View File

@@ -167,8 +167,8 @@
switch(action) switch(action)
// Toggles the cut/mend status. // Toggles the cut/mend status.
if("cut") if("cut")
// if(!I.is_wirecutter() && !user.can_admin_interact()) // if(!I.get_tool_quality(TOOL_WIRECUTTER) && !user.can_admin_interact())
if(!istype(I) || !I.is_wirecutter()) if(!istype(I) || !I.get_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "<span class='error'>You need wirecutters!</span>") to_chat(user, "<span class='error'>You need wirecutters!</span>")
return return
@@ -178,8 +178,8 @@
// Pulse a wire. // Pulse a wire.
if("pulse") if("pulse")
// if(!I.is_multitool() && !user.can_admin_interact()) // if(!I.get_tool_quality(TOOL_MULTITOOL) && !user.can_admin_interact())
if(!istype(I) || !I.is_multitool()) if(!istype(I) || !I.get_tool_quality(TOOL_MULTITOOL))
to_chat(user, "<span class='error'>You need a multitool!</span>") to_chat(user, "<span class='error'>You need a multitool!</span>")
return return

View File

@@ -135,7 +135,7 @@
armor_penetration = 15 armor_penetration = 15
sharp = 1 sharp = 1
edge = 1 edge = 1
pry = 1 tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_STANDARD)
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
defend_chance = 60 defend_chance = 60
projectile_parry_chance = 25 projectile_parry_chance = 25
@@ -162,6 +162,6 @@
name = "hand greatclaw" name = "hand greatclaw"
force = 20 force = 20
armor_penetration = 20 armor_penetration = 20
pry = 1 tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_STANDARD)
defend_chance = 60 defend_chance = 60
projectile_parry_chance = 25 projectile_parry_chance = 25

View File

@@ -35,7 +35,7 @@
to_chat(user, "You load [result] lengths of cable into [src].") to_chat(user, "You load [result] lengths of cable into [src].")
return return
if(O.is_wirecutter()) if(O.get_tool_quality(TOOL_WIRECUTTER))
if(cable && cable.amount) if(cable && cable.amount)
var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1) var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
m = min(m, cable.amount) m = min(m, cable.amount)

View File

@@ -239,7 +239,7 @@ update_flag
..() ..()
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(!W.is_wrench() && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda)) if(!W.get_tool_quality(TOOL_WRENCH) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
visible_message("<span class='warning'>\The [user] hits \the [src] with \a [W]!</span>") visible_message("<span class='warning'>\The [user] hits \the [src] with \a [W]!</span>")
src.health -= W.force src.health -= W.force
src.add_fingerprint(user) src.add_fingerprint(user)

View File

@@ -103,10 +103,10 @@
return ..() return ..()
/obj/machinery/meter/attackby(var/obj/item/W, var/mob/user) /obj/machinery/meter/attackby(var/obj/item/W, var/mob/user)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>") to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if(do_after(user, 40 * W.toolspeed)) if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message( \ user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \ "<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \ "<span class='notice'>You have unfastened \the [src].</span>", \

View File

@@ -109,7 +109,7 @@
update_icon() update_icon()
return return
else if (W.is_wrench()) else if (W.get_tool_quality(TOOL_WRENCH))
if(connected_port) if(connected_port)
disconnect() disconnect()
to_chat(user, "<span class='notice'>You disconnect \the [src] from the port.</span>") to_chat(user, "<span class='notice'>You disconnect \the [src] from the port.</span>")
@@ -165,7 +165,7 @@
power_change() power_change()
return return
if(I.is_screwdriver() && removeable_cell) if(I.get_tool_quality(TOOL_SCREWDRIVER) && removeable_cell)
if(!cell) if(!cell)
to_chat(user, "<span class='warning'>There is no power cell installed.</span>") to_chat(user, "<span class='warning'>There is no power cell installed.</span>")
return return

View File

@@ -216,7 +216,7 @@
update_connected_network() update_connected_network()
/obj/machinery/portable_atmospherics/powered/scrubber/huge/attackby(var/obj/item/I as obj, var/mob/user as mob) /obj/machinery/portable_atmospherics/powered/scrubber/huge/attackby(var/obj/item/I as obj, var/mob/user as mob)
if(I.is_wrench()) if(I.get_tool_quality(TOOL_WRENCH))
if(on) if(on)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>") to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
return return
@@ -230,7 +230,7 @@
//doesn't use power cells //doesn't use power cells
if(istype(I, /obj/item/weapon/cell)) if(istype(I, /obj/item/weapon/cell))
return return
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
return return
//doesn't hold tanks //doesn't hold tanks
@@ -248,7 +248,7 @@
desc += "This one seems to be tightly secured with large bolts." desc += "This one seems to be tightly secured with large bolts."
/obj/machinery/portable_atmospherics/powered/scrubber/huge/stationary/attackby(var/obj/item/I as obj, var/mob/user as mob) /obj/machinery/portable_atmospherics/powered/scrubber/huge/stationary/attackby(var/obj/item/I as obj, var/mob/user as mob)
if(I.is_wrench()) if(I.get_tool_quality(TOOL_WRENCH))
to_chat(user, "<span class='warning'>The bolts are too tight for you to unscrew!</span>") to_chat(user, "<span class='warning'>The bolts are too tight for you to unscrew!</span>")
return return

View File

@@ -156,7 +156,7 @@
if(panel_open) if(panel_open)
//Don't eat multitools or wirecutters used on an open lathe. //Don't eat multitools or wirecutters used on an open lathe.
if(O.is_multitool() || O.is_wirecutter()) if(O.get_tool_quality(TOOL_MULTITOOL) || O.get_tool_quality(TOOL_WIRECUTTER))
wires.Interact(user) wires.Interact(user)
return return

View File

@@ -154,7 +154,7 @@
/obj/machinery/camera/attackby(obj/item/W as obj, mob/living/user as mob) /obj/machinery/camera/attackby(obj/item/W as obj, mob/living/user as mob)
update_coverage() update_coverage()
// DECONSTRUCTION // DECONSTRUCTION
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
//to_chat(user, "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>") //to_chat(user, "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>")
//if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown //if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown
panel_open = !panel_open panel_open = !panel_open
@@ -162,7 +162,7 @@
"<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>") "<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open) else if((W.get_tool_quality(TOOL_WIRECUTTER) || istype(W, /obj/item/device/multitool)) && panel_open)
interact(user) interact(user)
else if(istype(W, /obj/item/weapon/weldingtool) && (wires.CanDeconstruct() || (stat & BROKEN))) else if(istype(W, /obj/item/weapon/weldingtool) && (wires.CanDeconstruct() || (stat & BROKEN)))
@@ -367,24 +367,20 @@
return null return null
/obj/machinery/camera/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user) /obj/machinery/camera/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
if(busy || !WT.isOn())
if(busy) return FALSE
return 0
if(!WT.isOn())
return 0
// Do after stuff here // Do after stuff here
to_chat(user, "<span class='notice'>You start to weld [src]..</span>") to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user) WT.eyecheck(user)
busy = 1 busy = TRUE
if(do_after(user, 100 * WT.toolspeed)) if(do_after(user, 100 * WT.get_tool_speed(TOOL_WELDER)))
busy = 0 busy = FALSE
if(!WT.isOn()) if(WT.isOn())
return 0 return TRUE
return 1 busy = FALSE
busy = 0 return FALSE
return 0
/obj/machinery/camera/interact(mob/living/user as mob) /obj/machinery/camera/interact(mob/living/user as mob)
if(!panel_open || istype(user, /mob/living/silicon/ai)) if(!panel_open || istype(user, /mob/living/silicon/ai))

View File

@@ -29,7 +29,7 @@
if(0) if(0)
// State 0 // State 0
if(W.is_wrench() && isturf(src.loc)) if(W.get_tool_quality(TOOL_WRENCH) && isturf(src.loc))
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
to_chat(user, "You wrench the assembly into place.") to_chat(user, "You wrench the assembly into place.")
anchored = 1 anchored = 1
@@ -47,7 +47,7 @@
state = 2 state = 2
return return
else if(W.is_wrench()) else if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
to_chat(user, "You unattach the assembly from its place.") to_chat(user, "You unattach the assembly from its place.")
anchored = 0 anchored = 0
@@ -77,7 +77,7 @@
if(3) if(3)
// State 3 // State 3
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT)) var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
@@ -115,7 +115,7 @@
break break
return return
else if(W.is_wirecutter()) else if(W.get_tool_quality(TOOL_WIRECUTTER))
new/obj/item/stack/cable_coil(get_turf(src), 2) new/obj/item/stack/cable_coil(get_turf(src), 2)
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
@@ -132,7 +132,7 @@
return return
// Taking out upgrades // Taking out upgrades
else if(W.is_crowbar() && upgrades.len) else if(W.get_tool_quality(TOOL_CROWBAR) && upgrades.len)
var/obj/U = locate(/obj) in upgrades var/obj/U = locate(/obj) in upgrades
if(U) if(U)
to_chat(user, "You unattach an upgrade from the assembly.") to_chat(user, "You unattach an upgrade from the assembly.")
@@ -154,20 +154,17 @@
..() ..()
/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user) /obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
if(busy || !WT.isOn())
return FALSE
if(busy) // Do after stuff here
return 0 to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
if(!WT.isOn())
return 0
to_chat(user, "<span class='notice'>You start to weld the [src]..</span>")
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user) WT.eyecheck(user)
busy = 1 busy = TRUE
if(do_after(user, 20 * WT.toolspeed)) if(do_after(user, 100 * WT.get_tool_speed(TOOL_WELDER)))
busy = 0 busy = FALSE
if(!WT.isOn()) if(WT.isOn())
return 0 return TRUE
return 1 busy = FALSE
busy = 0 return FALSE
return 0

View File

@@ -66,7 +66,7 @@
user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].") user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].")
chargelevel = -1 chargelevel = -1
update_icon() update_icon()
else if(W.is_wrench()) else if(W.get_tool_quality(TOOL_WRENCH))
if(charging) if(charging)
to_chat(user, "<span class='warning'>Remove [charging] first!</span>") to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
return return

View File

@@ -250,7 +250,7 @@
user.drop_item() user.drop_item()
W.forceMove(src) W.forceMove(src)
return return
else if(W.is_wrench()) else if(W.get_tool_quality(TOOL_WRENCH))
if(locked && (anchored || occupant)) if(locked && (anchored || occupant))
to_chat(user, "<span class='warning'>Can not do that while [src] is in use.</span>") to_chat(user, "<span class='warning'>Can not do that while [src] is in use.</span>")
else else

View File

@@ -273,17 +273,17 @@
if(LAZYLEN(good_surgeries)) if(LAZYLEN(good_surgeries))
return good_surgeries return good_surgeries
var/static/list/banned_surgery_steps = list( var/static/list/banned_surgery_steps = list(
/datum/surgery_step, /decl/surgery_step,
/datum/surgery_step/generic, /decl/surgery_step/generic,
/datum/surgery_step/open_encased, /decl/surgery_step/open_encased,
/datum/surgery_step/repairflesh, /decl/surgery_step/repairflesh,
/datum/surgery_step/face, /decl/surgery_step/face,
/datum/surgery_step/cavity, /decl/surgery_step/cavity,
/datum/surgery_step/limb, /decl/surgery_step/limb,
/datum/surgery_step/brainstem, /decl/surgery_step/brainstem,
) )
good_surgeries = surgery_steps good_surgeries = surgery_steps
for(var/datum/surgery_step/S in good_surgeries) for(var/decl/surgery_step/S in good_surgeries)
if(S.type in banned_surgery_steps) if(S.type in banned_surgery_steps)
good_surgeries -= S good_surgeries -= S
if(!LAZYLEN(S.allowed_tools)) if(!LAZYLEN(S.allowed_tools))
@@ -297,7 +297,7 @@
*/ */
/obj/machinery/computer/operating/proc/find_next_steps(mob/user, zone) /obj/machinery/computer/operating/proc/find_next_steps(mob/user, zone)
. = list() . = list()
for(var/datum/surgery_step/S in get_surgery_steps_without_basetypes()) for(var/decl/surgery_step/S in get_surgery_steps_without_basetypes())
if(S.can_use(user, victim, zone, null) && S.is_valid_target(victim)) if(S.can_use(user, victim, zone, null) && S.is_valid_target(victim))
var/allowed_tools_by_name = list() var/allowed_tools_by_name = list()
for(var/tool in S.allowed_tools) for(var/tool in S.allowed_tools)

View File

@@ -14,27 +14,27 @@
switch(state) switch(state)
if(0) if(0)
if(P.is_wrench()) if(P.get_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed)) if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>") to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = 1 anchored = 1
state = 1 state = 1
if(istype(P, /obj/item/weapon/weldingtool)) if(P.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = P var/obj/item/weapon/weldingtool/WT = P
if(!WT.isOn()) if(!WT.isOn())
to_chat(user, "The welder must be on for this task.") to_chat(user, "The welder must be on for this task.")
return return
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed)) if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.remove_fuel(0, user)) return if(!src || !WT.remove_fuel(0, user)) return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>") to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
new /obj/item/stack/material/plasteel( loc, 4) new /obj/item/stack/material/plasteel( loc, 4)
qdel(src) qdel(src)
if(1) if(1)
if(P.is_wrench()) if(P.get_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed)) if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>") to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
anchored = 0 anchored = 0
state = 0 state = 0
@@ -45,12 +45,12 @@
circuit = P circuit = P
user.drop_item() user.drop_item()
P.loc = src P.loc = src
if(P.is_screwdriver() && circuit) if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>") to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
state = 2 state = 2
icon_state = "2" icon_state = "2"
if(P.is_crowbar() && circuit) if(P.get_tool_quality(TOOL_CROWBAR) && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>") to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
state = 1 state = 1
@@ -58,7 +58,7 @@
circuit.loc = loc circuit.loc = loc
circuit = null circuit = null
if(2) if(2)
if(P.is_screwdriver() && circuit) if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>") to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = 1 state = 1
@@ -77,7 +77,7 @@
to_chat(user, "<span class='notice'>You add cables to the frame.</span>") to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
return return
if(3) if(3)
if(P.is_wirecutter()) if(P.get_tool_quality(TOOL_WIRECUTTER))
if (brain) if (brain)
to_chat(user, "Get that brain out of there first") to_chat(user, "Get that brain out of there first")
else else
@@ -145,7 +145,7 @@
to_chat(usr, "Added [P].") to_chat(usr, "Added [P].")
icon_state = "3b" icon_state = "3b"
if(P.is_crowbar() && brain) if(P.get_tool_quality(TOOL_CROWBAR) && brain)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the brain.</span>") to_chat(user, "<span class='notice'>You remove the brain.</span>")
brain.loc = loc brain.loc = loc
@@ -153,7 +153,7 @@
icon_state = "3" icon_state = "3"
if(4) if(4)
if(P.is_crowbar()) if(P.get_tool_quality(TOOL_CROWBAR))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>") to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = 3 state = 3
@@ -164,7 +164,7 @@
new /obj/item/stack/material/glass/reinforced( loc, 2 ) new /obj/item/stack/material/glass/reinforced( loc, 2 )
return return
if(P.is_screwdriver()) if(P.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>") to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(!brain) if(!brain)
@@ -232,11 +232,11 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
else else
to_chat(user, "<span class='danger'>ERROR:</span> Unable to locate artificial intelligence.") to_chat(user, "<span class='danger'>ERROR:</span> Unable to locate artificial intelligence.")
return return
else if(W.is_wrench()) else if(W.get_tool_quality(TOOL_WRENCH))
if(anchored) if(anchored)
user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>") user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
if(!do_after(user,40 * W.toolspeed)) if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>") user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>")
return return
user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>") user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>")
@@ -245,7 +245,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
else else
user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating...</span>") user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating...</span>")
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
if(!do_after(user,40 * W.toolspeed)) if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message("<span class='notice'>\The [user] decides not to bolt \the [src].</span>") user.visible_message("<span class='notice'>\The [user] decides not to bolt \the [src].</span>")
return return
user.visible_message("<span class='notice'>\The [user] finishes fastening down \the [src]!</span>") user.visible_message("<span class='notice'>\The [user] finishes fastening down \the [src]!</span>")

View File

@@ -15,7 +15,7 @@
var/restoring = FALSE var/restoring = FALSE
/obj/machinery/computer/aifixer/attackby(obj/item/I, mob/living/user) /obj/machinery/computer/aifixer/attackby(obj/item/I, mob/living/user)
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
if(occupier) if(occupier)
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge.</span>") to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge.</span>")

View File

@@ -13,27 +13,27 @@
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob) /obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
switch(state) switch(state)
if(0) if(0)
if(P.is_wrench()) if(P.get_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed)) if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>") to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
src.anchored = 1 src.anchored = 1
src.state = 1 src.state = 1
if(istype(P, /obj/item/weapon/weldingtool)) if(get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = P var/obj/item/weapon/weldingtool/WT = P
if(!WT.remove_fuel(0, user)) if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.") to_chat(user, "The welding tool must be on to complete this task.")
return return
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed)) if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.isOn()) return if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>") to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
new /obj/item/stack/material/steel( src.loc, 5 ) new /obj/item/stack/material/steel( src.loc, 5 )
qdel(src) qdel(src)
if(1) if(1)
if(P.is_wrench()) if(P.get_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed)) if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>") to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
src.anchored = 0 src.anchored = 0
src.state = 0 src.state = 0
@@ -48,12 +48,12 @@
P.loc = src P.loc = src
else else
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>") to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
if(P.is_screwdriver() && circuit) if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>") to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
src.state = 2 src.state = 2
src.icon_state = "2" src.icon_state = "2"
if(P.is_crowbar()) && circuit) if(P.get_tool_quality(TOOL_CROWBAR)) && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>") to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
src.state = 1 src.state = 1
@@ -61,7 +61,7 @@
circuit.loc = src.loc circuit.loc = src.loc
src.circuit = null src.circuit = null
if(2) if(2)
if(P.is_screwdriver() && circuit) if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>") to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
src.state = 1 src.state = 1
@@ -79,7 +79,7 @@
state = 3 state = 3
icon_state = "3" icon_state = "3"
if(3) if(3)
if(P.is_wirecutter()) if(P.get_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>") to_chat(user, "<span class='notice'>You remove the cables.</span>")
src.state = 2 src.state = 2
@@ -100,13 +100,13 @@
src.state = 4 src.state = 4
src.icon_state = "4" src.icon_state = "4"
if(4) if(4)
if(P.is_crowbar()) if(P.get_tool_quality(TOOL_CROWBAR))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>") to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
src.state = 3 src.state = 3
src.icon_state = "3" src.icon_state = "3"
new /obj/item/stack/material/glass( src.loc, 2 ) new /obj/item/stack/material/glass( src.loc, 2 )
if(P.is_screwdriver()) if(P.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>") to_chat(user, "<span class='notice'>You connect the monitor.</span>")
var/B = new src.circuit.build_path ( src.loc ) var/B = new src.circuit.build_path ( src.loc )

View File

@@ -34,7 +34,7 @@
return return
if(!istype(user)) if(!istype(user))
return return
if(O.is_screwdriver() && emag) if(O.get_tool_quality(TOOL_SCREWDRIVER) && emag)
//Stops people from just unscrewing the monitor and putting it back to get the console working again. //Stops people from just unscrewing the monitor and putting it back to get the console working again.
to_chat(user, "<span class='warning'>It is too hot to mess with!</span>") to_chat(user, "<span class='warning'>It is too hot to mess with!</span>")
return return

View File

@@ -50,7 +50,7 @@
/* /*
/obj/machinery/computer/pod/attackby(I as obj, user as mob) /obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
if(do_after(user, 20)) if(do_after(user, 20))
if(stat & BROKEN) if(stat & BROKEN)

View File

@@ -41,7 +41,7 @@
state = 2 state = 2
icon_state = "box_1" icon_state = "box_1"
else else
if(P.is_wrench()) if(P.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 75, 1) playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You dismantle the frame</span>") to_chat(user, "<span class='notice'>You dismantle the frame</span>")
new /obj/item/stack/material/steel(src.loc, 5) new /obj/item/stack/material/steel(src.loc, 5)
@@ -71,7 +71,7 @@
else else
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>") to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
else else
if(P.is_wirecutter()) if(P.get_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>") to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 1 state = 1
@@ -80,7 +80,7 @@
A.amount = 5 A.amount = 5
if(3) if(3)
if(P.is_crowbar()) if(P.get_tool_quality(TOOL_CROWBAR))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
state = 2 state = 2
circuit.loc = src.loc circuit.loc = src.loc
@@ -96,7 +96,7 @@
components = null components = null
icon_state = "box_1" icon_state = "box_1"
else else
if(P.is_screwdriver()) if(P.get_tool_quality(TOOL_SCREWDRIVER))
var/component_check = 1 var/component_check = 1
for(var/R in req_components) for(var/R in req_components)
if(req_components[R] > 0) if(req_components[R] > 0)

View File

@@ -47,7 +47,7 @@ Deployable items
visible_message("<span class='warning'>BZZzZZzZZzZT</span>") visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
return return
return return
else if(W.is_wrench()) else if(W.get_tool_quality(TOOL_WRENCH))
if(health < maxhealth) if(health < maxhealth)
health = maxhealth health = maxhealth
emagged = 0 emagged = 0

View File

@@ -1059,7 +1059,7 @@ About the new airlock wires panel:
return return
else else
return return
else if(C.is_screwdriver()) else if(C.get_tool_quality(TOOL_SCREWDRIVER))
if (src.p_open) if (src.p_open)
if (stat & BROKEN) if (stat & BROKEN)
to_chat(usr, "<span class='warning'>The panel is broken and cannot be closed.</span>") to_chat(usr, "<span class='warning'>The panel is broken and cannot be closed.</span>")
@@ -1070,7 +1070,7 @@ About the new airlock wires panel:
src.p_open = 1 src.p_open = 1
playsound(src, C.usesound, 50, 1) playsound(src, C.usesound, 50, 1)
src.update_icon() src.update_icon()
else if(C.is_wirecutter()) else if(C.get_tool_quality(TOOL_WIRECUTTER))
return src.attack_hand(user) return src.attack_hand(user)
else if(istype(C, /obj/item/device/multitool)) else if(istype(C, /obj/item/device/multitool))
return src.attack_hand(user) return src.attack_hand(user)
@@ -1079,11 +1079,11 @@ About the new airlock wires panel:
else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE
var/obj/item/weapon/pai_cable/cable = C var/obj/item/weapon/pai_cable/cable = C
cable.plugin(src, user) cable.plugin(src, user)
else if(!repairing && C.is_crowbar()) else if(!repairing && C.get_tool_quality(TOOL_CROWBAR))
if(can_remove_electronics()) if(can_remove_electronics())
playsound(src, C.usesound, 75, 1) playsound(src, C.usesound, 75, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.") user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
if(do_after(user,40 * C.toolspeed)) if(do_after(user,40 * C.get_tool_speed(TOOL_CROWBAR)))
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>") to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
var/obj/structure/door_assembly/da = new assembly_type(src.loc) var/obj/structure/door_assembly/da = new assembly_type(src.loc)
@@ -1124,7 +1124,7 @@ About the new airlock wires panel:
// Check if we're using a crowbar or armblade, and if the airlock's unpowered for whatever reason (off, broken, etc). // Check if we're using a crowbar or armblade, and if the airlock's unpowered for whatever reason (off, broken, etc).
else if(istype(C, /obj/item/weapon)) else if(istype(C, /obj/item/weapon))
var/obj/item/weapon/W = C var/obj/item/weapon/W = C
if((W.pry == 1) && !arePowerSystemsOn()) if(W.get_tool_quality(TOOL_CROWBAR) && !arePowerSystemsOn())
if(locked) if(locked)
to_chat(user, "<span class='notice'>The airlock's bolts prevent it from being forced.</span>") to_chat(user, "<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
else if( !welded && !operating ) else if( !welded && !operating )

View File

@@ -154,7 +154,7 @@
/obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob) /obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob)
src.add_fingerprint(user) src.add_fingerprint(user)
if(istype(C, /obj/item/weapon)) // For reasons unknown, sometimes C is actually not what it is advertised as, like a mob. if(istype(C, /obj/item/weapon)) // For reasons unknown, sometimes C is actually not what it is advertised as, like a mob.
if(C.pry == 1 && (user.a_intent != I_HURT || (stat & BROKEN))) // Can we pry it open with something, like a crowbar/fireaxe/lingblade? if(C.get_tool_quality(TOOL_CROWBAR) && (user.a_intent != I_HURT || (stat & BROKEN))) // Can we pry it open with something, like a crowbar/fireaxe/lingblade?
if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) // Fireaxes need to be in both hands to pry. if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) // Fireaxes need to be in both hands to pry.
var/obj/item/weapon/material/twohanded/fireaxe/F = C var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded) if(!F.wielded)

View File

@@ -246,7 +246,7 @@
return return
if(repairing && istype(I, /obj/item/weapon/weldingtool)) if(repairing && I.get_tool_quality(TOOL_WELDER))
if(!density) if(!density)
to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>") to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>")
return return
@@ -255,14 +255,14 @@
if(welder.remove_fuel(0,user)) if(welder.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You start to fix dents and weld \the [get_material_name()] into place.</span>") to_chat(user, "<span class='notice'>You start to fix dents and weld \the [get_material_name()] into place.</span>")
playsound(src, welder.usesound, 50, 1) playsound(src, welder.usesound, 50, 1)
if(do_after(user, (5 * repairing) * welder.toolspeed) && welder && welder.isOn()) if(do_after(user, (5 * repairing) * welder.get_tool_speed(TOOL_WELDER)) && welder && welder.isOn())
to_chat(user, "<span class='notice'>You finish repairing the damage to \the [src].</span>") to_chat(user, "<span class='notice'>You finish repairing the damage to \the [src].</span>")
health = between(health, health + repairing*DOOR_REPAIR_AMOUNT, maxhealth) health = between(health, health + repairing*DOOR_REPAIR_AMOUNT, maxhealth)
update_icon() update_icon()
repairing = 0 repairing = 0
return return
if(repairing && I.is_crowbar()) if(repairing && I.get_tool_quality(TOOL_CROWBAR))
var/datum/material/mat = get_material() var/datum/material/mat = get_material()
var/obj/item/stack/material/repairing_sheet = mat.place_sheet(loc) var/obj/item/stack/material/repairing_sheet = mat.place_sheet(loc)
repairing_sheet.amount += repairing-1 repairing_sheet.amount += repairing-1

View File

@@ -249,7 +249,7 @@
return //Don't open the door if we're putting tape on it to tell people 'don't open the door'. return //Don't open the door if we're putting tape on it to tell people 'don't open the door'.
if(operating) if(operating)
return//Already doing something. return//Already doing something.
if(istype(C, /obj/item/weapon/weldingtool) && !repairing) if(!repairing && C.get_tool_quality(TOOL_WELDER))
if(prying) if(prying)
to_chat(user, "<span class='notice'>Someone's busy prying that [density ? "open" : "closed"]!</span>") to_chat(user, "<span class='notice'>Someone's busy prying that [density ? "open" : "closed"]!</span>")
var/obj/item/weapon/weldingtool/W = C var/obj/item/weapon/weldingtool/W = C
@@ -262,7 +262,7 @@
update_icon() update_icon()
return return
if(density && C.is_screwdriver()) if(density && C.get_tool_quality(TOOL_SCREWDRIVER))
hatch_open = !hatch_open hatch_open = !hatch_open
playsound(src, C.usesound, 50, 1) playsound(src, C.usesound, 50, 1)
user.visible_message("<span class='danger'>[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch.</span>", user.visible_message("<span class='danger'>[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch.</span>",
@@ -270,7 +270,7 @@
update_icon() update_icon()
return return
if(blocked && C.is_crowbar() && !repairing) if(blocked && C.get_tool_quality(TOOL_CROWBAR) && !repairing)
if(!hatch_open) if(!hatch_open)
to_chat(user, "<span class='danger'>You must open the maintenance hatch first!</span>") to_chat(user, "<span class='danger'>You must open the maintenance hatch first!</span>")
else else
@@ -300,21 +300,16 @@
to_chat(user, "<span class='danger'>\The [src] is welded shut!</span>") to_chat(user, "<span class='danger'>\The [src] is welded shut!</span>")
return return
if(C.pry == 1) if(C.get_tool_quality(TOOL_CROWBAR))
if(operating) if(operating)
return return
if(blocked && C.is_crowbar()) if(blocked)
user.visible_message("<span class='danger'>\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!</span>",\ user.visible_message("<span class='danger'>\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!</span>",\
"You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\ "You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\
"You hear someone struggle and metal straining.") "You hear someone struggle and metal straining.")
return return
if(istype(C,/obj/item/weapon/material/twohanded/fireaxe))
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded)
return
if(prying) if(prying)
to_chat(user, "<span class='notice'>Someone's already prying that [density ? "open" : "closed"].</span>") to_chat(user, "<span class='notice'>Someone's already prying that [density ? "open" : "closed"].</span>")
return return
@@ -325,8 +320,8 @@
prying = 1 prying = 1
update_icon() update_icon()
playsound(src, C.usesound, 100, 1) playsound(src, C.usesound, 100, 1)
if(do_after(user,30 * C.toolspeed)) if(do_after(user,30 * C.get_tool_speed(TOOL_CROWBAR)))
if(C.is_crowbar()) if(C.get_tool_quality(TOOL_CROWBAR))
if(stat & (BROKEN|NOPOWER) || !density) if(stat & (BROKEN|NOPOWER) || !density)
user.visible_message("<span class='danger'>\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!</span>",\ user.visible_message("<span class='danger'>\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!</span>",\
"You force \the [src] [density ? "open" : "closed"] with \the [C]!",\ "You force \the [src] [density ? "open" : "closed"] with \the [C]!",\

View File

@@ -31,7 +31,7 @@
wired = 1 wired = 1
to_chat(user, "<span class='notice'>You wire \the [src].</span>") to_chat(user, "<span class='notice'>You wire \the [src].</span>")
else if(C.is_wirecutter() && wired ) else if(C.get_tool_quality(TOOL_WIRECUTTER) && wired )
playsound(src, C.usesound, 100, 1) playsound(src, C.usesound, 100, 1)
user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].") user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].")
@@ -54,20 +54,20 @@
qdel(src) qdel(src)
else else
to_chat(user, "<span class='warning'>You must secure \the [src] first!</span>") to_chat(user, "<span class='warning'>You must secure \the [src] first!</span>")
else if(C.is_wrench()) else if(C.get_tool_quality(TOOL_WRENCH))
anchored = !anchored anchored = !anchored
playsound(src, C.usesound, 50, 1) playsound(src, C.usesound, 50, 1)
user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>", user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>",
"You have [anchored ? "" : "un" ]secured \the [src]!") "You have [anchored ? "" : "un" ]secured \the [src]!")
update_icon() update_icon()
else if((glass || !anchored) && istype(C, /obj/item/weapon/weldingtool)) else if((glass || !anchored) && C.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = C var/obj/item/weapon/weldingtool/WT = C
if(WT.remove_fuel(0, user)) if(WT.remove_fuel(0, user))
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(glass) if(glass)
user.visible_message("<span class='warning'>[user] welds the glass panel out of \the [src].</span>", user.visible_message("<span class='warning'>[user] welds the glass panel out of \the [src].</span>",
"<span class='notice'>You start to weld the glass panel out of \the [src].</span>") "<span class='notice'>You start to weld the glass panel out of \the [src].</span>")
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn()) if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER), src) && WT.isOn())
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>") to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
new /obj/item/stack/material/glass/reinforced(drop_location()) new /obj/item/stack/material/glass/reinforced(drop_location())
glass = FALSE glass = FALSE
@@ -75,7 +75,7 @@
return return
if(!anchored) if(!anchored)
user.visible_message("<span class='warning'>[user] dissassembles \the [src].</span>", "You start to dissassemble \the [src].") user.visible_message("<span class='warning'>[user] dissassembles \the [src].</span>", "You start to dissassemble \the [src].")
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn()) if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER), src) && WT.isOn())
user.visible_message("<span class='warning'>[user] has dissassembled \the [src].</span>", user.visible_message("<span class='warning'>[user] has dissassembled \the [src].</span>",
"You have dissassembled \the [src].") "You have dissassembled \the [src].")
new /obj/item/stack/material/steel(drop_location(), 2) new /obj/item/stack/material/steel(drop_location(), 2)

View File

@@ -190,13 +190,13 @@
if(istype(I)) if(istype(I))
// Fixing. // Fixing.
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP) if(I.get_tool_quality(TOOL_WELDER) && user.a_intent == I_HELP)
var/obj/item/weapon/weldingtool/WT = I var/obj/item/weapon/weldingtool/WT = I
if(health < maxhealth) if(health < maxhealth)
if(WT.remove_fuel(1 ,user)) if(WT.remove_fuel(1 ,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>") to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed, target = src)) if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER), target = src))
health = maxhealth health = maxhealth
update_icon() update_icon()
to_chat(user, "<span class='notice'>You repair [src].</span>") to_chat(user, "<span class='notice'>You repair [src].</span>")
@@ -216,10 +216,10 @@
return 1 return 1
//If it's opened/emagged, crowbar can pry it out of its frame. //If it's opened/emagged, crowbar can pry it out of its frame.
if (!density && I.is_crowbar()) if (!density && I.get_tool_quality(TOOL_CROWBAR))
playsound(src, I.usesound, 50, 1) playsound(src, I.usesound, 50, 1)
user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.") user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.")
if (do_after(user,40 * I.toolspeed)) if (do_after(user,40 * I.get_tool_speed(TOOL_CROWBAR)))
to_chat(user,"<span class='notice'>You pried the windoor out of the frame!</span>") to_chat(user,"<span class='notice'>You pried the windoor out of the frame!</span>")
var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc) var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc)

View File

@@ -76,9 +76,9 @@
// Parameters: 2 (I - the item being whacked against the machine, user - the person doing the whacking) // Parameters: 2 (I - the item being whacked against the machine, user - the person doing the whacking)
// Description: Handles deconstruction. // Description: Handles deconstruction.
/obj/machinery/exonet_node/attackby(obj/item/I, mob/user) /obj/machinery/exonet_node/attackby(obj/item/I, mob/user)
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
default_deconstruction_screwdriver(user, I) default_deconstruction_screwdriver(user, I)
else if(I.is_crowbar()) else if(I.get_tool_quality(TOOL_CROWBAR))
default_deconstruction_crowbar(user, I) default_deconstruction_crowbar(user, I)
else else
..() ..()

View File

@@ -35,7 +35,7 @@
//Don't want to render prison breaks impossible //Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wirecutter()) if(W.get_tool_quality(TOOL_WIRECUTTER))
add_fingerprint(user) add_fingerprint(user)
disable = !disable disable = !disable
if(disable) if(disable)
@@ -102,7 +102,7 @@
flash() flash()
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
add_fingerprint(user) add_fingerprint(user)
anchored = !anchored anchored = !anchored

View File

@@ -96,7 +96,7 @@
update_icon() update_icon()
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(!open) if(!open)
if(unlocked) if(unlocked)
unlocked = 0 unlocked = 0
@@ -105,7 +105,7 @@
unlocked = 1 unlocked = 1
to_chat(user, "You unscrew the battery panel.") to_chat(user, "You unscrew the battery panel.")
if(W.is_crowbar()) if(W.get_tool_quality(TOOL_CROWBAR))
if(unlocked) if(unlocked)
if(open) if(open)
open = 0 open = 0

View File

@@ -23,16 +23,16 @@ var/list/floor_light_cache = list()
anchored = 1 anchored = 1
/obj/machinery/floor_light/attackby(var/obj/item/W, var/mob/user) /obj/machinery/floor_light/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
anchored = !anchored anchored = !anchored
visible_message("<span class='notice'>\The [user] has [anchored ? "attached" : "detached"] \the [src].</span>") visible_message("<span class='notice'>\The [user] has [anchored ? "attached" : "detached"] \the [src].</span>")
else if(istype(W, /obj/item/weapon/weldingtool) && (damaged || (stat & BROKEN))) else if(W.get_tool_quality(TOOL_WELDER) && (damaged || (stat & BROKEN)))
var/obj/item/weapon/weldingtool/WT = W var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0, user)) if(!WT.remove_fuel(0, user))
to_chat(user, "<span class='warning'>\The [src] must be on to complete this task.</span>") to_chat(user, "<span class='warning'>\The [src] must be on to complete this task.</span>")
return return
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(!do_after(user, 20 * WT.toolspeed)) if(!do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
return return
if(!src || !WT.isOn()) if(!src || !WT.isOn())
return return

View File

@@ -34,7 +34,7 @@
return return
/obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob) /obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
var/m = input("Choose work mode", "Mode") as null|anything in mode var/m = input("Choose work mode", "Mode") as null|anything in mode
mode[m] = !mode[m] mode[m] = !mode[m]
var/O = mode[m] var/O = mode[m]
@@ -47,7 +47,7 @@
TakeTile(T) TakeTile(T)
return return
if(W.is_crowbar()) if(W.get_tool_quality(TOOL_CROWBAR))
if(!length(contents)) if(!length(contents))
to_chat(user, "<span class='notice'>\The [src] is empty.</span>") to_chat(user, "<span class='notice'>\The [src] is empty.</span>")
else else
@@ -58,7 +58,7 @@
T = null T = null
return return
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
T = input("Choose tile type.", "Tiles") as null|anything in contents T = input("Choose tile type.", "Tiles") as null|anything in contents
return return
..() ..()

View File

@@ -132,6 +132,16 @@
frame_class = FRAME_CLASS_MACHINE frame_class = FRAME_CLASS_MACHINE
frame_size = 4 frame_size = 4
/datum/frame/frame_types/teleporter_hub
name = "Teleporter Hub"
frame_class = FRAME_CLASS_MACHINE
frame_size = 4
/datum/frame/frame_types/teleporter_station
name = "Teleporter Hub"
frame_class = FRAME_CLASS_MACHINE
frame_size = 4
/datum/frame/frame_types/display /datum/frame/frame_types/display
name = "Display" name = "Display"
frame_class = FRAME_CLASS_DISPLAY frame_class = FRAME_CLASS_DISPLAY
@@ -304,11 +314,11 @@
update_icon() update_icon()
/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob) /obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.is_wrench()) if(P.get_tool_quality(TOOL_WRENCH))
if(state == FRAME_PLACED && !anchored) if(state == FRAME_PLACED && !anchored)
to_chat(user, "<span class='notice'>You start to wrench the frame into place.</span>") to_chat(user, "<span class='notice'>You start to wrench the frame into place.</span>")
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed)) if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
anchored = TRUE anchored = TRUE
if(!need_circuit && circuit) if(!need_circuit && circuit)
state = FRAME_FASTENED state = FRAME_FASTENED
@@ -320,16 +330,16 @@
else if(state == FRAME_PLACED && anchored) else if(state == FRAME_PLACED && anchored)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed)) if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>") to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
anchored = FALSE anchored = FALSE
else if(istype(P, /obj/item/weapon/weldingtool)) else if(P.get_tool_quality(TOOL_WELDER))
if(state == FRAME_PLACED) if(state == FRAME_PLACED)
var/obj/item/weapon/weldingtool/WT = P var/obj/item/weapon/weldingtool/WT = P
if(WT.remove_fuel(0, user)) if(WT.remove_fuel(0, user))
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed)) if(do_after(user, 20 * P.get_tool_speed(TOOL_WELDER)))
if(src && WT.isOn()) if(src && WT.isOn())
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>") to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
new /obj/item/stack/material/steel(src.loc, frame_type.frame_size) new /obj/item/stack/material/steel(src.loc, frame_type.frame_size)
@@ -357,7 +367,7 @@
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>") to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
return return
else if(P.is_screwdriver()) else if(P.get_tool_quality(TOOL_SCREWDRIVER))
if(state == FRAME_UNFASTENED) if(state == FRAME_UNFASTENED)
if(need_circuit && circuit) if(need_circuit && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
@@ -452,7 +462,7 @@
qdel(src) qdel(src)
return return
else if(P.is_crowbar()) else if(P.get_tool_quality(TOOL_CROWBAR))
if(state == FRAME_UNFASTENED) if(state == FRAME_UNFASTENED)
if(need_circuit && circuit) if(need_circuit && circuit)
playsound(src, P.usesound, 50, 1) playsound(src, P.usesound, 50, 1)
@@ -530,7 +540,7 @@
break break
to_chat(user, desc) to_chat(user, desc)
else if(P.is_wirecutter()) else if(P.get_tool_quality(TOOL_WIRECUTTER))
if(state == FRAME_WIRED) if(state == FRAME_WIRED)
if( \ if( \
frame_type.frame_class == FRAME_CLASS_COMPUTER || \ frame_type.frame_class == FRAME_CLASS_COMPUTER || \

View File

@@ -69,7 +69,7 @@
// sd_SetLuminosity(0) // sd_SetLuminosity(0)
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
add_fingerprint(user) add_fingerprint(user)
disable = !disable disable = !disable
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)

View File

@@ -66,7 +66,7 @@
update_icon() update_icon()
return return
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to dismantle the IV drip.</span>") to_chat(user, "<span class='notice'>You start to dismantle the IV drip.</span>")
if(do_after(user, 15)) if(do_after(user, 15))

View File

@@ -78,11 +78,11 @@
return return
if(default_deconstruction_crowbar(user, W)) if(default_deconstruction_crowbar(user, W))
return return
if(W.is_wirecutter()) if(W.get_tool_quality(TOOL_WIRECUTTER))
return wires.Interact(user) return wires.Interact(user)
if(istype(W, /obj/item/device/multitool)) if(istype(W, /obj/item/device/multitool))
return wires.Interact(user) return wires.Interact(user)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
if(playing) if(playing)
StopPlaying() StopPlaying()
user.visible_message("<span class='warning'>[user] has [anchored ? "un" : ""]secured \the [src].</span>", "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>") user.visible_message("<span class='warning'>[user] has [anchored ? "un" : ""]secured \the [src].</span>", "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>")
@@ -222,7 +222,7 @@
return return
if(default_deconstruction_crowbar(user, W)) if(default_deconstruction_crowbar(user, W))
return return
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
if(playing) if(playing)
StopPlaying() StopPlaying()
user.visible_message("<span class='warning'>[user] has [anchored ? "un" : ""]secured \the [src].</span>", "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>") user.visible_message("<span class='warning'>[user] has [anchored ? "un" : ""]secured \the [src].</span>", "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>")

View File

@@ -166,7 +166,7 @@ Class Procs:
pulse2.icon = 'icons/effects/effects.dmi' pulse2.icon = 'icons/effects/effects.dmi'
pulse2.icon_state = "empdisable" pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks" pulse2.name = "emp sparks"
pulse2.anchored = 1 pulse2.anchored = TRUE
pulse2.set_dir(pick(cardinal)) pulse2.set_dir(pick(cardinal))
spawn(10) spawn(10)
@@ -177,17 +177,13 @@ Class Procs:
switch(severity) switch(severity)
if(1.0) if(1.0)
qdel(src) qdel(src)
return
if(2.0) if(2.0)
if(prob(50)) if(prob(50))
qdel(src) qdel(src)
return
if(3.0) if(3.0)
if(prob(25)) if(prob(25))
qdel(src) qdel(src)
return return
else
return
/obj/machinery/vv_edit_var(var/var_name, var/new_value) /obj/machinery/vv_edit_var(var/var_name, var/new_value)
if(var_name == NAMEOF(src, use_power)) if(var_name == NAMEOF(src, use_power))
@@ -234,22 +230,21 @@ Class Procs:
return attack_hand(user) return attack_hand(user)
/obj/machinery/attack_hand(mob/user as mob) /obj/machinery/attack_hand(mob/user as mob)
if(inoperable(MAINT)) if(inoperable(MAINT))
return 1 return TRUE
if(user.lying || user.stat) if(user.lying || user.stat)
return 1 return TRUE
if(!(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))) if(!(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon)))
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>") to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 1 return TRUE
if(ishuman(user)) if(ishuman(user))
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 55) if(H.getBrainLoss() >= 55)
visible_message("<span class='warning'>[H] stares cluelessly at [src].</span>") visible_message("<span class='warning'>[H] stares cluelessly at [src].</span>")
return 1 return TRUE
else if(prob(H.getBrainLoss())) else if(prob(H.getBrainLoss()))
to_chat(user, "<span class='warning'>You momentarily forget how to use [src].</span>") to_chat(user, "<span class='warning'>You momentarily forget how to use [src].</span>")
return 1 return TRUE
if(clicksound && istype(user, /mob/living/carbon)) if(clicksound && istype(user, /mob/living/carbon))
playsound(src, clicksound, clickvol) playsound(src, clicksound, clickvol)
@@ -278,9 +273,9 @@ Class Procs:
/obj/machinery/proc/shock(mob/user, prb) /obj/machinery/proc/shock(mob/user, prb)
if(inoperable()) if(inoperable())
return 0 return FALSE
if(!prob(prb)) if(!prob(prb))
return 0 return FALSE
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src) s.set_up(5, 1, src)
s.start() s.start()
@@ -292,8 +287,8 @@ Class Procs:
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet) if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
temp_apc.terminal.powernet.trigger_warning() temp_apc.terminal.powernet.trigger_warning()
if(user.stunned) if(user.stunned)
return 1 return TRUE
return 0 return TRUE
/obj/machinery/proc/default_apply_parts() /obj/machinery/proc/default_apply_parts()
var/obj/item/weapon/circuitboard/CB = circuit var/obj/item/weapon/circuitboard/CB = circuit
@@ -313,9 +308,9 @@ Class Procs:
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R) /obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
if(!istype(R)) if(!istype(R))
return 0 return FALSE
if(!component_parts) if(!component_parts)
return 0 return FALSE
to_chat(user, "<span class='notice'>Following parts detected in [src]:</span>") to_chat(user, "<span class='notice'>Following parts detected in [src]:</span>")
for(var/obj/item/C in component_parts) for(var/obj/item/C in component_parts)
to_chat(user, "<span class='notice'> [C.name]</span>") to_chat(user, "<span class='notice'> [C.name]</span>")
@@ -339,20 +334,22 @@ Class Procs:
break break
update_icon() update_icon()
RefreshParts() RefreshParts()
return 1 return TRUE
// Default behavior for wrenching down machines. Supports both delay and instant modes. // Default behavior for wrenching down machines. Supports both delay and instant modes.
/obj/machinery/proc/default_unfasten_wrench(var/mob/user, var/obj/item/W, var/time = 0) /obj/machinery/proc/default_unfasten_wrench(var/mob/user, var/obj/item/W, var/time = 0)
if(!W.is_wrench()) if(!W.get_tool_quality(TOOL_WRENCH))
return FALSE return FALSE
if(panel_open) if(panel_open)
return FALSE // Close panel first! return FALSE // Close panel first!
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
var/actual_time = W.toolspeed * time var/actual_time = W.get_tool_speed(TOOL_WRENCH) * time
if(actual_time != 0) if(actual_time != 0)
user.visible_message( \ user.visible_message( \
"<span class='warning'>\The [user] begins [anchored ? "un" : ""]securing \the [src].</span>", \ "<span class='warning'>\The [user] begins [anchored ? "un" : ""]securing \the [src].</span>", \
"<span class='notice'>You start [anchored ? "un" : ""]securing \the [src].</span>") "<span class='notice'>You start [anchored ? "un" : ""]securing \the [src].</span>")
if(actual_time == 0 || do_after(user, actual_time, target = src)) if(actual_time == 0 || do_after(user, actual_time, target = src))
user.visible_message( \ user.visible_message( \
"<span class='warning'>\The [user] has [anchored ? "un" : ""]secured \the [src].</span>", \ "<span class='warning'>\The [user] has [anchored ? "un" : ""]secured \the [src].</span>", \
@@ -363,29 +360,33 @@ Class Procs:
return TRUE return TRUE
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/C) /obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/C)
if(!C.is_crowbar()) if(!C.get_tool_quality(TOOL_CROWBAR))
return 0 return FALSE
if(!panel_open) if(!panel_open)
return 0 return FALSE
. = dismantle() . = dismantle()
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/S) /obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
if(!S.is_screwdriver()) if(!S.get_tool_quality(TOOL_SCREWDRIVER))
return 0 return FALSE
playsound(src, S.usesound, 50, 1) playsound(src, S.usesound, 50, 1)
panel_open = !panel_open panel_open = !panel_open
to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>") to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>")
update_icon() update_icon()
return 1 return TRUE
// Unimplemented on base type, but other machinery types may yet have use
/obj/machinery/proc/default_deconstruction_wrench(var/mob/user, var/obj/item/S)
return
/obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/S) /obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
if(!S.is_screwdriver()) if(!S.get_tool_quality(TOOL_SCREWDRIVER))
return 0 return FALSE
if(!circuit) if(!circuit)
return 0 return FALSE
to_chat(user, "<span class='notice'>You start disconnecting the monitor.</span>") to_chat(user, "<span class='notice'>You start disconnecting the monitor.</span>")
playsound(src, S.usesound, 50, 1) playsound(src, S.usesound, 50, 1)
if(do_after(user, 20 * S.toolspeed)) if(do_after(user, 20 * S.get_tool_speed(TOOL_SCREWDRIVER)))
if(stat & BROKEN) if(stat & BROKEN)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>") to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
new /obj/item/weapon/material/shard(src.loc) new /obj/item/weapon/material/shard(src.loc)
@@ -394,19 +395,19 @@ Class Procs:
. = dismantle() . = dismantle()
/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/S) /obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
if(!S.is_screwdriver()) if(!S.get_tool_quality(TOOL_SCREWDRIVER))
return 0 return FALSE
playsound(src, S.usesound, 50, 1) playsound(src, S.usesound, 50, 1)
panel_open = !panel_open panel_open = !panel_open
to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]") to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]")
update_icon() update_icon()
return 1 return FALSE
/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/W) /obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/W)
if(!W.is_wirecutter()) if(!W.get_tool_quality(TOOL_WIRECUTTER))
return 0 return FALSE
if(!panel_open) if(!panel_open)
return 0 return FALSE
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].") user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5) new/obj/item/stack/cable_coil(get_turf(src), 5)
@@ -418,19 +419,19 @@ Class Procs:
if(istype(I,/obj/item/weapon/card/id)) if(istype(I,/obj/item/weapon/card/id))
I.forceMove(src.loc) I.forceMove(src.loc)
if(!circuit) if(!circuit)
return 0 return FALSE
var/obj/structure/frame/A = new /obj/structure/frame(src.loc) var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
var/obj/item/weapon/circuitboard/M = circuit var/obj/item/weapon/circuitboard/M = circuit
A.circuit = M A.circuit = M
A.anchored = 1 A.anchored = TRUE
A.frame_type = M.board_type A.frame_type = M.board_type
if(A.frame_type.circuit) if(A.frame_type.circuit)
A.need_circuit = 0 A.need_circuit = FALSE
if(A.frame_type.frame_class == FRAME_CLASS_ALARM || A.frame_type.frame_class == FRAME_CLASS_DISPLAY) if(A.frame_type.frame_class == FRAME_CLASS_ALARM || A.frame_type.frame_class == FRAME_CLASS_DISPLAY)
A.density = 0 A.density = FALSE
else else
A.density = 1 A.density = TRUE
if(A.frame_type.frame_class == FRAME_CLASS_MACHINE) if(A.frame_type.frame_class == FRAME_CLASS_MACHINE)
for(var/obj/D in component_parts) for(var/obj/D in component_parts)
@@ -460,11 +461,10 @@ Class Procs:
M.loc = null M.loc = null
M.deconstruct(src) M.deconstruct(src)
qdel(src) qdel(src)
return 1 return TRUE
/datum/proc/apply_visual(mob/M) /datum/proc/apply_visual(mob/M)
M.sight = 0 //Just reset their mesons and stuff so they can't use them, by default. M.sight = FALSE //Just reset their mesons and stuff so they can't use them, by default.
return
/datum/proc/remove_visual(mob/M) /datum/proc/remove_visual(mob/M)
return return

View File

@@ -72,7 +72,7 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w
if(!T.is_plating()) if(!T.is_plating())
return // prevent intraction when T-scanner revealed return // prevent intraction when T-scanner revealed
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
open = !open open = !open
playsound(src, I.usesound, 50, 1) playsound(src, I.usesound, 50, 1)
user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.") user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.")

View File

@@ -55,7 +55,7 @@ var/bomb_set
return return
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob) /obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
if(O.is_screwdriver()) if(O.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, O.usesound, 50, 1) playsound(src, O.usesound, 50, 1)
add_fingerprint(user) add_fingerprint(user)
if(auth) if(auth)
@@ -78,7 +78,7 @@ var/bomb_set
flick("nuclearbombc", src) flick("nuclearbombc", src)
return return
if(O.is_wirecutter() || istype(O, /obj/item/device/multitool)) if(O.get_tool_quality(TOOL_WIRECUTTER) || istype(O, /obj/item/device/multitool))
if(opened == 1) if(opened == 1)
nukehack_win(user) nukehack_win(user)
return return
@@ -94,35 +94,38 @@ var/bomb_set
if(anchored) if(anchored)
switch(removal_stage) switch(removal_stage)
if(0) if(0)
if(istype(O,/obj/item/weapon/weldingtool)) if(O.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = O var/obj/item/weapon/weldingtool/WT = O
if(!WT.isOn()) return if(!WT.isOn())
return
if(WT.get_fuel() < 5) // uses up 5 fuel. if(WT.get_fuel() < 5) // uses up 5 fuel.
to_chat(user, "<span class='warning'>You need more fuel to complete this task.</span>") to_chat(user, "<span class='warning'>You need more fuel to complete this task.</span>")
return return
user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...") user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...")
if(do_after(user,40 * WT.toolspeed)) if(do_after(user,40 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !user || !WT.remove_fuel(5, user)) return if(!src || !user || !WT.remove_fuel(5, user))
return
user.visible_message("[user] cuts through the bolt covers on [src].", "You cut through the bolt cover.") user.visible_message("[user] cuts through the bolt covers on [src].", "You cut through the bolt cover.")
removal_stage = 1 removal_stage = 1
return return
if(1) if(1)
if(O.is_crowbar()) if(O.get_tool_quality(TOOL_CROWBAR))
user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...") user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...")
playsound(src, O.usesound, 50, 1) playsound(src, O.usesound, 50, 1)
if(do_after(user,15 * O.toolspeed)) if(do_after(user,15 * O.get_tool_speed(TOOL_CROWBAR)))
if(!src || !user) return if(!src || !user)
return
user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.") user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.")
removal_stage = 2 removal_stage = 2
return return
if(2) if(2)
if(istype(O,/obj/item/weapon/weldingtool)) if(O.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = O var/obj/item/weapon/weldingtool/WT = O
if(!WT.isOn()) return if(!WT.isOn()) return
@@ -132,29 +135,30 @@ var/bomb_set
user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...") user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...")
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(do_after(user,40 * WT.toolspeed)) if(do_after(user,40 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !user || !WT.remove_fuel(5, user)) return if(!src || !user || !WT.remove_fuel(5, user))
return
user.visible_message("[user] cuts apart the anchoring system sealant on [src].", "You cut apart the anchoring system's sealant.") user.visible_message("[user] cuts apart the anchoring system sealant on [src].", "You cut apart the anchoring system's sealant.")
removal_stage = 3 removal_stage = 3
return return
if(3) if(3)
if(O.is_wrench()) if(O.get_tool_quality(TOOL_WRENCH))
user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...") user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...")
playsound(src, O.usesound, 50, 1) playsound(src, O.usesound, 50, 1)
if(do_after(user,50 * O.toolspeed)) if(do_after(user,50 * O.get_tool_speed(TOOL_WRENCH)))
if(!src || !user) return if(!src || !user) return
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.") user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
removal_stage = 4 removal_stage = 4
return return
if(4) if(4)
if(O.is_crowbar()) if(O.get_tool_quality(TOOL_CROWBAR))
user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...") user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...")
playsound(src, O.usesound, 50, 1) playsound(src, O.usesound, 50, 1)
if(do_after(user,80 * O.toolspeed)) if(do_after(user,80 * O.get_tool_speed(TOOL_WRENCH)))
if(!src || !user) return if(!src || !user) return
user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!") user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!")
anchored = 0 anchored = 0
@@ -262,7 +266,7 @@ var/bomb_set
visible_message("<span class='notice'>The [src] emits a quiet whirling noise!</span>") visible_message("<span class='notice'>The [src] emits a quiet whirling noise!</span>")
if(href_list["act"] == "wire") if(href_list["act"] == "wire")
var/obj/item/I = usr.get_active_hand() var/obj/item/I = usr.get_active_hand()
if(!I.is_wirecutter()) if(!I.get_tool_quality(TOOL_WIRECUTTER))
to_chat(usr, "You need wirecutters!") to_chat(usr, "You need wirecutters!")
else else
wires[temp_wire] = !wires[temp_wire] wires[temp_wire] = !wires[temp_wire]

View File

@@ -128,7 +128,7 @@
return 1 return 1
/obj/machinery/oxygen_pump/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/oxygen_pump/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
stat ^= MAINT stat ^= MAINT
user.visible_message("<span class='notice'>\The [user] [(stat & MAINT) ? "opens" : "closes"] \the [src].</span>", "<span class='notice'>You [(stat & MAINT) ? "open" : "close"] \the [src].</span>") user.visible_message("<span class='notice'>\The [user] [(stat & MAINT) ? "opens" : "closes"] \the [src].</span>", "<span class='notice'>You [(stat & MAINT) ? "open" : "close"] \the [src].</span>")
icon_state = (stat & MAINT) ? icon_state_open : icon_state_closed icon_state = (stat & MAINT) ? icon_state_open : icon_state_closed

View File

@@ -38,9 +38,9 @@
icon_state = "[initial(icon_state)]_off" icon_state = "[initial(icon_state)]_off"
/obj/machinery/pda_multicaster/attackby(obj/item/I, mob/user) /obj/machinery/pda_multicaster/attackby(obj/item/I, mob/user)
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
default_deconstruction_screwdriver(user, I) default_deconstruction_screwdriver(user, I)
else if(I.is_crowbar()) else if(I.get_tool_quality(TOOL_CROWBAR))
default_deconstruction_crowbar(user, I) default_deconstruction_crowbar(user, I)
else else
..() ..()

View File

@@ -166,7 +166,7 @@ Buildable meters
return ..() return ..()
/obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
return wrench_act(user, W) return wrench_act(user, W)
return ..() return ..()
@@ -255,7 +255,7 @@ Buildable meters
var/piping_layer = PIPING_LAYER_DEFAULT var/piping_layer = PIPING_LAYER_DEFAULT
/obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
return wrench_act(user, W) return wrench_act(user, W)
return ..() return ..()

View File

@@ -115,11 +115,11 @@
user.drop_item() user.drop_item()
qdel(W) qdel(W)
return return
else if(W.is_wrench()) else if(W.get_tool_quality(TOOL_WRENCH))
if (unwrenched==0) if (unwrenched==0)
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src] from the floor...</span>") to_chat(user, "<span class='notice'>You begin to unfasten \the [src] from the floor...</span>")
if (do_after(user, 40 * W.toolspeed)) if (do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message( \ user.visible_message( \
"<span class='notice'>[user] unfastens \the [src].</span>", \ "<span class='notice'>[user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src]. Now it can be pulled somewhere else.</span>", \ "<span class='notice'>You have unfastened \the [src]. Now it can be pulled somewhere else.</span>", \
@@ -132,7 +132,7 @@
else /*if (unwrenched==1)*/ else /*if (unwrenched==1)*/
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to fasten \the [src] to the floor...</span>") to_chat(user, "<span class='notice'>You begin to fasten \the [src] to the floor...</span>")
if (do_after(user, 20 * W.toolspeed)) if (do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message( \ user.visible_message( \
"<span class='notice'>[user] fastens \the [src].</span>", \ "<span class='notice'>[user] fastens \the [src].</span>", \
"<span class='notice'>You have fastened \the [src]. Now it can dispense pipes.</span>", \ "<span class='notice'>You have fastened \the [src]. Now it can dispense pipes.</span>", \

View File

@@ -81,12 +81,12 @@
return return
if(default_part_replacement(user, W)) if(default_part_replacement(user, W))
return return
if (!panel_open && W.is_wrench()) if (!panel_open && W.get_tool_quality(TOOL_WRENCH))
P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes
P_type = Pipes[P_type_t] P_type = Pipes[P_type_t]
user.visible_message("<span class='notice'>[user] has set \the [src] to manufacture [P_type_t].</span>", "<span class='notice'>You set \the [src] to manufacture [P_type_t].</span>") user.visible_message("<span class='notice'>[user] has set \the [src] to manufacture [P_type_t].</span>", "<span class='notice'>You set \the [src] to manufacture [P_type_t].</span>")
return return
if(!panel_open && W.is_crowbar()) if(!panel_open && W.get_tool_quality(TOOL_CROWBAR))
a_dis = !a_dis a_dis = !a_dis
user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>") user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>")
return return

View File

@@ -101,7 +101,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
return data return data
/obj/machinery/pointdefense_control/attackby(var/obj/item/W, var/mob/user) /obj/machinery/pointdefense_control/attackby(var/obj/item/W, var/mob/user)
if(W?.is_multitool()) if(W?.get_tool_quality(TOOL_MULTITOOL))
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, physical_state)) if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, physical_state))
// Check for duplicate controllers with this ID // Check for duplicate controllers with this ID
@@ -180,7 +180,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
return PDC return PDC
/obj/machinery/pointdefense/attackby(var/obj/item/W, var/mob/user) /obj/machinery/pointdefense/attackby(var/obj/item/W, var/mob/user)
if(W?.is_multitool()) if(W?.get_tool_quality(TOOL_MULTITOOL))
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, physical_state)) if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, physical_state))
to_chat(user, "<span class='notice'>You register [src] with the [new_ident] network.</span>") to_chat(user, "<span class='notice'>You register [src] with the [new_ident] network.</span>")

View File

@@ -510,7 +510,7 @@
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user) /obj/machinery/porta_turret/attackby(obj/item/I, mob/user)
if(stat & BROKEN) if(stat & BROKEN)
if(I.is_crowbar()) if(I.get_tool_quality(TOOL_CROWBAR))
//If the turret is destroyed, you can remove it with a crowbar to //If the turret is destroyed, you can remove it with a crowbar to
//try and salvage its components //try and salvage its components
to_chat(user, "<span class='notice'>You begin prying the metal coverings off.</span>") to_chat(user, "<span class='notice'>You begin prying the metal coverings off.</span>")
@@ -529,7 +529,7 @@
to_chat(user, "<span class='notice'>You remove the turret but did not manage to salvage anything.</span>") to_chat(user, "<span class='notice'>You remove the turret but did not manage to salvage anything.</span>")
qdel(src) // qdel qdel(src) // qdel
else if(I.is_wrench()) else if(I.get_tool_quality(TOOL_WRENCH))
if(enabled || raised) if(enabled || raised)
to_chat(user, "<span class='warning'>You cannot unsecure an active turret!</span>") to_chat(user, "<span class='warning'>You cannot unsecure an active turret!</span>")
return return
@@ -546,18 +546,12 @@
) )
wrenching = TRUE wrenching = TRUE
if(do_after(user, 50 * I.toolspeed)) if(do_after(user, 50 * I.get_tool_speed(TOOL_WRENCH)))
//This code handles moving the turret around. After all, it's a portable turret! //This code handles moving the turret around. After all, it's a portable turret!
if(!anchored)
playsound(src, I.usesound, 100, 1) playsound(src, I.usesound, 100, 1)
anchored = TRUE
update_icon()
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
else if(anchored)
playsound(src, I.usesound, 100, 1)
anchored = FALSE
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
update_icon() update_icon()
anchored = !anchored
to_chat(user, "<span class='notice'>You [anchored ? "" : "un"]secure the exterior bolts on the turret.</span>")
wrenching = FALSE wrenching = FALSE
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda)) else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
@@ -968,14 +962,14 @@
//this is a bit unwieldy but self-explanatory //this is a bit unwieldy but self-explanatory
switch(build_step) switch(build_step)
if(0) //first step if(0) //first step
if(I.is_wrench() && !anchored) if(I.get_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, I.usesound, 100, 1) playsound(src, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You secure the external bolts.</span>") to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
anchored = TRUE anchored = TRUE
build_step = 1 build_step = 1
return return
else if(I.is_crowbar() && !anchored) else if(I.get_tool_quality(TOOL_CROWBAR) && !anchored)
playsound(src, I.usesound, 75, 1) playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>") to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
new /obj/item/stack/material/steel(loc, 5) new /obj/item/stack/material/steel(loc, 5)
@@ -993,7 +987,7 @@
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction.</span>") to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction.</span>")
return return
else if(I.is_wrench()) else if(I.get_tool_quality(TOOL_WRENCH))
playsound(src, I.usesound, 75, 1) playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>") to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
anchored = FALSE anchored = FALSE
@@ -1001,13 +995,13 @@
return return
if(2) if(2)
if(I.is_wrench()) if(I.get_tool_quality(TOOL_WRENCH))
playsound(src, I.usesound, 100, 1) playsound(src, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>") to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
build_step = 3 build_step = 3
return return
else if(istype(I, /obj/item/weapon/weldingtool)) else if(I.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = I var/obj/item/weapon/weldingtool/WT = I
if(!WT.isOn()) if(!WT.isOn())
return return
@@ -1016,7 +1010,7 @@
return return
playsound(src, I.usesound, 50, 1) playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed)) if(do_after(user, 20 * I.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.remove_fuel(5, user)) return if(!src || !WT.remove_fuel(5, user)) return
build_step = 1 build_step = 1
to_chat(user, "You remove the turret's interior metal armor.") to_chat(user, "You remove the turret's interior metal armor.")
@@ -1041,7 +1035,7 @@
qdel(I) //delete the gun :( qdel(I) //delete the gun :(
return return
else if(I.is_wrench()) else if(I.get_tool_quality(TOOL_WRENCH))
playsound(src, I.usesound, 100, 1) playsound(src, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>") to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
build_step = 2 build_step = 2
@@ -1060,7 +1054,7 @@
//attack_hand() removes the gun //attack_hand() removes the gun
if(5) if(5)
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 100, 1) playsound(src, I.usesound, 100, 1)
build_step = 6 build_step = 6
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>") to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
@@ -1078,21 +1072,21 @@
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction.</span>") to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction.</span>")
return return
else if(I.is_screwdriver()) else if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 100, 1) playsound(src, I.usesound, 100, 1)
build_step = 5 build_step = 5
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>") to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
return return
if(7) if(7)
if(istype(I, /obj/item/weapon/weldingtool)) if(I.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = I var/obj/item/weapon/weldingtool/WT = I
if(!WT.isOn()) return if(!WT.isOn()) return
if(WT.get_fuel() < 5) if(WT.get_fuel() < 5)
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>") to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
playsound(src, WT.usesound, 50, 1) playsound(src, WT.usesound, 50, 1)
if(do_after(user, 30 * WT.toolspeed)) if(do_after(user, 30 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.remove_fuel(5, user)) if(!src || !WT.remove_fuel(5, user))
return return
build_step = 8 build_step = 8
@@ -1108,7 +1102,7 @@
qdel(src) // qdel qdel(src) // qdel
else if(I.is_crowbar()) else if(I.get_tool_quality(TOOL_CROWBAR))
playsound(src, I.usesound, 75, 1) playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>") to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
new /obj/item/stack/material/steel(loc, 2) new /obj/item/stack/material/steel(loc, 2)

View File

@@ -78,7 +78,7 @@
update_icon() update_icon()
user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].") user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].")
else if(portable && G.is_wrench()) else if(portable && G.get_tool_quality(TOOL_WRENCH))
if(charging) if(charging)
to_chat(user, "<span class='warning'>Remove [charging] first!</span>") to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
return return

View File

@@ -72,7 +72,7 @@
else else
to_chat(user, "The hatch must be open to insert a power cell.") to_chat(user, "The hatch must be open to insert a power cell.")
return return
else if(I.is_screwdriver()) else if(I.get_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open panel_open = !panel_open
playsound(src, I.usesound, 50, 1) playsound(src, I.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] [panel_open ? "opens" : "closes"] the hatch on the [src].</span>", "<span class='notice'>You [panel_open ? "open" : "close"] the hatch on the [src].</span>") user.visible_message("<span class='notice'>[user] [panel_open ? "opens" : "closes"] the hatch on the [src].</span>", "<span class='notice'>You [panel_open ? "open" : "close"] the hatch on the [src].</span>")

View File

@@ -1,5 +1,5 @@
////////////////////////////////////// //////////////////////////////////////
// SUIT STORAGE UNIT ///////////////// // suit STORAGE UNIT /////////////////
////////////////////////////////////// //////////////////////////////////////
/obj/machinery/suit_storage_unit /obj/machinery/suit_storage_unit
@@ -9,13 +9,13 @@
icon_state = "suitstorage000000100" //order is: [has helmet][has suit][has human][is open][is locked][is UV cycling][is powered][is dirty/broken] [is superUVcycling] icon_state = "suitstorage000000100" //order is: [has helmet][has suit][has human][is open][is locked][is UV cycling][is powered][is dirty/broken] [is superUVcycling]
anchored = 1 anchored = 1
density = 1 density = 1
var/mob/living/carbon/human/OCCUPANT = null var/mob/living/carbon/human/occupant = null
var/obj/item/clothing/suit/space/SUIT = null var/obj/item/clothing/suit/space/suit = null
var/SUIT_TYPE = null var/suit_type = null
var/obj/item/clothing/head/helmet/space/HELMET = null var/obj/item/clothing/head/helmet/space/helmet = null
var/HELMET_TYPE = null var/helmet_type = null
var/obj/item/clothing/mask/MASK = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n var/obj/item/clothing/mask/mask = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n
var/MASK_TYPE = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself. var/mask_type = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself.
var/isopen = 0 var/isopen = 0
var/islocked = 0 var/islocked = 0
var/isUV = 0 var/isUV = 0
@@ -29,29 +29,29 @@
//The units themselves///////////////// //The units themselves/////////////////
/obj/machinery/suit_storage_unit/standard_unit /obj/machinery/suit_storage_unit/standard_unit
SUIT_TYPE = /obj/item/clothing/suit/space suit_type = /obj/item/clothing/suit/space
HELMET_TYPE = /obj/item/clothing/head/helmet/space helmet_type = /obj/item/clothing/head/helmet/space
MASK_TYPE = /obj/item/clothing/mask/breath mask_type = /obj/item/clothing/mask/breath
/obj/machinery/suit_storage_unit/Initialize() /obj/machinery/suit_storage_unit/Initialize()
. = ..() . = ..()
update_icon() update_icon()
if(SUIT_TYPE) if(suit_type)
SUIT = new SUIT_TYPE(src) suit = new suit_type(src)
if(HELMET_TYPE) if(helmet_type)
HELMET = new HELMET_TYPE(src) helmet = new helmet_type(src)
if(MASK_TYPE) if(mask_type)
MASK = new MASK_TYPE(src) mask = new mask_type(src)
/obj/machinery/suit_storage_unit/update_icon() /obj/machinery/suit_storage_unit/update_icon()
var/hashelmet = 0 var/hashelmet = 0
var/hassuit = 0 var/hassuit = 0
var/hashuman = 0 var/hashuman = 0
if(HELMET) if(helmet)
hashelmet = 1 hashelmet = 1
if(SUIT) if(suit)
hassuit = 1 hassuit = 1
if(OCCUPANT) if(occupant)
hashuman = 1 hashuman = 1
icon_state = text("suitstorage[][][][][][][][][]", hashelmet, hassuit, hashuman, isopen, islocked, isUV, ispowered, isbroken, issuperUV) icon_state = text("suitstorage[][][][][][][][][]", hashelmet, hassuit, hashuman, isopen, islocked, isUV, ispowered, isbroken, issuperUV)
@@ -108,20 +108,20 @@
data["safeties"] = safetieson data["safeties"] = safetieson
data["uv_active"] = isUV data["uv_active"] = isUV
data["uv_super"] = issuperUV data["uv_super"] = issuperUV
if(HELMET) if(helmet)
data["helmet"] = HELMET.name data["helmet"] = helmet.name
else else
data["helmet"] = null data["helmet"] = null
if(SUIT) if(suit)
data["suit"] = SUIT.name data["suit"] = suit.name
else else
data["suit"] = null data["suit"] = null
if(MASK) if(mask)
data["mask"] = MASK.name data["mask"] = mask.name
else else
data["mask"] = null data["mask"] = null
data["storage"] = null data["storage"] = null
if(OCCUPANT) if(occupant)
data["occupied"] = TRUE data["occupied"] = TRUE
else else
data["occupied"] = FALSE data["occupied"] = FALSE
@@ -169,92 +169,58 @@
/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob) /obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob)
// var/protected = 0 if(panelopen)
// var/mob/living/carbon/human/H = user
if(!panelopen)
return
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(istype(G,/obj/item/clothing/gloves/yellow))
protected = 1
if(!protected)
playsound(src, "sparks", 75, 1, -1)
to_chat(user, "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>")
return*/
else //welp, the guy is protected, we can continue
if(issuperUV) if(issuperUV)
to_chat(user, "You slide the dial back towards \"185nm\".") to_chat(user, "You slide the dial back towards \"185nm\".")
issuperUV = 0 issuperUV = 0
else else
to_chat(user, "You crank the dial all the way up to \"15nm\".") to_chat(user, "You crank the dial all the way up to \"15nm\".")
issuperUV = 1 issuperUV = 1
return
/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob) /obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob)
// var/protected = 0 if(panelopen)
// var/mob/living/carbon/human/H = user
if(!panelopen) //Needed check due to bugs
return
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(istype(G,/obj/item/clothing/gloves/yellow))
protected = 1
if(!protected)
playsound(src, "sparks", 75, 1, -1)
to_chat(user, "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>")
return*/
else
to_chat(user, "You push the button. The coloured LED next to it changes.") to_chat(user, "You push the button. The coloured LED next to it changes.")
safetieson = !safetieson safetieson = !safetieson
/obj/machinery/suit_storage_unit/proc/dispense_helmet(mob/user as mob) /obj/machinery/suit_storage_unit/proc/dispense_helmet(mob/user as mob)
if(!HELMET) if(helmet)
return //Do I even need this sanity check? Nyoro~n helmet.loc = src.loc
else helmet = null
HELMET.loc = src.loc
HELMET = null
return
/obj/machinery/suit_storage_unit/proc/dispense_suit(mob/user as mob) /obj/machinery/suit_storage_unit/proc/dispense_suit(mob/user as mob)
if(!SUIT) if(!suit)
return return
else else
SUIT.loc = src.loc suit.loc = src.loc
SUIT = null suit = null
return return
/obj/machinery/suit_storage_unit/proc/dispense_mask(mob/user as mob) /obj/machinery/suit_storage_unit/proc/dispense_mask(mob/user as mob)
if(!MASK) if(!mask)
return return
else else
MASK.loc = src.loc mask.loc = src.loc
MASK = null mask = null
return return
/obj/machinery/suit_storage_unit/proc/dump_everything() /obj/machinery/suit_storage_unit/proc/dump_everything()
islocked = 0 //locks go free islocked = 0 //locks go free
if(SUIT) if(suit)
SUIT.loc = src.loc suit.loc = src.loc
SUIT = null suit = null
if(HELMET) if(helmet)
HELMET.loc = src.loc helmet.loc = src.loc
HELMET = null helmet = null
if(MASK) if(mask)
MASK.loc = src.loc mask.loc = src.loc
MASK = null mask = null
if(OCCUPANT) if(occupant)
eject_occupant(OCCUPANT) eject_occupant(occupant)
return return
@@ -262,7 +228,7 @@
if(islocked || isUV) if(islocked || isUV)
to_chat(user, "<font color='red'>Unable to open unit.</font>") to_chat(user, "<font color='red'>Unable to open unit.</font>")
return return
if(OCCUPANT) if(occupant)
eject_occupant(user) eject_occupant(user)
return // eject_occupant opens the door, so we need to return return // eject_occupant opens the door, so we need to return
isopen = !isopen isopen = !isopen
@@ -270,7 +236,7 @@
/obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob) /obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob)
if(OCCUPANT && safetieson) if(occupant && safetieson)
to_chat(user, "<font color='red'>The Unit's safety protocols disallow locking when a biological form is detected inside its compartments.</font>") to_chat(user, "<font color='red'>The Unit's safety protocols disallow locking when a biological form is detected inside its compartments.</font>")
return return
if(isopen) if(isopen)
@@ -282,16 +248,16 @@
/obj/machinery/suit_storage_unit/proc/start_UV(mob/user as mob) /obj/machinery/suit_storage_unit/proc/start_UV(mob/user as mob)
if(isUV || isopen) //I'm bored of all these sanity checks if(isUV || isopen) //I'm bored of all these sanity checks
return return
if(OCCUPANT && safetieson) if(occupant && safetieson)
to_chat(user, "<font color='red'><B>WARNING:</B> Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle.</font>") to_chat(user, "<font color='red'><B>WARNING:</B> Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle.</font>")
return return
if(!HELMET && !MASK && !SUIT && !OCCUPANT) //shit's empty yo if(!helmet && !mask && !suit && !occupant) //shit's empty yo
to_chat(user, "<font color='red'>Unit storage bays empty. Nothing to disinfect -- Aborting.</font>") to_chat(user, "<font color='red'>Unit storage bays empty. Nothing to disinfect -- Aborting.</font>")
return return
to_chat(user, "You start the Unit's cauterisation cycle.") to_chat(user, "You start the Unit's cauterisation cycle.")
cycletime_left = 20 cycletime_left = 20
isUV = 1 isUV = 1
if(OCCUPANT && !islocked) if(occupant && !islocked)
islocked = 1 //Let's lock it for good measure islocked = 1 //Let's lock it for good measure
update_icon() update_icon()
updateUsrDialog() updateUsrDialog()
@@ -299,50 +265,50 @@
var/i //our counter var/i //our counter
for(i=0,i<4,i++) for(i=0,i<4,i++)
sleep(50) sleep(50)
if(OCCUPANT) if(occupant)
OCCUPANT.apply_effect(50, IRRADIATE) occupant.apply_effect(50, IRRADIATE)
var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in occupant.internal_organs
if(!rad_organ) if(!rad_organ)
if(OCCUPANT.can_feel_pain()) if(occupant.can_feel_pain())
OCCUPANT.emote("scream") occupant.emote("scream")
if(issuperUV) if(issuperUV)
var/burndamage = rand(28,35) var/burndamage = rand(28,35)
OCCUPANT.take_organ_damage(0,burndamage) occupant.take_organ_damage(0,burndamage)
else else
var/burndamage = rand(6,10) var/burndamage = rand(6,10)
OCCUPANT.take_organ_damage(0,burndamage) occupant.take_organ_damage(0,burndamage)
if(i==3) //End of the cycle if(i==3) //End of the cycle
if(!issuperUV) if(!issuperUV)
if(HELMET) if(helmet)
HELMET.clean_blood() helmet.clean_blood()
if(SUIT) if(suit)
SUIT.clean_blood() suit.clean_blood()
if(MASK) if(mask)
MASK.clean_blood() mask.clean_blood()
else //It was supercycling, destroy everything else //It was supercycling, destroy everything
if(HELMET) if(helmet)
HELMET = null helmet = null
if(SUIT) if(suit)
SUIT = null suit = null
if(MASK) if(mask)
MASK = null mask = null
visible_message("<font color='red'>With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.</font>", 3) visible_message("<font color='red'>With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.</font>", 3)
isbroken = 1 isbroken = 1
isopen = 1 isopen = 1
islocked = 0 islocked = 0
eject_occupant(OCCUPANT) //Mixing up these two lines causes bug. DO NOT DO IT. eject_occupant(occupant) //Mixing up these two lines causes bug. DO NOT DO IT.
isUV = 0 //Cycle ends isUV = 0 //Cycle ends
update_icon() update_icon()
updateUsrDialog() updateUsrDialog()
return return
/* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work /* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work
if(HELMET) if(helmet)
HELMET.clean_blood() helmet.clean_blood()
if(SUIT) if(suit)
SUIT.clean_blood() suit.clean_blood()
if(MASK) if(mask)
MASK.clean_blood() mask.clean_blood()
isUV = 0 //Cycle ends isUV = 0 //Cycle ends
update_icon() update_icon()
updateUsrDialog() updateUsrDialog()
@@ -350,12 +316,12 @@
var/i var/i
for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity
spawn(50) spawn(50)
if(OCCUPANT) if(occupant)
if(issuperUV) if(issuperUV)
OCCUPANT.take_organ_damage(0,40) occupant.take_organ_damage(0,40)
to_chat(user, "Test. You gave him 40 damage") to_chat(user, "Test. You gave him 40 damage")
else else
OCCUPANT.take_organ_damage(0,8) occupant.take_organ_damage(0,8)
to_chat(user, "Test. You gave him 8 damage") to_chat(user, "Test. You gave him 8 damage")
return*/ return*/
@@ -370,21 +336,21 @@
if(islocked) if(islocked)
return return
if(!OCCUPANT) if(!occupant)
return return
// for(var/obj/O in src) // for(var/obj/O in src)
// O.loc = src.loc // O.loc = src.loc
if(OCCUPANT.client) if(occupant.client)
if(user != OCCUPANT) if(user != occupant)
to_chat(OCCUPANT, "<font color='blue'>The machine kicks you out!</font>") to_chat(occupant, "<font color='blue'>The machine kicks you out!</font>")
if(user.loc != src.loc) if(user.loc != src.loc)
to_chat(OCCUPANT, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>") to_chat(occupant, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>")
OCCUPANT.client.eye = OCCUPANT.client.mob occupant.client.eye = occupant.client.mob
OCCUPANT.client.perspective = MOB_PERSPECTIVE occupant.client.perspective = MOB_PERSPECTIVE
OCCUPANT.loc = src.loc occupant.loc = src.loc
OCCUPANT = null occupant = null
if(!isopen) if(!isopen)
isopen = 1 isopen = 1
update_icon() update_icon()
@@ -418,7 +384,7 @@
if(!ispowered || isbroken) if(!ispowered || isbroken)
to_chat(usr, "<font color='red'>The unit is not operational.</font>") to_chat(usr, "<font color='red'>The unit is not operational.</font>")
return return
if((OCCUPANT) || (HELMET) || (SUIT)) if((occupant) || (helmet) || (suit))
to_chat(usr, "<font color='red'>It's too cluttered inside for you to fit in!</font>") to_chat(usr, "<font color='red'>It's too cluttered inside for you to fit in!</font>")
return return
visible_message("[usr] starts squeezing into the suit storage unit!", 3) visible_message("[usr] starts squeezing into the suit storage unit!", 3)
@@ -428,7 +394,7 @@
usr.client.eye = src usr.client.eye = src
usr.loc = src usr.loc = src
// usr.metabslow = 1 // usr.metabslow = 1
OCCUPANT = usr occupant = usr
isopen = 0 //Close the thing after the guy gets inside isopen = 0 //Close the thing after the guy gets inside
update_icon() update_icon()
@@ -439,14 +405,14 @@
updateUsrDialog() updateUsrDialog()
return return
else else
OCCUPANT = null //Testing this as a backup sanity test occupant = null //Testing this as a backup sanity test
return return
/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob) /obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob)
if(!ispowered) if(!ispowered)
return return
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
panelopen = !panelopen panelopen = !panelopen
playsound(src, I.usesound, 100, 1) playsound(src, I.usesound, 100, 1)
to_chat(user, "<font color='blue'>You [panelopen ? "open up" : "close"] the unit's maintenance panel.</font>") to_chat(user, "<font color='blue'>You [panelopen ? "open up" : "close"] the unit's maintenance panel.</font>")
@@ -462,7 +428,7 @@
if(!ispowered || isbroken) if(!ispowered || isbroken)
to_chat(user, "<font color='red'>The unit is not operational.</font>") to_chat(user, "<font color='red'>The unit is not operational.</font>")
return return
if((OCCUPANT) || (HELMET) || (SUIT)) //Unit needs to be absolutely empty if((occupant) || (helmet) || (suit)) //Unit needs to be absolutely empty
to_chat(user, "<font color='red'>The unit's storage area is too cluttered.</font>") to_chat(user, "<font color='red'>The unit's storage area is too cluttered.</font>")
return return
visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3) visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
@@ -473,7 +439,7 @@
M.client.perspective = EYE_PERSPECTIVE M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src M.client.eye = src
M.loc = src M.loc = src
OCCUPANT = M occupant = M
isopen = 0 //close ittt isopen = 0 //close ittt
//for(var/obj/O in src) //for(var/obj/O in src)
@@ -488,13 +454,13 @@
if(!isopen) if(!isopen)
return return
var/obj/item/clothing/suit/space/S = I var/obj/item/clothing/suit/space/S = I
if(SUIT) if(suit)
to_chat(user, "<font color='blue'>The unit already contains a suit.</font>") to_chat(user, "<font color='blue'>The unit already contains a suit.</font>")
return return
to_chat(user, "You load the [S.name] into the storage compartment.") to_chat(user, "You load the [S.name] into the storage compartment.")
user.drop_item() user.drop_item()
S.loc = src S.loc = src
SUIT = S suit = S
update_icon() update_icon()
updateUsrDialog() updateUsrDialog()
return return
@@ -502,13 +468,13 @@
if(!isopen) if(!isopen)
return return
var/obj/item/clothing/head/helmet/H = I var/obj/item/clothing/head/helmet/H = I
if(HELMET) if(helmet)
to_chat(user, "<font color='blue'>The unit already contains a helmet.</font>") to_chat(user, "<font color='blue'>The unit already contains a helmet.</font>")
return return
to_chat(user, "You load the [H.name] into the storage compartment.") to_chat(user, "You load the [H.name] into the storage compartment.")
user.drop_item() user.drop_item()
H.loc = src H.loc = src
HELMET = H helmet = H
update_icon() update_icon()
updateUsrDialog() updateUsrDialog()
return return
@@ -516,13 +482,13 @@
if(!isopen) if(!isopen)
return return
var/obj/item/clothing/mask/M = I var/obj/item/clothing/mask/M = I
if(MASK) if(mask)
to_chat(user, "<font color='blue'>The unit already contains a mask.</font>") to_chat(user, "<font color='blue'>The unit already contains a mask.</font>")
return return
to_chat(user, "You load the [M.name] into the storage compartment.") to_chat(user, "You load the [M.name] into the storage compartment.")
user.drop_item() user.drop_item()
M.loc = src M.loc = src
MASK = M mask = M
update_icon() update_icon()
updateUsrDialog() updateUsrDialog()
return return
@@ -675,7 +641,7 @@
return return
//Hacking init. //Hacking init.
if(istype(I, /obj/item/device/multitool) || I.is_wirecutter()) if(I.get_tool_quality(TOOL_MULTITOOL) || I.get_tool_quality(TOOL_WIRECUTTER))
if(panel_open) if(panel_open)
attack_hand(user) attack_hand(user)
return return
@@ -711,7 +677,7 @@
updateUsrDialog() updateUsrDialog()
return return
else if(I.is_screwdriver()) else if(I.get_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open panel_open = !panel_open
playsound(src, I.usesound, 50, 1) playsound(src, I.usesound, 50, 1)

View File

@@ -45,7 +45,7 @@
drop_type = "supermatter" drop_type = "supermatter"
/obj/machinery/power/supply_beacon/attackby(var/obj/item/weapon/W, var/mob/user) /obj/machinery/power/supply_beacon/attackby(var/obj/item/weapon/W, var/mob/user)
if(!use_power && W.is_wrench()) if(!use_power && W.get_tool_quality(TOOL_WRENCH))
if(!anchored && !connect_to_network()) if(!anchored && !connect_to_network())
to_chat(user, "<span class='warning'>This device must be placed over an exposed cable.</span>") to_chat(user, "<span class='warning'>This device must be placed over an exposed cable.</span>")
return return

View File

@@ -119,7 +119,7 @@
return return
/obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(active) if(active)
to_chat(user, "<span class='danger'>You need to deactivate the beacon first!</span>") to_chat(user, "<span class='danger'>You need to deactivate the beacon first!</span>")
return return

View File

@@ -17,7 +17,7 @@
frame_types_wall = construction_frame_wall frame_types_wall = construction_frame_wall
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench()) if(W.get_tool_quality(TOOL_WRENCH))
new refund_type(get_turf(src.loc), refund_amt) new refund_type(get_turf(src.loc), refund_amt)
qdel(src) qdel(src)
return return

View File

@@ -96,35 +96,23 @@
icon_state = "wm_[state][panel_open]" icon_state = "wm_[state][panel_open]"
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(state == 2 && washing.len < 1) if(state == 2 && washing.len < 1 && ( \
if(default_deconstruction_screwdriver(user, W)) default_deconstruction_screwdriver(user, W) || \
default_deconstruction_crowbar(user, W) || \
default_unfasten_wrench(user, W, 40) ) )
return return
if(default_deconstruction_crowbar(user, W))
return if(!crayon && (state in list(1, 3, 6)) && ( \
if(default_unfasten_wrench(user, W, 40)) istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp) ) )
return user.drop_from_inventory(W, src)
/*if(W.is_screwdriver())
panel = !panel
to_chat(user, "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>")*/
if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp))
if(state in list( 1, 3, 6))
if(!crayon)
user.drop_item()
crayon = W crayon = W
crayon.loc = src
else else if(istype(W,/obj/item/weapon/grab) && state == 1 && hacked)
..()
else
..()
else if(istype(W,/obj/item/weapon/grab))
if((state == 1) && hacked)
var/obj/item/weapon/grab/G = W var/obj/item/weapon/grab/G = W
if(ishuman(G.assailant) && iscorgi(G.affecting)) if(ishuman(G.assailant) && iscorgi(G.affecting))
G.affecting.loc = src G.affecting.loc = src
qdel(G) qdel(G)
state = 3 state = 3
else
..()
else if(is_type_in_list(W, disallowed_types)) else if(is_type_in_list(W, disallowed_types))
to_chat(user, "<span class='warning'>You can't fit \the [W] inside.</span>") to_chat(user, "<span class='warning'>You can't fit \the [W] inside.</span>")

View File

@@ -11,7 +11,7 @@
required_type = list(/obj/mecha/working/ripley) required_type = list(/obj/mecha/working/ripley)
var/obj/item/my_tool = null var/obj/item/my_tool = null
var/tooltype = /obj/item/weapon/tool/wrench/power var/tooltype = /obj/item/weapon/tool/powerdrill
/obj/item/mecha_parts/mecha_equipment/tool/powertool/Initialize() /obj/item/mecha_parts/mecha_equipment/tool/powertool/Initialize()
my_tool = new tooltype(src) my_tool = new tooltype(src)
@@ -37,19 +37,19 @@
name = "pneumatic prybar" name = "pneumatic prybar"
desc = "An exosuit-mounted pneumatic prybar." desc = "An exosuit-mounted pneumatic prybar."
icon_state = "mecha_crowbar" icon_state = "mecha_crowbar"
tooltype = /obj/item/weapon/tool/crowbar/power tooltype = /obj/item/weapon/tool/hydraulic_cutter
ready_sound = 'sound/mecha/gasdisconnected.ogg' ready_sound = 'sound/mecha/gasdisconnected.ogg'
/obj/item/mecha_parts/mecha_equipment/tool/powertool/cutter /obj/item/mecha_parts/mecha_equipment/tool/powertool/cutter
name = "pneumatic cablecutter" name = "pneumatic cablecutter"
desc = "An exosuit-mounted pneumatic cablecutter." desc = "An exosuit-mounted pneumatic cablecutter."
icon_state = "mecha_cablecutter" icon_state = "mecha_cablecutter"
tooltype = /obj/item/weapon/tool/wirecutters/power tooltype = /obj/item/weapon/tool/hydraulic_cutter
ready_sound = 'sound/mecha/gasdisconnected.ogg' ready_sound = 'sound/mecha/gasdisconnected.ogg'
/obj/item/mecha_parts/mecha_equipment/tool/powertool/screwdriver /obj/item/mecha_parts/mecha_equipment/tool/powertool/screwdriver
name = "pneumatic screwdriver" name = "pneumatic screwdriver"
desc = "An exosuit-mounted pneumatic screwdriver." desc = "An exosuit-mounted pneumatic screwdriver."
icon_state = "mecha_screwdriver" icon_state = "mecha_screwdriver"
tooltype = /obj/item/weapon/tool/screwdriver/power tooltype = /obj/item/weapon/tool/powerdrill
ready_sound = 'sound/mecha/gasdisconnected.ogg' ready_sound = 'sound/mecha/gasdisconnected.ogg'

View File

@@ -1468,7 +1468,7 @@
to_chat(user, "<span class='warning'>Invalid ID: Access denied.</span>") to_chat(user, "<span class='warning'>Invalid ID: Access denied.</span>")
else else
to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>") to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>")
else if(W.is_wrench()) else if(W.get_tool_quality(TOOL_WRENCH))
if(state==MECHA_BOLTS_SECURED) if(state==MECHA_BOLTS_SECURED)
state = MECHA_PANEL_LOOSE state = MECHA_PANEL_LOOSE
to_chat(user, "You undo the securing bolts.") to_chat(user, "You undo the securing bolts.")
@@ -1476,7 +1476,7 @@
state = MECHA_BOLTS_SECURED state = MECHA_BOLTS_SECURED
to_chat(user, "You tighten the securing bolts.") to_chat(user, "You tighten the securing bolts.")
return return
else if(W.is_crowbar()) else if(W.get_tool_quality(TOOL_CROWBAR))
if(state==MECHA_PANEL_LOOSE) if(state==MECHA_PANEL_LOOSE)
state = MECHA_CELL_OPEN state = MECHA_CELL_OPEN
to_chat(user, "You open the hatch to the power unit") to_chat(user, "You open the hatch to the power unit")
@@ -1509,7 +1509,7 @@
else else
to_chat(user, "There's not enough wire to finish the task.") to_chat(user, "There's not enough wire to finish the task.")
return return
else if(W.is_screwdriver()) else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(hasInternalDamage(MECHA_INT_TEMP_CONTROL)) if(hasInternalDamage(MECHA_INT_TEMP_CONTROL))
clearInternalDamage(MECHA_INT_TEMP_CONTROL) clearInternalDamage(MECHA_INT_TEMP_CONTROL)
to_chat(user, "You repair the damaged temperature controller.") to_chat(user, "You repair the damaged temperature controller.")

View File

@@ -9,13 +9,13 @@
playsound(holder, 'sound/items/Welder2.ogg', 50, 1) playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
else else
return 0 return 0
else if(I.is_wrench()) else if(I.get_tool_quality(TOOL_WRENCH))
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
else if(I.is_screwdriver()) else if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
else if(I.is_wirecutter()) else if(I.get_tool_quality(TOOL_WIRECUTTER))
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
else if(istype(I, /obj/item/stack/cable_coil)) else if(istype(I, /obj/item/stack/cable_coil))
@@ -41,13 +41,13 @@
playsound(holder, 'sound/items/Welder2.ogg', 50, 1) playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
else else
return 0 return 0
else if(I.is_wrench()) else if(I.get_tool_quality(TOOL_WRENCH))
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
else if(I.is_screwdriver()) else if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
else if(I.is_wirecutter()) else if(I.get_tool_quality(TOOL_WIRECUTTER))
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
else if(istype(I, /obj/item/stack/cable_coil)) else if(istype(I, /obj/item/stack/cable_coil))
@@ -103,11 +103,11 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="External armor is wrenched."), "desc"="External armor is wrenched."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//3 //3
list("key"=/obj/item/stack/material/plasteel, list("key"=/obj/item/stack/material/plasteel,
@@ -115,46 +115,46 @@
"desc"="Internal armor is welded."), "desc"="Internal armor is welded."),
//4 //4
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//5 //5
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is installed"), "desc"="Internal armor is installed"),
//6 //6
list("key"=/obj/item/stack/material/steel, list("key"=/obj/item/stack/material/steel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//7 //7
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//8 //8
list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//9 //9
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//10 //10
list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main, list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//11 //11
list("key"=IS_WIRECUTTER, list("key"=TOOL_WIRECUTTER,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//12 //12
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//13 //13
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//14 //14
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )
@@ -314,11 +314,11 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="External armor is wrenched."), "desc"="External armor is wrenched."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//3 //3
list("key"=/obj/item/mecha_parts/part/gygax_armour, list("key"=/obj/item/mecha_parts/part/gygax_armour,
@@ -326,70 +326,70 @@
"desc"="Internal armor is welded."), "desc"="Internal armor is welded."),
//4 //4
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//5 //5
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is installed"), "desc"="Internal armor is installed"),
//6 //6
list("key"=/obj/item/stack/material/steel, list("key"=/obj/item/stack/material/steel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Advanced capacitor is secured"), "desc"="Advanced capacitor is secured"),
//7 //7
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Advanced capacitor is installed"), "desc"="Advanced capacitor is installed"),
//8 //8
list("key"=/obj/item/weapon/stock_parts/capacitor/adv, list("key"=/obj/item/weapon/stock_parts/capacitor/adv,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Advanced scanner module is secured"), "desc"="Advanced scanner module is secured"),
//9 //9
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Advanced scanner module is installed"), "desc"="Advanced scanner module is installed"),
//10 //10
list("key"=/obj/item/weapon/stock_parts/scanning_module/adv, list("key"=/obj/item/weapon/stock_parts/scanning_module/adv,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Targeting module is secured"), "desc"="Targeting module is secured"),
//11 //11
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Targeting module is installed"), "desc"="Targeting module is installed"),
//12 //12
list("key"=/obj/item/weapon/circuitboard/mecha/gygax/targeting, list("key"=/obj/item/weapon/circuitboard/mecha/gygax/targeting,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//13 //13
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//14 //14
list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//15 //15
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//16 //16
list("key"=/obj/item/weapon/circuitboard/mecha/gygax/main, list("key"=/obj/item/weapon/circuitboard/mecha/gygax/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//17 //17
list("key"=/obj/item/weapon/tool/wirecutters, list("key"=/obj/item/weapon/tool/wirecutters,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//18 //18
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//19 //19
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//20 //20
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )
@@ -598,11 +598,11 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="External armor is wrenched."), "desc"="External armor is wrenched."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//3 //3
list("key"=/obj/item/stack/material/plasteel, list("key"=/obj/item/stack/material/plasteel,
@@ -610,70 +610,70 @@
"desc"="Internal armor is welded."), "desc"="Internal armor is welded."),
//4 //4
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//5 //5
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is installed"), "desc"="Internal armor is installed"),
//6 //6
list("key"=/obj/item/stack/material/steel, list("key"=/obj/item/stack/material/steel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Advanced capacitor is secured"), "desc"="Advanced capacitor is secured"),
//7 //7
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Advanced capacitor is installed"), "desc"="Advanced capacitor is installed"),
//8 //8
list("key"=/obj/item/weapon/stock_parts/capacitor/adv, list("key"=/obj/item/weapon/stock_parts/capacitor/adv,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Advanced scanner module is secured"), "desc"="Advanced scanner module is secured"),
//9 //9
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Advanced scanner module is installed"), "desc"="Advanced scanner module is installed"),
//10 //10
list("key"=/obj/item/weapon/stock_parts/scanning_module/adv, list("key"=/obj/item/weapon/stock_parts/scanning_module/adv,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Medical module is secured"), "desc"="Medical module is secured"),
//11 //11
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Medical module is installed"), "desc"="Medical module is installed"),
//12 //12
list("key"=/obj/item/weapon/circuitboard/mecha/gygax/medical, list("key"=/obj/item/weapon/circuitboard/mecha/gygax/medical,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//13 //13
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//14 //14
list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//15 //15
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//16 //16
list("key"=/obj/item/weapon/circuitboard/mecha/gygax/main, list("key"=/obj/item/weapon/circuitboard/mecha/gygax/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//17 //17
list("key"=/obj/item/weapon/tool/wirecutters, list("key"=/obj/item/weapon/tool/wirecutters,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//18 //18
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//19 //19
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//20 //20
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )
@@ -884,15 +884,15 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="External armor is wrenched."), "desc"="External armor is wrenched."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//3 //3
list("key"=/obj/item/stack/material/plasteel, list("key"=/obj/item/stack/material/plasteel,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is being installed."), "desc"="External armor is being installed."),
//4 //4
list("key"=/obj/item/stack/material/plasteel, list("key"=/obj/item/stack/material/plasteel,
@@ -900,46 +900,46 @@
"desc"="Internal armor is welded."), "desc"="Internal armor is welded."),
//5 //5
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//6 //6
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is installed"), "desc"="Internal armor is installed"),
//7 //7
list("key"=/obj/item/stack/material/plasteel, list("key"=/obj/item/stack/material/plasteel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//8 //8
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//9 //9
list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//10 //10
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//11 //11
list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main, list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//12 //12
list("key"=/obj/item/weapon/tool/wirecutters, list("key"=/obj/item/weapon/tool/wirecutters,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//13 //13
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//14 //14
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//15 //15
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )
@@ -1108,11 +1108,11 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="External armor is wrenched."), "desc"="External armor is wrenched."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//3 //3
list("key"=/obj/item/mecha_parts/part/durand_armour, list("key"=/obj/item/mecha_parts/part/durand_armour,
@@ -1120,70 +1120,70 @@
"desc"="Internal armor is welded."), "desc"="Internal armor is welded."),
//4 //4
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//5 //5
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is installed"), "desc"="Internal armor is installed"),
//6 //6
list("key"=/obj/item/stack/material/steel, list("key"=/obj/item/stack/material/steel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Advanced capacitor is secured"), "desc"="Advanced capacitor is secured"),
//7 //7
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Advanced capacitor is installed"), "desc"="Advanced capacitor is installed"),
//8 //8
list("key"=/obj/item/weapon/stock_parts/capacitor/adv, list("key"=/obj/item/weapon/stock_parts/capacitor/adv,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Advanced scanner module is secured"), "desc"="Advanced scanner module is secured"),
//9 //9
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Advanced scanner module is installed"), "desc"="Advanced scanner module is installed"),
//10 //10
list("key"=/obj/item/weapon/stock_parts/scanning_module/adv, list("key"=/obj/item/weapon/stock_parts/scanning_module/adv,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Targeting module is secured"), "desc"="Targeting module is secured"),
//11 //11
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Targeting module is installed"), "desc"="Targeting module is installed"),
//12 //12
list("key"=/obj/item/weapon/circuitboard/mecha/durand/targeting, list("key"=/obj/item/weapon/circuitboard/mecha/durand/targeting,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//13 //13
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//14 //14
list("key"=/obj/item/weapon/circuitboard/mecha/durand/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/durand/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//15 //15
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//16 //16
list("key"=/obj/item/weapon/circuitboard/mecha/durand/main, list("key"=/obj/item/weapon/circuitboard/mecha/durand/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//17 //17
list("key"=/obj/item/weapon/tool/wirecutters, list("key"=/obj/item/weapon/tool/wirecutters,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//18 //18
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//19 //19
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//20 //20
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )
@@ -1392,11 +1392,11 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="External armor is wrenched."), "desc"="External armor is wrenched."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//3 //3
list("key"=/obj/item/stack/material/plasteel, list("key"=/obj/item/stack/material/plasteel,
@@ -1404,46 +1404,46 @@
"desc"="Internal armor is welded."), "desc"="Internal armor is welded."),
//4 //4
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//5 //5
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is installed"), "desc"="Internal armor is installed"),
//6 //6
list("key"=/obj/item/stack/material/steel, list("key"=/obj/item/stack/material/steel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//7 //7
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//8 //8
list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//9 //9
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//10 //10
list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/main, list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//11 //11
list("key"=/obj/item/weapon/tool/wirecutters, list("key"=/obj/item/weapon/tool/wirecutters,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//12 //12
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//13 //13
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//14 //14
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )
@@ -1604,11 +1604,11 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="External armor is wrenched."), "desc"="External armor is wrenched."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//3 //3
list("key"=/obj/item/stack/material/plasteel, list("key"=/obj/item/stack/material/plasteel,
@@ -1616,70 +1616,70 @@
"desc"="Internal armor is welded."), "desc"="Internal armor is welded."),
//4 //4
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//5 //5
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is installed"), "desc"="Internal armor is installed"),
//6 //6
list("key"=/obj/item/stack/material/steel, list("key"=/obj/item/stack/material/steel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Hand teleporter is secured"), "desc"="Hand teleporter is secured"),
//7 //7
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Hand teleporter is installed"), "desc"="Hand teleporter is installed"),
//8 //8
list("key"=/obj/item/weapon/hand_tele, list("key"=/obj/item/weapon/hand_tele,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="SMES coil is secured"), "desc"="SMES coil is secured"),
//9 //9
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="SMES coil is installed"), "desc"="SMES coil is installed"),
//10 //10
list("key"=/obj/item/weapon/smes_coil/super_capacity, list("key"=/obj/item/weapon/smes_coil/super_capacity,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Targeting module is secured"), "desc"="Targeting module is secured"),
//11 //11
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Targeting module is installed"), "desc"="Targeting module is installed"),
//12 //12
list("key"=/obj/item/weapon/circuitboard/mecha/phazon/targeting, list("key"=/obj/item/weapon/circuitboard/mecha/phazon/targeting,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//13 //13
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//14 //14
list("key"=/obj/item/weapon/circuitboard/mecha/phazon/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/phazon/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//15 //15
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//16 //16
list("key"=/obj/item/weapon/circuitboard/mecha/phazon/main, list("key"=/obj/item/weapon/circuitboard/mecha/phazon/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//17 //17
list("key"=/obj/item/weapon/tool/wirecutters, list("key"=/obj/item/weapon/tool/wirecutters,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//18 //18
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//19 //19
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//20 //20
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )
@@ -1886,11 +1886,11 @@
steps = list( steps = list(
//1 //1
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is installed."), "desc"="External armor is installed."),
//2 //2
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="External armor is attached."), "desc"="External armor is attached."),
//3 //3
list("key"=/obj/item/stack/material/morphium, list("key"=/obj/item/stack/material/morphium,
@@ -1898,78 +1898,78 @@
"desc"="Internal armor is welded"), "desc"="Internal armor is welded"),
//4 //4
list("key"=/obj/item/weapon/weldingtool, list("key"=/obj/item/weapon/weldingtool,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is wrenched"), "desc"="Internal armor is wrenched"),
//5 //5
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Internal armor is attached."), "desc"="Internal armor is attached."),
//6 //6
list("key"=/obj/item/stack/material/durasteel, list("key"=/obj/item/stack/material/durasteel,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Durand auxiliary board is secured."), "desc"="Durand auxiliary board is secured."),
//7 //7
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Durand auxiliary board is installed"), "desc"="Durand auxiliary board is installed"),
//8 //8
list("key"=/obj/item/weapon/circuitboard/mecha/durand/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/durand/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Phase coil is secured"), "desc"="Phase coil is secured"),
//9 //9
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Phase coil is installed"), "desc"="Phase coil is installed"),
//10 //10
list("key"=/obj/item/prop/alien/phasecoil, list("key"=/obj/item/prop/alien/phasecoil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Gygax balance system secured"), "desc"="Gygax balance system secured"),
//11 //11
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Gygax balance system installed"), "desc"="Gygax balance system installed"),
//12 //12
list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Targeting module is secured"), "desc"="Targeting module is secured"),
//13 //13
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Targeting module is installed"), "desc"="Targeting module is installed"),
//14 //14
list("key"=/obj/item/weapon/circuitboard/mecha/imperion/targeting, list("key"=/obj/item/weapon/circuitboard/mecha/imperion/targeting,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Peripherals control module is secured"), "desc"="Peripherals control module is secured"),
//15 //15
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Peripherals control module is installed"), "desc"="Peripherals control module is installed"),
//16 //16
list("key"=/obj/item/weapon/circuitboard/mecha/imperion/peripherals, list("key"=/obj/item/weapon/circuitboard/mecha/imperion/peripherals,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="Central control module is secured"), "desc"="Central control module is secured"),
//17 //17
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_CROWBAR, "backkey"=TOOL_CROWBAR,
"desc"="Central control module is installed"), "desc"="Central control module is installed"),
//18 //18
list("key"=/obj/item/weapon/circuitboard/mecha/imperion/main, list("key"=/obj/item/weapon/circuitboard/mecha/imperion/main,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is adjusted"), "desc"="The wiring is adjusted"),
//19 //19
list("key"=/obj/item/weapon/tool/wirecutters, list("key"=/obj/item/weapon/tool/wirecutters,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The wiring is added"), "desc"="The wiring is added"),
//20 //20
list("key"=/obj/item/stack/cable_coil, list("key"=/obj/item/stack/cable_coil,
"backkey"=IS_SCREWDRIVER, "backkey"=TOOL_SCREWDRIVER,
"desc"="The hydraulic systems are active."), "desc"="The hydraulic systems are active."),
//21 //21
list("key"=IS_SCREWDRIVER, list("key"=TOOL_SCREWDRIVER,
"backkey"=IS_WRENCH, "backkey"=TOOL_WRENCH,
"desc"="The hydraulic systems are connected."), "desc"="The hydraulic systems are connected."),
//22 //22
list("key"=IS_WRENCH, list("key"=TOOL_WRENCH,
"desc"="The hydraulic systems are disconnected.") "desc"="The hydraulic systems are disconnected.")
) )

View File

@@ -49,7 +49,7 @@
else else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>") to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return return
if(W.is_wirecutter()) if(W.get_tool_quality(TOOL_WIRECUTTER))
if(salvage_num <= 0) if(salvage_num <= 0)
to_chat(user, "You don't see anything that can be cut with [W].") to_chat(user, "You don't see anything that can be cut with [W].")
return return
@@ -61,7 +61,7 @@
salvage_num-- salvage_num--
else else
to_chat(user, "You failed to salvage anything valuable from [src].") to_chat(user, "You failed to salvage anything valuable from [src].")
if(W.is_crowbar()) if(W.get_tool_quality(TOOL_CROWBAR))
if(!isemptylist(crowbar_salvage)) if(!isemptylist(crowbar_salvage))
var/obj/S = pick(crowbar_salvage) var/obj/S = pick(crowbar_salvage)
if(S) if(S)

View File

@@ -164,7 +164,7 @@
return ..() return ..()
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wirecutter()) if(W.get_tool_quality(TOOL_WIRECUTTER))
playsound(src, W.usesound, 100, 1) playsound(src, W.usesound, 100, 1)
if(ruined) if(ruined)
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>") to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")

View File

@@ -100,7 +100,7 @@
explode(M) explode(M)
/obj/effect/mine/attackby(obj/item/W as obj, mob/living/user as mob) /obj/effect/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open panel_open = !panel_open
user.visible_message("<span class='warning'>[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].</span>", user.visible_message("<span class='warning'>[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].</span>",
"<span class='notice'>You very carefully screw the mine's panel [panel_open ? "open" : "closed"].</span>") "<span class='notice'>You very carefully screw the mine's panel [panel_open ? "open" : "closed"].</span>")
@@ -109,14 +109,13 @@
// Panel open, stay uncloaked, or uncloak if already cloaked. If you don't cloak on place, ignore it and just be normal alpha. // Panel open, stay uncloaked, or uncloak if already cloaked. If you don't cloak on place, ignore it and just be normal alpha.
alpha = camo_net ? (panel_open ? 255 : 50) : 255 alpha = camo_net ? (panel_open ? 255 : 50) : 255
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open) else if(panel_open && (W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_MULTITOOL)))
interact(user) interact(user)
else else
..() ..()
/obj/effect/mine/interact(mob/living/user as mob) /obj/effect/mine/interact(mob/living/user as mob)
if(!panel_open || istype(user, /mob/living/silicon/ai)) if(panel_open && !istype(user, /mob/living/silicon/ai))
return
user.set_machine(src) user.set_machine(src)
wires.Interact(user) wires.Interact(user)
@@ -308,7 +307,7 @@
return return
/obj/item/weapon/mine/attackby(obj/item/W as obj, mob/living/user as mob) /obj/item/weapon/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.is_screwdriver() && trap) if(W.get_tool_quality(TOOL_SCREWDRIVER) && trap)
to_chat(user, "<span class='notice'>You begin removing \the [trap].</span>") to_chat(user, "<span class='notice'>You begin removing \the [trap].</span>")
if(do_after(user, 10 SECONDS)) if(do_after(user, 10 SECONDS))
to_chat(user, "<span class='notice'>You finish disconnecting the mine's trigger.</span>") to_chat(user, "<span class='notice'>You finish disconnecting the mine's trigger.</span>")

View File

@@ -86,7 +86,6 @@
// Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called. // Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called.
var/list/sprite_sheets_obj = list() var/list/sprite_sheets_obj = list()
var/toolspeed = 1 // This is a multipler on how 'fast' a tool works. e.g. setting this to 0.5 will make the tool work twice as fast.
var/attackspeed = DEFAULT_ATTACK_COOLDOWN // How long click delay will be when using this, in 1/10ths of a second. Checked in the user's get_attack_speed(). var/attackspeed = DEFAULT_ATTACK_COOLDOWN // How long click delay will be when using this, in 1/10ths of a second. Checked in the user's get_attack_speed().
var/reach = 1 // Length of tiles it can reach, 1 is adjacent. var/reach = 1 // Length of tiles it can reach, 1 is adjacent.
var/addblends // Icon overlay for ADD highlights when applicable. var/addblends // Icon overlay for ADD highlights when applicable.

View File

@@ -87,7 +87,7 @@
/obj/item/weapon/deskbell/attackby(obj/item/W, mob/user, params) /obj/item/weapon/deskbell/attackby(obj/item/W, mob/user, params)
if(!istype(W)) if(!istype(W))
return return
if(W.is_wrench() && isturf(loc)) if(W.get_tool_quality(TOOL_WRENCH) && isturf(loc))
if(do_after(5)) if(do_after(5))
if(!src) return if(!src) return
to_chat(user, "<span class='notice'>You dissasemble the desk bell</span>") to_chat(user, "<span class='notice'>You dissasemble the desk bell</span>")

View File

@@ -48,7 +48,7 @@
src.name = "body bag" src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri //..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return return
else if(W.is_wirecutter()) else if(W.get_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "You cut the tag off the bodybag") to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag" src.name = "body bag"
src.overlays.Cut() src.overlays.Cut()
@@ -246,7 +246,7 @@
inject_occupant(H) inject_occupant(H)
break break
else if(W.is_screwdriver()) else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(syringe) if(syringe)
if(used) if(used)
to_chat(user,"<span class='warning'>The injector cannot be removed now that the stasis bag has been used!</span>") to_chat(user,"<span class='warning'>The injector cannot be removed now that the stasis bag has been used!</span>")

View File

@@ -97,7 +97,7 @@
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>") to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon() update_icon()
else if(W.is_screwdriver()) else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(bcell) if(bcell)
bcell.update_icon() bcell.update_icon()
bcell.forceMove(get_turf(src.loc)) bcell.forceMove(get_turf(src.loc))

View File

@@ -37,13 +37,13 @@
power_supply = new cell_type(src) power_supply = new cell_type(src)
/obj/item/device/flash/attackby(var/obj/item/W, var/mob/user) /obj/item/device/flash/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver() && broken) if(W.get_tool_quality(TOOL_SCREWDRIVER) && broken)
if(repairing) if(repairing)
to_chat(user, "<span class='notice'>\The [src] is already being repaired!</span>") to_chat(user, "<span class='notice'>\The [src] is already being repaired!</span>")
return return
user.visible_message("<span class='notice'>\The [user] starts trying to repair \the [src]'s bulb.</span>") user.visible_message("<span class='notice'>\The [user] starts trying to repair \the [src]'s bulb.</span>")
repairing = TRUE repairing = TRUE
if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed) && can_repair) if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.get_tool_speed(TOOL_SCREWDRIVER)) && can_repair)
if(prob(30)) if(prob(30))
user.visible_message("<span class='notice'>\The [user] successfully repairs \the [src]!</span>") user.visible_message("<span class='notice'>\The [user] successfully repairs \the [src]!</span>")
broken = FALSE broken = FALSE

View File

@@ -24,7 +24,7 @@
return ..() return ..()
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user) /obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver()) if(W.get_tool_quality(TOOL_SCREWDRIVER))
in_hack_mode = !in_hack_mode in_hack_mode = !in_hack_mode
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
else else

View File

@@ -54,7 +54,7 @@
else else
to_chat(user, "<span class='notice'>[src] already has a diode.</span>") to_chat(user, "<span class='notice'>[src] already has a diode.</span>")
else if(W.is_screwdriver()) else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(diode) if(diode)
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>") to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
diode.loc = get_turf(src.loc) diode.loc = get_turf(src.loc)

View File

@@ -28,8 +28,7 @@
var/obj/machinery/clonepod/connecting //same for cryopod linkage var/obj/machinery/clonepod/connecting //same for cryopod linkage
var/obj/machinery/connectable //Used to connect machinery. var/obj/machinery/connectable //Used to connect machinery.
var/weakref_wiring //Used to store weak references for integrated circuitry. This is now the Omnitool. var/weakref_wiring //Used to store weak references for integrated circuitry. This is now the Omnitool.
toolspeed = 1 tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_STANDARD)
tool_qualities = list(TOOL_MULTITOOL)
/obj/item/device/multitool/attack_self(mob/living/user) /obj/item/device/multitool/attack_self(mob/living/user)
var/choice = alert("What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel") var/choice = alert("What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel")
@@ -63,16 +62,12 @@
to_chat(user,"<span class='notice'>\The [src] is now set to [toolmode].</span>") to_chat(user,"<span class='notice'>\The [src] is now set to [toolmode].</span>")
accepting_refs = (toolmode == MULTITOOL_MODE_INTCIRCUITS) accepting_refs = (toolmode == MULTITOOL_MODE_INTCIRCUITS)
n
return
/obj/item/device/multitool/is_multitool()
return TRUE
/obj/item/device/multitool/cyborg /obj/item/device/multitool/cyborg
name = "multitool" name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool." desc = "Optimised and stripped-down version of a regular multitool."
toolspeed = 0.5 tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_DECENT)
@@ -94,5 +89,5 @@
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_multitool) catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_multitool)
icon = 'icons/obj/abductor.dmi' icon = 'icons/obj/abductor.dmi'
icon_state = "multitool" icon_state = "multitool"
toolspeed = 0.1 tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_BEST)
origin_tech = list(TECH_MAGNET = 5, TECH_ENGINEERING = 5) origin_tech = list(TECH_MAGNET = 5, TECH_ENGINEERING = 5)

View File

@@ -328,7 +328,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
current_emotion = emotion current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate() /obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc) var/turf/T = get_turf(src.loc)
for (var/mob/M in viewers(T)) for (var/mob/M in viewers(T))
M.show_message("<span class='notice'>\The [src] flashes a message across its screen, \"Additional personalities available for download.\"</span>", 3, "<span class='notice'>\The [src] bleeps electronically.</span>", 2) M.show_message("<span class='notice'>\The [src] flashes a message across its screen, \"Additional personalities available for download.\"</span>", 3, "<span class='notice'>\The [src] bleeps electronically.</span>", 2)

View File

@@ -29,7 +29,7 @@
..() ..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user) /obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
if(I.is_screwdriver()) if(I.get_tool_quality(TOOL_SCREWDRIVER))
if(mode == 0) if(mode == 0)
var/turf/T = loc var/turf/T = loc
if(isturf(T) && !!T.is_plating()) if(isturf(T) && !!T.is_plating())

View File

@@ -334,32 +334,19 @@
return ..(freq, level, 1) return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src) user.set_machine(src)
if(!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey))) if(W.get_tool_quality(TOOL_SCREWDRIVER))
return
if(W.is_screwdriver())
if(keyslot1 || keyslot2) if(keyslot1 || keyslot2)
for(var/ch_name in channels) for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name]) radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null secure_radio_connections[ch_name] = null
if(keyslot1) if(keyslot1)
var/turf/T = get_turf(user) keyslot1.forceMove(get_turf(user))
if(T)
keyslot1.loc = T
keyslot1 = null keyslot1 = null
if(keyslot2) if(keyslot2)
var/turf/T = get_turf(user) keyslot2.forceMove(get_turf(user))
if(T)
keyslot2.loc = T
keyslot2 = null keyslot2 = null
recalculateChannels() recalculateChannels()
@@ -369,25 +356,24 @@
else else
to_chat(user, "This headset doesn't have any encryption keys! How useless...") to_chat(user, "This headset doesn't have any encryption keys! How useless...")
if(istype(W, /obj/item/device/encryptionkey/)) return TRUE
if(keyslot1 && keyslot2)
to_chat(user, "The headset can't hold another key!")
return
else if(istype(W, /obj/item/device/encryptionkey/))
if(!keyslot1) if(!keyslot1)
user.drop_item() user.drop_from_inventory(W, src)
W.loc = src
keyslot1 = W keyslot1 = W
else else if(!keyslot2)
user.drop_item() user.drop_from_inventory(W, src)
W.loc = src
keyslot2 = W keyslot2 = W
else
to_chat(user, "The headset can't hold another key!")
recalculateChannels() recalculateChannels()
return TRUE
return return ..()
/obj/item/device/radio/headset/recalculateChannels(var/setDescription = 0) /obj/item/device/radio/headset/recalculateChannels(var/setDescription = 0)

View File

@@ -123,12 +123,12 @@
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob) /obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
add_fingerprint(user) add_fingerprint(user)
if(W.is_screwdriver()) // Opening the intercom up. if(W.get_tool_quality(TOOL_SCREWDRIVER)) // Opening the intercom up.
wiresexposed = !wiresexposed wiresexposed = !wiresexposed
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
update_icon() update_icon()
else if(wiresexposed && W.is_wirecutter()) else if(wiresexposed && W.get_tool_quality(TOOL_WIRECUTTER))
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].") user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src, W.usesound, 50, 1) playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5) new/obj/item/stack/cable_coil(get_turf(src), 5)

View File

@@ -606,21 +606,18 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
. += "<span class='notice'>\The [src] can not be modified or attached!</span>" . += "<span class='notice'>\The [src] can not be modified or attached!</span>"
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
user.set_machine(src) user.set_machine(src)
if (!W.is_screwdriver())
return
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
if (b_stat)
user.show_message("<span class='notice'>\The [src] can now be attached and modified!</span>")
else
user.show_message("<span class='notice'>\The [src] can no longer be modified or attached!</span>")
updateDialog()
//Foreach goto(83)
add_fingerprint(user) add_fingerprint(user)
return if(W.get_tool_quality(TOOL_SCREWDRIVER))
else return b_stat = !b_stat
if(!istype(src, /obj/item/device/radio/beacon))
updateDialog()
if(b_stat)
to_chat(user, SPAN_NOTICE("\The [src] can now be attached and modified!"))
else
to_chat(user, SPAN_NOTICE("\The [src] can no longer be modified or attached!"))
return TRUE
return ..()
/obj/item/device/radio/emp_act(severity) /obj/item/device/radio/emp_act(severity)
broadcasting = 0 broadcasting = 0
@@ -658,24 +655,15 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
R.cell_use_power(C.active_usage) R.cell_use_power(C.active_usage)
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src) user.set_machine(src)
if (!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey))) if(W.get_tool_quality(TOOL_SCREWDRIVER))
return
if(W.is_screwdriver())
if(keyslot) if(keyslot)
for(var/ch_name in channels) for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name]) radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null secure_radio_connections[ch_name] = null
if(keyslot) if(keyslot)
var/turf/T = get_turf(user) keyslot.forceMove(get_turf(user))
if(T)
keyslot.loc = T
keyslot = null keyslot = null
recalculateChannels() recalculateChannels()
@@ -685,19 +673,20 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
else else
to_chat(user, "This radio doesn't have any encryption keys!") to_chat(user, "This radio doesn't have any encryption keys!")
if(istype(W, /obj/item/device/encryptionkey/)) return TRUE
else if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot) if(keyslot)
to_chat(user, "The radio can't hold another key!") to_chat(user, "The radio can't hold another key!")
return
if(!keyslot) else
user.drop_item() user.drop_from_inventory(W, src)
W.loc = src
keyslot = W keyslot = W
recalculateChannels() recalculateChannels()
return TRUE
return return ..()
/obj/item/device/radio/borg/recalculateChannels() /obj/item/device/radio/borg/recalculateChannels()
src.channels = list() src.channels = list()

View File

@@ -32,13 +32,12 @@ HALOGEN COUNTER - Radcount on mobs
. = ..() . = ..()
/obj/item/device/healthanalyzer/do_surgery(mob/living/M, mob/living/user) /obj/item/device/healthanalyzer/do_surgery(mob/living/M, mob/living/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
return ..()
scan_mob(M, user) //default surgery behaviour is just to scan as usual scan_mob(M, user) //default surgery behaviour is just to scan as usual
return 1 return TRUE
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user) /obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user)
scan_mob(M, user) scan_mob(M, user)
return TRUE
/obj/item/device/healthanalyzer/proc/scan_mob(mob/living/M, mob/living/user) /obj/item/device/healthanalyzer/proc/scan_mob(mob/living/M, mob/living/user)
var/dat = "" var/dat = ""

View File

@@ -110,7 +110,7 @@
else else
to_chat(user, "Error: The device is linked to another monitor.") to_chat(user, "Error: The device is linked to another monitor.")
else if(W.is_wrench() && user.a_intent != I_HURT) else if(W.get_tool_quality(TOOL_WRENCH) && user.a_intent != I_HURT)
if(isturf(loc)) if(isturf(loc))
anchored = !anchored anchored = !anchored

View File

@@ -144,7 +144,7 @@
to_chat(user, "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>") to_chat(user, "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>")
/obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (W.is_screwdriver()) if (W.get_tool_quality(TOOL_SCREWDRIVER))
if(cover_open) if(cover_open)
cover_open = 0 cover_open = 0
to_chat(user, "You screw the panel into place.") to_chat(user, "You screw the panel into place.")

View File

@@ -408,10 +408,10 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user, params) /obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && I.is_screwdriver()) if(ruined && I.get_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>") to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
playsound(src, I.usesound, 50, 1) playsound(src, I.usesound, 50, 1)
if(do_after(user, 120 * I.toolspeed, target = src)) if(do_after(user, 120 * I.get_tool_speed(TOOL_SCREWDRIVER), target = src))
to_chat(user, "<span class='notice'>You wound the tape back in.</span>") to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
fix() fix()
return return

View File

@@ -6,7 +6,7 @@
icon_state = "nanopaste" icon_state = "nanopaste"
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3) origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
amount = 10 amount = 10
toolspeed = 0.75 //Used in surgery, shouldn't be the same speed as a normal screwdriver on mechanical organ repair. tool_qualities = list(TOOL_NANOPASTE = TOOL_QUALITY_STANDARD) //Used in surgery, shouldn't be the same speed as a normal screwdriver on mechanical organ repair.
w_class = ITEMSIZE_SMALL w_class = ITEMSIZE_SMALL
no_variants = FALSE no_variants = FALSE
@@ -16,7 +16,7 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss()) if (R.getBruteLoss() || R.getFireLoss())
if(do_after(user,7 * toolspeed)) if(do_after(user,7 * get_tool_speed(TOOL_NANOPASTE)))
R.adjustBruteLoss(-15) R.adjustBruteLoss(-15)
R.adjustFireLoss(-15) R.adjustFireLoss(-15)
R.updatehealth() R.updatehealth()
@@ -45,13 +45,13 @@
if (S && (S.robotic >= ORGAN_ROBOT)) if (S && (S.robotic >= ORGAN_ROBOT))
if(!S.get_damage()) if(!S.get_damage())
user << "<span class='notice'>Nothing to fix here.</span>" to_chat(user, "<span class='notice'>Nothing to fix here.</span>")
else if(can_use(1)) else if(can_use(1))
user.setClickCooldown(user.get_attack_speed(src)) user.setClickCooldown(user.get_attack_speed(src))
if(S.open >= 2) if(S.open >= 2)
if(do_after(user,5 * toolspeed)) if(do_after(user,5 * get_tool_speed(TOOL_NANOPASTE)))
S.heal_damage(20, 20, robo_repair = 1) S.heal_damage(20, 20, robo_repair = 1)
else if(do_after(user,5 * toolspeed)) else if(do_after(user,5 * get_tool_speed(TOOL_NANOPASTE)))
S.heal_damage(10,10, robo_repair =1) S.heal_damage(10,10, robo_repair =1)
H.updatehealth() H.updatehealth()
use(1) use(1)

View File

@@ -750,7 +750,7 @@
opened = FALSE opened = FALSE
return return
if(is_sharp(I) && !opened) if(I.sharp && !opened)
to_chat(user, "You open a small incision in [src]. You can place tiny items inside.") to_chat(user, "You open a small incision in [src]. You can place tiny items inside.")
opened = TRUE opened = TRUE
return return
@@ -871,7 +871,7 @@
opened = FALSE opened = FALSE
return return
if(is_sharp(I) && !opened) if(I.sharp && !opened)
to_chat(user, "You open a small incision in [src]. You can place tiny items inside.") to_chat(user, "You open a small incision in [src]. You can place tiny items inside.")
opened = TRUE opened = TRUE
return return

View File

@@ -99,7 +99,7 @@
visible_message("<span class='notice'>[user] pairs [I] to [nickname]</span>") visible_message("<span class='notice'>[user] pairs [I] to [nickname]</span>")
toggle_pairing() toggle_pairing()
else if(I.is_screwdriver() && cell) else if(I.get_tool_quality(TOOL_SCREWDRIVER) && cell)
if(do_after(user, 3 SECONDS, src)) if(do_after(user, 3 SECONDS, src))
to_chat(user, "<span class='notice'>You remove [cell] into [nickname].</span>") to_chat(user, "<span class='notice'>You remove [cell] into [nickname].</span>")
playsound(src, I.usesound, 50, 1) playsound(src, I.usesound, 50, 1)

Some files were not shown because too many files have changed in this diff Show More