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/env_air = loc.return_air()
if((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
return 0
return 1
return FALSE
return TRUE
// Deconstruct into a pipe item.
/obj/machinery/atmospherics/proc/deconstruct()
@@ -228,3 +228,21 @@ Pipelines + Other Objects -> Pipe network
// pixel_x = PIPE_PIXEL_OFFSET_X(piping_layer)
// pixel_y = PIPE_PIXEL_OFFSET_Y(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
/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)
anchored = !anchored
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)
/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 ..()
if (unlocked)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
return 1
if(!can_unwrench())
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()
return TRUE
return default_deconstruction_wrench(user, W)
#undef REGULATE_NONE
#undef REGULATE_INPUT

View File

@@ -240,20 +240,9 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench())
if (!W.get_tool_quality(TOOL_WRENCH))
return ..()
if (!(stat & NOPOWER) && use_power)
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
return 1
if(!can_unwrench())
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()
return TRUE
return default_deconstruction_wrench(user, W)

View File

@@ -80,21 +80,9 @@
update_icon()
/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 ..()
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()
return default_deconstruction_wrench(user, W)
/obj/machinery/atmospherics/omni/attack_hand(user as mob)
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)
if (!W.is_wrench())
if(!W.get_tool_quality(TOOL_WRENCH))
return ..()
if (connected_device)
if(connected_device)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], dettach \the [connected_device] first.</span>")
return 1
if (locate(/obj/machinery/portable_atmospherics, src.loc))
return 1
if(!can_unwrench())
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()
return TRUE
if(locate(/obj/machinery/portable_atmospherics, src.loc))
return TRUE
return default_deconstruction_wrench(user, W)

View File

@@ -52,20 +52,9 @@
update_icon()
/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 ..()
if(!can_unwrench())
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()
return default_deconstruction_wrench(user, W)
// Housekeeping and pipe network stuff below
/obj/machinery/atmospherics/trinary/get_neighbor_nodes_for_init()

View File

@@ -327,23 +327,13 @@
go_to_side()
/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 ..()
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>")
return 1
if(!can_unwrench())
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()
return TRUE
return default_deconstruction_wrench(user, W)
/obj/machinery/atmospherics/tvalve/mirrored
icon_state = "map_tvalvem0"

View File

@@ -67,21 +67,10 @@
return 1
/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 ..()
var/turf/T = src.loc
if (level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1
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
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()
return TRUE
return default_deconstruction_wrench(user, W)

View File

@@ -161,14 +161,7 @@
update_icon()
/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 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
if (WT.remove_fuel(0,user))
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
playsound(src, WT.usesound, 50, 1)
if(!welded)
@@ -416,27 +416,16 @@
update_icon()
/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 ..()
if (!(stat & NOPOWER) && use_power)
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
if (node && node.level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1
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
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()
return TRUE
return default_deconstruction_wrench(user, W)
#undef DEFAULT_PRESSURE_DELTA

View File

@@ -264,27 +264,17 @@
update_icon()
/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 ..()
if (!(stat & NOPOWER) && use_power)
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
if (node && node.level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1
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
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()
return TRUE
return default_deconstruction_wrench(user, W)
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
. = ..()

View File

@@ -19,7 +19,7 @@
var/datum/pipe_network/network_node2
/obj/machinery/atmospherics/valve/open
open = 1
open = TRUE
icon_state = "map_valve1"
/obj/machinery/atmospherics/valve/update_icon(animation)
@@ -61,7 +61,7 @@
network_node1 = new_network
if(new_network.normal_members.Find(src))
return 0
return FALSE
new_network.normal_members += src
@@ -89,9 +89,10 @@
node2 = null
/obj/machinery/atmospherics/valve/proc/open()
if(open) return 0
if(open)
return FALSE
open = 1
open = TRUE
update_icon()
if(network_node1&&network_node2)
@@ -99,17 +100,17 @@
network_node2 = network_node1
if(network_node1)
network_node1.update = 1
network_node1.update = TRUE
else if(network_node2)
network_node2.update = 1
network_node2.update = TRUE
return 1
return TRUE
/obj/machinery/atmospherics/valve/proc/close()
if(!open)
return 0
return FALSE
open = 0
open = FALSE
update_icon()
if(network_node1)
@@ -119,7 +120,7 @@
build_network()
return 1
return TRUE
/obj/machinery/atmospherics/valve/proc/normalize_dir()
if(dir==3)
@@ -141,9 +142,7 @@
/obj/machinery/atmospherics/valve/process()
..()
. = PROCESS_KILL
return
return PROCESS_KILL
/obj/machinery/atmospherics/valve/atmos_init()
normalize_dir()
@@ -199,7 +198,7 @@
if(network_node2 == old_network)
network_node2 = new_network
return 1
return TRUE
/obj/machinery/atmospherics/valve/return_network_air(datum/pipe_network/reference)
return null
@@ -229,7 +228,7 @@
/obj/machinery/atmospherics/valve/digital/Destroy()
unregister_radio(src, frequency)
. = ..()
return ..()
/obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -240,20 +239,20 @@
if(!src.allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
return
..()
return ..()
/obj/machinery/atmospherics/valve/digital/open
open = 1
open = TRUE
icon_state = "map_valve1"
/obj/machinery/atmospherics/valve/digital/power_change()
var/old_stat = stat
..()
. = ..()
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/valve/digital/update_icon()
..()
. = ..()
if(!powered())
icon_state = "valve[open]nopower"
@@ -270,7 +269,7 @@
/obj/machinery/atmospherics/valve/digital/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id))
return 0
return FALSE
switch(signal.data["command"])
if("valve_open")
@@ -286,25 +285,16 @@
close()
else
open()
return TRUE
/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 ..()
if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
return 1
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
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()
return TRUE
return default_deconstruction_wrench(user, W)
/obj/machinery/atmospherics/valve/examine(mob/user)
. = ..()

View File

@@ -114,26 +114,17 @@
return ..()
if(istype(W,/obj/item/device/pipe_painter))
return 0
return FALSE
if (!W.is_wrench())
if (!W.get_tool_quality(TOOL_WRENCH))
return ..()
var/turf/T = src.loc
if (level==1 && isturf(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return 1
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
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()
return TRUE
return default_deconstruction_wrench(W, user)
/obj/machinery/atmospherics/pipe/proc/change_color(var/new_color)
//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_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
#define FIRST_DIAG_STEP 1

View File

@@ -12,10 +12,26 @@
#define TOOL_RETRACTOR "retractor"
#define TOOL_HEMOSTAT "hemostat"
#define TOOL_CAUTERY "cautery"
#define TOOL_DRILL "drill"
#define TOOL_SDRILL "surgical_drill"
#define TOOL_SCALPEL "scalpel"
#define TOOL_SAW "saw"
#define TOOL_CSAW "circ_saw"
#define TOOL_BONESET "bonesetter"
#define TOOL_KNIFE "knife"
#define TOOL_BLOODFILTER "bloodfilter"
#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()
body_marking_styles_list[M.name] = M
//Surgery Steps - Initialize all /datum/surgery_step into a list
paths = typesof(/datum/surgery_step)-/datum/surgery_step
//Surgery Steps - Initialize all /decl/surgery_step into a list
paths = subtypesof(/decl/surgery_step)
for(var/T in paths)
var/datum/surgery_step/S = new T
surgery_steps += S
var/decl/surgery_step/S = new T
surgery_steps += S // TODO: Actually treat this like a decl
sort_surgeries()
//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
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)
return 0
return FALSE
if(delay == 0)
return TRUE
var/user_loc = user.loc
var/target_loc = target.loc
var/holding = user.get_active_hand()
var/datum/progressbar/progbar
if (progress)
progbar = new(user, time, target)
progbar = new(user, delay, target)
var/endtime = world.time+time
var/starttime = world.time
var/endtime = starttime + delay
. = TRUE
while (world.time < endtime)
stoplag(1)
@@ -190,10 +195,12 @@ Proc for attack log creation, because really why not
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)
if(delay < 0)
return FALSE
if(!user)
return 0
return FALSE
if(!delay)
return 1 //Okay. Done.
return TRUE //Okay. Done.
var/atom/target_loc = null
if(target)
target_loc = target.loc
@@ -212,9 +219,9 @@ Proc for attack log creation, because really why not
if (progress)
progbar = new(user, delay, target)
var/endtime = world.time + delay
var/starttime = world.time
. = 1
var/endtime = starttime + delay
. = TRUE
while (world.time < endtime)
stoplag(1)
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
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)
if(istype(I, /obj/item/device/multitool) || I.is_wirecutter())
return TRUE
if(istype(I, /obj/item/device/assembly/signaler))
return TRUE
return
return I.get_tool_quality(TOOL_MULTITOOL) || \
I.get_tool_quality(TOOL_WIRECUTTER) || \
istype(I, /obj/item/device/assembly/signaler)
/proc/is_hot(obj/item/W as obj)
switch(W.type)
@@ -1126,24 +1104,6 @@ var/global/list/common_tools = list(
else
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.
/proc/can_puncture(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
if(!W)
@@ -1151,7 +1111,7 @@ var/global/list/common_tools = list(
if(W.sharp)
return TRUE
return ( \
W.is_screwdriver() || \
W.get_tool_quality(TOOL_SCREWDRIVER) || \
istype(W, /obj/item/weapon/pen) || \
istype(W, /obj/item/weapon/weldingtool) || \
istype(W, /obj/item/weapon/flame/lighter/zippo) || \
@@ -1160,27 +1120,17 @@ var/global/list/common_tools = list(
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.
// 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)
. = M.lying
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.
if(!M.isSynthetic())
. = TRUE
return .
// You can, technically, always operate on yourself after standing still. Inadvised, but you can.
if(istype(user) && \
M == user && \
user.allow_self_surgery && \
user.a_intent == I_HELP && \
!M.isSynthetic())
return TRUE
return M.lying
// Returns an instance of a valid surgery surface.
/mob/living/proc/get_surgery_surface(mob/living/user)

View File

@@ -85,8 +85,10 @@
if(istype(item, /obj/item/stack))
var/obj/item/stack/stack = item
.["other"][item.type] += stack.amount
else if(item.tool_qualities)
.["tool_qualities"] |= item.tool_qualities
else if(LAZYLEN(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
else
if(istype(item, /obj/item/weapon/reagent_containers))
@@ -161,10 +163,10 @@
present_qualities[behavior] = TRUE
available_tools[contained_item.type] = TRUE
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"])
present_qualities[quality] = TRUE
present_qualities[quality] = max(present_qualities[quality], surroundings[quality])
for(var/path in surroundings["other"])
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(custom_action(valid_step, I, user))
next_step()
return 1
return 0
return TRUE
return FALSE
/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]
switch(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"]))
if(istype(I, L["key"]) || I.get_tool_quality(L["key"]))
return steps.len
return 0
/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.
for(var/i=1;i<=steps.len;i++)
@@ -69,8 +55,8 @@
listclearnulls(steps);
if(!steps.len)
spawn_result()
return 1
return 0
return TRUE
return FALSE
/datum/construction/proc/spawn_result()
@@ -105,33 +91,10 @@
/datum/construction/reversible/is_right_key(var/obj/item/I) // returns index step
var/list/L = steps[index]
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())
if(I.get_tool_quality(L["key"]))
return FORWARD
switch(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())
if(I.get_tool_quality(L["backkey"]))
return BACKWARD
if(istype(I, L["key"]))
@@ -145,8 +108,8 @@
if(diff)
if(custom_action(index, diff, I, user))
update_index(diff)
return 1
return 0
return TRUE
return FALSE
/datum/construction/reversible/custom_action(index, diff, I, user)
return 1
return TRUE

View File

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

View File

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

View File

@@ -35,7 +35,7 @@
to_chat(user, "You load [result] lengths of cable into [src].")
return
if(O.is_wirecutter())
if(O.get_tool_quality(TOOL_WIRECUTTER))
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)
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)
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>")
src.health -= W.force
src.add_fingerprint(user)

View File

@@ -103,10 +103,10 @@
return ..()
/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)
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( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \

View File

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

View File

@@ -216,7 +216,7 @@
update_connected_network()
/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)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
return
@@ -230,7 +230,7 @@
//doesn't use power cells
if(istype(I, /obj/item/weapon/cell))
return
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
return
//doesn't hold tanks
@@ -248,7 +248,7 @@
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)
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>")
return

View File

@@ -156,7 +156,7 @@
if(panel_open)
//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)
return

View File

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

View File

@@ -29,7 +29,7 @@
if(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)
to_chat(user, "You wrench the assembly into place.")
anchored = 1
@@ -47,7 +47,7 @@
state = 2
return
else if(W.is_wrench())
else if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
to_chat(user, "You unattach the assembly from its place.")
anchored = 0
@@ -77,7 +77,7 @@
if(3)
// State 3
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
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))
@@ -115,7 +115,7 @@
break
return
else if(W.is_wirecutter())
else if(W.get_tool_quality(TOOL_WIRECUTTER))
new/obj/item/stack/cable_coil(get_turf(src), 2)
playsound(src, W.usesound, 50, 1)
@@ -132,7 +132,7 @@
return
// 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
if(U)
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)
if(busy || !WT.isOn())
return FALSE
if(busy)
return 0
if(!WT.isOn())
return 0
to_chat(user, "<span class='notice'>You start to weld the [src]..</span>")
// Do after stuff here
to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user)
busy = 1
if(do_after(user, 20 * WT.toolspeed))
busy = 0
if(!WT.isOn())
return 0
return 1
busy = 0
return 0
busy = TRUE
if(do_after(user, 100 * WT.get_tool_speed(TOOL_WELDER)))
busy = FALSE
if(WT.isOn())
return TRUE
busy = FALSE
return FALSE

View File

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

View File

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

View File

@@ -273,17 +273,17 @@
if(LAZYLEN(good_surgeries))
return good_surgeries
var/static/list/banned_surgery_steps = list(
/datum/surgery_step,
/datum/surgery_step/generic,
/datum/surgery_step/open_encased,
/datum/surgery_step/repairflesh,
/datum/surgery_step/face,
/datum/surgery_step/cavity,
/datum/surgery_step/limb,
/datum/surgery_step/brainstem,
/decl/surgery_step,
/decl/surgery_step/generic,
/decl/surgery_step/open_encased,
/decl/surgery_step/repairflesh,
/decl/surgery_step/face,
/decl/surgery_step/cavity,
/decl/surgery_step/limb,
/decl/surgery_step/brainstem,
)
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)
good_surgeries -= S
if(!LAZYLEN(S.allowed_tools))
@@ -297,7 +297,7 @@
*/
/obj/machinery/computer/operating/proc/find_next_steps(mob/user, zone)
. = 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))
var/allowed_tools_by_name = list()
for(var/tool in S.allowed_tools)

View File

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

View File

@@ -15,7 +15,7 @@
var/restoring = FALSE
/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(stat & (NOPOWER|BROKEN))
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)
switch(state)
if(0)
if(P.is_wrench())
if(P.get_tool_quality(TOOL_WRENCH))
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>")
src.anchored = 1
src.state = 1
if(istype(P, /obj/item/weapon/weldingtool))
if(get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = P
if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.")
return
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
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
new /obj/item/stack/material/steel( src.loc, 5 )
qdel(src)
if(1)
if(P.is_wrench())
if(P.get_tool_quality(TOOL_WRENCH))
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>")
src.anchored = 0
src.state = 0
@@ -48,12 +48,12 @@
P.loc = src
else
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)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
src.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)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
src.state = 1
@@ -61,7 +61,7 @@
circuit.loc = src.loc
src.circuit = null
if(2)
if(P.is_screwdriver() && circuit)
if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
src.state = 1
@@ -79,7 +79,7 @@
state = 3
icon_state = "3"
if(3)
if(P.is_wirecutter())
if(P.get_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
src.state = 2
@@ -100,13 +100,13 @@
src.state = 4
src.icon_state = "4"
if(4)
if(P.is_crowbar())
if(P.get_tool_quality(TOOL_CROWBAR))
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
src.state = 3
src.icon_state = "3"
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)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
var/B = new src.circuit.build_path ( src.loc )

View File

@@ -34,7 +34,7 @@
return
if(!istype(user))
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.
to_chat(user, "<span class='warning'>It is too hot to mess with!</span>")
return

View File

@@ -50,7 +50,7 @@
/*
/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)
if(do_after(user, 20))
if(stat & BROKEN)

View File

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

View File

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

View File

@@ -1059,7 +1059,7 @@ About the new airlock wires panel:
return
else
return
else if(C.is_screwdriver())
else if(C.get_tool_quality(TOOL_SCREWDRIVER))
if (src.p_open)
if (stat & BROKEN)
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
playsound(src, C.usesound, 50, 1)
src.update_icon()
else if(C.is_wirecutter())
else if(C.get_tool_quality(TOOL_WIRECUTTER))
return src.attack_hand(user)
else if(istype(C, /obj/item/device/multitool))
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
var/obj/item/weapon/pai_cable/cable = C
cable.plugin(src, user)
else if(!repairing && C.is_crowbar())
else if(!repairing && C.get_tool_quality(TOOL_CROWBAR))
if(can_remove_electronics())
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.")
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>")
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).
else if(istype(C, /obj/item/weapon))
var/obj/item/weapon/W = C
if((W.pry == 1) && !arePowerSystemsOn())
if(W.get_tool_quality(TOOL_CROWBAR) && !arePowerSystemsOn())
if(locked)
to_chat(user, "<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
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)
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(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.
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded)

View File

@@ -246,7 +246,7 @@
return
if(repairing && istype(I, /obj/item/weapon/weldingtool))
if(repairing && I.get_tool_quality(TOOL_WELDER))
if(!density)
to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>")
return
@@ -255,14 +255,14 @@
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>")
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>")
health = between(health, health + repairing*DOOR_REPAIR_AMOUNT, maxhealth)
update_icon()
repairing = 0
return
if(repairing && I.is_crowbar())
if(repairing && I.get_tool_quality(TOOL_CROWBAR))
var/datum/material/mat = get_material()
var/obj/item/stack/material/repairing_sheet = mat.place_sheet(loc)
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'.
if(operating)
return//Already doing something.
if(istype(C, /obj/item/weapon/weldingtool) && !repairing)
if(!repairing && C.get_tool_quality(TOOL_WELDER))
if(prying)
to_chat(user, "<span class='notice'>Someone's busy prying that [density ? "open" : "closed"]!</span>")
var/obj/item/weapon/weldingtool/W = C
@@ -262,7 +262,7 @@
update_icon()
return
if(density && C.is_screwdriver())
if(density && C.get_tool_quality(TOOL_SCREWDRIVER))
hatch_open = !hatch_open
playsound(src, C.usesound, 50, 1)
user.visible_message("<span class='danger'>[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch.</span>",
@@ -270,7 +270,7 @@
update_icon()
return
if(blocked && C.is_crowbar() && !repairing)
if(blocked && C.get_tool_quality(TOOL_CROWBAR) && !repairing)
if(!hatch_open)
to_chat(user, "<span class='danger'>You must open the maintenance hatch first!</span>")
else
@@ -300,21 +300,16 @@
to_chat(user, "<span class='danger'>\The [src] is welded shut!</span>")
return
if(C.pry == 1)
if(C.get_tool_quality(TOOL_CROWBAR))
if(operating)
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>",\
"You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\
"You hear someone struggle and metal straining.")
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)
to_chat(user, "<span class='notice'>Someone's already prying that [density ? "open" : "closed"].</span>")
return
@@ -325,8 +320,8 @@
prying = 1
update_icon()
playsound(src, C.usesound, 100, 1)
if(do_after(user,30 * C.toolspeed))
if(C.is_crowbar())
if(do_after(user,30 * C.get_tool_speed(TOOL_CROWBAR)))
if(C.get_tool_quality(TOOL_CROWBAR))
if(stat & (BROKEN|NOPOWER) || !density)
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]!",\

View File

@@ -31,7 +31,7 @@
wired = 1
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)
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)
else
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
playsound(src, C.usesound, 50, 1)
user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>",
"You have [anchored ? "" : "un" ]secured \the [src]!")
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
if(WT.remove_fuel(0, user))
playsound(src, WT.usesound, 50, 1)
if(glass)
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>")
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>")
new /obj/item/stack/material/glass/reinforced(drop_location())
glass = FALSE
@@ -75,7 +75,7 @@
return
if(!anchored)
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>",
"You have dissassembled \the [src].")
new /obj/item/stack/material/steel(drop_location(), 2)

View File

@@ -190,13 +190,13 @@
if(istype(I))
// 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
if(health < maxhealth)
if(WT.remove_fuel(1 ,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
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
update_icon()
to_chat(user, "<span class='notice'>You repair [src].</span>")
@@ -216,10 +216,10 @@
return 1
//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)
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>")
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)
// Description: Handles deconstruction.
/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)
else if(I.is_crowbar())
else if(I.get_tool_quality(TOOL_CROWBAR))
default_deconstruction_crowbar(user, I)
else
..()

View File

@@ -35,7 +35,7 @@
//Don't want to render prison breaks impossible
/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)
disable = !disable
if(disable)
@@ -102,7 +102,7 @@
flash()
/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)
anchored = !anchored

View File

@@ -96,7 +96,7 @@
update_icon()
/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(unlocked)
unlocked = 0
@@ -105,7 +105,7 @@
unlocked = 1
to_chat(user, "You unscrew the battery panel.")
if(W.is_crowbar())
if(W.get_tool_quality(TOOL_CROWBAR))
if(unlocked)
if(open)
open = 0

View File

@@ -23,16 +23,16 @@ var/list/floor_light_cache = list()
anchored = 1
/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
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
if(!WT.remove_fuel(0, user))
to_chat(user, "<span class='warning'>\The [src] must be on to complete this task.</span>")
return
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
if(!src || !WT.isOn())
return

View File

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

View File

@@ -132,6 +132,16 @@
frame_class = FRAME_CLASS_MACHINE
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
name = "Display"
frame_class = FRAME_CLASS_DISPLAY
@@ -304,11 +314,11 @@
update_icon()
/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)
to_chat(user, "<span class='notice'>You start to wrench the frame into place.</span>")
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
if(!need_circuit && circuit)
state = FRAME_FASTENED
@@ -320,16 +330,16 @@
else if(state == FRAME_PLACED && anchored)
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>")
anchored = FALSE
else if(istype(P, /obj/item/weapon/weldingtool))
else if(P.get_tool_quality(TOOL_WELDER))
if(state == FRAME_PLACED)
var/obj/item/weapon/weldingtool/WT = P
if(WT.remove_fuel(0, user))
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())
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
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>")
return
else if(P.is_screwdriver())
else if(P.get_tool_quality(TOOL_SCREWDRIVER))
if(state == FRAME_UNFASTENED)
if(need_circuit && circuit)
playsound(src, P.usesound, 50, 1)
@@ -452,7 +462,7 @@
qdel(src)
return
else if(P.is_crowbar())
else if(P.get_tool_quality(TOOL_CROWBAR))
if(state == FRAME_UNFASTENED)
if(need_circuit && circuit)
playsound(src, P.usesound, 50, 1)
@@ -530,7 +540,7 @@
break
to_chat(user, desc)
else if(P.is_wirecutter())
else if(P.get_tool_quality(TOOL_WIRECUTTER))
if(state == FRAME_WIRED)
if( \
frame_type.frame_class == FRAME_CLASS_COMPUTER || \

View File

@@ -69,7 +69,7 @@
// sd_SetLuminosity(0)
/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)
disable = !disable
playsound(src, W.usesound, 50, 1)

View File

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

View File

@@ -78,11 +78,11 @@
return
if(default_deconstruction_crowbar(user, W))
return
if(W.is_wirecutter())
if(W.get_tool_quality(TOOL_WIRECUTTER))
return wires.Interact(user)
if(istype(W, /obj/item/device/multitool))
return wires.Interact(user)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
if(playing)
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>")
@@ -222,7 +222,7 @@
return
if(default_deconstruction_crowbar(user, W))
return
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
if(playing)
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>")

View File

@@ -166,7 +166,7 @@ Class Procs:
pulse2.icon = 'icons/effects/effects.dmi'
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
pulse2.anchored = 1
pulse2.anchored = TRUE
pulse2.set_dir(pick(cardinal))
spawn(10)
@@ -177,17 +177,13 @@ Class Procs:
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if(prob(50))
qdel(src)
return
if(3.0)
if(prob(25))
qdel(src)
return
else
return
/obj/machinery/vv_edit_var(var/var_name, var/new_value)
if(var_name == NAMEOF(src, use_power))
@@ -234,22 +230,21 @@ Class Procs:
return attack_hand(user)
/obj/machinery/attack_hand(mob/user as mob)
if(inoperable(MAINT))
return 1
return TRUE
if(user.lying || user.stat)
return 1
return TRUE
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>")
return 1
return TRUE
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 55)
visible_message("<span class='warning'>[H] stares cluelessly at [src].</span>")
return 1
return TRUE
else if(prob(H.getBrainLoss()))
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))
playsound(src, clicksound, clickvol)
@@ -278,9 +273,9 @@ Class Procs:
/obj/machinery/proc/shock(mob/user, prb)
if(inoperable())
return 0
return FALSE
if(!prob(prb))
return 0
return FALSE
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
@@ -292,8 +287,8 @@ Class Procs:
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
temp_apc.terminal.powernet.trigger_warning()
if(user.stunned)
return 1
return 0
return TRUE
return TRUE
/obj/machinery/proc/default_apply_parts()
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)
if(!istype(R))
return 0
return FALSE
if(!component_parts)
return 0
return FALSE
to_chat(user, "<span class='notice'>Following parts detected in [src]:</span>")
for(var/obj/item/C in component_parts)
to_chat(user, "<span class='notice'> [C.name]</span>")
@@ -339,20 +334,22 @@ Class Procs:
break
update_icon()
RefreshParts()
return 1
return TRUE
// 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)
if(!W.is_wrench())
if(!W.get_tool_quality(TOOL_WRENCH))
return FALSE
if(panel_open)
return FALSE // Close panel first!
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)
user.visible_message( \
"<span class='warning'>\The [user] begins [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))
user.visible_message( \
"<span class='warning'>\The [user] has [anchored ? "un" : ""]secured \the [src].</span>", \
@@ -363,29 +360,33 @@ Class Procs:
return TRUE
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/C)
if(!C.is_crowbar())
return 0
if(!C.get_tool_quality(TOOL_CROWBAR))
return FALSE
if(!panel_open)
return 0
return FALSE
. = dismantle()
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
if(!S.is_screwdriver())
return 0
if(!S.get_tool_quality(TOOL_SCREWDRIVER))
return FALSE
playsound(src, S.usesound, 50, 1)
panel_open = !panel_open
to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>")
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)
if(!S.is_screwdriver())
return 0
if(!S.get_tool_quality(TOOL_SCREWDRIVER))
return FALSE
if(!circuit)
return 0
return FALSE
to_chat(user, "<span class='notice'>You start disconnecting the monitor.</span>")
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)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
new /obj/item/weapon/material/shard(src.loc)
@@ -394,19 +395,19 @@ Class Procs:
. = dismantle()
/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
if(!S.is_screwdriver())
return 0
if(!S.get_tool_quality(TOOL_SCREWDRIVER))
return FALSE
playsound(src, S.usesound, 50, 1)
panel_open = !panel_open
to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]")
update_icon()
return 1
return FALSE
/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/W)
if(!W.is_wirecutter())
return 0
if(!W.get_tool_quality(TOOL_WIRECUTTER))
return FALSE
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].")
playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
@@ -418,19 +419,19 @@ Class Procs:
if(istype(I,/obj/item/weapon/card/id))
I.forceMove(src.loc)
if(!circuit)
return 0
return FALSE
var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
var/obj/item/weapon/circuitboard/M = circuit
A.circuit = M
A.anchored = 1
A.anchored = TRUE
A.frame_type = M.board_type
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)
A.density = 0
A.density = FALSE
else
A.density = 1
A.density = TRUE
if(A.frame_type.frame_class == FRAME_CLASS_MACHINE)
for(var/obj/D in component_parts)
@@ -460,11 +461,10 @@ Class Procs:
M.loc = null
M.deconstruct(src)
qdel(src)
return 1
return TRUE
/datum/proc/apply_visual(mob/M)
M.sight = 0 //Just reset their mesons and stuff so they can't use them, by default.
return
M.sight = FALSE //Just reset their mesons and stuff so they can't use them, by default.
/datum/proc/remove_visual(mob/M)
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())
return // prevent intraction when T-scanner revealed
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
open = !open
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.")

View File

@@ -55,7 +55,7 @@ var/bomb_set
return
/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)
add_fingerprint(user)
if(auth)
@@ -78,7 +78,7 @@ var/bomb_set
flick("nuclearbombc", src)
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)
nukehack_win(user)
return
@@ -94,35 +94,38 @@ var/bomb_set
if(anchored)
switch(removal_stage)
if(0)
if(istype(O,/obj/item/weapon/weldingtool))
if(O.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = O
if(!WT.isOn()) return
if(!WT.isOn())
return
if(WT.get_fuel() < 5) // uses up 5 fuel.
to_chat(user, "<span class='warning'>You need more fuel to complete this task.</span>")
return
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(!src || !user || !WT.remove_fuel(5, user)) return
if(do_after(user,40 * WT.get_tool_speed(TOOL_WELDER)))
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.")
removal_stage = 1
return
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]...")
playsound(src, O.usesound, 50, 1)
if(do_after(user,15 * O.toolspeed))
if(!src || !user) return
if(do_after(user,15 * O.get_tool_speed(TOOL_CROWBAR)))
if(!src || !user)
return
user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.")
removal_stage = 2
return
if(2)
if(istype(O,/obj/item/weapon/weldingtool))
if(O.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = O
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]...")
playsound(src, WT.usesound, 50, 1)
if(do_after(user,40 * WT.toolspeed))
if(!src || !user || !WT.remove_fuel(5, user)) return
if(do_after(user,40 * WT.get_tool_speed(TOOL_WELDER)))
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.")
removal_stage = 3
return
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...")
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
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
removal_stage = 4
return
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...")
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
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
@@ -262,7 +266,7 @@ var/bomb_set
visible_message("<span class='notice'>The [src] emits a quiet whirling noise!</span>")
if(href_list["act"] == "wire")
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!")
else
wires[temp_wire] = !wires[temp_wire]

View File

@@ -128,7 +128,7 @@
return 1
/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
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

View File

@@ -38,9 +38,9 @@
icon_state = "[initial(icon_state)]_off"
/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)
else if(I.is_crowbar())
else if(I.get_tool_quality(TOOL_CROWBAR))
default_deconstruction_crowbar(user, I)
else
..()

View File

@@ -166,7 +166,7 @@ Buildable meters
return ..()
/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 ..()
@@ -255,7 +255,7 @@ Buildable meters
var/piping_layer = PIPING_LAYER_DEFAULT
/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 ..()

View File

@@ -115,11 +115,11 @@
user.drop_item()
qdel(W)
return
else if(W.is_wrench())
else if(W.get_tool_quality(TOOL_WRENCH))
if (unwrenched==0)
playsound(src, W.usesound, 50, 1)
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( \
"<span class='notice'>[user] unfastens \the [src].</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)*/
playsound(src, W.usesound, 50, 1)
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( \
"<span class='notice'>[user] fastens \the [src].</span>", \
"<span class='notice'>You have fastened \the [src]. Now it can dispense pipes.</span>", \

View File

@@ -81,12 +81,12 @@
return
if(default_part_replacement(user, W))
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 = 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>")
return
if(!panel_open && W.is_crowbar())
if(!panel_open && W.get_tool_quality(TOOL_CROWBAR))
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>")
return

View File

@@ -101,7 +101,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
return data
/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
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, physical_state))
// Check for duplicate controllers with this ID
@@ -180,7 +180,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
return PDC
/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
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>")

View File

@@ -510,7 +510,7 @@
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user)
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
//try and salvage its components
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>")
qdel(src) // qdel
else if(I.is_wrench())
else if(I.get_tool_quality(TOOL_WRENCH))
if(enabled || raised)
to_chat(user, "<span class='warning'>You cannot unsecure an active turret!</span>")
return
@@ -546,18 +546,12 @@
)
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!
if(!anchored)
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()
anchored = !anchored
to_chat(user, "<span class='notice'>You [anchored ? "" : "un"]secure the exterior bolts on the turret.</span>")
wrenching = FALSE
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
switch(build_step)
if(0) //first step
if(I.is_wrench() && !anchored)
if(I.get_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
anchored = TRUE
build_step = 1
return
else if(I.is_crowbar() && !anchored)
else if(I.get_tool_quality(TOOL_CROWBAR) && !anchored)
playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
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>")
return
else if(I.is_wrench())
else if(I.get_tool_quality(TOOL_WRENCH))
playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
anchored = FALSE
@@ -1001,13 +995,13 @@
return
if(2)
if(I.is_wrench())
if(I.get_tool_quality(TOOL_WRENCH))
playsound(src, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
build_step = 3
return
else if(istype(I, /obj/item/weapon/weldingtool))
else if(I.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = I
if(!WT.isOn())
return
@@ -1016,7 +1010,7 @@
return
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
build_step = 1
to_chat(user, "You remove the turret's interior metal armor.")
@@ -1041,7 +1035,7 @@
qdel(I) //delete the gun :(
return
else if(I.is_wrench())
else if(I.get_tool_quality(TOOL_WRENCH))
playsound(src, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
build_step = 2
@@ -1060,7 +1054,7 @@
//attack_hand() removes the gun
if(5)
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 100, 1)
build_step = 6
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>")
return
else if(I.is_screwdriver())
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 100, 1)
build_step = 5
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
return
if(7)
if(istype(I, /obj/item/weapon/weldingtool))
if(I.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = I
if(!WT.isOn()) return
if(WT.get_fuel() < 5)
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
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))
return
build_step = 8
@@ -1108,7 +1102,7 @@
qdel(src) // qdel
else if(I.is_crowbar())
else if(I.get_tool_quality(TOOL_CROWBAR))
playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
new /obj/item/stack/material/steel(loc, 2)

View File

@@ -78,7 +78,7 @@
update_icon()
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)
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
return

View File

@@ -72,7 +72,7 @@
else
to_chat(user, "The hatch must be open to insert a power cell.")
return
else if(I.is_screwdriver())
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open
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>")

View File

@@ -1,5 +1,5 @@
//////////////////////////////////////
// SUIT STORAGE UNIT /////////////////
// 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]
anchored = 1
density = 1
var/mob/living/carbon/human/OCCUPANT = null
var/obj/item/clothing/suit/space/SUIT = null
var/SUIT_TYPE = null
var/obj/item/clothing/head/helmet/space/HELMET = null
var/HELMET_TYPE = null
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/mob/living/carbon/human/occupant = null
var/obj/item/clothing/suit/space/suit = null
var/suit_type = null
var/obj/item/clothing/head/helmet/space/helmet = null
var/helmet_type = null
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/isopen = 0
var/islocked = 0
var/isUV = 0
@@ -29,29 +29,29 @@
//The units themselves/////////////////
/obj/machinery/suit_storage_unit/standard_unit
SUIT_TYPE = /obj/item/clothing/suit/space
HELMET_TYPE = /obj/item/clothing/head/helmet/space
MASK_TYPE = /obj/item/clothing/mask/breath
suit_type = /obj/item/clothing/suit/space
helmet_type = /obj/item/clothing/head/helmet/space
mask_type = /obj/item/clothing/mask/breath
/obj/machinery/suit_storage_unit/Initialize()
. = ..()
update_icon()
if(SUIT_TYPE)
SUIT = new SUIT_TYPE(src)
if(HELMET_TYPE)
HELMET = new HELMET_TYPE(src)
if(MASK_TYPE)
MASK = new MASK_TYPE(src)
if(suit_type)
suit = new suit_type(src)
if(helmet_type)
helmet = new helmet_type(src)
if(mask_type)
mask = new mask_type(src)
/obj/machinery/suit_storage_unit/update_icon()
var/hashelmet = 0
var/hassuit = 0
var/hashuman = 0
if(HELMET)
if(helmet)
hashelmet = 1
if(SUIT)
if(suit)
hassuit = 1
if(OCCUPANT)
if(occupant)
hashuman = 1
icon_state = text("suitstorage[][][][][][][][][]", hashelmet, hassuit, hashuman, isopen, islocked, isUV, ispowered, isbroken, issuperUV)
@@ -108,20 +108,20 @@
data["safeties"] = safetieson
data["uv_active"] = isUV
data["uv_super"] = issuperUV
if(HELMET)
data["helmet"] = HELMET.name
if(helmet)
data["helmet"] = helmet.name
else
data["helmet"] = null
if(SUIT)
data["suit"] = SUIT.name
if(suit)
data["suit"] = suit.name
else
data["suit"] = null
if(MASK)
data["mask"] = MASK.name
if(mask)
data["mask"] = mask.name
else
data["mask"] = null
data["storage"] = null
if(OCCUPANT)
if(occupant)
data["occupied"] = TRUE
else
data["occupied"] = FALSE
@@ -169,92 +169,58 @@
/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob)
// var/protected = 0
// 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(panelopen)
if(issuperUV)
to_chat(user, "You slide the dial back towards \"185nm\".")
issuperUV = 0
else
to_chat(user, "You crank the dial all the way up to \"15nm\".")
issuperUV = 1
return
/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob)
// var/protected = 0
// 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
if(panelopen)
to_chat(user, "You push the button. The coloured LED next to it changes.")
safetieson = !safetieson
/obj/machinery/suit_storage_unit/proc/dispense_helmet(mob/user as mob)
if(!HELMET)
return //Do I even need this sanity check? Nyoro~n
else
HELMET.loc = src.loc
HELMET = null
return
if(helmet)
helmet.loc = src.loc
helmet = null
/obj/machinery/suit_storage_unit/proc/dispense_suit(mob/user as mob)
if(!SUIT)
if(!suit)
return
else
SUIT.loc = src.loc
SUIT = null
suit.loc = src.loc
suit = null
return
/obj/machinery/suit_storage_unit/proc/dispense_mask(mob/user as mob)
if(!MASK)
if(!mask)
return
else
MASK.loc = src.loc
MASK = null
mask.loc = src.loc
mask = null
return
/obj/machinery/suit_storage_unit/proc/dump_everything()
islocked = 0 //locks go free
if(SUIT)
SUIT.loc = src.loc
SUIT = null
if(HELMET)
HELMET.loc = src.loc
HELMET = null
if(MASK)
MASK.loc = src.loc
MASK = null
if(OCCUPANT)
eject_occupant(OCCUPANT)
if(suit)
suit.loc = src.loc
suit = null
if(helmet)
helmet.loc = src.loc
helmet = null
if(mask)
mask.loc = src.loc
mask = null
if(occupant)
eject_occupant(occupant)
return
@@ -262,7 +228,7 @@
if(islocked || isUV)
to_chat(user, "<font color='red'>Unable to open unit.</font>")
return
if(OCCUPANT)
if(occupant)
eject_occupant(user)
return // eject_occupant opens the door, so we need to return
isopen = !isopen
@@ -270,7 +236,7 @@
/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>")
return
if(isopen)
@@ -282,16 +248,16 @@
/obj/machinery/suit_storage_unit/proc/start_UV(mob/user as mob)
if(isUV || isopen) //I'm bored of all these sanity checks
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>")
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>")
return
to_chat(user, "You start the Unit's cauterisation cycle.")
cycletime_left = 20
isUV = 1
if(OCCUPANT && !islocked)
if(occupant && !islocked)
islocked = 1 //Let's lock it for good measure
update_icon()
updateUsrDialog()
@@ -299,50 +265,50 @@
var/i //our counter
for(i=0,i<4,i++)
sleep(50)
if(OCCUPANT)
OCCUPANT.apply_effect(50, IRRADIATE)
var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs
if(occupant)
occupant.apply_effect(50, IRRADIATE)
var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in occupant.internal_organs
if(!rad_organ)
if(OCCUPANT.can_feel_pain())
OCCUPANT.emote("scream")
if(occupant.can_feel_pain())
occupant.emote("scream")
if(issuperUV)
var/burndamage = rand(28,35)
OCCUPANT.take_organ_damage(0,burndamage)
occupant.take_organ_damage(0,burndamage)
else
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(!issuperUV)
if(HELMET)
HELMET.clean_blood()
if(SUIT)
SUIT.clean_blood()
if(MASK)
MASK.clean_blood()
if(helmet)
helmet.clean_blood()
if(suit)
suit.clean_blood()
if(mask)
mask.clean_blood()
else //It was supercycling, destroy everything
if(HELMET)
HELMET = null
if(SUIT)
SUIT = null
if(MASK)
MASK = null
if(helmet)
helmet = null
if(suit)
suit = null
if(mask)
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)
isbroken = 1
isopen = 1
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
update_icon()
updateUsrDialog()
return
/* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work
if(HELMET)
HELMET.clean_blood()
if(SUIT)
SUIT.clean_blood()
if(MASK)
MASK.clean_blood()
if(helmet)
helmet.clean_blood()
if(suit)
suit.clean_blood()
if(mask)
mask.clean_blood()
isUV = 0 //Cycle ends
update_icon()
updateUsrDialog()
@@ -350,12 +316,12 @@
var/i
for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity
spawn(50)
if(OCCUPANT)
if(occupant)
if(issuperUV)
OCCUPANT.take_organ_damage(0,40)
occupant.take_organ_damage(0,40)
to_chat(user, "Test. You gave him 40 damage")
else
OCCUPANT.take_organ_damage(0,8)
occupant.take_organ_damage(0,8)
to_chat(user, "Test. You gave him 8 damage")
return*/
@@ -370,21 +336,21 @@
if(islocked)
return
if(!OCCUPANT)
if(!occupant)
return
// for(var/obj/O in src)
// O.loc = src.loc
if(OCCUPANT.client)
if(user != OCCUPANT)
to_chat(OCCUPANT, "<font color='blue'>The machine kicks you out!</font>")
if(occupant.client)
if(user != occupant)
to_chat(occupant, "<font color='blue'>The machine kicks you out!</font>")
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.perspective = MOB_PERSPECTIVE
OCCUPANT.loc = src.loc
OCCUPANT = null
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = src.loc
occupant = null
if(!isopen)
isopen = 1
update_icon()
@@ -418,7 +384,7 @@
if(!ispowered || isbroken)
to_chat(usr, "<font color='red'>The unit is not operational.</font>")
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>")
return
visible_message("[usr] starts squeezing into the suit storage unit!", 3)
@@ -428,7 +394,7 @@
usr.client.eye = src
usr.loc = src
// usr.metabslow = 1
OCCUPANT = usr
occupant = usr
isopen = 0 //Close the thing after the guy gets inside
update_icon()
@@ -439,14 +405,14 @@
updateUsrDialog()
return
else
OCCUPANT = null //Testing this as a backup sanity test
occupant = null //Testing this as a backup sanity test
return
/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob)
if(!ispowered)
return
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
panelopen = !panelopen
playsound(src, I.usesound, 100, 1)
to_chat(user, "<font color='blue'>You [panelopen ? "open up" : "close"] the unit's maintenance panel.</font>")
@@ -462,7 +428,7 @@
if(!ispowered || isbroken)
to_chat(user, "<font color='red'>The unit is not operational.</font>")
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>")
return
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.eye = src
M.loc = src
OCCUPANT = M
occupant = M
isopen = 0 //close ittt
//for(var/obj/O in src)
@@ -488,13 +454,13 @@
if(!isopen)
return
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>")
return
to_chat(user, "You load the [S.name] into the storage compartment.")
user.drop_item()
S.loc = src
SUIT = S
suit = S
update_icon()
updateUsrDialog()
return
@@ -502,13 +468,13 @@
if(!isopen)
return
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>")
return
to_chat(user, "You load the [H.name] into the storage compartment.")
user.drop_item()
H.loc = src
HELMET = H
helmet = H
update_icon()
updateUsrDialog()
return
@@ -516,13 +482,13 @@
if(!isopen)
return
var/obj/item/clothing/mask/M = I
if(MASK)
if(mask)
to_chat(user, "<font color='blue'>The unit already contains a mask.</font>")
return
to_chat(user, "You load the [M.name] into the storage compartment.")
user.drop_item()
M.loc = src
MASK = M
mask = M
update_icon()
updateUsrDialog()
return
@@ -675,7 +641,7 @@
return
//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)
attack_hand(user)
return
@@ -711,7 +677,7 @@
updateUsrDialog()
return
else if(I.is_screwdriver())
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open
playsound(src, I.usesound, 50, 1)

View File

@@ -45,7 +45,7 @@
drop_type = "supermatter"
/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())
to_chat(user, "<span class='warning'>This device must be placed over an exposed cable.</span>")
return

View File

@@ -119,7 +119,7 @@
return
/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)
to_chat(user, "<span class='danger'>You need to deactivate the beacon first!</span>")
return

View File

@@ -17,7 +17,7 @@
frame_types_wall = construction_frame_wall
/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)
qdel(src)
return

View File

@@ -96,35 +96,23 @@
icon_state = "wm_[state][panel_open]"
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(state == 2 && washing.len < 1)
if(default_deconstruction_screwdriver(user, W))
if(state == 2 && washing.len < 1 && ( \
default_deconstruction_screwdriver(user, W) || \
default_deconstruction_crowbar(user, W) || \
default_unfasten_wrench(user, W, 40) ) )
return
if(default_deconstruction_crowbar(user, W))
return
if(default_unfasten_wrench(user, W, 40))
return
/*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()
if(!crayon && (state in list(1, 3, 6)) && ( \
istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp) ) )
user.drop_from_inventory(W, src)
crayon = W
crayon.loc = src
else
..()
else
..()
else if(istype(W,/obj/item/weapon/grab))
if((state == 1) && hacked)
else if(istype(W,/obj/item/weapon/grab) && state == 1 && hacked)
var/obj/item/weapon/grab/G = W
if(ishuman(G.assailant) && iscorgi(G.affecting))
G.affecting.loc = src
qdel(G)
state = 3
else
..()
else if(is_type_in_list(W, disallowed_types))
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)
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()
my_tool = new tooltype(src)
@@ -37,19 +37,19 @@
name = "pneumatic prybar"
desc = "An exosuit-mounted pneumatic prybar."
icon_state = "mecha_crowbar"
tooltype = /obj/item/weapon/tool/crowbar/power
tooltype = /obj/item/weapon/tool/hydraulic_cutter
ready_sound = 'sound/mecha/gasdisconnected.ogg'
/obj/item/mecha_parts/mecha_equipment/tool/powertool/cutter
name = "pneumatic cablecutter"
desc = "An exosuit-mounted pneumatic 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'
/obj/item/mecha_parts/mecha_equipment/tool/powertool/screwdriver
name = "pneumatic screwdriver"
desc = "An exosuit-mounted pneumatic screwdriver."
icon_state = "mecha_screwdriver"
tooltype = /obj/item/weapon/tool/screwdriver/power
tooltype = /obj/item/weapon/tool/powerdrill
ready_sound = 'sound/mecha/gasdisconnected.ogg'

View File

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

View File

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

View File

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

View File

@@ -164,7 +164,7 @@
return ..()
/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)
if(ruined)
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")

View File

@@ -100,7 +100,7 @@
explode(M)
/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
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>")
@@ -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.
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)
else
..()
/obj/effect/mine/interact(mob/living/user as mob)
if(!panel_open || istype(user, /mob/living/silicon/ai))
return
if(panel_open && !istype(user, /mob/living/silicon/ai))
user.set_machine(src)
wires.Interact(user)
@@ -308,7 +307,7 @@
return
/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>")
if(do_after(user, 10 SECONDS))
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.
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/reach = 1 // Length of tiles it can reach, 1 is adjacent.
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)
if(!istype(W))
return
if(W.is_wrench() && isturf(loc))
if(W.get_tool_quality(TOOL_WRENCH) && isturf(loc))
if(do_after(5))
if(!src) return
to_chat(user, "<span class='notice'>You dissasemble the desk bell</span>")

View File

@@ -48,7 +48,7 @@
src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return
else if(W.is_wirecutter())
else if(W.get_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag"
src.overlays.Cut()
@@ -246,7 +246,7 @@
inject_occupant(H)
break
else if(W.is_screwdriver())
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(syringe)
if(used)
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>")
update_icon()
else if(W.is_screwdriver())
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(bcell)
bcell.update_icon()
bcell.forceMove(get_turf(src.loc))

View File

@@ -37,13 +37,13 @@
power_supply = new cell_type(src)
/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)
to_chat(user, "<span class='notice'>\The [src] is already being repaired!</span>")
return
user.visible_message("<span class='notice'>\The [user] starts trying to repair \the [src]'s bulb.</span>")
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))
user.visible_message("<span class='notice'>\The [user] successfully repairs \the [src]!</span>")
broken = FALSE

View File

@@ -24,7 +24,7 @@
return ..()
/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
playsound(src, W.usesound, 50, 1)
else

View File

@@ -54,7 +54,7 @@
else
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)
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
diode.loc = get_turf(src.loc)

View File

@@ -28,8 +28,7 @@
var/obj/machinery/clonepod/connecting //same for cryopod linkage
var/obj/machinery/connectable //Used to connect machinery.
var/weakref_wiring //Used to store weak references for integrated circuitry. This is now the Omnitool.
toolspeed = 1
tool_qualities = list(TOOL_MULTITOOL)
tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_STANDARD)
/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")
@@ -63,16 +62,12 @@
to_chat(user,"<span class='notice'>\The [src] is now set to [toolmode].</span>")
accepting_refs = (toolmode == MULTITOOL_MODE_INTCIRCUITS)
return
/obj/item/device/multitool/is_multitool()
return TRUE
n
/obj/item/device/multitool/cyborg
name = "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)
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_BEST)
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
/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))
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)
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
if(mode == 0)
var/turf/T = loc
if(isturf(T) && !!T.is_plating())

View File

@@ -334,32 +334,19 @@
return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if(!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
return
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(keyslot1 || keyslot2)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
if(keyslot1)
var/turf/T = get_turf(user)
if(T)
keyslot1.loc = T
keyslot1.forceMove(get_turf(user))
keyslot1 = null
if(keyslot2)
var/turf/T = get_turf(user)
if(T)
keyslot2.loc = T
keyslot2.forceMove(get_turf(user))
keyslot2 = null
recalculateChannels()
@@ -369,25 +356,24 @@
else
to_chat(user, "This headset doesn't have any encryption keys! How useless...")
if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot1 && keyslot2)
to_chat(user, "The headset can't hold another key!")
return
return TRUE
else if(istype(W, /obj/item/device/encryptionkey/))
if(!keyslot1)
user.drop_item()
W.loc = src
user.drop_from_inventory(W, src)
keyslot1 = W
else
user.drop_item()
W.loc = src
else if(!keyslot2)
user.drop_from_inventory(W, src)
keyslot2 = W
else
to_chat(user, "The headset can't hold another key!")
recalculateChannels()
return TRUE
return
return ..()
/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)
add_fingerprint(user)
if(W.is_screwdriver()) // Opening the intercom up.
if(W.get_tool_quality(TOOL_SCREWDRIVER)) // Opening the intercom up.
wiresexposed = !wiresexposed
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
playsound(src, W.usesound, 50, 1)
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].")
playsound(src, W.usesound, 50, 1)
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>"
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
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)
return
else return
if(W.get_tool_quality(TOOL_SCREWDRIVER))
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)
broadcasting = 0
@@ -658,24 +655,15 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
R.cell_use_power(C.active_usage)
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if (!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
return
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(keyslot)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
if(keyslot)
var/turf/T = get_turf(user)
if(T)
keyslot.loc = T
keyslot.forceMove(get_turf(user))
keyslot = null
recalculateChannels()
@@ -685,19 +673,20 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
else
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)
to_chat(user, "The radio can't hold another key!")
return
if(!keyslot)
user.drop_item()
W.loc = src
else
user.drop_from_inventory(W, src)
keyslot = W
recalculateChannels()
return TRUE
return
return ..()
/obj/item/device/radio/borg/recalculateChannels()
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)
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
return 1
return TRUE
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user)
scan_mob(M, user)
return TRUE
/obj/item/device/healthanalyzer/proc/scan_mob(mob/living/M, mob/living/user)
var/dat = ""

View File

@@ -110,7 +110,7 @@
else
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))
anchored = !anchored

View File

@@ -144,7 +144,7 @@
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)
if (W.is_screwdriver())
if (W.get_tool_quality(TOOL_SCREWDRIVER))
if(cover_open)
cover_open = 0
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)
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>")
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>")
fix()
return

View File

@@ -6,7 +6,7 @@
icon_state = "nanopaste"
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
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
no_variants = FALSE
@@ -16,7 +16,7 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
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.adjustFireLoss(-15)
R.updatehealth()
@@ -45,13 +45,13 @@
if (S && (S.robotic >= ORGAN_ROBOT))
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))
user.setClickCooldown(user.get_attack_speed(src))
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)
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)
H.updatehealth()
use(1)

View File

@@ -750,7 +750,7 @@
opened = FALSE
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.")
opened = TRUE
return
@@ -871,7 +871,7 @@
opened = FALSE
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.")
opened = TRUE
return

View File

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

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