diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index d66ebc100c..ea1189c1cb 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -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, "You cannot unwrench \the [src], it too exerted due to internal pressure.") + else + playsound(src, W.usesound, 50, 1, preference = /datum/client_preference/pickup_sounds) + to_chat(user, "You begin to unfasten \the [src]...") + if (do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH))) + user.visible_message( \ + "\The [user] unfastens \the [src].", \ + "You have unfastened \the [src].", \ + "You hear a ratchet.") + deconstruct() + add_fingerprint(user) + return TRUE \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 071593f7d6..ae92466e88 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -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.", \ diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index 46b82e3b6f..456bf6761f 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -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, "You cannot unwrench \the [src], turn it off first.") - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear ratchet.") - deconstruct() + return TRUE + return default_deconstruction_wrench(user, W) #undef REGULATE_NONE #undef REGULATE_INPUT diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index c767679f3e..0da858d11a 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -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, "You cannot unwrench this [src], turn it off first.") - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench this [src], it too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear ratchet.") - deconstruct() + return TRUE + return default_deconstruction_wrench(user, W) diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index bc772ba8c6..3a2bd1a5f1 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -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, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - to_chat(user, "You begin to unfasten \the [src]...") - playsound(src, W.usesound, 50, 1) - if(do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() + return default_deconstruction_wrench(user, W) /obj/machinery/atmospherics/omni/attack_hand(user as mob) if(..()) diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index 5b489441db..37b3611bb7 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -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, "You cannot unwrench \the [src], dettach \the [connected_device] first.") - return 1 - if (locate(/obj/machinery/portable_atmospherics, src.loc)) - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() + return TRUE + if(locate(/obj/machinery/portable_atmospherics, src.loc)) + return TRUE + return default_deconstruction_wrench(user, W) diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index 4570b95dda..8279ed77c5 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -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, "You cannot unwrench \the [src], it too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "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() diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index 7deca38847..d8f657689c 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -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, "You cannot unwrench \the [src], it's too complicated.") - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() + return TRUE + return default_deconstruction_wrench(user, W) + /obj/machinery/atmospherics/tvalve/mirrored icon_state = "map_tvalvem0" diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index bba26185e7..ab800040ca 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -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, "You must remove the plating first.") - return 1 - if (!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() + return TRUE + return default_deconstruction_wrench(user, W) diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm index fa77c7b7ab..0ef41c04b5 100644 --- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm @@ -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, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 926521ad00..5a6081ef8e 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -381,7 +381,7 @@ var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0,user)) to_chat(user, "Now welding the vent.") - 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, "You cannot unwrench \the [src], turn it off first.") - return 1 + return TRUE var/turf/T = src.loc if (node && node.level==1 && isturf(T) && !T.is_plating()) to_chat(user, "You must remove the plating first.") - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() + return TRUE + return default_deconstruction_wrench(user, W) #undef DEFAULT_PRESSURE_DELTA diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 495d7d0428..8cf56c98cf 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -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, "You cannot unwrench \the [src], turn it off first.") - return 1 + return TRUE var/turf/T = src.loc if (node && node.level==1 && isturf(T) && !T.is_plating()) to_chat(user, "You must remove the plating first.") - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() + return TRUE + return default_deconstruction_wrench(user, W) + /obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user) . = ..() diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index c890938100..aa9fc24120 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -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, "Access denied.") 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, "Access denied.") - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 40 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "You hear a ratchet.") - deconstruct() + return TRUE + return default_deconstruction_wrench(user, W) + /obj/machinery/atmospherics/valve/examine(mob/user) . = ..() diff --git a/code/ATMOSPHERICS/pipes/pipe_base.dm b/code/ATMOSPHERICS/pipes/pipe_base.dm index 22ceb272f6..9792b3396d 100644 --- a/code/ATMOSPHERICS/pipes/pipe_base.dm +++ b/code/ATMOSPHERICS/pipes/pipe_base.dm @@ -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, "You must remove the plating first.") - return 1 - if(!can_unwrench()) - to_chat(user, "You cannot unwrench \the [src], it is too exerted due to internal pressure.") - add_fingerprint(user) - return 1 - playsound(src, W.usesound, 50, 1) - to_chat(user, "You begin to unfasten \the [src]...") - if (do_after(user, 10 * W.toolspeed)) - user.visible_message( \ - "\The [user] unfastens \the [src].", \ - "You have unfastened \the [src].", \ - "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 diff --git a/code/ATMOSPHERICS/pipes/simple.dm b/code/ATMOSPHERICS/pipes/simple.dm index f70c7ea63e..f67f7c1383 100644 --- a/code/ATMOSPHERICS/pipes/simple.dm +++ b/code/ATMOSPHERICS/pipes/simple.dm @@ -79,7 +79,7 @@ /obj/machinery/atmospherics/pipe/simple/proc/burst() src.visible_message("\The [src] bursts!"); playsound(src, 'sound/effects/bang.ogg', 25, 1) - var/datum/effect/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) smoke.start() qdel(src) diff --git a/code/__defines/events.dm b/code/__defines/events.dm new file mode 100644 index 0000000000..65e5137ce6 --- /dev/null +++ b/code/__defines/events.dm @@ -0,0 +1,10 @@ +// Event defines + +#define EVENT_REGION_SPACESTATION "near_space" // In space, but easy access +#define EVENT_REGION_DEEPSPACE "overmap" // Deep in space, far from others +#define EVENT_REGION_PLANETSURFACE "planetside" // Somewhere on a planet +#define EVENT_REGION_SUBTERRANEAN "mining" // Somewhere explicitly subterranean, like the mining Z +#define EVENT_REGION_PLAYER_MAIN_AREA "player_main_area" // The main area that players are expected to be in + +// Universal events disregard +#define EVENT_REGION_UNIVERSAL "universal" \ No newline at end of file diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 0b955b6cfc..6eb5bf315e 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -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 diff --git a/code/__defines/tools.dm b/code/__defines/tools.dm index d7b5e1cdba..18feb9b9e5 100644 --- a/code/__defines/tools.dm +++ b/code/__defines/tools.dm @@ -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" \ No newline at end of file +#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 \ No newline at end of file diff --git a/code/_helpers/_lists.dm b/code/_helpers/_lists.dm index 0d1a46b2ea..587d75dab7 100644 --- a/code/_helpers/_lists.dm +++ b/code/_helpers/_lists.dm @@ -238,19 +238,17 @@ This actually tests if they have the same entries and values. //Pretends to pick an element based on its weight but really just seems to pick a random element. /proc/pickweight(list/L) var/total = 0 - var/item - for (item in L) - if (!L[item]) + for(var/item in L) + if(!L[item]) L[item] = 1 total += L[item] total = rand(1, total) - for (item in L) - total -=L [item] - if (total <= 0) + for(var/item in L) + total -= L[item] + if(total <= 0) return item - return null //Pick a random element from the list and remove it from the list. /proc/pick_n_take(list/listfrom) diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index f554855648..78b40740fa 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -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! diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 7860e93b00..0857dc73d4 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -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) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 52b3e7762b..48a4445e19 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -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) diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index c6cf642f8a..9ed4ad3852 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -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 diff --git a/code/datums/components/crafting/tool_quality.dm b/code/datums/components/crafting/tool_quality.dm deleted file mode 100644 index 119469310a..0000000000 --- a/code/datums/components/crafting/tool_quality.dm +++ /dev/null @@ -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) diff --git a/code/datums/game_masters/default.dm b/code/datums/game_masters/default.dm index d380476df2..dee22db73e 100644 --- a/code/datums/game_masters/default.dm +++ b/code/datums/game_masters/default.dm @@ -10,8 +10,12 @@ /datum/game_master/default/choose_event() log_game_master("Now starting event decision.") + var/list/regions = metric.assess_player_regions() + if(!LAZYLEN(regions)) + regions = list(EVENT_REGION_UNIVERSAL = 100) + var/list/most_active_departments = metric.assess_all_departments(3, list(last_department_used)) - var/list/best_events = decide_best_events(most_active_departments) + var/list/best_events = decide_best_events(most_active_departments, regions) if(LAZYLEN(best_events)) log_game_master("Got [best_events.len] choice\s for the next event.") @@ -32,33 +36,45 @@ last_department_used = LAZYACCESS(choice.departments, 1) return choice -/datum/game_master/default/proc/decide_best_events(list/most_active_departments) +/datum/game_master/default/proc/decide_best_events(list/most_active_departments, var/list/regions) if(!LAZYLEN(most_active_departments)) // Server's empty? log_game_master("Game Master failed to find any active departments.") return list() - var/list/best_events = list() + // Filter by generic factors + var/list/available_events = filter_events_generic() + + // Filter by player regions. Lots of people in the mines = favor subterranean events + var/list/best_events = filter_events_by_region(available_events, pickweight(regions)) + if(!LAZYLEN(best_events)) + best_events = filter_events_by_region(available_events, EVENT_REGION_UNIVERSAL) + if(!LAZYLEN(best_events)) + log_game_master("Game Master failed to find a suitable event, something very wrong is going on.") + return list() + available_events = best_events + + // Filter events by department. Lots of engineering = break things on the station if(most_active_departments.len >= 2) var/list/top_two = list(most_active_departments[1], most_active_departments[2]) - best_events = filter_events_by_departments(top_two) + best_events = filter_events_by_departments(available_events, top_two) if(LAZYLEN(best_events)) // We found something for those two, let's do it. return best_events // Otherwise we probably couldn't find something for the second highest group, so let's ignore them. - best_events = filter_events_by_departments(most_active_departments[1]) + best_events = filter_events_by_departments(available_events, list(most_active_departments[1])) if(LAZYLEN(best_events)) return best_events // At this point we should expand our horizons. - best_events = filter_events_by_departments(list(DEPARTMENT_EVERYONE)) + best_events = filter_events_by_departments(available_events, list(DEPARTMENT_EVERYONE)) if(LAZYLEN(best_events)) return best_events // Just give a random event if for some reason it still can't make up its mind. - best_events = filter_events_by_departments() + best_events = filter_events_by_departments(available_events) if(LAZYLEN(best_events)) return best_events @@ -66,10 +82,8 @@ log_game_master("Game Master failed to find a suitable event, something very wrong is going on.") return list() -// Filters the available events down to events for specific departments. -// Pass DEPARTMENT_EVERYONE if you want events that target the general population, like gravity failure. -// If no list is passed, all the events will be returned. -/datum/game_master/default/proc/filter_events_by_departments(list/departments) +// Filters events by availability, enable, and chaos +/datum/game_master/default/proc/filter_events_generic() . = list() for(var/E in SSgame_master.available_events) var/datum/event2/meta/event = E @@ -78,12 +92,21 @@ if(event.chaotic_threshold && !ignore_round_chaos) if(SSgame_master.danger > event.chaotic_threshold) continue + . += event + +// Filters the available events down to events for specific departments. +// Pass DEPARTMENT_EVERYONE if you want events that target the general population, like gravity failure. +// If no list is passed, all the events will be returned. +/datum/game_master/default/proc/filter_events_by_departments(list/available_events, list/departments) + . = list() + for(var/datum/event2/meta/event in available_events) // An event has to involve all of these departments to pass. - var/viable = TRUE - if(LAZYLEN(departments)) - for(var/department in departments) - if(!LAZYFIND(departments, department)) - viable = FALSE - break - if(viable) + if(!LAZYLEN(departments) || (departments ~= (event.departments & departments))) . += event + +// Filters the available events by the region those events target. +/datum/game_master/default/proc/filter_events_by_region(list/available_events, var/target_region) + . = list() + for(var/datum/event2/meta/event in available_events) + if(target_region in event.regions) + . += event \ No newline at end of file diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index e2d3dbdfd4..a0162e8bea 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -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,34 +91,11 @@ /datum/construction/reversible/is_right_key(var/obj/item/I) // returns index step var/list/L = steps[index] + if(I.get_tool_quality(L["key"])) + return FORWARD - switch(L["key"]) - if(IS_SCREWDRIVER) - if(I.is_screwdriver()) - return FORWARD - if(IS_CROWBAR) - if(I.is_crowbar()) - return FORWARD - if(IS_WIRECUTTER) - if(I.is_wirecutter()) - return FORWARD - if(IS_WRENCH) - if(I.is_wrench()) - return FORWARD - - 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()) - return BACKWARD + if(I.get_tool_quality(L["backkey"])) + return BACKWARD if(istype(I, L["key"])) return FORWARD //to the first step -> forward @@ -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 \ No newline at end of file + return TRUE \ No newline at end of file diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index fc47258a82..7f8d996c6d 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -7,8 +7,8 @@ var/atom/movable/teleatom //atom to teleport var/atom/destination //destination to teleport to var/precision = 0 //teleport precision - var/datum/effect/effect/system/effectin //effect to show right before teleportation - var/datum/effect/effect/system/effectout //effect to show right after teleportation + var/datum/effect_system/effectin //effect to show right before teleportation + var/datum/effect_system/effectout //effect to show right after teleportation var/soundin //soundfile to play before teleportation var/soundout //soundfile to play after teleportation var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation) @@ -58,7 +58,7 @@ //custom effects must be properly set up first for instant-type teleports //optional -/datum/teleport/proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null) +/datum/teleport/proc/setEffects(datum/effect_system/aeffectin=null,datum/effect_system/aeffectout=null) effectin = istype(aeffectin) ? aeffectin : null effectout = istype(aeffectout) ? aeffectout : null return 1 @@ -78,7 +78,7 @@ /datum/teleport/proc/teleportChecks() return 1 -/datum/teleport/proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound) +/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound) if(location) if(effect) spawn(-1) @@ -136,9 +136,9 @@ return -/datum/teleport/instant/science/setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout) +/datum/teleport/instant/science/setEffects(datum/effect_system/aeffectin,datum/effect_system/aeffectout) if(!aeffectin || !aeffectout) - var/datum/effect/effect/system/spark_spread/aeffect = new + var/datum/effect_system/spark_spread/aeffect = new aeffect.set_up(5, 1, teleatom) effectin = effectin || aeffect effectout = effectout || aeffect diff --git a/code/datums/looping_sounds/weather_sounds.dm b/code/datums/looping_sounds/weather_sounds.dm index 4a02993058..67a97c71f1 100644 --- a/code/datums/looping_sounds/weather_sounds.dm +++ b/code/datums/looping_sounds/weather_sounds.dm @@ -75,17 +75,24 @@ mid_sounds = list( 'sound/effects/weather/acidrain_mid.ogg' = 1 ) - mid_length = 15 SECONDS // The lengths for the files vary, but the longest is ten seconds, so this will make it sound like intermittent wind. + mid_length = 15 SECONDS start_sound = 'sound/effects/weather/acidrain_start.ogg' start_length = 13 SECONDS end_sound = 'sound/effects/weather/acidrain_end.ogg' volume = 20 -/datum/looping_sound/weather/rain/indoors - volume = 10 - /datum/looping_sound/weather/rain/heavy volume = 40 -/datum/looping_sound/weather/rain/heavy/indoors - volume = 20 \ No newline at end of file +/datum/looping_sound/weather/rain/indoors + mid_sounds = list( + 'sound/effects/weather/indoorrain_mid.ogg' = 1 + ) + mid_length = 15 SECONDS + start_sound = 'sound/effects/weather/indoorrain_start.ogg' + start_length = 13 SECONDS + end_sound = 'sound/effects/weather/indoorrain_end.ogg' + volume = 20 //Sound is already quieter in file + +/datum/looping_sound/weather/rain/indoors/heavy + volume = 40 \ No newline at end of file diff --git a/code/datums/vending/stored_item.dm b/code/datums/vending/stored_item.dm index d5e9c3cae0..92565a5f46 100644 --- a/code/datums/vending/stored_item.dm +++ b/code/datums/vending/stored_item.dm @@ -90,6 +90,8 @@ for(var/obj/item/stack/T as anything in instances) if(count <= 0) break + if(T.get_amount() <= count) + instances -= T count -= T.transfer_to(S, count) S.forceMove(product_location) diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 83ebb65fa8..01d368bc2e 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -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, "You need wirecutters!") 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, "You need a multitool!") return diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm index 0652280ce7..98460d3c9e 100644 --- a/code/game/gamemodes/changeling/powers/armblade.dm +++ b/code/game/gamemodes/changeling/powers/armblade.dm @@ -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 diff --git a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm index d35a2f2161..67e05ffcc6 100644 --- a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm +++ b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm @@ -86,7 +86,7 @@ break if(siemens) var/T = get_turf(src) - new /obj/effect/effect/sparks(T) + new /obj/effect/vfx/sparks(T) held_item.update_icon() i-- sleep(1 SECOND) @@ -120,7 +120,7 @@ "We store a charge of electricity in our hand.", "You hear crackling electricity!") var/T = get_turf(src) - new /obj/effect/effect/sparks(T) + new /obj/effect/vfx/sparks(T) /obj/item/weapon/electric_hand/dropped(mob/user) spawn(1) @@ -199,7 +199,7 @@ // break if(siemens) var/Turf = get_turf(src) - new /obj/effect/effect/sparks(Turf) + new /obj/effect/vfx/sparks(Turf) T.update_icon() i-- sleep(1 SECOND) diff --git a/code/game/gamemodes/changeling/powers/rapid_regen.dm b/code/game/gamemodes/changeling/powers/rapid_regen.dm index 6d1e9ee300..298ee8769b 100644 --- a/code/game/gamemodes/changeling/powers/rapid_regen.dm +++ b/code/game/gamemodes/changeling/powers/rapid_regen.dm @@ -46,7 +46,7 @@ // now make it obvious that we're not human (or whatever xeno race they are impersonating) playsound(src, 'sound/effects/blobattack.ogg', 30, 1) var/T = get_turf(src) - new /obj/effect/gibspawner/human(T) + new /obj/effect/spawner/gibs/human(T) visible_message("With a sickening squish, [src] reforms their whole body, casting their old parts on the floor!", "We reform our body. We are whole once more.", "You hear organic matter ripping and tearing!") diff --git a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm index 82138988b5..0f13da022f 100644 --- a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm +++ b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm @@ -42,7 +42,7 @@ if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf))))) return - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(5, 0, user.loc) sparks.attach(user) sparks.start() diff --git a/code/game/gamemodes/technomancer/devices/shield_armor.dm b/code/game/gamemodes/technomancer/devices/shield_armor.dm index 6d667be001..b98fa3b9f1 100644 --- a/code/game/gamemodes/technomancer/devices/shield_armor.dm +++ b/code/game/gamemodes/technomancer/devices/shield_armor.dm @@ -21,12 +21,12 @@ action_button_name = "Toggle Shield Projector" var/active = 0 var/damage_to_energy_multiplier = 50.0 //Determines how much energy to charge for blocking, e.g. 20 damage attack = 750 energy cost - var/datum/effect/effect/system/spark_spread/spark_system = null + var/datum/effect_system/spark_spread/spark_system = null var/block_percentage = 75 /obj/item/clothing/suit/armor/shield/Initialize() . = ..() - spark_system = new /datum/effect/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) /obj/item/clothing/suit/armor/shield/Destroy() diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm index 8b4e1f2767..01e7f23561 100644 --- a/code/game/gamemodes/technomancer/instability.dm +++ b/code/game/gamemodes/technomancer/instability.dm @@ -106,7 +106,7 @@ rng = rand(0,1) switch(rng) if(0) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(5, 0, src) sparks.attach(loc) sparks.start() @@ -171,7 +171,7 @@ rng = rand(0,1) switch(rng) if(0) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(5, 0, src) sparks.attach(loc) sparks.start() diff --git a/code/game/gamemodes/technomancer/spells/apportation.dm b/code/game/gamemodes/technomancer/spells/apportation.dm index 13f893b536..d5397fe161 100644 --- a/code/game/gamemodes/technomancer/spells/apportation.dm +++ b/code/game/gamemodes/technomancer/spells/apportation.dm @@ -32,8 +32,8 @@ if(istype(hit_atom, /obj/item)) var/obj/item/I = hit_atom - var/datum/effect/effect/system/spark_spread/s1 = new /datum/effect/effect/system/spark_spread - var/datum/effect/effect/system/spark_spread/s2 = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s1 = new /datum/effect_system/spark_spread + var/datum/effect_system/spark_spread/s2 = new /datum/effect_system/spark_spread s1.set_up(2, 1, user) s2.set_up(2, 1, I) s1.start() @@ -50,8 +50,8 @@ else if(istype(hit_atom, /mob/living)) var/mob/living/L = hit_atom to_chat(L, "You are teleported towards \the [user].") - var/datum/effect/effect/system/spark_spread/s1 = new /datum/effect/effect/system/spark_spread - var/datum/effect/effect/system/spark_spread/s2 = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s1 = new /datum/effect_system/spark_spread + var/datum/effect_system/spark_spread/s2 = new /datum/effect_system/spark_spread s1.set_up(2, 1, user) s2.set_up(2, 1, L) s1.start() diff --git a/code/game/gamemodes/technomancer/spells/blink.dm b/code/game/gamemodes/technomancer/spells/blink.dm index 0bbff7b016..6e791176a0 100644 --- a/code/game/gamemodes/technomancer/spells/blink.dm +++ b/code/game/gamemodes/technomancer/spells/blink.dm @@ -49,8 +49,8 @@ AM.forceMove(destination) AM.visible_message("\The [AM] vanishes!") to_chat(AM, "You suddenly appear somewhere else!") - new /obj/effect/effect/sparks(destination) - new /obj/effect/effect/sparks(starting) + new /obj/effect/vfx/sparks(destination) + new /obj/effect/vfx/sparks(starting) return /obj/item/weapon/spell/blink/on_ranged_cast(atom/hit_atom, mob/user) diff --git a/code/game/gamemodes/technomancer/spells/condensation.dm b/code/game/gamemodes/technomancer/spells/condensation.dm index 226ccbed18..bd7dba8736 100644 --- a/code/game/gamemodes/technomancer/spells/condensation.dm +++ b/code/game/gamemodes/technomancer/spells/condensation.dm @@ -25,7 +25,7 @@ spawn(1) var/turf/desired_turf = get_step(T,direction) if(desired_turf) // This shouldn't fail but... - var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(T)) + var/obj/effect/vfx/water/W = new /obj/effect/vfx/water(get_turf(T)) W.create_reagents(60) W.reagents.add_reagent(id = "water", amount = 60, data = null, safety = 0) W.set_color() diff --git a/code/game/gamemodes/technomancer/spells/passwall.dm b/code/game/gamemodes/technomancer/spells/passwall.dm index b5e0b18060..a82d6d79f0 100644 --- a/code/game/gamemodes/technomancer/spells/passwall.dm +++ b/code/game/gamemodes/technomancer/spells/passwall.dm @@ -39,7 +39,7 @@ visible_message("[user] rests a hand on \the [hit_atom].") busy = 1 - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, our_turf) while(i) diff --git a/code/game/gamemodes/technomancer/spells/reflect.dm b/code/game/gamemodes/technomancer/spells/reflect.dm index b5ca6047a4..3022685c37 100644 --- a/code/game/gamemodes/technomancer/spells/reflect.dm +++ b/code/game/gamemodes/technomancer/spells/reflect.dm @@ -14,12 +14,12 @@ toggled = 1 var/reflecting = 0 var/damage_to_energy_multiplier = 60.0 //Determines how much energy to charge for blocking, e.g. 20 damage attack = 1200 energy cost - var/datum/effect/effect/system/spark_spread/spark_system = null + var/datum/effect_system/spark_spread/spark_system = null /obj/item/weapon/spell/reflect/Initialize() . = ..() set_light(3, 2, l_color = "#006AFF") - spark_system = new /datum/effect/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) to_chat(owner, "Your shield will expire in 5 seconds!") QDEL_IN(src, 5 SECONDS) diff --git a/code/game/gamemodes/technomancer/spells/shield.dm b/code/game/gamemodes/technomancer/spells/shield.dm index 849ea56fbc..ed1a4eb7e1 100644 --- a/code/game/gamemodes/technomancer/spells/shield.dm +++ b/code/game/gamemodes/technomancer/spells/shield.dm @@ -16,12 +16,12 @@ aspect = ASPECT_FORCE toggled = 1 var/damage_to_energy_multiplier = 30.0 //Determines how much energy to charge for blocking, e.g. 20 damage attack = 600 energy cost - var/datum/effect/effect/system/spark_spread/spark_system = null + var/datum/effect_system/spark_spread/spark_system = null /obj/item/weapon/spell/shield/Initialize() . = ..() set_light(3, 2, l_color = "#006AFF") - spark_system = new /datum/effect/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) /obj/item/weapon/spell/shield/Destroy() diff --git a/code/game/gamemodes/technomancer/spells/warp_strike.dm b/code/game/gamemodes/technomancer/spells/warp_strike.dm index b0f7712cfa..9164e70312 100644 --- a/code/game/gamemodes/technomancer/spells/warp_strike.dm +++ b/code/game/gamemodes/technomancer/spells/warp_strike.dm @@ -12,11 +12,11 @@ icon_state = "warp_strike" cast_methods = CAST_RANGED aspect = ASPECT_TELE - var/datum/effect/effect/system/spark_spread/sparks + var/datum/effect_system/spark_spread/sparks /obj/item/weapon/spell/warp_strike/Initialize() . = ..() - sparks = new /datum/effect/effect/system/spark_spread() + sparks = new /datum/effect_system/spark_spread() sparks.set_up(5, 0, src) sparks.attach(loc) diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index ed99b6e72c..699e847208 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -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) diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 8a07a3a416..ae669e0f8b 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -100,7 +100,7 @@ if(cooldown_on || disabled) return else - new /obj/effect/effect/foam(src.loc) + new /obj/effect/vfx/foam(src.loc) uses-- cooldown_on = 1 cooldown_time = world.timeofday + 100 diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 585a62a5fa..65db62df13 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -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("\The [user] hits \the [src] with \a [W]!") src.health -= W.force src.add_fingerprint(user) diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 2e706defcf..cb8e2f4ef8 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -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, "You begin to unfasten \the [src]...") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH))) user.visible_message( \ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index e334a3f3c2..1fab99d760 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -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, "You disconnect \the [src] from the port.") @@ -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, "There is no power cell installed.") return diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index f6cadfbff1..a7010ec3d9 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -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, "Turn \the [src] off first!") 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, "The bolts are too tight for you to unscrew!") return diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 90d5409143..3598c657e6 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -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 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index d22ab1c9d1..75632751db 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -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, "You start to [panel_open ? "close" : "open"] the camera's panel.") //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 @@ "You screw the camera's panel [panel_open ? "open" : "closed"].") 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))) @@ -278,7 +278,7 @@ update_coverage() //sparks - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, loc) spark_system.start() playsound(src, "sparks", 50, 1) @@ -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, "You start to weld [src]..") + to_chat(user, "You start to weld [src]...") 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)) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index b56fa786be..e3c4d92d9f 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -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, "You start to weld the [src]..") + // Do after stuff here + to_chat(user, "You start to weld [src]...") 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 diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 2b768fb3e6..557ee73b3f 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -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, "Remove [charging] first!") return diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index a41ccad3a0..025e55b3dd 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -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, "Can not do that while [src] is in use.") else diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index dd94e6c8a9..9ca2d2236d 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -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) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 397366c6c2..ba6080de59 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -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, "You wrench the frame into place.") 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, "You deconstruct the frame.") 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, "You unfasten the frame.") 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, "You screw the circuit board into place.") 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, "You remove the circuit board.") 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, "You unfasten the circuit board.") state = 1 @@ -77,7 +77,7 @@ to_chat(user, "You add cables to the frame.") 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, "You remove the brain.") 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, "You remove the glass panel.") 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, "You connect the monitor.") if(!brain) @@ -232,11 +232,11 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva else to_chat(user, "ERROR: Unable to locate artificial intelligence.") return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(anchored) user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") 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("\The [user] decides not to unbolt \the [src].") return user.visible_message("\The [user] finishes unfastening \the [src]!") @@ -245,7 +245,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva else user.visible_message("\The [user] starts to bolt \the [src] to the plating...") 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("\The [user] decides not to bolt \the [src].") return user.visible_message("\The [user] finishes fastening down \the [src]!") diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 3ec9e2c841..935dac23be 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -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, "The screws on [name]'s screen won't budge.") diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 054c9c2cc3..ef0fb687bf 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -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, "You wrench the frame into place.") 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, "You deconstruct the frame.") 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, "You unfasten the frame.") src.anchored = 0 src.state = 0 @@ -48,12 +48,12 @@ P.loc = src else to_chat(user, "This frame does not accept circuit boards of this type!") - if(P.is_screwdriver() && circuit) + if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit) playsound(src, P.usesound, 50, 1) to_chat(user, "You screw the circuit board into place.") 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, "You remove the circuit board.") 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, "You unfasten the circuit board.") 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, "You remove the cables.") 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, "You remove the glass panel.") 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, "You connect the monitor.") var/B = new src.circuit.build_path ( src.loc ) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 87b35e8cd0..7db94fafcf 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -10,7 +10,7 @@ //Server linked to. var/obj/machinery/message_server/linkedServer = null //Sparks effect - For emag - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread //Messages - Saves me time if I want to change something. var/noserver = list("text" = "ALERT: No server detected.", "style" = "alert") var/incorrectkey = list("text" = "ALERT: Incorrect decryption key!", "style" = "warning") @@ -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, "It is too hot to mess with!") return diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 5eae5e82d0..670a55a9d1 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -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) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 3717da58c5..11174a9652 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -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, "You dismantle the frame") new /obj/item/stack/material/steel(src.loc, 5) @@ -71,7 +71,7 @@ else to_chat(user, "This frame does not accept circuit boards of this type!") else - if(P.is_wirecutter()) + if(P.get_tool_quality(TOOL_WIRECUTTER)) playsound(src, P.usesound, 50, 1) to_chat(user, "You remove the cables.") 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) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index a8f0d94c96..28e2fae729 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -41,13 +41,13 @@ Deployable items to_chat(user, "Barrier lock toggled off.") return else - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") return return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(health < maxhealth) health = maxhealth emagged = 0 @@ -119,7 +119,7 @@ Deployable items /* var/obj/item/stack/rods/ =*/ new /obj/item/stack/rods(Tsec) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() @@ -133,7 +133,7 @@ Deployable items LAZYCLEARLIST(req_access) LAZYCLEARLIST(req_one_access) to_chat(user, "You break the ID authentication lock on \the [src].") - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") @@ -141,7 +141,7 @@ Deployable items else if(emagged == 1) emagged = 2 to_chat(user, "You short out the anchoring mechanism on \the [src].") - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d34778210f..8bce7872f7 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -907,7 +907,7 @@ About the new airlock wires panel: if (istype(mover, /obj/item)) var/obj/item/i = mover if (i.matter && (DEFAULT_WALL_MATERIAL in i.matter) && i.matter[DEFAULT_WALL_MATERIAL] > 0) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() return ..() @@ -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, "The panel is broken and cannot be closed.") @@ -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, "You removed the airlock electronics!") 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, "The airlock's bolts prevent it from being forced.") else if( !welded && !operating ) @@ -1160,7 +1160,7 @@ About the new airlock wires panel: if ((O.client && !( O.blinded ))) O.show_message("[src.name]'s control panel bursts open, sparks spewing out!") - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 6bd7a82291..c549779478 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -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) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 04e5002776..36fff7aa30 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -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, "\The [src] must be closed before you can repair it.") return @@ -255,14 +255,14 @@ if(welder.remove_fuel(0,user)) to_chat(user, "You start to fix dents and weld \the [get_material_name()] into place.") 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, "You finish repairing the damage to \the [src].") 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 @@ -364,7 +364,7 @@ take_damage(300) if(3.0) if(prob(80)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() else diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index c23e6f4ffa..854dfbc5b8 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -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, "Someone's busy prying that [density ? "open" : "closed"]!") 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("[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch.", @@ -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, "You must open the maintenance hatch first!") else @@ -300,21 +300,16 @@ to_chat(user, "\The [src] is welded shut!") 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("\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!",\ "You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\ "You hear someone struggle and metal straining.") 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, "Someone's already prying that [density ? "open" : "closed"].") 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("\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!",\ "You force \the [src] [density ? "open" : "closed"] with \the [C]!",\ diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm index ab1de73c60..9e04e4d2ca 100644 --- a/code/game/machinery/doors/firedoor_assembly.dm +++ b/code/game/machinery/doors/firedoor_assembly.dm @@ -31,7 +31,7 @@ wired = 1 to_chat(user, "You wire \the [src].") - 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, "You must secure \the [src] first!") - else if(C.is_wrench()) + else if(C.get_tool_quality(TOOL_WRENCH)) anchored = !anchored playsound(src, C.usesound, 50, 1) user.visible_message("[user] has [anchored ? "" : "un" ]secured \the [src]!", "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("[user] welds the glass panel out of \the [src].", "You start to weld the glass panel out of \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()) to_chat(user, "You welded the glass panel out!") new /obj/item/stack/material/glass/reinforced(drop_location()) glass = FALSE @@ -75,7 +75,7 @@ return if(!anchored) user.visible_message("[user] dissassembles \the [src].", "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("[user] has dissassembled \the [src].", "You have dissassembled \the [src].") new /obj/item/stack/material/steel(drop_location(), 2) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 0caabe8b75..386fc977a8 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -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, "You begin repairing [src]...") 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, "You repair [src].") @@ -207,7 +207,7 @@ //Emags and ninja swords? You may pass. if (istype(I, /obj/item/weapon/melee/energy/blade)) if(emag_act(10, user)) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(src, "sparks", 50, 1) @@ -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,"You pried the windoor out of the frame!") var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc) diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index 3c8d458922..a9af4fe834 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -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 ..() diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 9576650dab..7a89310974 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -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 diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 10ad623bf9..9e9542097e 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -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 diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 09296ac302..b64045e217 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -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("\The [user] has [anchored ? "attached" : "detached"] \the [src].") - 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, "\The [src] 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))) return if(!src || !WT.isOn()) return diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index 5dcfe90d6e..9affbf24a5 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -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, "\The [src] is empty.") 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 ..() diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 867d9858c6..1a6d1e9bd8 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -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, "You start to wrench the frame into place.") 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, "You unfasten the frame.") 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, "You deconstruct the frame.") new /obj/item/stack/material/steel(src.loc, frame_type.frame_size) @@ -357,7 +367,7 @@ to_chat(user, "This frame does not accept circuit boards of this type!") 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 || \ diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index a478d3a416..429417e033 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -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) @@ -97,7 +97,7 @@ return flick("[base_state]-spark", src) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, src) s.start() last_spark = world.time diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 0f57b816d0..6a8136e1d7 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -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, "You start to dismantle the IV drip.") if(do_after(user, 15)) diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 649fa3bc43..506a73a4e4 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -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("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") @@ -208,7 +208,7 @@ explosion(src.loc, 0, 0, 1, rand(1,2), 1) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() @@ -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("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 5ee2d246d0..38ecc6d581 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -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,16 +177,12 @@ 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) @@ -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, "You don't have the dexterity to do this!") - return 1 + return TRUE if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.getBrainLoss() >= 55) visible_message("[H] stares cluelessly at [src].") - return 1 + return TRUE else if(prob(H.getBrainLoss())) to_chat(user, "You momentarily forget how to use [src].") - return 1 + return TRUE if(clicksound && istype(user, /mob/living/carbon)) playsound(src, clicksound, clickvol) @@ -278,10 +273,10 @@ Class Procs: /obj/machinery/proc/shock(mob/user, prb) if(inoperable()) - return 0 + return FALSE if(!prob(prb)) - return 0 - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + return FALSE + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(electrocute_mob(user, get_area(src), src, 0.7)) @@ -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, "Following parts detected in [src]:") for(var/obj/item/C in component_parts) to_chat(user, " [C.name]") @@ -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( \ "\The [user] begins [anchored ? "un" : ""]securing \the [src].", \ "You start [anchored ? "un" : ""]securing \the [src].") + if(actual_time == 0 || do_after(user, actual_time, target = src)) user.visible_message( \ "\The [user] has [anchored ? "un" : ""]secured \the [src].", \ @@ -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, "You [panel_open ? "open" : "close"] the maintenance hatch of [src].") 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, "You start disconnecting the monitor.") 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, "The broken glass falls out.") 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("[user] has cut the wires inside \the [src]!", "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 diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 6d08389065..18596ff535 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -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.") diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 414b153c2f..dfc161be02 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -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, "You need more fuel to complete this task.") 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("The [src] emits a quiet whirling noise!") 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] diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm index 32a76c3fb8..4540af5af7 100644 --- a/code/game/machinery/oxygen_pump.dm +++ b/code/game/machinery/oxygen_pump.dm @@ -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("\The [user] [(stat & MAINT) ? "opens" : "closes"] \the [src].", "You [(stat & MAINT) ? "open" : "close"] \the [src].") icon_state = (stat & MAINT) ? icon_state_open : icon_state_closed diff --git a/code/game/machinery/pda_multicaster.dm b/code/game/machinery/pda_multicaster.dm index 8f9cfb0f4b..c546368ca5 100644 --- a/code/game/machinery/pda_multicaster.dm +++ b/code/game/machinery/pda_multicaster.dm @@ -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 ..() diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index f5f2532080..bd51ba6e7e 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -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 ..() diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 0d5e42f771..8637779244 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -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, "You begin to unfasten \the [src] from the floor...") - if (do_after(user, 40 * W.toolspeed)) + if (do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH))) user.visible_message( \ "[user] unfastens \the [src].", \ "You have unfastened \the [src]. Now it can be pulled somewhere else.", \ @@ -132,7 +132,7 @@ else /*if (unwrenched==1)*/ playsound(src, W.usesound, 50, 1) to_chat(user, "You begin to fasten \the [src] to the floor...") - if (do_after(user, 20 * W.toolspeed)) + if (do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH))) user.visible_message( \ "[user] fastens \the [src].", \ "You have fastened \the [src]. Now it can dispense pipes.", \ diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 41e31e4ec0..339462beb1 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -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("[user] has set \the [src] to manufacture [P_type_t].", "You set \the [src] to manufacture [P_type_t].") return - if(!panel_open && W.is_crowbar()) + if(!panel_open && W.get_tool_quality(TOOL_CROWBAR)) a_dis = !a_dis user.visible_message("[user] has [!a_dis?"de":""]activated auto-dismantling.", "You [!a_dis?"de":""]activate auto-dismantling.") return diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm index 4efd32c273..cd7853eae6 100644 --- a/code/game/machinery/pointdefense.dm +++ b/code/game/machinery/pointdefense.dm @@ -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, "You register [src] with the [new_ident] network.") diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index f15ffd6f35..59df34611b 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -86,7 +86,7 @@ var/shot_sound //what sound should play when the turret fires var/lethal_shot_sound //what sound should play when the emagged turret fires - var/datum/effect/effect/system/spark_spread/spark_system //the spark system, used for generating... sparks? + var/datum/effect_system/spark_spread/spark_system //the spark system, used for generating... sparks? var/wrenching = FALSE var/last_target //last target fired at, prevents turrets from erratically firing at all valid targets in range @@ -302,7 +302,7 @@ /obj/machinery/porta_turret/Initialize() //Sets up a spark system - spark_system = new /datum/effect/effect/system/spark_spread + spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) @@ -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, "You begin prying the metal coverings off.") @@ -529,7 +529,7 @@ to_chat(user, "You remove the turret but did not manage to salvage anything.") qdel(src) // qdel - else if(I.is_wrench()) + else if(I.get_tool_quality(TOOL_WRENCH)) if(enabled || raised) to_chat(user, "You cannot unsecure an active turret!") 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, "You secure the exterior bolts on the turret.") - else if(anchored) - playsound(src, I.usesound, 100, 1) - anchored = FALSE - to_chat(user, "You unsecure the exterior bolts on the turret.") - update_icon() + playsound(src, I.usesound, 100, 1) + update_icon() + anchored = !anchored + to_chat(user, "You [anchored ? "" : "un"]secure the exterior bolts on the turret.") 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, "You secure the external bolts.") 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, "You dismantle the turret construction.") new /obj/item/stack/material/steel(loc, 5) @@ -993,7 +987,7 @@ to_chat(user, "You need two sheets of metal to continue construction.") return - else if(I.is_wrench()) + else if(I.get_tool_quality(TOOL_WRENCH)) playsound(src, I.usesound, 75, 1) to_chat(user, "You unfasten the external bolts.") 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, "You bolt the metal armor into place.") 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, "You remove the turret's metal armor bolts.") 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, "You close the internal access hatch.") @@ -1078,21 +1072,21 @@ to_chat(user, "You need two sheets of metal to continue construction.") 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, "You open the internal access hatch.") 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, "You need more fuel to complete this task.") 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, "You pry off the turret's exterior armor.") new /obj/item/stack/material/steel(loc, 2) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 669d738c63..d4c4fcb749 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -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, "Remove [charging] first!") return diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 8178c970c9..1b269cbca4 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -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("[user] [panel_open ? "opens" : "closes"] the hatch on the [src].", "You [panel_open ? "open" : "close"] the hatch on the [src].") diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 6bad81a8da..f14d2bdc4f 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -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, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.") - 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, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.") - 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, "Unable to open unit.") 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, "The Unit's safety protocols disallow locking when a biological form is detected inside its compartments.") 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, "WARNING: Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle.") return - if(!HELMET && !MASK && !SUIT && !OCCUPANT) //shit's empty yo + if(!helmet && !mask && !suit && !occupant) //shit's empty yo to_chat(user, "Unit storage bays empty. Nothing to disinfect -- Aborting.") 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("With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.", 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, "The machine kicks you out!") + if(occupant.client) + if(user != occupant) + to_chat(occupant, "The machine kicks you out!") if(user.loc != src.loc) - to_chat(OCCUPANT, "You leave the not-so-cozy confines of the SSU.") + to_chat(occupant, "You leave the not-so-cozy confines of the SSU.") - 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, "The unit is not operational.") return - if((OCCUPANT) || (HELMET) || (SUIT)) + if((occupant) || (helmet) || (suit)) to_chat(usr, "It's too cluttered inside for you to fit in!") 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, "You [panelopen ? "open up" : "close"] the unit's maintenance panel.") @@ -462,7 +428,7 @@ if(!ispowered || isbroken) to_chat(user, "The unit is not operational.") return - if((OCCUPANT) || (HELMET) || (SUIT)) //Unit needs to be absolutely empty + if((occupant) || (helmet) || (suit)) //Unit needs to be absolutely empty to_chat(user, "The unit's storage area is too cluttered.") 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, "The unit already contains a suit.") 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, "The unit already contains a helmet.") 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, "The unit already contains a mask.") 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) diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm index 413f5a0af9..4a386129eb 100644 --- a/code/game/machinery/supplybeacon.dm +++ b/code/game/machinery/supplybeacon.dm @@ -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, "This device must be placed over an exposed cable.") return diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 2c59ec8b20..2581366a3e 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -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, "You need to deactivate the beacon first!") return diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 5c68397894..bbbcfe542f 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -274,7 +274,7 @@ com.one_time_use = 0 com.teleport_control.locked = null else - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() accurate = 1 diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm index f0680c5faf..2a0a71ee09 100644 --- a/code/game/machinery/virtual_reality/vr_console.dm +++ b/code/game/machinery/virtual_reality/vr_console.dm @@ -12,7 +12,7 @@ var/mob/living/carbon/human/occupant = null var/mob/living/carbon/human/avatar = null var/datum/mind/vr_mind = null - var/datum/effect/effect/system/smoke_spread/bad/smoke + var/datum/effect_system/smoke_spread/bad/smoke var/eject_dead = TRUE diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index aabb65769a..ab9b471b03 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -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 diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index ae2238145d..e966e80f18 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -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)) - 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, "You [panel ? "open" : "close"] the [src]'s maintenance panel")*/ - if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp)) - if(state in list( 1, 3, 6)) - if(!crayon) - user.drop_item() - crayon = W - crayon.loc = src - else - ..() - else - ..() - else if(istype(W,/obj/item/weapon/grab)) - if((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 - ..() + if(state == 2 && washing.len < 1 && ( \ + default_deconstruction_screwdriver(user, W) || \ + default_deconstruction_crowbar(user, W) || \ + default_unfasten_wrench(user, W, 40) ) ) + return + + 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 + + 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 if(is_type_in_list(W, disallowed_types)) to_chat(user, "You can't fit \the [W] inside.") diff --git a/code/game/mecha/combat/fighter.dm b/code/game/mecha/combat/fighter.dm index d0a134e3d3..b46f9021fa 100644 --- a/code/game/mecha/combat/fighter.dm +++ b/code/game/mecha/combat/fighter.dm @@ -4,7 +4,7 @@ name = "Delete me, nerd!!" desc = "The base type of fightercraft. Don't spawn this one!" - var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/ion_trail_follow/ion_trail var/stabilization_enabled = TRUE //If our anti-space-drift is on var/ground_capable = FALSE //If we can fly over normal turfs and not just space @@ -47,7 +47,7 @@ /obj/mecha/combat/fighter/Initialize() . = ..() - ion_trail = new /datum/effect/effect/system/ion_trail_follow() + ion_trail = new /datum/effect_system/ion_trail_follow() ion_trail.set_up(src) ion_trail.stop() diff --git a/code/game/mecha/equipment/tools/extinguisher.dm b/code/game/mecha/equipment/tools/extinguisher.dm index 5b83b20344..c7af9da3c3 100644 --- a/code/game/mecha/equipment/tools/extinguisher.dm +++ b/code/game/mecha/equipment/tools/extinguisher.dm @@ -44,7 +44,7 @@ for(var/a = 1 to 5) spawn(0) - var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(chassis)) + var/obj/effect/vfx/water/W = new /obj/effect/vfx/water(get_turf(chassis)) var/turf/my_target if(a == 1) my_target = T diff --git a/code/game/mecha/equipment/tools/jetpack.dm b/code/game/mecha/equipment/tools/jetpack.dm index 5f2fc153a2..079c466089 100644 --- a/code/game/mecha/equipment/tools/jetpack.dm +++ b/code/game/mecha/equipment/tools/jetpack.dm @@ -5,7 +5,7 @@ equip_cooldown = 5 energy_drain = 50 var/wait = 0 - var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/ion_trail_follow/ion_trail /obj/item/mecha_parts/mecha_equipment/tool/jetpack/can_attach(obj/mecha/M as obj) diff --git a/code/game/mecha/equipment/tools/powertool.dm b/code/game/mecha/equipment/tools/powertool.dm index 0adcb98929..9c4e40184e 100644 --- a/code/game/mecha/equipment/tools/powertool.dm +++ b/code/game/mecha/equipment/tools/powertool.dm @@ -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' diff --git a/code/game/mecha/equipment/weapons/ballistic/automatic.dm b/code/game/mecha/equipment/weapons/ballistic/automatic.dm index 3578592511..1a5cf7e5c0 100644 --- a/code/game/mecha/equipment/weapons/ballistic/automatic.dm +++ b/code/game/mecha/equipment/weapons/ballistic/automatic.dm @@ -4,7 +4,7 @@ icon_state = "mecha_uac2" equip_cooldown = 10 projectile = /obj/item/projectile/bullet/pistol/medium - fire_sound = 'sound/weapons/Gunshot_machinegun.ogg' + fire_sound = 'sound/weapons/mech_autocannon.ogg' projectiles = 30 //10 bursts, matching the Scattershot's 10. Also, conveniently, doesn't eat your powercell when reloading like 300 bullets does. projectiles_per_shot = 3 deviation = 0.3 diff --git a/code/game/mecha/equipment/weapons/ballistic/mortar.dm b/code/game/mecha/equipment/weapons/ballistic/mortar.dm index c192d0fc9b..6df0524660 100644 --- a/code/game/mecha/equipment/weapons/ballistic/mortar.dm +++ b/code/game/mecha/equipment/weapons/ballistic/mortar.dm @@ -4,7 +4,7 @@ description_info = "This weapon cannot be fired indoors, underground, or on-station." icon_state = "mecha_mortar" equip_cooldown = 30 - fire_sound = 'sound/weapons/Gunshot_cannon.ogg' + fire_sound = 'sound/weapons/mech_mortar.ogg' fire_volume = 100 projectiles = 3 deviation = 0.6 diff --git a/code/game/mecha/equipment/weapons/ballistic/shotgun.dm b/code/game/mecha/equipment/weapons/ballistic/shotgun.dm index e698248b7f..7df9b8ee74 100644 --- a/code/game/mecha/equipment/weapons/ballistic/shotgun.dm +++ b/code/game/mecha/equipment/weapons/ballistic/shotgun.dm @@ -4,7 +4,7 @@ icon_state = "mecha_scatter" equip_cooldown = 20 projectile = /obj/item/projectile/bullet/pellet/shotgun/flak - fire_sound = 'sound/weapons/Gunshot_shotgun.ogg' + fire_sound = 'sound/weapons/mech_shotgun.ogg' fire_volume = 80 projectiles = 40 projectiles_per_shot = 4 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 9e54dd7c8a..fd4ec50d04 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -68,7 +68,7 @@ var/maint_access = 1 var/dna //Dna-locking the mech var/list/proc_res = list() //Stores proc owners, like proc_res["functionname"] = owner reference - var/datum/effect/effect/system/spark_spread/spark_system = new + var/datum/effect_system/spark_spread/spark_system = new var/lights = 0 var/lights_power = 6 var/force = 0 @@ -101,7 +101,7 @@ var/list/equipment = new //This lists holds what stuff you bolted onto your baby ride var/obj/item/mecha_parts/mecha_equipment/selected var/max_equip = 2 - + // What direction to float in, if inertial movement is active. var/float_direction = 0 // Process() iterator count. @@ -179,7 +179,7 @@ var/smoke_reserve = 5 //How many shots you have. Might make a reload later on. MIGHT. var/smoke_ready = 1 //This is a check for the whether or not the cooldown is ongoing. var/smoke_cooldown = 100 //How long you have between uses. - var/datum/effect/effect/system/smoke_spread/smoke_system = new + var/datum/effect_system/smoke_spread/smoke_system = new var/cloak_possible = FALSE // Can this exosuit innately cloak? @@ -1468,7 +1468,7 @@ to_chat(user, "Invalid ID: Access denied.") else to_chat(user, "Maintenance protocols disabled by operator.") - 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.") @@ -2026,7 +2026,7 @@ update_cell_alerts() update_damage_alerts() set_dir(dir_in) - playsound(src, 'sound/machines/door/windowdoor.ogg', 50, 1) + playsound(src, 'sound/mecha/mech_enter.ogg', 50, 1) if(occupant.client && cloaked_selfimage) occupant.client.images += cloaked_selfimage play_entered_noise(occupant) @@ -2119,6 +2119,7 @@ update_icon() set_dir(dir_in) verbs -= /obj/mecha/verb/eject + playsound(src, 'sound/mecha/mech_exit.ogg', 50, 1) //src.zoom = 0 diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index c70c3b9b83..01f5590b1f 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -334,7 +334,7 @@ smoke_reserve-- //Remove ammo src.occupant_message("Smoke fired. [smoke_reserve] usages left.") - var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() + var/datum/effect_system/smoke_spread/smoke = new /datum/effect_system/smoke_spread() smoke.attach(src) smoke.set_up(10, 0, usr.loc) smoke.start() diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index e345013e3d..d008d072bb 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -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.") ) diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index c28a16c893..6241937577 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -49,7 +49,7 @@ else to_chat(user, "You need more welding fuel to complete this task.") 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) diff --git a/code/game/mecha/space/hoverpod.dm b/code/game/mecha/space/hoverpod.dm index fc5fc1e739..164f9516e7 100644 --- a/code/game/mecha/space/hoverpod.dm +++ b/code/game/mecha/space/hoverpod.dm @@ -14,7 +14,7 @@ wreckage = /obj/effect/decal/mecha_wreckage/hoverpod cargo_capacity = 5 max_equip = 3 - var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/ion_trail_follow/ion_trail var/stabilization_enabled = 1 stomp_sound = 'sound/machines/hiss.ogg' @@ -28,7 +28,7 @@ /obj/mecha/working/hoverpod/Initialize() . = ..() - ion_trail = new /datum/effect/effect/system/ion_trail_follow() + ion_trail = new /datum/effect_system/ion_trail_follow() ion_trail.set_up(src) /obj/mecha/working/hoverpod/moved_inside(var/mob/living/carbon/human/H as mob) diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm index 3d55d0ea5b..50f1a3217c 100644 --- a/code/game/objects/effects/alien/aliens.dm +++ b/code/game/objects/effects/alien/aliens.dm @@ -174,7 +174,7 @@ /obj/effect/alien/weeds/Initialize(var/mapload, var/node, var/newcolor) . = ..() - if(isspace(loc)) + if(isspace(loc) || (locate(/obj/effect/alien/weeds) in loc) != src) return INITIALIZE_HINT_QDEL linked_node = node @@ -188,14 +188,11 @@ /obj/effect/alien/weeds/Destroy() var/turf/T = get_turf(src) - // To not mess up the overlay updates. - loc = null - - for (var/obj/effect/alien/weeds/W in range(1,T)) - W.updateWeedOverlays() - linked_node = null - return ..() + . = ..() + if(T) + for (var/obj/effect/alien/weeds/W in range(1,T)) + W.updateWeedOverlays() /obj/effect/alien/weeds/node icon_state = "weednode" @@ -210,10 +207,10 @@ /obj/effect/alien/weeds/node/Initialize(var/mapload, var/node, var/newcolor) . = ..() - for(var/obj/effect/alien/weeds/existing in loc) - if(existing == src) - continue - else + if(. != INITIALIZE_HINT_QDEL && !mapload) + for(var/obj/effect/alien/weeds/existing in loc) + if(existing == src) + continue qdel(existing) linked_node = src @@ -256,8 +253,6 @@ for (var/obj/effect/alien/weeds/W in range(1,src)) W.updateWeedOverlays() - return - // NB: This is not actually called by a processing subsystem, it's called by the node processing /obj/effect/alien/weeds/process() set background = 1 diff --git a/code/game/objects/effects/chem/chemsmoke.dm b/code/game/objects/effects/chem/chemsmoke.dm index 482f59810d..443478d180 100644 --- a/code/game/objects/effects/chem/chemsmoke.dm +++ b/code/game/objects/effects/chem/chemsmoke.dm @@ -1,26 +1,26 @@ ///////////////////////////////////////////// // Chem smoke ///////////////////////////////////////////// -/obj/effect/effect/smoke/chem +/obj/effect/vfx/smoke/chem icon = 'icons/effects/chemsmoke.dmi' opacity = TRUE time_to_live = 300 pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass -/obj/effect/effect/smoke/chem/Initialize() +/obj/effect/vfx/smoke/chem/Initialize() . = ..() create_reagents(500) return -/obj/effect/effect/smoke/chem/Destroy() +/obj/effect/vfx/smoke/chem/Destroy() walk(src, 0) // Because we might have called walk_to, we must stop the walk loop or BYOND keeps an internal reference to us forever. return ..() -/obj/effect/effect/smoke/chem/transparent +/obj/effect/vfx/smoke/chem/transparent opacity = FALSE -/datum/effect/effect/system/smoke_spread/chem - smoke_type = /obj/effect/effect/smoke/chem +/datum/effect_system/smoke_spread/chem + smoke_type = /obj/effect/vfx/smoke/chem var/obj/chemholder var/range var/list/targetTurfs @@ -28,21 +28,21 @@ var/density var/show_log = 1 -/datum/effect/effect/system/smoke_spread/chem/spores +/datum/effect_system/smoke_spread/chem/spores show_log = 0 var/datum/seed/seed -/datum/effect/effect/system/smoke_spread/chem/spores/New(_seed) +/datum/effect_system/smoke_spread/chem/spores/New(_seed) seed = _seed if(!istype(seed)) CRASH("Invalid seed datum passed! [seed] ([seed?.type])") ..() -/datum/effect/effect/system/smoke_spread/chem/blob +/datum/effect_system/smoke_spread/chem/blob show_log = 0 - smoke_type = /obj/effect/effect/smoke/chem/transparent + smoke_type = /obj/effect/vfx/smoke/chem/transparent -/datum/effect/effect/system/smoke_spread/chem/New() +/datum/effect_system/smoke_spread/chem/New() ..() chemholder = new/obj() chemholder.create_reagents(500) @@ -51,7 +51,7 @@ // Calculates the max range smoke can travel, then gets all turfs in that view range. // Culls the selected turfs to a (roughly) circle shape, then calls smokeFlow() to make // sure the smoke can actually path to the turfs. This culls any turfs it can't reach. -/datum/effect/effect/system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct) +/datum/effect_system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct) range = n * 0.3 cardinals = c carry.trans_to_obj(chemholder, carry.total_volume, copy = 1) @@ -102,7 +102,7 @@ // Applies reagents to walls that affect walls (only thermite and plant-b-gone at the moment). // Also calculates target locations to spawn the visual smoke effect on, so the whole area // is covered fairly evenly. -/datum/effect/effect/system/smoke_spread/chem/start() +/datum/effect_system/smoke_spread/chem/start() if(!location) return @@ -112,7 +112,7 @@ for(var/turf/T in targetTurfs) chemholder.reagents.touch_turf(T) for(var/atom/A in T.contents) - if(istype(A, /obj/effect/effect/smoke/chem) || istype(A, /mob)) + if(istype(A, /obj/effect/vfx/smoke/chem) || istype(A, /mob)) continue else if(isobj(A) && !A.simulated) chemholder.reagents.touch_obj(A) @@ -156,9 +156,9 @@ // Randomizes and spawns the smoke effect. // Also handles deleting the smoke once the effect is finished. //------------------------------------------ -/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/effect/smoke/chem/passed_smoke) +/datum/effect_system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/vfx/smoke/chem/passed_smoke) - var/obj/effect/effect/smoke/chem/smoke + var/obj/effect/vfx/smoke/chem/smoke if(passed_smoke) smoke = passed_smoke else @@ -180,12 +180,12 @@ fadeOut(smoke) qdel(smoke) -/datum/effect/effect/system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1) - var/obj/effect/effect/smoke/chem/spores = new /obj/effect/effect/smoke/chem(location) +/datum/effect_system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1) + var/obj/effect/vfx/smoke/chem/spores = new /obj/effect/vfx/smoke/chem(location) spores.name = "cloud of [seed.seed_name] [seed.seed_noun]" ..(T, I, dist, spores) -/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable. +/datum/effect_system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable. if(A.alpha == 0) //Handle already transparent case return if(frames == 0) @@ -197,7 +197,7 @@ return -/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach. +/datum/effect_system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach. var/list/pending = new() var/list/complete = new() diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index a093abe9be..5031fb779e 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -2,7 +2,7 @@ // Similar to smoke, but spreads out more // metal foams leave behind a foamed metal wall -/obj/effect/effect/foam +/obj/effect/vfx/foam name = "foam" icon_state = "foam" opacity = 0 @@ -15,7 +15,7 @@ var/expand = 1 var/metal = 0 -/obj/effect/effect/foam/Initialize(var/mapload, var/ismetal = 0) +/obj/effect/vfx/foam/Initialize(var/mapload, var/ismetal = 0) . = ..() icon_state = "[ismetal? "m" : ""]foam" metal = ismetal @@ -25,14 +25,14 @@ addtimer(CALLBACK(src, .proc/pre_harden), 12 SECONDS) addtimer(CALLBACK(src, .proc/harden), 15 SECONDS) -/obj/effect/effect/foam/proc/post_spread() +/obj/effect/vfx/foam/proc/post_spread() process() checkReagents() -/obj/effect/effect/foam/proc/pre_harden() +/obj/effect/vfx/foam/proc/pre_harden() STOP_PROCESSING(SSobj, src) -/obj/effect/effect/foam/proc/harden() +/obj/effect/vfx/foam/proc/harden() if(metal) var/obj/structure/foamedmetal/M = new(src.loc) M.metal = metal @@ -40,14 +40,14 @@ flick("[icon_state]-disolve", src) QDEL_IN(src, 5) -/obj/effect/effect/foam/proc/checkReagents() // transfer any reagents to the floor +/obj/effect/vfx/foam/proc/checkReagents() // transfer any reagents to the floor if(!metal && reagents) var/turf/T = get_turf(src) reagents.touch_turf(T) for(var/obj/O in T) reagents.touch_obj(O) -/obj/effect/effect/foam/process() +/obj/effect/vfx/foam/process() if(--amount < 0) return @@ -59,7 +59,7 @@ if(!T.Enter(src)) continue - var/obj/effect/effect/foam/F = locate() in T + var/obj/effect/vfx/foam/F = locate() in T if(F) continue @@ -71,14 +71,14 @@ for(var/datum/reagent/R in reagents.reagent_list) F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react -/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams +/obj/effect/vfx/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams if(!metal && prob(max(0, exposed_temperature - 475))) flick("[icon_state]-disolve", src) spawn(5) qdel(src) -/obj/effect/effect/foam/Crossed(var/atom/movable/AM) +/obj/effect/vfx/foam/Crossed(var/atom/movable/AM) if(AM.is_incorporeal()) return if(metal) @@ -87,12 +87,12 @@ var/mob/living/M = AM M.slip("the foam", 6) -/datum/effect/effect/system/foam_spread +/datum/effect_system/foam_spread var/amount = 5 // the size of the foam spread. var/list/carried_reagents // the IDs of reagents present when the foam was mixed var/metal = 0 // 0 = foam, 1 = metalfoam, 2 = ironfoam -/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0) +/datum/effect_system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0) amount = round(sqrt(amt / 3), 1) if(istype(loca, /turf/)) location = loca @@ -108,14 +108,14 @@ for(var/datum/reagent/R in carry.reagent_list) carried_reagents += R.id -/datum/effect/effect/system/foam_spread/start() +/datum/effect_system/foam_spread/start() spawn(0) - var/obj/effect/effect/foam/F = locate() in location + var/obj/effect/vfx/foam/F = locate() in location if(F) F.amount += amount return - F = new /obj/effect/effect/foam(location, metal) + F = new /obj/effect/vfx/foam(location, metal) F.amount = amount if(!metal) // don't carry other chemicals if a metal foam diff --git a/code/game/objects/effects/chem/water.dm b/code/game/objects/effects/chem/water.dm index 7de9b9f8ff..adf095d030 100644 --- a/code/game/objects/effects/chem/water.dm +++ b/code/game/objects/effects/chem/water.dm @@ -1,18 +1,18 @@ -/obj/effect/effect/water +/obj/effect/vfx/water name = "water" icon = 'icons/effects/effects.dmi' icon_state = "extinguish" mouse_opacity = 0 pass_flags = PASSTABLE | PASSGRILLE | PASSBLOB -/obj/effect/effect/water/Initialize() +/obj/effect/vfx/water/Initialize() . = ..() QDEL_IN(src, 15 SECONDS) -/obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it +/obj/effect/vfx/water/proc/set_color() // Call it after you move reagents to it icon += reagents.get_color() -/obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5) +/obj/effect/vfx/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5) if(!target) return for(var/i = 1 to step_count) @@ -37,18 +37,18 @@ sleep(10) qdel(src) -/obj/effect/effect/water/Move(turf/newloc) +/obj/effect/vfx/water/Move(turf/newloc) if(newloc.density) return 0 . = ..() -/obj/effect/effect/water/Bump(atom/A) +/obj/effect/vfx/water/Bump(atom/A) if(reagents) reagents.touch(A) return ..() //Used by spraybottles. -/obj/effect/effect/water/chempuff +/obj/effect/vfx/water/chempuff name = "chemicals" icon = 'icons/obj/chempuff.dmi' icon_state = "" diff --git a/code/game/objects/effects/decals/Cleanable/robots.dm b/code/game/objects/effects/decals/Cleanable/robots.dm index bdc5c9237a..ccafd9ecc1 100644 --- a/code/game/objects/effects/decals/Cleanable/robots.dm +++ b/code/game/objects/effects/decals/Cleanable/robots.dm @@ -24,7 +24,7 @@ var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc) streak.update_icon() else if (prob(10)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if (step_to(src, get_step(src, direction), 0)) diff --git a/code/game/objects/effects/decals/posters/posters.dm b/code/game/objects/effects/decals/posters/posters.dm index 7c55453656..307a20de03 100644 --- a/code/game/objects/effects/decals/posters/posters.dm +++ b/code/game/objects/effects/decals/posters/posters.dm @@ -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, "You remove the remnants of the poster.") diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm deleted file mode 100644 index 2a3d014547..0000000000 --- a/code/game/objects/effects/effect_system.dm +++ /dev/null @@ -1,575 +0,0 @@ -/* This is an attempt to make some easily reusable "particle" type effect, to stop the code -constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one -defined, then set up when it is created with New(). Then this same system can just be reused each time -it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam -would spawn and follow the beaker, even if it is carried or thrown. -*/ - - -/obj/effect/effect - name = "effect" - icon = 'icons/effects/effects.dmi' - mouse_opacity = 0 - unacidable = 1//So effect are not targeted by alien acid. - pass_flags = PASSTABLE | PASSGRILLE - -/datum/effect/effect/system - var/number = 3 - var/cardinals = 0 - var/turf/location - var/atom/holder - var/setup = 0 - -/datum/effect/effect/system/proc/set_up(n = 3, c = 0, turf/loc) - if(n > 10) - n = 10 - number = n - cardinals = c - location = loc - setup = 1 - -/datum/effect/effect/system/proc/attach(atom/atom) - holder = atom - -/datum/effect/effect/system/proc/start() - -/datum/effect/effect/system/Destroy() - holder = null - return ..() - -///////////////////////////////////////////// -// GENERIC STEAM SPREAD SYSTEM - -//Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location) -// The attach(atom/atom) proc is optional, and can be called to attach the effect -// to something, like a smoking beaker, so then you can just call start() and the steam -// will always spawn at the items location, even if it's moved. - -/* Example: -var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system -steam.set_up(5, 0, mob.loc) -- sets up variables -OPTIONAL: steam.attach(mob) -steam.start() -- spawns the effect -*/ -///////////////////////////////////////////// -/obj/effect/effect/steam - name = "steam" - icon = 'icons/effects/effects.dmi' - icon_state = "extinguish" - density = 0 - -/datum/effect/effect/system/steam_spread/set_up(n = 3, c = 0, turf/loc) - if(n > 10) - n = 10 - number = n - cardinals = c - location = loc - -/datum/effect/effect/system/steam_spread/start() - var/i = 0 - for(i=0, i 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - -/datum/effect/effect/system/spark_spread/start() - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) - src.total_sparks++ - var/direction - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, i 10) - n = 10 - number = n - cardinals = c - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - if(direct) - direction = direct - -/datum/effect/effect/system/smoke_spread/start(var/I) - var/i = 0 - for(i=0, i 20) - return - spawn(0) - if(holder) - src.location = get_turf(holder) - var/obj/effect/effect/smoke/smoke = new smoke_type(src.location) - src.total_smoke++ - if(I) - smoke.color = I - var/direction = src.direction - if(!direction) - if(src.cardinals) - direction = pick(cardinal) - else - direction = pick(alldirs) - for(i=0, iThe solution violently explodes.") - for(var/mob/M in viewers(1, location)) - if (prob (50 * amount)) - to_chat(M, "The explosion knocks you down.") - M.Weaken(rand(1,5)) - return - else - var/devst = -1 - var/heavy = -1 - var/light = -1 - var/flash = -1 - - // Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs - if (round(amount/12) > 0) - devst = devst + amount/12 - - if (round(amount/6) > 0) - heavy = heavy + amount/6 - - if (round(amount/3) > 0) - light = light + amount/3 - - if (flashing && flashing_factor) - flash = (amount/4) * flashing_factor - - for(var/mob/M in viewers(8, location)) - to_chat(M, "The solution violently explodes.") - - explosion( - location, - round(min(devst, BOMBCAP_DVSTN_RADIUS)), - round(min(heavy, BOMBCAP_HEAVY_RADIUS)), - round(min(light, BOMBCAP_LIGHT_RADIUS)), - round(min(flash, BOMBCAP_FLASH_RADIUS)) - ) diff --git a/code/game/objects/effects/explosion_particles.dm b/code/game/objects/effects/explosion_particles.dm deleted file mode 100644 index 2f706a1072..0000000000 --- a/code/game/objects/effects/explosion_particles.dm +++ /dev/null @@ -1,68 +0,0 @@ -/obj/effect/expl_particles - name = "explosive particles" - icon = 'icons/effects/effects.dmi' - icon_state = "explosion_particle" - opacity = 1 - anchored = 1 - mouse_opacity = 0 - -/obj/effect/expl_particles/Initialize() - . = ..() - QDEL_IN(src, 15) - -/datum/effect/system/expl_particles - var/number = 10 - var/turf/location - var/total_particles = 0 - -/datum/effect/system/expl_particles/proc/set_up(n = 10, loca) - number = n - if(istype(loca, /turf/)) location = loca - else location = get_turf(loca) - -/datum/effect/system/expl_particles/proc/start() - var/i = 0 - for(i=0, iGib list length mismatch!") - return - - var/obj/effect/decal/cleanable/blood/gibs/gib = null - - if(sparks) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() - s.set_up(2, 1, get_turf(location)) // Not sure if it's safe to pass an arbitrary object to set_up, todo - s.start() - - for(var/i = 1, i<= gibtypes.len, i++) - if(gibamounts[i]) - for(var/j = 1, j<= gibamounts[i], j++) - var/gibType = gibtypes[i] - gib = new gibType(location) - - // Apply human species colouration to masks. - if(fleshcolor) - gib.fleshcolor = fleshcolor - if(bloodcolor) - gib.basecolor = bloodcolor - - gib.update_icon() - - gib.blood_DNA = list() - if(MobDNA) - gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type - else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey - gib.blood_DNA["Non-human DNA"] = "A+" - if(istype(location,/turf/)) - var/list/directions = gibdirections[i] - if(directions.len) - gib.streak(directions) diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm deleted file mode 100644 index a204358b0f..0000000000 --- a/code/game/objects/effects/manifest.dm +++ /dev/null @@ -1,19 +0,0 @@ -/obj/effect/manifest - name = "manifest" - icon = 'icons/mob/screen1.dmi' - icon_state = "x" - unacidable = 1//Just to be sure. - -/obj/effect/manifest/Initialize() - . = ..() - invisibility = 101 - -/obj/effect/manifest/proc/manifest() - var/dat = "Crew Manifest:
" - for(var/mob/living/carbon/human/M in mob_list) - dat += text(" [] - []
", M.name, M.get_assignment()) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc ) - P.info = dat - P.name = "paper- 'Crew Manifest'" - //SN src = null - qdel(src) diff --git a/code/game/objects/effects/map_effects/effect_emitter.dm b/code/game/objects/effects/map_effects/effect_emitter.dm index 423e248fc1..c3c0a66d87 100644 --- a/code/game/objects/effects/map_effects/effect_emitter.dm +++ b/code/game/objects/effects/map_effects/effect_emitter.dm @@ -1,6 +1,6 @@ // Creates effects like smoke clouds every so often. /obj/effect/map_effect/interval/effect_emitter - var/datum/effect/effect/system/effect_system = null + var/datum/effect_system/effect_system = null var/effect_system_type = null // Which effect system to attach. var/effect_amount = 10 // How many effect objects to create on each interval. Note that there's a hard cap on certain effect_systems. @@ -30,7 +30,7 @@ /obj/effect/map_effect/interval/effect_emitter/smoke name = "smoke emitter" icon_state = "smoke_emitter" - effect_system_type = /datum/effect/effect/system/smoke_spread + effect_system_type = /datum/effect_system/smoke_spread interval_lower_bound = 1 SECOND interval_upper_bound = 1 SECOND @@ -38,30 +38,30 @@ /obj/effect/map_effect/interval/effect_emitter/smoke/bad name = "bad smoke emitter" - effect_system_type = /datum/effect/effect/system/smoke_spread/bad + effect_system_type = /datum/effect_system/smoke_spread/bad /obj/effect/map_effect/interval/effect_emitter/smoke/fire name = "fire smoke emitter" - effect_system_type = /datum/effect/effect/system/smoke_spread/fire + effect_system_type = /datum/effect_system/smoke_spread/fire /obj/effect/map_effect/interval/effect_emitter/smoke/frost name = "frost smoke emitter" - effect_system_type = /datum/effect/effect/system/smoke_spread/frost + effect_system_type = /datum/effect_system/smoke_spread/frost /obj/effect/map_effect/interval/effect_emitter/smoke/shock name = "shock smoke emitter" - effect_system_type = /datum/effect/effect/system/smoke_spread/shock + effect_system_type = /datum/effect_system/smoke_spread/shock /obj/effect/map_effect/interval/effect_emitter/smoke/mist name = "mist smoke emitter" - effect_system_type = /datum/effect/effect/system/smoke_spread/mist + effect_system_type = /datum/effect_system/smoke_spread/mist // Makes sparks. /obj/effect/map_effect/interval/effect_emitter/sparks name = "spark emitter" icon_state = "spark_emitter" - effect_system_type = /datum/effect/effect/system/spark_spread + effect_system_type = /datum/effect_system/spark_spread interval_lower_bound = 3 SECONDS interval_upper_bound = 7 SECONDS @@ -75,4 +75,4 @@ /obj/effect/map_effect/interval/effect_emitter/steam name = "steam emitter" icon_state = "smoke_emitter" - effect_system_type = /datum/effect/effect/system/steam_spread + effect_system_type = /datum/effect_system/steam_spread diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index c49a4e0666..55a338b605 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -42,7 +42,7 @@ new_turf.register_dangerous_object(src) /obj/effect/mine/proc/explode(var/mob/living/M) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() triggered = 1 s.set_up(3, 1, src) s.start() @@ -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("[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].", "You very carefully screw the mine's panel [panel_open ? "open" : "closed"].") @@ -109,16 +109,15 @@ // 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 - user.set_machine(src) - wires.Interact(user) + if(panel_open && !istype(user, /mob/living/silicon/ai)) + user.set_machine(src) + wires.Interact(user) /obj/effect/mine/camo camo_net = TRUE @@ -127,7 +126,7 @@ mineitemtype = /obj/item/weapon/mine/dnascramble /obj/effect/mine/dnascramble/explode(var/mob/living/M) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() triggered = 1 s.set_up(3, 1, src) s.start() @@ -145,7 +144,7 @@ /obj/effect/mine/stun/explode(var/mob/living/M) triggered = 1 - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() s.set_up(3, 1, src) s.start() if(istype(M)) @@ -184,7 +183,7 @@ mineitemtype = /obj/item/weapon/mine/kick /obj/effect/mine/kick/explode(var/mob/living/M) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() triggered = 1 s.set_up(3, 1, src) s.start() @@ -205,7 +204,7 @@ var/spread_range = 7 /obj/effect/mine/frag/explode(var/mob/living/M) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() triggered = 1 s.set_up(3, 1, src) s.start() @@ -234,7 +233,7 @@ mineitemtype = /obj/item/weapon/mine/emp /obj/effect/mine/emp/explode(var/mob/living/M) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() s.set_up(3, 1, src) s.start() visible_message("\The [src.name] flashes violently before disintegrating!") @@ -250,7 +249,7 @@ /obj/effect/mine/incendiary/explode(var/mob/living/M) triggered = 1 - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() s.set_up(3, 1, src) s.start() if(istype(M)) @@ -264,7 +263,7 @@ mineitemtype = /obj/item/weapon/mine/gadget /obj/effect/mine/gadget/explode(var/mob/living/M) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() triggered = 1 s.set_up(3, 1, src) s.start() @@ -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, "You begin removing \the [trap].") if(do_after(user, 10 SECONDS)) to_chat(user, "You finish disconnecting the mine's trigger.") diff --git a/code/game/objects/effects/prop/columnblast.dm b/code/game/objects/effects/prop/columnblast.dm index e8397bf99b..9841b3278e 100644 --- a/code/game/objects/effects/prop/columnblast.dm +++ b/code/game/objects/effects/prop/columnblast.dm @@ -27,7 +27,7 @@ /obj/effect/temporary_effect/eruption/testing/on_eruption(var/turf/Target) if(Target) - new /obj/effect/explosion(Target) + new /obj/effect/vfx/explosion(Target) return TRUE /* diff --git a/code/game/objects/effects/spawners/gibs.dm b/code/game/objects/effects/spawners/gibs.dm new file mode 100644 index 0000000000..5d6e65bbf1 --- /dev/null +++ b/code/game/objects/effects/spawners/gibs.dm @@ -0,0 +1,80 @@ +/proc/gibs(atom/location, var/datum/dna/MobDNA, gibber_type = /obj/effect/spawner/gibs/generic, var/fleshcolor, var/bloodcolor) + new gibber_type(location,MobDNA,fleshcolor,bloodcolor) + +/obj/effect/spawner/gibs + var/sparks = 0 //whether sparks spread on Gib() + var/list/gibtypes = list() + var/list/gibamounts = list() + var/list/gibdirections = list() //of lists + var/fleshcolor //Used for gibbed humans. + var/bloodcolor //Used for gibbed humans. + +/obj/effect/spawner/gibs/New(location, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor) + ..() + + if(fleshcolor) src.fleshcolor = fleshcolor + if(bloodcolor) src.bloodcolor = bloodcolor + + if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len) + to_world("Gib list length mismatch!") + return + + var/obj/effect/decal/cleanable/blood/gibs/gib = null + + if(sparks) + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() + s.set_up(2, 1, get_turf(loc)) // Not sure if it's safe to pass an arbitrary object to set_up, todo + s.start() + + for(var/i = 1, i<= gibtypes.len, i++) + if(gibamounts[i]) + for(var/j = 1, j<= gibamounts[i], j++) + var/gibType = gibtypes[i] + gib = new gibType(loc) + + // Apply human species colouration to masks. + if(fleshcolor) + gib.fleshcolor = fleshcolor + if(bloodcolor) + gib.basecolor = bloodcolor + + gib.update_icon() + + gib.blood_DNA = list() + if(MobDNA) + gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type + else if(istype(src, /obj/effect/spawner/gibs/human)) // Probably a monkey + gib.blood_DNA["Non-human DNA"] = "A+" + if(isturf(loc)) + var/list/directions = gibdirections[i] + if(directions.len) + gib.streak(directions) + + return INITIALIZE_HINT_QDEL + +/obj/effect/spawner/gibs/generic + gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core) + gibamounts = list(2,2,1) + +/obj/effect/spawner/gibs/generic/New() + gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list()) + ..() + +/obj/effect/spawner/gibs/human + gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core) + gibamounts = list(1,1,1,1,1,1,1) + +/obj/effect/spawner/gibs/human/New() + gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list()) + gibamounts[6] = pick(0,1,2) + ..() + +/obj/effect/spawner/gibs/robot + sparks = 1 + gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb) + gibamounts = list(1,1,1,1,1,1) + +/obj/effect/spawner/gibs/robot/New() + gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs) + gibamounts[6] = pick(0,1,2) + ..() \ No newline at end of file diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm deleted file mode 100644 index 0db3bd5414..0000000000 --- a/code/game/objects/effects/spawners/gibspawner.dm +++ /dev/null @@ -1,26 +0,0 @@ -/obj/effect/gibspawner/generic - gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core) - gibamounts = list(2,2,1) - -/obj/effect/gibspawner/generic/Initialize() - gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list()) - . = ..() - -/obj/effect/gibspawner/human - gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core) - gibamounts = list(1,1,1,1,1,1,1) - -/obj/effect/gibspawner/human/Initialize() - gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list()) - gibamounts[6] = pick(0,1,2) - . = ..() - -/obj/effect/gibspawner/robot - sparks = 1 - gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb) - gibamounts = list(1,1,1,1,1,1) - -/obj/effect/gibspawner/robot/Initialize() - gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs) - gibamounts[6] = pick(0,1,2) - . = ..() \ No newline at end of file diff --git a/code/game/objects/effects/spawners/graffiti.dm b/code/game/objects/effects/spawners/graffiti.dm index afac11f4f1..8e7de164c2 100644 --- a/code/game/objects/effects/spawners/graffiti.dm +++ b/code/game/objects/effects/spawners/graffiti.dm @@ -1,4 +1,4 @@ -/obj/effect/graffitispawner +/obj/effect/spawner/graffiti name = "old scrawling" icon = 'icons/effects/map_effects.dmi' icon_state = "graffiti" @@ -8,7 +8,7 @@ // If the effect's color is not set, it will be chosen at random. var/color_secondary // The hexcode for the desired secondary color of your graffiti. If blank, it will inherit this effect's color. -/obj/effect/graffitispawner/Initialize() +/obj/effect/spawner/graffiti/Initialize() ..() if(!color) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 659db0ca01..afa536d38f 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -64,8 +64,8 @@ defer_powernet_rebuild = 1 if(heavy_impact_range > 1) - var/datum/effect/system/explosion/E = new/datum/effect/system/explosion() - E.set_up(epicenter) + var/datum/effect_system/explosion/E = new/datum/effect_system/explosion() + E.set_up(loc=epicenter) E.start() var/x0 = epicenter.x diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 165d261080..ed770e631c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -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. diff --git a/code/game/objects/items/antag_spawners.dm b/code/game/objects/items/antag_spawners.dm index ac63282303..c5d9528502 100644 --- a/code/game/objects/items/antag_spawners.dm +++ b/code/game/objects/items/antag_spawners.dm @@ -3,11 +3,11 @@ var/used = 0 var/ghost_query_type = null var/searching = FALSE - var/datum/effect/effect/system/spark_spread/sparks + var/datum/effect_system/spark_spread/sparks /obj/item/weapon/antag_spawner/Initialize() . = ..() - sparks = new /datum/effect/effect/system/spark_spread() + sparks = new /datum/effect_system/spark_spread() sparks.set_up(5, 0, src) sparks.attach(loc) diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm index e9219957e4..1af158be10 100644 --- a/code/game/objects/items/bells.dm +++ b/code/game/objects/items/bells.dm @@ -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, "You dissasemble the desk bell") diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 970613bc5b..3b41cb299f 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -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,"The injector cannot be removed now that the stasis bag has been used!") diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 09cee5bb4c..2242a74fad 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -65,7 +65,7 @@ /obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1) if(active_dummy) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) spark_system.start() diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index eeaf734566..f00271fee8 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -97,7 +97,7 @@ to_chat(user, "You install a cell in \the [src].") 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)) diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 0801e0da5b..722076a0be 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -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, "\The [src] is already being repaired!") return user.visible_message("\The [user] starts trying to repair \the [src]'s bulb.") 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("\The [user] successfully repairs \the [src]!") broken = FALSE diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm index a550d608e1..68ce0ed6a0 100644 --- a/code/game/objects/items/devices/hacktool.dm +++ b/code/game/objects/items/devices/hacktool.dm @@ -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 diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 8b6d472c58..2facc57a3c 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -54,7 +54,7 @@ else to_chat(user, "[src] already has a diode.") - else if(W.is_screwdriver()) + else if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(diode) to_chat(user, "You remove the [diode.name] from the [src].") diode.loc = get_turf(src.loc) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 86602094c1..0bbfc5bdfa 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -153,7 +153,7 @@ else user.audible_message("*BZZZZzzzzzt*") if(prob(40) && insults <= 0) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, get_turf(user)) s.start() user.visible_message("\The [src] sparks violently!") diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 72552b4de9..cf60227545 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -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,"\The [src] is now set to [toolmode].") 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) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 1fd6711092..c679177869 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -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("\The [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\The [src] bleeps electronically.", 2) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index db601a2d93..36cb9776a6 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -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()) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index e63979bdde..fb65595fa7 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -96,7 +96,7 @@ if(M) M.moved_recently = 0 to_chat(M, "You feel a sharp shock!") - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, M) s.start() diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 58e8100204..88075cf096 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -334,33 +334,20 @@ 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 = null - - + keyslot1.forceMove(get_turf(user)) + keyslot1 = null if(keyslot2) - var/turf/T = get_turf(user) - if(T) - keyslot2.loc = T - keyslot2 = null + keyslot2.forceMove(get_turf(user)) + keyslot2 = null recalculateChannels() to_chat(user, "You pop out the encryption keys in the headset!") @@ -368,26 +355,25 @@ else to_chat(user, "This headset doesn't have any encryption keys! How useless...") + + return TRUE - if(istype(W, /obj/item/device/encryptionkey/)) - if(keyslot1 && keyslot2) - to_chat(user, "The headset can't hold another key!") - return - + 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 + return TRUE + + return ..() /obj/item/device/radio/headset/recalculateChannels(var/setDescription = 0) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 97dd933e3a..dcb8086912 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -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("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].") playsound(src, W.usesound, 50, 1) new/obj/item/stack/cable_coil(get_turf(src), 5) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 444c80c94a..aca1ba09d2 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -606,21 +606,18 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) . += "\The [src] can not be modified or attached!" /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("\The [src] can now be attached and modified!") - else - user.show_message("\The [src] can no longer be modified or attached!") - updateDialog() - //Foreach goto(83) - add_fingerprint(user) - return - else return + add_fingerprint(user) + 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,25 +655,16 @@ 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 = null + keyslot.forceMove(get_turf(user)) + keyslot = null recalculateChannels() to_chat(user, "You pop out the encryption key in the radio!") @@ -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() diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index d28ebc71f4..1176de17eb 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -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 = "" diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index d3436ba4c5..ab51cdf2fc 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -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 diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index e378a16a8a..6a2c7b4829 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -144,7 +144,7 @@ to_chat(user, "You switch \the [src] [on ? "on" : "off"].") /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.") diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 011a3338d6..55bbb1b082 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -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, "You start winding the tape back in...") 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, "You wound the tape back in.") fix() return diff --git a/code/game/objects/items/poi_items.dm b/code/game/objects/items/poi_items.dm index fc7ac29466..fc412e5f18 100644 --- a/code/game/objects/items/poi_items.dm +++ b/code/game/objects/items/poi_items.dm @@ -66,6 +66,8 @@ catalogue_data = list(/datum/category_item/catalogue/information/objects/oldreactor) climbable = 0 door_anim_time = 0 //Unsupported + open_sound = 'sound/machines/door/hatchforced.ogg' + close_sound = 'sound/machines/door/hatchclose.ogg' starts_with = list( /obj/item/weapon/fuel_assembly/deuterium = 6) diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index a336326845..c5dc090e1b 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -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 << "Nothing to fix here." + to_chat(user, "Nothing to fix here.") 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) diff --git a/code/game/objects/items/toys/mech_toys.dm b/code/game/objects/items/toys/mech_toys.dm index a1f7d69815..a4ca595d6b 100644 --- a/code/game/objects/items/toys/mech_toys.dm +++ b/code/game/objects/items/toys/mech_toys.dm @@ -289,12 +289,12 @@ combat_health-- attacker.combat_health-- // This is sloppy but we don't have do_sparks. - var/datum/effect/effect/system/spark_spread/sparksrc = new(src) + var/datum/effect_system/spark_spread/sparksrc = new(src) playsound(src, "sparks", 50, 1) sparksrc.set_up(2, 0, src) sparksrc.attach(src) sparksrc.start() - var/datum/effect/effect/system/spark_spread/sparkatk = new(attacker) + var/datum/effect_system/spark_spread/sparkatk = new(attacker) playsound(attacker, "sparks", 50, 1) sparkatk.set_up(2, 0, attacker) sparkatk.attach(attacker) diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index 02e283deac..f6c4fc2c52 100644 --- a/code/game/objects/items/toys/toys.dm +++ b/code/game/objects/items/toys/toys.dm @@ -246,7 +246,7 @@ /obj/item/toy/snappop/throw_impact(atom/hit_atom) ..() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() new /obj/effect/decal/cleanable/ash(src.loc) @@ -262,7 +262,7 @@ if(M.m_intent == "run") to_chat(M, "You step on the snap pop!") - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 0, src) s.start() new /obj/effect/decal/cleanable/ash(src.loc) @@ -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 diff --git a/code/game/objects/items/uav.dm b/code/game/objects/items/uav.dm index 320b90a661..12cfb2ec24 100644 --- a/code/game/objects/items/uav.dm +++ b/code/game/objects/items/uav.dm @@ -19,7 +19,7 @@ var/power_per_process = 50 // About 6.5 minutes of use on a high-cell (10,000) var/state = UAV_OFF - var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/ion_trail_follow/ion_trail var/list/mob/living/masters @@ -47,7 +47,7 @@ if(!cell && cell_type) cell = new cell_type - ion_trail = new /datum/effect/effect/system/ion_trail_follow() + ion_trail = new /datum/effect_system/ion_trail_follow() ion_trail.set_up(src) ion_trail.stop() @@ -99,7 +99,7 @@ visible_message("[user] pairs [I] to [nickname]") 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, "You remove [cell] into [nickname].") playsound(src, I.usesound, 50, 1) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 4cff3bc517..1626827153 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -16,7 +16,8 @@ origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 2) matter = list(MAT_STEEL = 50000) preserve_item = TRUE // RCDs are pretty important. - var/datum/effect/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system + var/toolspeed = 1 var/stored_matter = 0 var/max_stored_matter = RCD_MAX_CAPACITY var/ranged = FALSE @@ -31,7 +32,7 @@ var/make_rwalls = FALSE // If true, when building walls, they will be reinforced. /obj/item/weapon/rcd/Initialize() - src.spark_system = new /datum/effect/effect/system/spark_spread + src.spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) return ..() diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index cd4e338abc..10af782f8d 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -24,7 +24,7 @@ throw_range = 5 w_class = ITEMSIZE_NORMAL matter = list(MAT_STEEL = 50000, MAT_GLASS = 25000) - var/datum/effect/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system var/p_dir = NORTH // Next pipe will be built with this dir var/p_flipped = FALSE // If the next pipe should be built flipped var/paint_color = "grey" // Pipe color index for next pipe painted/built. @@ -45,7 +45,7 @@ /obj/item/weapon/pipe_dispenser/Initialize() . = ..() - src.spark_system = new /datum/effect/effect/system/spark_spread + src.spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) tool = new /obj/item/weapon/tool/wrench/cyborg(src) // RPDs have wrenches inside of them, so that they can wrench down spawned pipes without being used as superior wrenches themselves. diff --git a/code/game/objects/items/weapons/augment_items.dm b/code/game/objects/items/weapons/augment_items.dm index c0df9c9688..d40db30c70 100644 --- a/code/game/objects/items/weapons/augment_items.dm +++ b/code/game/objects/items/weapons/augment_items.dm @@ -32,6 +32,6 @@ force = 30 armor_penetration = 15 edge = 1 - pry = 1 + tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_STANDARD) defend_chance = 40 projectile_parry_chance = 20 \ No newline at end of file diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index f0f5ba7830..74e5096eae 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -172,13 +172,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1) damtype = "fire" if(reagents.get_reagent_amount("phoron")) // the phoron explodes when exposed to fire - var/datum/effect/effect/system/reagents_explosion/e = new() + var/datum/effect_system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("phoron") / 2.5, 1), get_turf(src), 0, 0) e.start() qdel(src) return if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently - var/datum/effect/effect/system/reagents_explosion/e = new() + var/datum/effect_system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("fuel") / 5, 1), get_turf(src), 0, 0) e.start() qdel(src) diff --git a/code/game/objects/items/weapons/circuitboards/computer/research.dm b/code/game/objects/items/weapons/circuitboards/computer/research.dm index 791cd51cdc..58ff2a0b23 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/research.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/research.dm @@ -7,7 +7,7 @@ build_path = /obj/machinery/computer/rdconsole/core /obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, I.usesound, 50, 1) user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.") if(build_path == /obj/machinery/computer/rdconsole/core) diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm index 612047cc7c..4968e0f830 100644 --- a/code/game/objects/items/weapons/circuitboards/frame.dm +++ b/code/game/objects/items/weapons/circuitboards/frame.dm @@ -167,6 +167,7 @@ /obj/item/weapon/reagent_containers/glass/beaker/large = 1) /obj/item/weapon/circuitboard/distiller + name = T_BOARD("distillery") build_path = /obj/machinery/portable_atmospherics/powered/reagent_distillery board_type = new /datum/frame/frame_types/reagent_distillery req_components = list( @@ -178,7 +179,7 @@ /obj/item/weapon/circuitboard/teleporter_hub name = T_BOARD("teleporter hub") build_path = /obj/machinery/teleport/hub - board_type = "teleporter_hub" + board_type = new /datum/frame/frame_types/teleporter_hub // origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 4) req_components = list( /obj/item/weapon/stock_parts/scanning_module = 4, @@ -188,7 +189,7 @@ /obj/item/weapon/circuitboard/teleporter_station name = T_BOARD("teleporter station") build_path = /obj/machinery/teleport/station - board_type = "teleporter_station" + board_type = new /datum/frame/frame_types/teleporter_hub // origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 3) req_components = list( /obj/item/weapon/stock_parts/console_screen = 1, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm index 02dfbd6354..017dea03d1 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm @@ -12,7 +12,7 @@ /obj/item/weapon/stock_parts/scanning_module = 1) /obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, I.usesound, 50, 1) user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.") if(build_path == /obj/machinery/r_n_d/server/core) diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index f1f6e85bb3..75411925a8 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -29,14 +29,15 @@ return ..() /obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) open_panel = !open_panel to_chat(user, "You [open_panel ? "open" : "close"] the wire panel.") playsound(src, I.usesound, 50, 1) - else if(I.is_wirecutter() || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler )) + return TRUE + else if(I.get_tool_quality(TOOL_WIRECUTTER) || I.get_tool_quality(TOOL_MULTITOOL) || istype(I, /obj/item/device/assembly/signaler )) wires.Interact(user) - else - ..() + return TRUE + return ..() /obj/item/weapon/plastique/attack_self(mob/user as mob) var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 3c5cbbd158..19429d2715 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -107,7 +107,7 @@ spawn(0) if(!src || !reagents.total_volume) return - var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(src)) + var/obj/effect/vfx/water/W = new /obj/effect/vfx/water(get_turf(src)) var/turf/my_target if(a <= the_targets.len) my_target = the_targets[a] diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 60098a4f3f..94d1a25ebc 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -69,7 +69,7 @@ /obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob) if(user.stat || user.restrained() || user.lying) return - if(W.is_wrench() && !status)//Taking this apart + if(W.get_tool_quality(TOOL_WRENCH) && !status)//Taking this apart var/turf/T = get_turf(src) if(weldtool) weldtool.loc = T @@ -84,7 +84,7 @@ qdel(src) return - if(W.is_screwdriver() && igniter && !lit) + if(W.get_tool_quality(TOOL_SCREWDRIVER) && igniter && !lit) status = !status to_chat(user, "[igniter] is now [status ? "secured" : "unsecured"]!") update_icon() diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 862453693c..8d40f73536 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -49,7 +49,7 @@ /obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if (!W.is_wirecutter()) + if (!W.get_tool_quality(TOOL_WIRECUTTER)) to_chat(user, "I need wirecutters for that.") return @@ -135,7 +135,7 @@ to_chat(user, "You MUST put the paper on a table!") if (W.w_class < ITEMSIZE_LARGE) var/obj/item/I = user.get_inactive_hand() - if(I.is_wirecutter()) + if(I.get_tool_quality(TOOL_WIRECUTTER)) var/a_used = 2 ** (src.w_class - 1) if (src.amount < a_used) to_chat(user, "You need more paper!") diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index cb3184a7f6..6ddce6af21 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -76,7 +76,7 @@ icon_state = initial(icon_state) +"_ass" name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]" stage = 1 - else if(W.is_screwdriver() && path != 2) + else if(W.get_tool_quality(TOOL_SCREWDRIVER) && path != 2) if(stage == 1) path = 1 if(beakers.len) @@ -170,7 +170,7 @@ G.reagents.trans_to_obj(src, G.reagents.total_volume) if(src.reagents.total_volume) //The possible reactions didnt use up all reagents. - var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() + var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() steam.set_up(10, 0, get_turf(src)) steam.attach(src) steam.start() diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 98ebb2579d..f011741607 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -22,8 +22,8 @@ damage *= B.overmind.blob_type.burn_multiplier B.adjust_integrity(-damage) - new /obj/effect/effect/sparks(src.loc) - new /obj/effect/effect/smoke/illumination(src.loc, 5, 30, 30, "#FFFFFF") + new /obj/effect/vfx/sparks(src.loc) + new /obj/effect/vfx/smoke/illumination(src.loc, 5, 30, 30, "#FFFFFF") qdel(src) diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 209e47b253..159af97c80 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -90,7 +90,7 @@ /obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) switch(det_time) if (1) det_time = 10 diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index c1c67b4d38..51ec50d182 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -6,13 +6,13 @@ det_time = 20 item_state = "flashbang" slot_flags = SLOT_BELT - var/datum/effect/effect/system/smoke_spread/bad/smoke + var/datum/effect_system/smoke_spread/bad/smoke var/smoke_color var/smoke_strength = 8 /obj/item/weapon/grenade/smokebomb/Initialize() . = ..() - src.smoke = new /datum/effect/effect/system/smoke_spread/bad() + src.smoke = new /datum/effect_system/smoke_spread/bad() src.smoke.attach(src) /obj/item/weapon/grenade/smokebomb/Destroy() diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm index 033ad2c4b1..58919ea3b1 100644 --- a/code/game/objects/items/weapons/implants/implantcircuits.dm +++ b/code/game/objects/items/weapons/implants/implantcircuits.dm @@ -39,7 +39,7 @@ return IC.examine(user) /obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user) - if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) ) + if(O.get_tool_quality(TOOL_CROWBAR) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.get_tool_quality(TOOL_SCREWDRIVER) || istype(O, /obj/item/weapon/cell/device) ) IC.attackby(O, user) else ..() diff --git a/code/game/objects/items/weapons/improvised_components.dm b/code/game/objects/items/weapons/improvised_components.dm index 928a7c1a5d..922908f443 100644 --- a/code/game/objects/items/weapons/improvised_components.dm +++ b/code/game/objects/items/weapons/improvised_components.dm @@ -7,7 +7,7 @@ thrown_force_divisor = 0.1 /obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "You finish the concealed blade weapon.") playsound(src, W.usesound, 50, 1) new /obj/item/weapon/material/butterfly(user.loc, material.name) diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index d3c615e8fd..77bfd6a6b4 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -12,24 +12,24 @@ var/epitaph = "" //A quick little blurb /obj/item/weapon/material/gravemarker/attackby(obj/item/weapon/W, mob/user as mob) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN) if(carving_1) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") - if(do_after(user, material.hardness * W.toolspeed)) + if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER))) user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].") grave_name += carving_1 update_icon() var/carving_2 = sanitizeSafe(input(user, "What message should \the [src.name] have?", "Epitaph Carving", null) as text, MAX_NAME_LEN) if(carving_2) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") - if(do_after(user, material.hardness * W.toolspeed)) + if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER))) user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].") epitaph += carving_2 update_icon() - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") - if(do_after(user, material.hardness * W.toolspeed)) + if(do_after(user, material.hardness * W.get_tool_speed(TOOL_WRENCH))) material.place_dismantled_product(get_turf(src)) user.visible_message("[user] dismantles down \the [src.name].", "You dismantle \the [src.name].") qdel(src) diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index 08fbb4f348..69fceb008c 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -97,9 +97,11 @@ icon_state = "fork" sharp = TRUE edge = FALSE + tool_qualities = list(TOOL_SCREWDRIVER = TOOL_QUALITY_WORST) // Really bad, but in a pinch... /obj/item/weapon/material/kitchen/utensil/fork/plastic default_material = "plastic" + tool_qualities = list() /obj/item/weapon/material/kitchen/utensil/foon name = "foon" diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm index 17cf512927..f9d1af51a7 100644 --- a/code/game/objects/items/weapons/material/knives.dm +++ b/code/game/objects/items/weapons/material/knives.dm @@ -68,6 +68,7 @@ origin_tech = list(TECH_MATERIAL = 1) attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") drop_sound = 'sound/items/drop/knife.ogg' + tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR, TOOL_KNIFE = TOOL_QUALITY_STANDARD) // These no longer inherit from hatchets. /obj/item/weapon/material/knife/tacknife @@ -139,6 +140,8 @@ attack_verb = list("slashed", "chopped", "gouged", "ripped", "cut") can_cleave = TRUE //Now hatchets inherit from the machete, and thus knives. Tables turned. slot_flags = SLOT_BELT + tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_MEDIOCRE, TOOL_KNIFE = TOOL_QUALITY_STANDARD) + /obj/item/weapon/material/knife/machete/cyborg name = "integrated machete" @@ -152,4 +155,4 @@ icon_state = "survivalknife" item_state = "knife" applies_material_colour = FALSE - toolspeed = 2 // Use a real axe if you want to chop logs. + tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR) // Use a real axe if you want to chop logs. diff --git a/code/game/objects/items/weapons/material/material_armor.dm b/code/game/objects/items/weapons/material/material_armor.dm index fb9d4f05d1..3f094d9c61 100644 --- a/code/game/objects/items/weapons/material/material_armor.dm +++ b/code/game/objects/items/weapons/material/material_armor.dm @@ -124,7 +124,7 @@ Protectiveness | Armor % var/turf/picked = pick(turfs) if(!isturf(picked)) return - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/effects/teleport.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index ab65a03c97..d6a57a1dea 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -119,9 +119,8 @@ T.visible_message("\The [src] goes dull!") playsound(src, "shatter", 70, 1) dulled = 1 - if(is_sharp() || has_edge()) - sharp = 0 - edge = 0 + sharp = 0 + edge = 0 /obj/item/weapon/material/proc/repair(var/repair_amount, var/repair_time, mob/living/user) if(!fragile) diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm index d5adac0da0..0adf466903 100644 --- a/code/game/objects/items/weapons/material/misc.dm +++ b/code/game/objects/items/weapons/material/misc.dm @@ -23,6 +23,7 @@ applies_material_colour = 0 drop_sound = 'sound/items/drop/axe.ogg' pickup_sound = 'sound/items/pickup/axe.ogg' + tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_STANDARD, TOOL_KNIFE = TOOL_QUALITY_STANDARD) /obj/item/weapon/material/knife/machete/hatchet/stone name = "sharp rock" @@ -31,6 +32,7 @@ icon_state = "rock" item_state = "rock" attack_verb = list("chopped", "torn", "cut") + tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR, TOOL_KNIFE = TOOL_QUALITY_POOR) /obj/item/weapon/material/knife/machete/hatchet/stone/set_material(var/new_material) var/old_name = name @@ -44,6 +46,7 @@ attack_verb = list("ripped", "torn", "cut") can_cleave = FALSE var/hits = 0 + tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR, TOOL_KNIFE = TOOL_QUALITY_POOR) /obj/item/weapon/material/knife/machete/hatchet/unathiknife/attack(mob/M as mob, mob/user as mob) if(hits > 0) diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm index 5ca8091ab6..1d7bf340bd 100644 --- a/code/game/objects/items/weapons/material/twohanded.dm +++ b/code/game/objects/items/weapons/material/twohanded.dm @@ -105,13 +105,13 @@ var/mob/living/M = loc if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full()) wielded = 1 - pry = 1 + tool_qualities[TOOL_CROWBAR] = TOOL_QUALITY_DECENT force = force_wielded name = "[base_name] (wielded)" update_icon() else wielded = 0 - pry = 0 + tool_qualities[TOOL_CROWBAR] = TOOL_QUALITY_NONE force = force_unwielded name = "[base_name]" update_icon() diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 23db96d239..8634d5ac57 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -147,7 +147,7 @@ update_icon() else to_chat(user, "[src] already has a cell.") - else if(W.is_screwdriver() && bcell) + else if(W.get_tool_quality(TOOL_SCREWDRIVER) && bcell) bcell.update_icon() bcell.forceMove(get_turf(loc)) bcell = null @@ -302,7 +302,7 @@ if(active && default_parry_check(user, attacker, damage_source) && prob(60)) user.visible_message("\The [user] parries [attack_text] with \the [src]!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) @@ -310,7 +310,7 @@ if(active && unique_parry_check(user, attacker, damage_source) && prob(projectile_parry_chance)) user.visible_message("\The [user] deflects [attack_text] with \the [src]!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) @@ -430,14 +430,14 @@ flags = NOBLOODY attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") var/mob/living/creator - var/datum/effect/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system projectile_parry_chance = 60 lcolor = "#00FF00" /obj/item/weapon/melee/energy/blade/Initialize() . = ..() - spark_system = new /datum/effect/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) @@ -474,7 +474,7 @@ if(default_parry_check(user, attacker, damage_source) && prob(60)) user.visible_message("\The [user] parries [attack_text] with \the [src]!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) @@ -482,7 +482,7 @@ if(unique_parry_check(user, attacker, damage_source) && prob(projectile_parry_chance)) user.visible_message("\The [user] deflects [attack_text] with \the [src]!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) @@ -540,7 +540,7 @@ /obj/item/weapon/melee/energy/spear/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") if(active && default_parry_check(user, attacker, damage_source) && prob(50)) user.visible_message("\The [user] parries [attack_text] with \the [src]!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm index 0032123655..66879552dc 100644 --- a/code/game/objects/items/weapons/policetape.dm +++ b/code/game/objects/items/weapons/policetape.dm @@ -5,8 +5,6 @@ icon_state = "tape" w_class = ITEMSIZE_SMALL - toolspeed = 3 //You can use it in surgery. It's stupid, but you can. - var/turf/start var/turf/end var/tape_type = /obj/item/tape diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 8119de19e0..67afb09e67 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -57,7 +57,7 @@ if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf))))) return - var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() + var/datum/effect_system/smoke_spread/smoke = new /datum/effect_system/smoke_spread() smoke.set_up(5, 0, user.loc) smoke.attach(user) smoke.start() diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index e93e7ad2dd..3cbcb0f130 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -84,7 +84,7 @@ //to strong bullets and lasers. They still do fine to pistol rounds of all kinds, however. if(istype(damage_source, /obj/item/projectile)) var/obj/item/projectile/P = damage_source - if((is_sharp(P) && P.armor_penetration >= 10) || istype(P, /obj/item/projectile/beam)) + if((P.sharp && P.armor_penetration >= 10) || istype(P, /obj/item/projectile/beam)) //If we're at this point, the bullet/beam is going to go through the shield, however it will hit for less damage. //Bullets get slowed down, while beams are diffused as they hit the shield, so these shields are not /completely/ //useless. Extremely penetrating projectiles will go through the shield without less damage. @@ -141,7 +141,7 @@ . = ..() if(.) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) @@ -149,7 +149,7 @@ /obj/item/weapon/shield/energy/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null) if(istype(damage_source, /obj/item/projectile)) var/obj/item/projectile/P = damage_source - if((is_sharp(P) && damage > 10) || istype(P, /obj/item/projectile/beam)) + if((P.sharp && damage > 10) || istype(P, /obj/item/projectile/beam)) return (base_block_chance - round(damage / 3)) //block bullets and beams using the old block chance return base_block_chance diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 10a7407f0b..582acb3527 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -110,8 +110,8 @@ /obj/item/weapon/storage/belt/utility/chief/full starts_with = list( - /obj/item/weapon/tool/screwdriver/power, - /obj/item/weapon/tool/crowbar/power, + /obj/item/weapon/tool/powerdrill, + /obj/item/weapon/tool/hydraulic_cutter, /obj/item/weapon/weldingtool/experimental, /obj/item/device/multitool, /obj/item/stack/cable_coil/random_belt, diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index b3fbc758b3..9cb56f40c7 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -37,7 +37,7 @@ to_chat(user, "Access Denied") else if(istype(W, /obj/item/weapon/melee/energy/blade)) if(emag_act(INFINITY, user, W, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying.")) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 436b1da8c6..a9de35b444 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -36,15 +36,15 @@ /obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob) if(locked) if (istype(W, /obj/item/weapon/melee/energy/blade) && emag_act(INFINITY, user, "You slice through the lock of \the [src]")) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) playsound(src, "sparks", 50, 1) return - if (W.is_screwdriver()) - if (do_after(user, 20 * W.toolspeed)) + if (W.get_tool_quality(TOOL_SCREWDRIVER)) + if (do_after(user, 20 * W.get_tool_speed(TOOL_SCREWDRIVER))) src.open =! src.open playsound(src, W.usesound, 50, 1) user.show_message(text("You [] the service panel.", (src.open ? "open" : "close"))) diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index e62ac35ea8..22580b9e3b 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -86,9 +86,9 @@ /obj/item/weapon/storage/toolbox/syndicate/powertools starts_with = list( /obj/item/clothing/gloves/yellow, - /obj/item/weapon/tool/screwdriver/power, + /obj/item/weapon/tool/powerdrill, /obj/item/weapon/weldingtool/experimental, - /obj/item/weapon/tool/crowbar/power, + /obj/item/weapon/tool/hydraulic_cutter, /obj/item/device/multitool, /obj/item/stack/cable_coil/random_belt, /obj/item/device/analyzer diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 324fb93dd8..261e222a34 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -328,7 +328,7 @@ description_antag = "This case will likely contain a charged fuel rod gun, and a few fuel rods to go with it. It can only hold the fuel rod gun, fuel rods, batteries, a screwdriver, and stock machine parts." force = 12 //Anti-rad lined i.e. Lead, probably gonna hurt a bit if you get bashed with it. can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/tool/screwdriver) - cant_hold = list(/obj/item/weapon/tool/screwdriver/power) + cant_hold = list(/obj/item/weapon/tool/powerdrill) starts_with = list( /obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly/deuterium, diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index c92f122547..bc58288afc 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -38,7 +38,7 @@ /obj/item/clothing/accessory/badge, /obj/item/weapon/makeover ) - cant_hold = list(/obj/item/weapon/tool/screwdriver/power) + cant_hold = list(/obj/item/weapon/tool/powerdrill) slot_flags = SLOT_ID var/obj/item/weapon/card/id/front_id = null diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 31c260c730..4e540d29e3 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -33,6 +33,7 @@ matter = list(MAT_STEEL = 10000, "glass" = 5000) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) drop_sound = 'sound/items/drop/scrap.ogg' + tool_qualities = list(TOOL_RETRACTOR = TOOL_QUALITY_STANDARD) /* * Hemostat @@ -45,6 +46,7 @@ origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("attacked", "pinched") drop_sound = 'sound/items/drop/scrap.ogg' + tool_qualities = list(TOOL_HEMOSTAT = TOOL_QUALITY_STANDARD) /* * Cautery @@ -57,6 +59,7 @@ origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("burnt") drop_sound = 'sound/items/drop/scrap.ogg' + tool_qualities = list(TOOL_CAUTERY = TOOL_QUALITY_STANDARD) /* * Surgical Drill @@ -72,6 +75,7 @@ origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("drilled") drop_sound = 'sound/items/drop/accessory.ogg' + tool_qualities = list(TOOL_SDRILL = TOOL_QUALITY_STANDARD) /* * Scalpel @@ -92,6 +96,7 @@ matter = list(MAT_STEEL = 10000, "glass" = 5000) attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") drop_sound = 'sound/items/drop/knife.ogg' + tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_STANDARD) /* * Researchable Scalpels @@ -101,6 +106,7 @@ desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks basic and could be improved." icon_state = "scalpel_laser1_on" damtype = "fire" + tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/scalpel/laser2 name = "laser scalpel" @@ -108,6 +114,7 @@ icon_state = "scalpel_laser2_on" damtype = "fire" force = 12.0 + tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_GOOD) /obj/item/weapon/surgical/scalpel/laser3 name = "laser scalpel" @@ -115,12 +122,9 @@ icon_state = "scalpel_laser3_on" damtype = "fire" force = 15.0 + tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_BEST) + -/obj/item/weapon/surgical/scalpel/manager - name = "incision management system" - desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps." - icon_state = "scalpel_manager_on" - force = 7.5 /obj/item/weapon/surgical/scalpel/ripper name = "organ pincers" @@ -128,9 +132,25 @@ icon_state = "organ_ripper" item_state = "bone_setter" force = 15.0 - toolspeed = 0.75 + tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT) origin_tech = list(TECH_MATERIAL = 5, TECH_BIO = 3, TECH_ILLEGAL = 2) +/* + * Incision management: + * Circ saw, scalpel, retractor, and hemostat + */ +/obj/item/weapon/surgical/manager + name = "incision management system" + desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps." + icon_state = "scalpel_manager_on" + force = 7.5 + tool_qualities = list( + TOOL_SCALPEL = TOOL_QUALITY_GOOD, + TOOL_CSAW = TOOL_QUALITY_GOOD, + TOOL_RETRACTOR = TOOL_QUALITY_GOOD, + TOOL_HEMOSTAT = TOOL_QUALITY_GOOD + ) + /* * Circular Saw */ @@ -150,6 +170,7 @@ attack_verb = list("attacked", "slashed", "sawed", "cut") sharp = 1 edge = 1 + tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_STANDARD) /obj/item/weapon/surgical/circular_saw/manager name = "energetic bone diverter" @@ -162,7 +183,7 @@ origin_tech = list(TECH_BIO = 4, TECH_MATERIAL = 6, TECH_MAGNET = 6) matter = list(MAT_STEEL = 12500) attack_verb = list("attacked", "slashed", "seared", "cut") - toolspeed = 0.75 + tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_GOOD) //misc, formerly from code/defines/weapons.dm /obj/item/weapon/surgical/bonegel @@ -172,6 +193,7 @@ force = 0 throwforce = 1.0 drop_sound = 'sound/items/drop/bottle.ogg' + tool_qualities = list(TOOL_BONEGEL = TOOL_QUALITY_STANDARD) /obj/item/weapon/surgical/FixOVein name = "FixOVein" @@ -182,6 +204,7 @@ origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 3) var/usage_amount = 10 drop_sound = 'sound/items/drop/accessory.ogg' + tool_qualities = list(TOOL_FIXVEIN = TOOL_QUALITY_STANDARD) /obj/item/weapon/surgical/bonesetter name = "bone setter" @@ -193,6 +216,7 @@ throw_range = 5 attack_verb = list("attacked", "hit", "bludgeoned") drop_sound = 'sound/items/drop/scrap.ogg' + tool_qualities = list(TOOL_BONESET = TOOL_QUALITY_STANDARD) /obj/item/weapon/surgical/bone_clamp name = "bone clamp" @@ -203,66 +227,68 @@ throw_speed = 3 throw_range = 5 attack_verb = list("attacked", "hit", "bludgeoned") + tool_qualities = list(TOOL_BONECLAMP = TOOL_QUALITY_STANDARD) // Cyborg Tools /obj/item/weapon/surgical/retractor/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_RETRACTOR = TOOL_QUALITY_DECENT) + /obj/item/weapon/surgical/hemostat/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_HEMOSTAT = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/cautery/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_CAUTERY = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/surgicaldrill/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_SDRILL = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/scalpel/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/circular_saw/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/bonegel/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_BONEGEL = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/FixOVein/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_FIXVEIN = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/bonesetter/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_BONESET = TOOL_QUALITY_DECENT) // Alien Tools /obj/item/weapon/surgical/retractor/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.25 + tool_qualities = list(TOOL_RETRACTOR = TOOL_QUALITY_GOOD) /obj/item/weapon/surgical/hemostat/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.25 + tool_qualities = list(TOOL_HEMOSTAT = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/cautery/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.25 + tool_qualities = list(TOOL_CAUTERY = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/surgicaldrill/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.25 + tool_qualities = list(TOOL_SDRILL = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/scalpel/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.25 + tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/circular_saw/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.25 + tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/FixOVein/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.25 + tool_qualities = list(TOOL_FIXVEIN = TOOL_QUALITY_DECENT) /obj/item/weapon/surgical/bone_clamp/alien icon = 'icons/obj/abductor.dmi' - toolspeed = 0.75 + tool_qualities = list(TOOL_BONECLAMP = TOOL_QUALITY_DECENT) diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index c88f2ada6a..6f8b0b8640 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -107,7 +107,7 @@ /obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) detonator_mode = !detonator_mode playsound(src, W.usesound, 50, 1) to_chat(user, "You unscrew the top panel of \the [src] revealing a button.") diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index a07f9ddaf2..bc8b4751ba 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -12,7 +12,7 @@ ) item_state_slots = list(slot_r_hand_str = "jetpack", slot_l_hand_str = "jetpack") distribute_pressure = ONE_ATMOSPHERE*O2STANDARD - var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/ion_trail_follow/ion_trail var/on = 0.0 var/stabilization_on = 0 var/volume_rate = 500 //Needed for borg jetpack transfer @@ -20,7 +20,7 @@ /obj/item/weapon/tank/jetpack/Initialize() . = ..() - ion_trail = new /datum/effect/effect/system/ion_trail_follow() + ion_trail = new /datum/effect_system/ion_trail_follow() ion_trail.set_up(src) /obj/item/weapon/tank/jetpack/Destroy() diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index d19539f29a..af2414da00 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -133,7 +133,7 @@ var/list/global/tank_gauge_cache = list() to_chat(user, "You attach the wires to the tank.") src.add_bomb_overlay() - if(W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WIRECUTTER)) if(wired && src.proxyassembly.assembly) to_chat(user, "You carefully begin clipping the wires that attach to the tank.") diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index b8a9c87416..a745905fe2 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -7,8 +7,6 @@ drop_sound = 'sound/items/drop/cardboardbox.ogg' pickup_sound = 'sound/items/pickup/cardboardbox.ogg' - toolspeed = 2 //It is now used in surgery as a not awful, but probably dangerous option, due to speed. - /obj/item/weapon/tape_roll/proc/can_place(var/mob/living/carbon/human/H, var/mob/user) if(istype(user, /mob/living/silicon/robot) || user == H) return TRUE @@ -16,7 +14,6 @@ for (var/obj/item/weapon/grab/G in H.grabbed_by) if (G.loc == user && G.state >= GRAB_AGGRESSIVE) return TRUE - return FALSE /obj/item/weapon/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user) diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index b6af04f1d8..f765eeef0f 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -244,7 +244,7 @@ var/inc_damage = W.force - if(W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WIRECUTTER)) if(!shock(user, 100, pick(BP_L_HAND, BP_R_HAND))) playsound(src, W.usesound, 100, 1) inc_damage *= 3 @@ -317,7 +317,7 @@ var/mob/living/L = user L.electrocute_act(PN_damage, src, 0.8) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if(user.stunned) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 9442f762e5..fee3cf829b 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -10,7 +10,6 @@ var/catchable = 1 // can it be caught on throws/flying? var/sharp = 0 // whether this object cuts var/edge = 0 // whether this object is more likely to dismember - var/pry = 0 //Used in attackby() to open doors var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! var/damtype = "brute" var/armor_penetration = 0 diff --git a/code/game/objects/random/misc.dm b/code/game/objects/random/misc.dm index b347dcd021..21179e8af6 100644 --- a/code/game/objects/random/misc.dm +++ b/code/game/objects/random/misc.dm @@ -25,8 +25,8 @@ /obj/random/tool/powermaint/item_to_spawn() return pick(prob(320);/obj/random/tool, - prob(1);/obj/item/weapon/tool/screwdriver/power, - prob(1);/obj/item/weapon/tool/wirecutters/power, + prob(1);/obj/item/weapon/tool/powerdrill, + prob(1);/obj/item/weapon/tool/hydraulic_cutter, prob(15);/obj/item/weapon/weldingtool/electric, prob(5);/obj/item/weapon/weldingtool/experimental) @@ -36,8 +36,8 @@ icon_state = "tool_2" /obj/random/tool/power/item_to_spawn() - return pick(/obj/item/weapon/tool/screwdriver/power, - /obj/item/weapon/tool/wirecutters/power, + return pick(/obj/item/weapon/tool/powerdrill, + /obj/item/weapon/tool/hydraulic_cutter, /obj/item/weapon/weldingtool/electric, /obj/item/weapon/weldingtool/experimental) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 29498bb2df..bcfa245521 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -29,7 +29,7 @@ LINEN BINS return /obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user) - if(is_sharp(I)) + if(I.sharp) user.visible_message("\The [user] begins cutting up [src] with [I].", "You begin cutting up [src] with [I].") if(do_after(user, 50)) to_chat(user, "You cut [src] into pieces!") diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm index 147a5dc38f..9ee69a6121 100644 --- a/code/game/objects/structures/catwalk.dm +++ b/code/game/objects/structures/catwalk.dm @@ -83,7 +83,7 @@ if(WT.isOn() && WT.remove_fuel(0, user)) deconstruct(user) return - if(C.is_crowbar() && plated_tile) + if(C.get_tool_quality(TOOL_CROWBAR) && plated_tile) hatch_open = !hatch_open if(hatch_open) playsound(src, 'sound/items/Crowbar.ogg', 100, 2) diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm index 96cd5bacf3..657d950b00 100644 --- a/code/game/objects/structures/crates_lockers/__closets.dm +++ b/code/game/objects/structures/crates_lockers/__closets.dm @@ -23,8 +23,8 @@ //then open it in a populated area to crash clients. var/storage_cost = 40 //How much space this closet takes up if it's stuffed in another closet - var/open_sound = 'sound/machines/click.ogg' - var/close_sound = 'sound/machines/click.ogg' + var/open_sound = 'sound/machines/closet/closet_open.ogg' + var/close_sound = 'sound/machines/closet/closet_close.ogg' var/store_misc = 1 //Chameleon item check var/store_items = 1 //Will the closet store items? @@ -277,13 +277,13 @@ return /obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) if(opened) if(anchored) user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") else user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") - if(do_after(user, 20 * W.toolspeed)) + if(do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH))) if(!src) return to_chat(user, "You [anchored? "un" : ""]secured \the [src]!") anchored = !anchored @@ -332,7 +332,7 @@ else if(seal_tool) if(istype(W, seal_tool)) var/obj/item/weapon/S = W - if(istype(S, /obj/item/weapon/weldingtool)) + if(S.get_tool_quality(TOOL_WELDER)) var/obj/item/weapon/weldingtool/WT = S if(!WT.remove_fuel(0,user)) if(!WT.isOn()) @@ -340,7 +340,7 @@ else to_chat(user, "You need more welding fuel to complete this task.") return - if(do_after(user, 20 * S.toolspeed)) + if(do_after(user, 20 * S.get_tool_speed(TOOL_WELDER))) playsound(src, S.usesound, 50) sealed = !sealed update_icon() diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm index ce1e7cfe5e..352c5370c2 100644 --- a/code/game/objects/structures/crates_lockers/closets/coffin.dm +++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm @@ -6,6 +6,8 @@ icon_state = "closed_unlocked" seal_tool = /obj/item/weapon/tool/screwdriver breakout_sound = 'sound/weapons/tablehit1.ogg' + open_sound = 'sound/machines/closet/crate_open.ogg' + close_sound = 'sound/machines/closet/crate_close.ogg' closet_appearance = null // Special icon for us door_anim_time = 0 //Unsupported @@ -68,11 +70,11 @@ /obj/structure/closet/grave/attackby(obj/item/weapon/W as obj, mob/user as mob) if(src.opened) - if(istype(W, /obj/item/weapon/shovel)) + if(W.get_tool_quality(TOOL_SHOVEL)) user.visible_message("[user] piles dirt into \the [src.name].", \ "You start to pile dirt into \the [src.name].", \ "You hear dirt being moved.") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL))) user.visible_message("[user] pats down the dirt on top of \the [src.name].", \ "You finish filling in \the [src.name].") close() @@ -104,12 +106,12 @@ if(W) W.forceMove(src.loc) else - if(istype(W, /obj/item/weapon/shovel)) + if(W.get_tool_quality(TOOL_SHOVEL)) if(user.a_intent == I_HURT) // Hurt intent means you're trying to kill someone, or just get rid of the grave user.visible_message("[user] begins to smoothe out the dirt of \the [src.name].", \ "You start to smoothe out the dirt of \the [src.name].", \ "You hear dirt being moved.") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL))) user.visible_message("[user] finishes smoothing out \the [src.name].", \ "You finish smoothing out \the [src.name].") if(LAZYLEN(contents)) @@ -125,7 +127,7 @@ user.visible_message("[user] begins to unearth \the [src.name].", \ "You start to unearth \the [src.name].", \ "You hear dirt being moved.") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL))) user.visible_message("[user] reaches the bottom of \the [src.name].", \ "You finish digging out \the [src.name].") break_open() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm index 52b949f809..3e4542b6f5 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm @@ -2,6 +2,8 @@ name = "booze closet" req_access = list(access_bar) closet_appearance = /decl/closet_appearance/cabinet/secure + open_sound = 'sound/machines/closet/closet_wood_open.ogg' + close_sound = 'sound/machines/closet/closet_wood_close.ogg' starts_with = list( /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer = 10) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index 46cb2409d9..24dcc4412f 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -200,6 +200,8 @@ desc = "Store psychology tools and medicines in here." req_access = list(access_psychiatrist) closet_appearance = /decl/closet_appearance/cabinet/secure + open_sound = 'sound/machines/closet/closet_wood_open.ogg' + close_sound = 'sound/machines/closet/closet_wood_close.ogg' starts_with = list( /obj/item/clothing/under/rank/psych, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index decec020e7..b3c37efb59 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -27,6 +27,8 @@ /obj/structure/closet/secure_closet/personal/cabinet closet_appearance = /decl/closet_appearance/cabinet/secure door_anim_time = 0 //Unsupported + open_sound = 'sound/machines/closet/closet_wood_open.ogg' + close_sound = 'sound/machines/closet/closet_wood_close.ogg' starts_with = list( /obj/item/weapon/storage/backpack/satchel/withwallet, @@ -58,7 +60,7 @@ to_chat(user, "Access Denied") else if(istype(W, /obj/item/weapon/melee/energy/blade)) if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying.")) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 9fae830b44..0e05e4ba0c 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -54,13 +54,13 @@ to_chat(user, "Access Denied") /obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) if(opened) if(anchored) user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") else user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") - if(do_after(user, 20 * W.toolspeed)) + if(do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH))) if(!src) return to_chat(user, "You [anchored? "un" : ""]secured \the [src]!") anchored = !anchored @@ -85,7 +85,7 @@ W.forceMove(loc) else if(istype(W, /obj/item/weapon/melee/energy/blade)) if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying.")) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index fe27bf6db6..9372d2ca98 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -224,6 +224,8 @@ req_access = list(access_forensics_lockers) closet_appearance = /decl/closet_appearance/cabinet/secure door_anim_time = 0 //Unsupported + open_sound = 'sound/machines/closet/closet_wood_open.ogg' + close_sound = 'sound/machines/closet/closet_wood_close.ogg' starts_with = list( /obj/item/clothing/accessory/badge/holo/detective, diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index 5eb36f6dc3..6f12e8e5fe 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -40,6 +40,8 @@ /obj/structure/closet/wardrobe/detective name = "detective wardrobe" closet_appearance = /decl/closet_appearance/cabinet + open_sound = 'sound/machines/closet/closet_wood_open.ogg' + close_sound = 'sound/machines/closet/closet_wood_close.ogg' starts_with = list( /obj/item/clothing/head/det = 2, @@ -441,6 +443,8 @@ /obj/structure/closet/wardrobe/captain name = "site manager's wardrobe" closet_appearance = /decl/closet_appearance/cabinet + open_sound = 'sound/machines/closet/closet_wood_open.ogg' + close_sound = 'sound/machines/closet/closet_wood_close.ogg' starts_with = list( /obj/item/weapon/storage/backpack/captain, diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 6edd67d2d2..69107824b2 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -8,6 +8,8 @@ climbable = 1 dir = 4 //Spawn facing 'forward' by default. door_anim_time = 0 //Unsupported until appropriate sprites are available + open_sound = 'sound/machines/closet/crate_open.ogg' + close_sound = 'sound/machines/closet/crate_close.ogg' var/points_per_crate = 5 var/rigged = 0 @@ -27,13 +29,13 @@ if(isliving(usr)) var/mob/living/L = usr if(L.electrocute_act(17, src)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(usr.stunned) return 2 - playsound(src, 'sound/machines/click.ogg', 15, 1, -3) + playsound(src, open_sound, 15, 1, -3) for(var/obj/O in src) O.forceMove(get_turf(src)) src.opened = 1 @@ -49,7 +51,7 @@ if(!src.can_close()) return 0 - playsound(src, 'sound/machines/click.ogg', 15, 1, -3) + playsound(src, close_sound, 15, 1, -3) var/itemcount = 0 for(var/obj/O in get_turf(src)) if(itemcount >= storage_capacity) @@ -113,7 +115,7 @@ user.drop_item() W.forceMove(src) return - else if(W.is_wirecutter()) + else if(W.get_tool_quality(TOOL_WIRECUTTER)) if(rigged) to_chat(user , "You cut away the wiring.") playsound(src, W.usesound, 100, 1) diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 3485b31505..e3846130df 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -25,7 +25,7 @@ var/turf/T = get_turf(src) if(!T) to_chat(user, "You can't open this here!") - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) new /obj/item/stack/material/wood(src) for(var/atom/movable/AM in contents) @@ -48,7 +48,7 @@ icon_state = "vehiclecrate" /obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) var/obj/item/mecha_parts/mecha_equipment/ME var/obj/mecha/working/hoverpod/H = new (loc) diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm index b98636eb16..f12fe71b9f 100644 --- a/code/game/objects/structures/crates_lockers/vehiclecage.dm +++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm @@ -31,11 +31,11 @@ var/turf/T = get_turf(src) if(!T) to_chat(user, "You can't open this here!") - if(W.is_wrench() && do_after(user, 60 * W.toolspeed, src)) + if(W.get_tool_quality(TOOL_WRENCH) && do_after(user, 60 * W.get_tool_speed(TOOL_WRENCH), src)) playsound(src, W.usesound, 50, 1) disassemble(W, user) user.visible_message("[user] begins loosening \the [src]'s bolts.") - if(W.is_wirecutter() && do_after(user, 70 * W.toolspeed, src)) + if(W.get_tool_quality(TOOL_WIRECUTTER) && do_after(user, 70 * W.get_tool_speed(TOOL_WIRECUTTER), src)) playsound(src, W.usesound, 50, 1) disassemble(W, user) user.visible_message("[user] begins cutting \the [src]'s bolts.") diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index 9de63fd3d0..20fa02e90d 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -38,7 +38,7 @@ layer = OBJ_LAYER /obj/structure/curtain/attackby(obj/item/P, mob/user) - if(P.is_wirecutter()) + if(P.get_tool_quality(TOOL_WIRECUTTER)) playsound(src, P.usesound, 50, 1) to_chat(user, "You start to cut the shower curtains.") if(do_after(user, 10)) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index f303878e02..888ed40b59 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -172,13 +172,13 @@ rename_door(user) return - if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) )) + if(W.get_tool_quality(TOOL_WELDER) && ( (istext(glass)) || (glass == 1) || (!anchored) )) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0, user)) playsound(src, WT.usesound, 50, 1) if(istext(glass)) user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.") - if(do_after(user, 40 * WT.toolspeed)) + if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return to_chat(user, "You welded the [glass] plating off!") var/M = text2path("/obj/item/stack/material/[glass]") @@ -186,14 +186,14 @@ glass = 0 else if(glass == 1) user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.") - if(do_after(user, 40 * WT.toolspeed)) + if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return to_chat(user, "You welded the glass panel out!") new /obj/item/stack/material/glass/reinforced(src.loc) glass = 0 else if(!anchored) user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.") - if(do_after(user, 40 * WT.toolspeed)) + if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return to_chat(user, "You dissasembled the airlock assembly!") new /obj/item/stack/material/steel(src.loc, 4) @@ -202,19 +202,19 @@ to_chat(user, "You need more welding fuel.") return - else if(W.is_wrench() && state == 0) + else if(W.get_tool_quality(TOOL_WRENCH) && state == 0) playsound(src, W.usesound, 100, 1) if(anchored) user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.") else user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH))) if(!src) return to_chat(user, "You [anchored? "un" : ""]secured the airlock assembly!") anchored = !anchored - else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored) + else if(W.get_tool_quality(TOOL_CABLE_COIL) && state == 0 && anchored) var/obj/item/stack/cable_coil/C = W if (C.get_amount() < 1) to_chat(user, "You need one length of coil to wire the airlock assembly.") @@ -225,11 +225,11 @@ src.state = 1 to_chat(user, "You wire the airlock.") - else if(W.is_wirecutter() && state == 1 ) + else if(W.get_tool_quality(TOOL_WIRECUTTER) && state == 1 ) playsound(src, W.usesound, 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_WIRECUTTER))) if(!src) return to_chat(user, "You cut the airlock wires.!") new/obj/item/stack/cable_coil(src.loc, 1) @@ -247,7 +247,7 @@ src.state = 2 src.electronics = W - else if(W.is_crowbar() && state == 2 ) + else if(W.get_tool_quality(TOOL_CROWBAR) && state == 2 ) //This should never happen, but just in case I guess if (!electronics) to_chat(user, "There was nothing to remove.") @@ -257,7 +257,7 @@ playsound(src, W.usesound, 100, 1) user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_CROWBAR))) if(!src) return to_chat(user, "You removed the airlock electronics!") src.state = 1 @@ -289,11 +289,11 @@ to_chat(user, "You installed [material_display_name(material_name)] plating into the airlock assembly.") glass = material_name - else if(W.is_screwdriver() && state == 2 ) + else if(W.get_tool_quality(TOOL_SCREWDRIVER) && state == 2 ) playsound(src, W.usesound, 100, 1) to_chat(user, "Now finishing the airlock.") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_SCREWDRIVER))) if(!src) return to_chat(user, "You finish the airlock!") var/path diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index 758b245f79..98c2eaadbd 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -12,7 +12,7 @@ return /obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc) playsound(src, W.usesound, 50, 1) C.set_dir(dir) @@ -61,7 +61,7 @@ A.updateicon() flick("echair1", src) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(12, 1, src) s.start() if(has_buckled_mobs()) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index c13c471d15..fb0c0818c8 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -29,11 +29,11 @@ to_chat(user, "You place [O] in [src].") else opened = !opened - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) if(!has_extinguisher) to_chat(user, "You start to unwrench the extinguisher cabinet.") playsound(src, O.usesound, 50, 1) - if(do_after(user, 15 * O.toolspeed)) + if(do_after(user, 15 * O.get_tool_speed(TOOL_WRENCH))) to_chat(user, "You unwrench the extinguisher cabinet.") new /obj/item/frame/extinguisher_cabinet( src.loc ) qdel(src) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index bf04da9870..b958dbfab6 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -69,7 +69,7 @@ return ..() /obj/structure/fence/attackby(obj/item/W, mob/user) - if(W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WIRECUTTER)) if(!cuttable) to_chat(user, span("warning", "This section of the fence can't be cut.")) return @@ -85,7 +85,7 @@ span("danger", "You start cutting through \the [src] with \the [W].")) playsound(src, W.usesound, 50, 1) - if(do_after(user, CUT_TIME * W.toolspeed, target = src)) + if(do_after(user, CUT_TIME * W.get_tool_speed(TOOL_WIRECUTTER), target = src)) if(current_stage == hole_size) switch(++hole_size) if(MEDIUM_HOLE) diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index f584fd8838..ae3133d278 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -30,10 +30,10 @@ // hasaxe = 1 if (isrobot(user) || locked) - if(istype(O, /obj/item/device/multitool)) + if(O.get_tool_quality(TOOL_MULTITOOL)) to_chat(user, "Resetting circuitry...") playsound(src, 'sound/machines/lockreset.ogg', 50, 1) - if(do_after(user, 20 * O.toolspeed)) + if(do_after(user, 20 * O.get_tool_speed(TOOL_MULTITOOL))) locked = 0 to_chat(user, " You disable the locking modules.") update_icon() @@ -75,7 +75,7 @@ else if(smashed) return - if(istype(O, /obj/item/device/multitool)) + if(O.get_tool_quality(TOOL_MULTITOOL)) if(open) open = 0 update_icon() @@ -84,7 +84,7 @@ else to_chat(user, "Resetting circuitry...") playsound(src, 'sound/machines/lockenable.ogg', 50, 1) - if(do_after(user,20 * O.toolspeed)) + if(do_after(user,20 * O.get_tool_speed(TOOL_MULTITOOL))) locked = 1 to_chat(user, " You re-enable the locking modules.") return diff --git a/code/game/objects/structures/fitness.dm b/code/game/objects/structures/fitness.dm index 729e578ba5..2f6dd1da35 100644 --- a/code/game/objects/structures/fitness.dm +++ b/code/game/objects/structures/fitness.dm @@ -33,7 +33,7 @@ var/list/qualifiers = list("with ease", "without any trouble", "with great effort") /obj/structure/fitness/weightlifter/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) playsound(src, 'sound/items/Deconstruct.ogg', 75, 1) weight = ((weight) % qualifiers.len) + 1 to_chat(user, "You set the machine's weight level to [weight].") diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 79cbda65e4..090ce620a6 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -145,24 +145,24 @@ reinforce_girder() /obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob) - if(W.is_wrench() && state == 0) + if(W.get_tool_quality(TOOL_WRENCH) && state == 0) if(anchored && !reinf_material) playsound(src, W.usesound, 100, 1) to_chat(user, "Now disassembling the girder...") - if(do_after(user,(35 + round(max_health/50)) * W.toolspeed)) + if(do_after(user, (35 + round(max_health/50)) * W.get_tool_speed(TOOL_WRENCH))) if(!src) return to_chat(user, "You dissasembled the girder!") dismantle() else if(!anchored) playsound(src, W.usesound, 100, 1) to_chat(user, "Now securing the girder...") - if(do_after(user, 40 * W.toolspeed, src)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH), src)) to_chat(user, "You secured the girder!") reset_girder() else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) to_chat(user, "Now slicing apart the girder...") - if(do_after(user,30 * W.toolspeed)) + if(do_after(user, 30 * W.get_tool_speed(TOOL_WELDER))) // TODO: Welding tool usage checks if(!src) return to_chat(user, "You slice apart the girder!") dismantle() @@ -171,11 +171,11 @@ to_chat(user, "You drill through the girder!") dismantle() - else if(W.is_screwdriver()) + else if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(state == 2) playsound(src, W.usesound, 100, 1) to_chat(user, "Now unsecuring support struts...") - if(do_after(user,40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_SCREWDRIVER))) if(!src) return to_chat(user, "You unsecured the support struts!") state = 1 @@ -184,20 +184,20 @@ reinforcing = !reinforcing to_chat(user, "\The [src] can now be [reinforcing? "reinforced" : "constructed"]!") - else if(W.is_wirecutter() && state == 1) + else if(W.get_tool_quality(TOOL_WIRECUTTER) && state == 1) playsound(src, W.usesound, 100, 1) to_chat(user, "Now removing support struts...") - if(do_after(user,40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_WIRECUTTER))) if(!src) return to_chat(user, "You removed the support struts!") reinf_material.place_dismantled_product(get_turf(src)) reinf_material = null reset_girder() - else if(W.is_crowbar() && state == 0 && anchored) + else if(W.get_tool_quality(TOOL_CROWBAR) && state == 0 && anchored) playsound(src, W.usesound, 100, 1) to_chat(user, "Now dislodging the girder...") - if(do_after(user, 40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_CROWBAR))) if(!src) return to_chat(user, "You dislodged the girder!") displace() @@ -240,7 +240,7 @@ to_chat(user, "You begin adding the plating...") - if(!do_after(user,40) || !S.use(amount_to_use)) + if(!do_after(user, 40) || !S.use(amount_to_use)) return 1 //once we've gotten this far don't call parent attackby() if(anchored) @@ -274,7 +274,7 @@ return 0 to_chat(user, "Now reinforcing...") - if (!do_after(user,40) || !S.use(1)) + if (!do_after(user, 40) || !S.use(1)) return 1 //don't call parent attackby() past this point to_chat(user, "You added reinforcement!") @@ -338,16 +338,16 @@ qdel(src) /obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) playsound(src, W.usesound, 100, 1) to_chat(user, "Now disassembling the girder...") - if(do_after(user,40 * W.toolspeed)) + if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH))) to_chat(user, "You dissasembled the girder!") dismantle() else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) to_chat(user, "Now slicing apart the girder...") - if(do_after(user,30 * W.toolspeed)) + if(do_after(user, 30 * W.get_tool_speed(TOOL_WELDER))) // TODO: #8284 welding tool usage to_chat(user, "You slice apart the girder!") dismantle() diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index f6d88eb310..96e86a44de 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -51,25 +51,25 @@ return 1 /obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN) if(carving_1) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") - if(do_after(user, material.hardness * W.toolspeed)) + if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER))) user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].") grave_name += carving_1 update_icon() var/carving_2 = sanitizeSafe(input(user, "What message should \the [src.name] have?", "Epitaph Carving", null) as text, MAX_NAME_LEN) if(carving_2) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") - if(do_after(user, material.hardness * W.toolspeed)) + if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER))) user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].") epitaph += carving_2 update_icon() return - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].") - if(do_after(user, material.hardness * W.toolspeed)) + if(do_after(user, material.hardness * W.get_tool_speed(TOOL_WRENCH))) user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].") dismantle() ..() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index dcbea16776..0bb6c51825 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -94,12 +94,12 @@ return if(istype(W, /obj/item/weapon/rcd)) // To stop us from hitting the grille when building windows, because grilles don't let parent handle it properly. return FALSE - else if(W.is_wirecutter()) + else if(W.get_tool_quality(TOOL_WIRECUTTER)) if(!shock(user, 100)) playsound(src, W.usesound, 100, 1) new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2) qdel(src) - else if((W.is_screwdriver()) && (istype(loc, /turf/simulated) || anchored)) + else if((W.get_tool_quality(TOOL_SCREWDRIVER)) && (istype(loc, /turf/simulated) || anchored)) if(!shock(user, 90)) playsound(src, W.usesound, 100, 1) anchored = !anchored @@ -196,7 +196,7 @@ if(electrocute_mob(user, C, src)) if(C.powernet) C.powernet.trigger_warning() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() if(user.stunned) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 69347fb0aa..f964065bbd 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -50,7 +50,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) /obj/structure/janitorialcart/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/reagent_containers/glass/rag) || istype(I, /obj/item/weapon/soap)) - if (mybucket) + if(mybucket) if(I.reagents.total_volume < I.reagents.maximum_volume) if(mybucket.reagents.total_volume < 1) to_chat(user, "[mybucket] is empty!") @@ -62,47 +62,47 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) to_chat(user, "[I] can't absorb anymore liquid!") else to_chat(user, "There is no bucket mounted here to dip [I] into!") - return 1 + return TRUE else if (istype(I, /obj/item/weapon/reagent_containers/glass/bucket) && mybucket) I.afterattack(mybucket, usr, 1) update_icon() - return 1 + return TRUE else if(istype(I, /obj/item/weapon/reagent_containers/spray) && !myspray) - user.unEquip(I, 0, src) + user.drop_from_inventory(I, src) myspray = I update_icon() updateUsrDialog() to_chat(user, "You put [I] into [src].") - return 1 + return TRUE else if(istype(I, /obj/item/device/lightreplacer) && !myreplacer) - user.unEquip(I, 0, src) + user.drop_from_inventory(I, src) myreplacer = I update_icon() updateUsrDialog() to_chat(user, "You put [I] into [src].") - return 1 + return TRUE else if(istype(I, /obj/item/weapon/storage/bag/trash) && !mybag) - user.unEquip(I, 0, src) + user.drop_from_inventory(I, src) mybag = I update_icon() updateUsrDialog() to_chat(user, "You put [I] into [src].") - return 1 + return TRUE else if(istype(I, /obj/item/clothing/suit/caution)) if(signs < 4) - user.unEquip(I, 0, src) + user.drop_from_inventory(I, src) signs++ update_icon() updateUsrDialog() to_chat(user, "You put [I] into [src].") else to_chat(user, "[src] can't hold any more signs.") - return 1 + return TRUE else if(mybag) return mybag.attackby(I, user) @@ -110,12 +110,11 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) //This prevents dumb stuff like splashing the cart with the contents of a container, after putting said container into trash else if (!has_items) - if (I.is_wrench()) + if (I.get_tool_quality(TOOL_WRENCH)) if (do_after(user, 5 SECONDS, src)) dismantle(user) - return - ..() - + return TRUE + return ..() //New Altclick functionality! //Altclick the cart with a mop to stow the mop away diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index ab70e66c58..435de05c98 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -19,6 +19,7 @@ if(LAT != src) crash_with("Found multiple lattices at '[log_info_line(loc)]'") return INITIALIZE_HINT_QDEL + icon = 'icons/obj/smoothlattice.dmi' icon_state = "latticeblank" updateOverlays() diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index f6bdcca0b1..83439d7679 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -50,15 +50,15 @@ ..() /obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_wrench()) + if(I.get_tool_quality(TOOL_WRENCH)) if(!glass) playsound(src, I.usesound, 50, 1) - if(do_after(user, 20 * I.toolspeed)) + if(do_after(user, 20 * I.get_tool_speed(TOOL_WRENCH))) to_chat(user, "You unfasten the frame.") new /obj/item/frame/mirror( src.loc ) qdel(src) return - if(I.is_wrench()) + if(I.get_tool_quality(TOOL_WRENCH)) if(shattered && glass) to_chat(user, "The broken glass falls out.") icon_state = "mirror_frame" diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index e90f7392ee..0d929e3ee4 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -343,11 +343,11 @@ song.interact(user) /obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob) - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) if(anchored) playsound(src, O.usesound, 50, 1) to_chat(user, "You begin to loosen \the [src]'s casters...") - if (do_after(user, 40 * O.toolspeed)) + if (do_after(user, 40 * O.get_tool_speed(TOOL_WRENCH))) user.visible_message( \ "[user] loosens \the [src]'s casters.", \ "You have loosened \the [src]. Now it can be pulled somewhere else.", \ @@ -356,7 +356,7 @@ else playsound(src, O.usesound, 50, 1) to_chat(user, "You begin to tighten \the [src] to the floor...") - if (do_after(user, 20 * O.toolspeed)) + if (do_after(user, 20 * O.get_tool_speed(TOOL_WRENCH))) user.visible_message( \ "[user] tightens \the [src]'s casters.", \ "You have tightened \the [src]'s casters. Now it can be played again.", \ diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index d655581c92..ae173178f0 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -17,10 +17,10 @@ ) /obj/structure/plasticflaps/attackby(obj/item/P, mob/user) - if(P.is_wirecutter()) + if(P.get_tool_quality(TOOL_WIRECUTTER)) playsound(src, P.usesound, 50, 1) to_chat(user, "You start to cut the plastic flaps.") - if(do_after(user, 10 * P.toolspeed)) + if(do_after(user, 10 * P.get_tool_speed(TOOL_WIRECUTTER))) to_chat(user, "You cut the plastic flaps.") var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc ) A.amount = 4 diff --git a/code/game/objects/structures/props/puzzledoor.dm b/code/game/objects/structures/props/puzzledoor.dm index f5ec2fe7cb..05af02e984 100644 --- a/code/game/objects/structures/props/puzzledoor.dm +++ b/code/game/objects/structures/props/puzzledoor.dm @@ -61,7 +61,7 @@ /obj/machinery/door/blast/puzzle/attackby(obj/item/weapon/C as obj, mob/user as mob) if(istype(C, /obj/item/weapon)) - if(C.pry == 1 && (user.a_intent != I_HURT || (stat & BROKEN))) + if(C.get_tool_quality(TOOL_CROWBAR) && (user.a_intent != I_HURT || (stat & BROKEN))) if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) var/obj/item/weapon/material/twohanded/fireaxe/F = C if(!F.wielded) diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 93442b4d68..068f841a59 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -199,7 +199,7 @@ /obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob) // Dismantle - if(W.is_wrench() && !anchored) + if(W.get_tool_quality(TOOL_WRENCH) && !anchored) playsound(src, W.usesound, 50, 1) if(do_after(user, 20, src)) user.visible_message("\The [user] dismantles \the [src].", "You dismantle \the [src].") @@ -218,7 +218,7 @@ return // Install - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) user.visible_message(anchored ? "\The [user] begins unscrewing \the [src]." : "\The [user] begins fasten \the [src]." ) playsound(src, W.usesound, 75, 1) if(do_after(user, 10, src)) diff --git a/code/game/objects/structures/salvageable.dm b/code/game/objects/structures/salvageable.dm index 18fe7ad080..62d322729e 100644 --- a/code/game/objects/structures/salvageable.dm +++ b/code/game/objects/structures/salvageable.dm @@ -14,9 +14,9 @@ return /obj/structure/salvageable/attackby(obj/item/I, mob/user) - if(I.is_crowbar()) + if(I.get_tool_quality(TOOL_CROWBAR)) playsound(src, I.usesound, 50, 1) - var/actual_time = I.toolspeed * 170 + var/actual_time = I.get_tool_speed(TOOL_CROWBAR) * 170 user.visible_message( \ "\The [user] begins salvaging from \the [src].", \ "You start salvaging from \the [src].") diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 8abf0f3d18..878a40ecf0 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -21,7 +21,7 @@ return /obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction - if(tool.is_screwdriver() && !istype(src, /obj/structure/sign/scenery) && !istype(src, /obj/structure/sign/double)) + if(tool.get_tool_quality(TOOL_SCREWDRIVER) && !istype(src, /obj/structure/sign/scenery) && !istype(src, /obj/structure/sign/double)) playsound(src, tool.usesound, 50, 1) to_chat(user, "You unfasten the sign with your [tool].") var/obj/item/sign/S = new(src.loc) @@ -42,7 +42,7 @@ var/sign_state = "" /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction - if(tool.is_screwdriver() && isturf(user.loc)) + if(tool.get_tool_quality(TOOL_SCREWDRIVER) && isturf(user.loc)) var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel") if(direction == "Cancel") return var/obj/structure/sign/S = new(user.loc) diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index 66803ddbb1..9d4fe53c50 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -127,9 +127,8 @@ /obj/structure/simple_door/attackby(obj/item/weapon/W as obj, mob/user as mob) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if(istype(W,/obj/item/weapon/pickaxe)) - var/obj/item/weapon/pickaxe/digTool = W visible_message("[user] starts digging [src]!") - if(do_after(user,digTool.digspeed*hardness) && src) + if(do_after(user,40 / W.get_tool_quality(TOOL_MINING) * hardness) && src) visible_message("[user] finished digging [src]!") Dismantle() else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc? diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index be833aec08..7c84f1d1a4 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -87,7 +87,7 @@ return /obj/structure/bed/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, 50, 1) dismantle() qdel(src) @@ -118,7 +118,7 @@ add_padding(padding_type) return - else if(W.is_wirecutter()) + else if(W.get_tool_quality(TOOL_WIRECUTTER)) if(!padding_material) to_chat(user, "\The [src] has no padding to remove.") return @@ -218,7 +218,7 @@ return /obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_wrench() || istype(W,/obj/item/stack) || W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WRENCH) || istype(W,/obj/item/stack) || W.get_tool_quality(TOOL_WIRECUTTER)) return else if(istype(W,/obj/item/roller_holder)) if(has_buckled_mobs()) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 5d1322c3c3..6c0b05b28f 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -140,7 +140,7 @@ return /obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || W.is_wirecutter()) + if(istype(W,/obj/item/stack) || W.get_tool_quality(TOOL_WIRECUTTER)) return ..() @@ -240,7 +240,7 @@ color = WOOD_COLOR_CHOCOLATE /obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || W.is_wirecutter()) + if(istype(W,/obj/item/stack) || W.get_tool_quality(TOOL_WIRECUTTER)) return ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 640d84ea68..7f9f52eae0 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -110,7 +110,7 @@ var/global/list/stool_cache = list() //haha stool qdel(src) /obj/item/weapon/stool/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, 50, 1) dismantle() qdel(src) @@ -140,7 +140,7 @@ var/global/list/stool_cache = list() //haha stool to_chat(user, "You add padding to \the [src].") add_padding(padding_type) return - else if (W.is_wirecutter()) + else if (W.get_tool_quality(TOOL_WIRECUTTER)) if(!padding_material) to_chat(user, "\The [src] has no padding to remove.") return diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 3641d57fda..e8b7528931 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -56,9 +56,9 @@ L.set_dir(dir) /obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_wrench() || W.is_wirecutter() || istype(W,/obj/item/stack)) - return - ..() + if(W.get_tool_quality(TOOL_WRENCH) || W.get_tool_quality(TOOL_WIRECUTTER) || istype(W,/obj/item/stack)) + return TRUE + return ..() /obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction) // Redundant check? diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 15919a754a..d185c9ce94 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -73,7 +73,7 @@ phorontanks++ else full = TRUE - else if(I.is_wrench()) + else if(I.get_tool_quality(TOOL_WRENCH)) if(anchored) to_chat(user, "You lean down and unwrench [src].") anchored = 0 diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 42e90eda15..afd9c748fa 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -45,7 +45,7 @@ icon_state = "[initial(icon_state)][open][cistern]" /obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob) - if(I.is_crowbar()) + if(I.get_tool_quality(TOOL_CROWBAR)) to_chat(user, "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].") playsound(src, 'sound/effects/stonedoor_openclose.ogg', 50, 1) if(do_after(user, 30)) @@ -204,11 +204,11 @@ /obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob) if(I.type == /obj/item/device/analyzer) to_chat(user, "The water temperature seems to be [watertemp].") - if(I.is_wrench()) + if(I.get_tool_quality(TOOL_WRENCH)) var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings to_chat(user, "You begin to adjust the temperature valve with \the [I].") playsound(src, I.usesound, 50, 1) - if(do_after(user, 50 * I.toolspeed)) + if(do_after(user, 50 * I.get_tool_speed(TOOL_WRENCH))) watertemp = newtemp user.visible_message("[user] adjusts the shower with \the [I].", "You adjust the shower with \the [I].") add_fingerprint(user) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 9934794a7c..a4f7221090 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -86,13 +86,13 @@ switch(state) if("01") - if(istype(W, /obj/item/weapon/weldingtool) && !anchored ) + if(W.get_tool_quality(TOOL_WELDER) && !anchored ) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0,user)) user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.") playsound(src, WT.usesound, 50, 1) - if(do_after(user, 40 * WT.toolspeed)) + if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return to_chat(user,"You disassembled the windoor assembly!") if(secure) @@ -104,30 +104,32 @@ to_chat(user,"You need more welding fuel to disassemble the windoor assembly.") return - //Wrenching an unsecure assembly anchors it in place. Step 4 complete - if(W.is_wrench() && !anchored) + + if(W.get_tool_quality(TOOL_WRENCH)) playsound(src, W.usesound, 100, 1) - user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.") - - if(do_after(user, 40 * W.toolspeed)) - if(!src) return - to_chat(user,"You've secured the windoor assembly!") - src.anchored = 1 - step = 0 - - //Unwrenching an unsecure assembly un-anchors it. Step 4 undone - else if(W.is_wrench() && anchored) - playsound(src, W.usesound, 100, 1) - user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.") - - if(do_after(user, 40 * W.toolspeed)) - if(!src) return - to_chat(user,"You've unsecured the windoor assembly!") - src.anchored = 0 - step = null + + //Wrenching an unsecure assembly anchors it in place. Step 4 complete + if(!anchored) + user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.") + if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH))) + if(!src) + return + to_chat(user,"You've secured the windoor assembly!") + src.anchored = TRUE + step = 0 + + //Unwrenching an unsecure assembly un-anchors it. Step 4 undone + else + user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.") + if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH))) + if(!src) + return + to_chat(user,"You've unsecured the windoor assembly!") + src.anchored = FALSE + step = null //Adding cable to the assembly. Step 5 complete. - else if(istype(W, /obj/item/stack/cable_coil) && anchored) + else if(W.get_tool_quality(TOOL_CABLE_COIL) && anchored) user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.") var/obj/item/stack/cable_coil/CC = W @@ -142,12 +144,13 @@ if("02") //Removing wire from the assembly. Step 5 undone. - if(W.is_wirecutter() && !src.electronics) + if(W.get_tool_quality(TOOL_WIRECUTTER) && !src.electronics) playsound(src, W.usesound, 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") - if(do_after(user, 40 * W.toolspeed)) - if(!src) return + if(do_after(user, 40 * W.get_tool_speed(TOOL_WIRECUTTER))) + if(!src) + return to_chat(user,"You cut the windoor wires.!") new/obj/item/stack/cable_coil(get_turf(user), 1) @@ -171,12 +174,13 @@ W.loc = src.loc //Screwdriver to remove airlock electronics. Step 6 undone. - else if(W.is_screwdriver() && src.electronics) + else if(W.get_tool_quality(TOOL_SCREWDRIVER) && src.electronics) playsound(src, W.usesound, 100, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.") - if(do_after(user, 40 * W.toolspeed)) - if(!src || !src.electronics) return + if(do_after(user, 40 * W.get_tool_speed(TOOL_SCREWDRIVER))) + if(!src || !src.electronics) + return to_chat(user,"You've removed the airlock electronics!") step = 1 var/obj/item/weapon/airlock_electronics/ae = electronics @@ -184,7 +188,7 @@ ae.loc = src.loc //Crowbar to complete the assembly, Step 7 complete. - else if(W.is_crowbar()) + else if(W.get_tool_quality(TOOL_CROWBAR)) if(!src.electronics) to_chat(usr,"The assembly is missing electronics.") return @@ -195,9 +199,9 @@ playsound(src, W.usesound, 100, 1) user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.") - if(do_after(user, 40 * W.toolspeed)) - - if(!src) return + if(do_after(user, 40 * W.get_tool_speed(TOOL_CROWBAR))) + if(!src) + return density = 1 //Shouldn't matter but just incase to_chat(user,"You finish the windoor!") diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 54e1ee720b..a60384b77b 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -223,13 +223,13 @@ if(!istype(W)) return//I really wish I did not need this // Fixing. - if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP) + if(W.get_tool_quality(TOOL_WELDER) && user.a_intent == I_HELP) var/obj/item/weapon/weldingtool/WT = W if(health < maxhealth) if(WT.remove_fuel(1 ,user)) to_chat(user, "You begin repairing [src]...") 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 // playsound(src, 'sound/items/Welder.ogg', 50, 1) update_icon() @@ -265,7 +265,7 @@ if(W.flags & NOBLUDGEON) return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(reinf && state >= 1) state = 3 - state update_nearby_icons() @@ -283,11 +283,11 @@ update_verbs() playsound(src, W.usesound, 75, 1) to_chat(user, "You have [anchored ? "" : "un"]fastened the window [anchored ? "to" : "from"] the floor.") - else if(W.is_crowbar() && reinf && state <= 1) + else if(W.get_tool_quality(TOOL_CROWBAR) && reinf && state <= 1) state = 1 - state playsound(src, W.usesound, 75, 1) to_chat(user, "You have pried the window [state ? "into" : "out of"] the frame.") - else if(W.is_wrench() && !anchored && (!state || !reinf)) + else if(W.get_tool_quality(TOOL_WRENCH) && !anchored && (!state || !reinf)) if(!glasstype) to_chat(user, "You're not sure how to dismantle \the [src] properly.") else @@ -297,7 +297,7 @@ if(is_fulltile()) mats.amount = 4 qdel(src) - else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized)) + else if(W.get_tool_quality(TOOL_CABLE_COIL) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized)) var/obj/item/stack/cable_coil/C = W if (C.use(1)) playsound(src, 'sound/effects/sparks1.ogg', 75, 1) @@ -305,7 +305,7 @@ "\The [user] begins to wire \the [src] for electrochromic tinting.", \ "You begin to wire \the [src] for electrochromic tinting.", \ "You hear sparks.") - if(do_after(user, 20 * C.toolspeed, src) && state == 0) + if(do_after(user, 20 * C.get_tool_speed(TOOL_CABLE_COIL), src) && state == 0) playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) var/obj/structure/window/reinforced/polarized/P = new(loc, dir) if(is_fulltile()) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 18d74c1eee..e9f37c8836 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -48,6 +48,9 @@ if(prob(dirty_prob)) dirt += rand(50,100) update_dirt() //5% chance to start with dirt on a floor tile- give the janitor something to do + if(!mapload) + for(var/obj/structure/lattice/L in src) + qdel(L) /turf/simulated/floor/LateInitialize() . = ..() diff --git a/code/game/turfs/simulated/floor_attackby.dm b/code/game/turfs/simulated/floor_attackby.dm index ae8664113a..962a3aa08b 100644 --- a/code/game/turfs/simulated/floor_attackby.dm +++ b/code/game/turfs/simulated/floor_attackby.dm @@ -9,7 +9,7 @@ attack_tile(C, L) // Be on help intent if you want to decon something. return - if(!(C.is_screwdriver() && flooring && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) && try_graffiti(user, C)) + if(!(C.get_tool_quality(TOOL_SCREWDRIVER) && flooring && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) && try_graffiti(user, C)) return if(istype(C, /obj/item/stack/tile/roofing)) @@ -117,7 +117,7 @@ to_chat(user, "You need more welding fuel to complete this task.") /turf/simulated/floor/proc/try_deconstruct_tile(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) if(broken || burnt) to_chat(user, "You remove the broken [flooring.descriptor].") make_plating() @@ -131,14 +131,14 @@ return 0 playsound(src, W.usesound, 80, 1) return 1 - else if(W.is_screwdriver() && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) + else if(W.get_tool_quality(TOOL_SCREWDRIVER) && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) if(broken || burnt) return 0 to_chat(user, "You unscrew and remove the [flooring.descriptor].") make_plating(1) playsound(src, W.usesound, 80, 1) return 1 - else if(W.is_wrench() && (flooring.flags & TURF_REMOVE_WRENCH)) + else if(W.get_tool_quality(TOOL_WRENCH) && (flooring.flags & TURF_REMOVE_WRENCH)) to_chat(user, "You unwrench and remove the [flooring.descriptor].") make_plating(1) playsound(src, W.usesound, 80, 1) diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm index 98b5168b15..40d4ee7852 100644 --- a/code/game/turfs/simulated/outdoors/outdoors.dm +++ b/code/game/turfs/simulated/outdoors/outdoors.dm @@ -41,9 +41,9 @@ var/list/turf_edge_cache = list() /turf/simulated/floor/outdoors/attackby(obj/item/C, mob/user) - if(can_dig && istype(C, /obj/item/weapon/shovel)) + if(can_dig && C.get_tool_quality(TOOL_SHOVEL)) to_chat(user, SPAN_NOTICE("\The [user] begins digging into \the [src] with \the [C].")) - var/delay = (3 SECONDS * C.toolspeed) + var/delay = (3 SECONDS * C.get_tool_quality(TOOL_SHOVEL)) user.setClickCooldown(delay) if(do_after(user, delay, src)) if(!(locate(/obj/machinery/portable_atmospherics/hydroponics/soil) in contents)) diff --git a/code/game/turfs/simulated/outdoors/outdoors_attackby.dm b/code/game/turfs/simulated/outdoors/outdoors_attackby.dm index 1a969fee98..097b33563b 100644 --- a/code/game/turfs/simulated/outdoors/outdoors_attackby.dm +++ b/code/game/turfs/simulated/outdoors/outdoors_attackby.dm @@ -1,7 +1,14 @@ // this code here enables people to dig up worms from certain tiles. /turf/simulated/floor/outdoors/grass/attackby(obj/item/weapon/S as obj, mob/user as mob) - if(istype(S, /obj/item/stack/tile/floor)) + if(S.get_tool_quality(TOOL_SHOVEL)) + to_chat(user, "You begin to dig in \the [src] with your [S].") + if(do_after(user, 4 SECONDS * S.get_tool_speed(TOOL_SHOVEL))) + to_chat(user, "\The [src] has been dug up, a worm pops from the ground.") + new /obj/item/weapon/reagent_containers/food/snacks/worm(src) + else + to_chat(user, "You decide to not finish digging in \the [src].") + else if(istype(S, /obj/item/stack/tile/floor)) ChangeTurf(/turf/simulated/floor, preserve_outdoors = TRUE) return . = ..() \ No newline at end of file diff --git a/code/game/turfs/simulated/outdoors/snow.dm b/code/game/turfs/simulated/outdoors/snow.dm index 31fb6c5ac8..36e7f1a802 100644 --- a/code/game/turfs/simulated/outdoors/snow.dm +++ b/code/game/turfs/simulated/outdoors/snow.dm @@ -27,9 +27,9 @@ add_overlay(image(icon = 'icons/turf/outdoors.dmi', icon_state = "snow_footprints", dir = text2num(d))) /turf/simulated/floor/outdoors/snow/attackby(var/obj/item/W, var/mob/user) - if(istype(W, /obj/item/weapon/shovel)) + if(W.get_tool_quality(TOOL_SHOVEL)) to_chat(user, "You begin to remove \the [src] with your [W].") - if(do_after(user, 4 SECONDS * W.toolspeed)) + if(do_after(user, 4 SECONDS * W.get_tool_speed(TOOL_SHOVEL))) to_chat(user, "\The [src] has been dug up, and now lies in a pile nearby.") var/obj/item/stack/material/snow/S = new(src) S.amount = 10 diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 559bc62557..502e86c165 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -189,7 +189,7 @@ for(var/obj/effect/overlay/wallrot/WR in src) qdel(WR) return - else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) + else if(!W.sharp && W.force >= 10 || W.force >= 20) to_chat(user, "\The [src] crumbles away under the force of your [W.name].") src.dismantle_wall(1) return @@ -219,7 +219,7 @@ var/turf/T = user.loc //get user's location for delay checks - if(damage && istype(W, /obj/item/weapon/weldingtool)) + if(damage && W.get_tool_quality(TOOL_WELDER)) var/obj/item/weapon/weldingtool/WT = W @@ -229,7 +229,7 @@ if(WT.remove_fuel(0,user)) to_chat(user, "You start repairing the damage to [src].") playsound(src, WT.usesound, 100, 1) - if(do_after(user, max(5, damage / 5) * WT.toolspeed) && WT && WT.isOn()) + if(do_after(user, max(5, damage / 5) * WT.get_tool_speed(TOOL_WELDER)) && WT && WT.isOn()) to_chat(user, "You finish repairing the damage to [src].") take_damage(-damage) else @@ -239,13 +239,14 @@ return // Basic dismantling. + var/dismantle_toolspeed = 0 if(isnull(construction_stage) || !reinf_material) var/cut_delay = 60 - material.cut_delay var/dismantle_verb var/dismantle_sound - if(istype(W,/obj/item/weapon/weldingtool)) + if(W.get_tool_quality(TOOL_WELDER)) var/obj/item/weapon/weldingtool/WT = W if(!WT.isOn()) return @@ -254,27 +255,30 @@ return dismantle_verb = "cutting" dismantle_sound = W.usesound + dismantle_toolspeed = W.get_tool_speed(TOOL_WELDER) // cut_delay *= 0.7 // Tools themselves now can shorten the time it takes. else if(istype(W,/obj/item/weapon/melee/energy/blade)) dismantle_sound = "sparks" dismantle_verb = "slicing" + dismantle_toolspeed = 1 cut_delay *= 0.5 - else if(istype(W,/obj/item/weapon/pickaxe)) + else if(W.get_tool_quality(TOOL_MINING)) var/obj/item/weapon/pickaxe/P = W dismantle_verb = P.drill_verb dismantle_sound = P.drill_sound - cut_delay -= P.digspeed + cut_delay -= 40 / P.get_tool_quality(TOOL_MINING) + dismantle_toolspeed = W.get_tool_speed(TOOL_MINING) - if(dismantle_verb) + if(dismantle_toolspeed) to_chat(user, "You begin [dismantle_verb] through the outer plating.") if(dismantle_sound) playsound(src, dismantle_sound, 100, 1) - if(cut_delay<0) + if(cut_delay < 0) cut_delay = 0 - if(!do_after(user,cut_delay * W.toolspeed)) + if(!do_after(user,cut_delay * dismantle_toolspeed)) return to_chat(user, "You remove the outer plating.") @@ -286,7 +290,7 @@ else switch(construction_stage) if(6) - if (W.is_wirecutter()) + if (W.get_tool_quality(TOOL_WIRECUTTER)) playsound(src, W.usesound, 100, 1) construction_stage = 5 user.update_examine_panel(src) @@ -294,17 +298,17 @@ update_icon() return if(5) - if (W.is_screwdriver()) + if (W.get_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "You begin removing the support lines.") playsound(src, W.usesound, 100, 1) - if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 5) + if(!do_after(user,40 * W.get_tool_speed(TOOL_SCREWDRIVER)) || !istype(src, /turf/simulated/wall) || construction_stage != 5) return construction_stage = 4 user.update_examine_panel(src) update_icon() to_chat(user, "You unscrew the support lines.") return - else if (W.is_wirecutter()) + else if (W.get_tool_quality(TOOL_WIRECUTTER)) construction_stage = 6 user.update_examine_panel(src) to_chat(user, "You mend the outer grille.") @@ -327,17 +331,17 @@ if(cut_cover) to_chat(user, "You begin slicing through the metal cover.") playsound(src, W.usesound, 100, 1) - if(!do_after(user, 60 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 4) + if(!do_after(user, 60 * W.get_tool_speed(TOOL_WELDER)) || !istype(src, /turf/simulated/wall) || construction_stage != 4) return construction_stage = 3 user.update_examine_panel(src) update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") return - else if (W.is_screwdriver()) + else if (W.get_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "You begin screwing down the support lines.") playsound(src, W.usesound, 100, 1) - if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 4) + if(!do_after(user,40 * W.get_tool_speed(TOOL_SCREWDRIVER)) || !istype(src, /turf/simulated/wall) || construction_stage != 4) return construction_stage = 5 user.update_examine_panel(src) @@ -345,10 +349,10 @@ to_chat(user, "You screw down the support lines.") return if(3) - if (W.is_crowbar()) + if (W.get_tool_quality(TOOL_CROWBAR)) to_chat(user, "You struggle to pry off the cover.") playsound(src, W.usesound, 100, 1) - if(!do_after(user,100 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 3) + if(!do_after(user,100 * W.get_tool_speed(TOOL_CROWBAR)) || !istype(src, /turf/simulated/wall) || construction_stage != 3) return construction_stage = 2 user.update_examine_panel(src) @@ -356,10 +360,10 @@ to_chat(user, "You pry off the cover.") return if(2) - if (W.is_wrench()) + if (W.get_tool_quality(TOOL_WRENCH)) to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame.") playsound(src, W.usesound, 100, 1) - if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 2) + if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH)) || !istype(src, /turf/simulated/wall) || construction_stage != 2) return construction_stage = 1 user.update_examine_panel(src) @@ -380,18 +384,18 @@ if(cut_cover) to_chat(user, "You begin slicing through the support rods.") playsound(src, W.usesound, 100, 1) - if(!do_after(user,70 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 1) + if(!do_after(user,70 * W.get_tool_speed(TOOL_WELDER)) || !istype(src, /turf/simulated/wall) || construction_stage != 1) return construction_stage = 0 user.update_examine_panel(src) update_icon() - to_chat(user, "The slice through the support rods.") + to_chat(user, "You slice through the support rods.") return if(0) - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) to_chat(user, "You struggle to pry off the outer sheath.") playsound(src, W.usesound, 100, 1) - if(!do_after(user,100 * W.toolspeed) || !istype(src, /turf/simulated/wall) || !user || !W || !T ) + if(!do_after(user,100 * W.get_tool_speed(TOOL_CROWBAR)) || !istype(src, /turf/simulated/wall) || !user || !W || !T ) return if(user.loc == T && user.get_active_hand() == W ) to_chat(user, "You pry off the outer sheath.") diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 0ceb0226d8..eb3ca5ad00 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -3,12 +3,6 @@ spawn() new /obj/structure/lattice( locate(src.x, src.y, src.z) ) -// Removes all signs of lattice on the pos of the turf -Donkieyo -/turf/proc/RemoveLattice() - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - qdel(L) - // Called after turf replaces old one /turf/proc/post_change() levelupdate() @@ -44,12 +38,11 @@ qdel(src) var/turf/W = new N( locate(src.x, src.y, src.z) ) - if(istype(W, /turf/simulated/floor)) - if(old_fire) + if(old_fire) + if(istype(W, /turf/simulated/floor)) W.fire = old_fire - W.RemoveLattice() - else if(old_fire) - old_fire.RemoveFire() + else + old_fire.RemoveFire() if(tell_universe) universe.OnTurfChange(W) diff --git a/code/game/vehicles/vehicle.dm b/code/game/vehicles/vehicle.dm index 1250c7d961..1a6e46373f 100644 --- a/code/game/vehicles/vehicle.dm +++ b/code/game/vehicles/vehicle.dm @@ -24,7 +24,7 @@ var/maint_access = 1 //var/dna //dna-locking the mech var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference - var/datum/effect/effect/system/spark_spread/spark_system = new + var/datum/effect_system/spark_spread/spark_system = new var/lights = 0 var/lights_power = 6 diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm index 5c351ec3fb..21d9cd8588 100644 --- a/code/modules/ai/ai_holder.dm +++ b/code/modules/ai/ai_holder.dm @@ -293,6 +293,9 @@ // 'Tactical' processes such as moving a step, meleeing an enemy, firing a projectile, and other fairly cheap actions that need to happen quickly. /datum/ai_holder/proc/handle_tactics() + if(!istype(holder) || QDELETED(holder)) + qdel(src) + return if(holder.key && !autopilot) return handle_special_tactic() @@ -300,6 +303,9 @@ // 'Strategical' processes that are more expensive on the CPU and so don't get run as often as the above proc, such as A* pathfinding or robust targeting. /datum/ai_holder/proc/handle_strategicals() + if(!istype(holder) || QDELETED(holder)) + qdel(src) + return if(holder.key && !autopilot) return handle_special_strategical() diff --git a/code/modules/artifice/deadringer.dm b/code/modules/artifice/deadringer.dm index 1204e7de18..d721b08b21 100644 --- a/code/modules/artifice/deadringer.dm +++ b/code/modules/artifice/deadringer.dm @@ -69,7 +69,7 @@ if(timer == 20) reveal() if(corpse) - new /obj/effect/effect/smoke/chem(corpse.loc) + new /obj/effect/vfx/smoke/chem(corpse.loc) qdel(corpse) if(timer == 0) icon_state = "deadringer" diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 1a0b58bdc9..cee578cdc9 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -70,7 +70,7 @@ if((!A.secured) && (!secured)) attach_assembly(A,user) return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(toggle_secure()) to_chat(user, "\The [src] is ready!") else diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index b38d28938c..71c2eb3d64 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -103,7 +103,7 @@ ..() /obj/item/device/assembly_holder/attackby(var/obj/item/weapon/W, var/mob/user) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(!a_left || !a_right) to_chat(user, " BUG:Assembly part missing, please report this!") return diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index 8b45b84084..3349e4df11 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -25,7 +25,7 @@ if (tank && tank.modded) tank.explode() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index d3f518bbc8..f591891c5f 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -14,7 +14,7 @@ return /obj/item/assembly/shock_kit/attackby(var/obj/item/weapon/W, var/mob/user) - if(W.is_wrench() && !status) + if(W.get_tool_quality(TOOL_WRENCH) && !status) var/turf/T = loc if(ismob(T)) T = T.loc @@ -26,7 +26,7 @@ part2 = null qdel(src) return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) status = !status to_chat(user, "[src] is now [status ? "secured" : "unsecured"]!") playsound(src, W.usesound, 50, 1) diff --git a/code/modules/awaymissions/trigger.dm b/code/modules/awaymissions/trigger.dm index d34763ab02..b5a917a093 100644 --- a/code/modules/awaymissions/trigger.dm +++ b/code/modules/awaymissions/trigger.dm @@ -22,20 +22,20 @@ M.Move(dest) if(entersparks) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(4, 1, src) s.start() if(exitsparks) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(4, 1, dest) s.start() if(entersmoke) - var/datum/effect/effect/system/smoke_spread/s = new /datum/effect/effect/system/smoke_spread + var/datum/effect_system/smoke_spread/s = new /datum/effect_system/smoke_spread s.set_up(4, 1, src, 0) s.start() if(exitsmoke) - var/datum/effect/effect/system/smoke_spread/s = new /datum/effect/effect/system/smoke_spread + var/datum/effect_system/smoke_spread/s = new /datum/effect_system/smoke_spread s.set_up(4, 1, dest, 0) s.start() diff --git a/code/modules/blob2/overmind/types/classic.dm b/code/modules/blob2/overmind/types/classic.dm index 450324b493..37c87a53fd 100644 --- a/code/modules/blob2/overmind/types/classic.dm +++ b/code/modules/blob2/overmind/types/classic.dm @@ -20,7 +20,7 @@ for(var/turf/simulated/floor/F in view(2, T)) spawn() - var/obj/effect/effect/water/splash = new(T) + var/obj/effect/vfx/water/splash = new(T) splash.create_reagents(15) splash.reagents.add_reagent("blood", 10,list("blood_colour" = color)) splash.set_color() diff --git a/code/modules/blob2/overmind/types/explosive_lattice.dm b/code/modules/blob2/overmind/types/explosive_lattice.dm index aec6787eab..6e67388eca 100644 --- a/code/modules/blob2/overmind/types/explosive_lattice.dm +++ b/code/modules/blob2/overmind/types/explosive_lattice.dm @@ -35,9 +35,9 @@ L.blob_act() // Visual effect. - var/datum/effect/system/explosion/E = new/datum/effect/system/explosion/smokeless() + var/datum/effect_system/explosion/E = new/datum/effect_system/explosion/smokeless() var/turf/T = get_turf(victim) - E.set_up(T) + E.set_up(loc=T) E.start() // Now for sounds. diff --git a/code/modules/blob2/overmind/types/ravenous_macrophage.dm b/code/modules/blob2/overmind/types/ravenous_macrophage.dm index b6b3b65a4f..fb51bc8685 100644 --- a/code/modules/blob2/overmind/types/ravenous_macrophage.dm +++ b/code/modules/blob2/overmind/types/ravenous_macrophage.dm @@ -25,7 +25,7 @@ var/mob/living/L = locate() in range(world.view, B) if(L && prob(1) && L.mind && !L.stat) // There's some active living thing nearby, produce offgas. var/turf/T = get_turf(B) - var/datum/effect/effect/system/smoke_spread/noxious/BS = new /datum/effect/effect/system/smoke_spread/noxious + var/datum/effect_system/smoke_spread/noxious/BS = new /datum/effect_system/smoke_spread/noxious BS.attach(T) BS.set_up(3, 0, T) playsound(T, 'sound/effects/smoke.ogg', 50, 1, -3) @@ -43,7 +43,7 @@ if(prob(5) && !L.stat) // There's some active living thing nearby, produce offgas. B.visible_message("\icon [B] \The [B] disgorches a cloud of noxious gas!") var/turf/T = get_turf(B) - var/datum/effect/effect/system/smoke_spread/noxious/BS = new /datum/effect/effect/system/smoke_spread/noxious + var/datum/effect_system/smoke_spread/noxious/BS = new /datum/effect_system/smoke_spread/noxious BS.attach(T) BS.set_up(3, 0, T) playsound(T, 'sound/effects/smoke.ogg', 50, 1, -3) diff --git a/code/modules/catalogue/cataloguer.dm b/code/modules/catalogue/cataloguer.dm index 8f7f3152f3..3584d44e4f 100644 --- a/code/modules/catalogue/cataloguer.dm +++ b/code/modules/catalogue/cataloguer.dm @@ -34,6 +34,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers) var/debug = FALSE // If true, can view all catalogue data defined, regardless of unlock status. var/weakref/partial_scanned = null // Weakref of the thing that was last scanned if inturrupted. Used to allow for partial scans to be resumed. var/partial_scan_time = 0 // How much to make the next scan shorter. + var/toolspeed = 1 /obj/item/device/cataloguer/advanced name = "advanced cataloguer" diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index f53a217645..7df5025a42 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -72,7 +72,7 @@ if (!..()) return 0 - if(LAZYLEN(species_restricted) && istype(M,/mob/living/carbon/human)) + if(LAZYLEN(species_restricted) && ishuman(M)) var/exclusive = null var/wearable = null var/mob/living/carbon/human/H = M @@ -191,19 +191,15 @@ SPECIES_TESHARI = 'icons/mob/species/teshari/ears.dmi') /obj/item/clothing/ears/attack_hand(mob/user as mob) - if (!user) return - - if (src.loc != user || !istype(user,/mob/living/carbon/human)) - ..() + if (!user || !canremove) return + if (src.loc != user || !ishuman(user)) + return ..() + var/mob/living/carbon/human/H = user if(H.l_ear != src && H.r_ear != src) - ..() - return - - if(!canremove) - return + return ..() var/obj/item/clothing/ears/O if(slot_flags & SLOT_TWOEARS ) @@ -316,25 +312,6 @@ /obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity) return 0 // return 1 to cancel attack_hand() -/*/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user) - if(W.is_wirecutter() || istype(W, /obj/item/weapon/scalpel)) - if (clipped) - to_chat(user, "The [src] have already been clipped!") - update_icon() - return - - playsound(src, W.usesound, 50, 1) - user.visible_message("[user] cuts the fingertips off of the [src].","You cut the fingertips off of the [src].") - - clipped = 1 - name = "modified [name]" - desc = "[desc]
They have had the fingertips cut off of them." - if("exclude" in species_restricted) - species_restricted -= SPECIES_UNATHI - species_restricted -= SPECIES_TAJ - return -*/ - /obj/item/clothing/gloves/clean_blood() . = ..() transfer_blood = 0 diff --git a/code/modules/clothing/gloves/boxing.dm b/code/modules/clothing/gloves/boxing.dm index 9316c8f64f..38e4eae6f4 100644 --- a/code/modules/clothing/gloves/boxing.dm +++ b/code/modules/clothing/gloves/boxing.dm @@ -4,14 +4,6 @@ icon_state = "boxing" item_state_slots = list(slot_r_hand_str = "red", slot_l_hand_str = "red") -/* -/obj/item/clothing/gloves/boxing/attackby(obj/item/weapon/W, mob/user) - if(W.is_wirecutter() || istype(W, /obj/item/weapon/surgical/scalpel)) - to_chat(user, "That won't work.") //Nope - return - ..() -*/ - /obj/item/clothing/gloves/boxing/green icon_state = "boxinggreen" item_state_slots = list(slot_r_hand_str = "green", slot_l_hand_str = "green") diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 025080f8f2..5cdad2feac 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -103,7 +103,7 @@ return /obj/item/clothing/mask/gas/sechailer/attackby(obj/item/I, mob/user) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) switch(aggressiveness) if(1) to_chat(user, "You set the aggressiveness restrictor to the second position.") @@ -123,11 +123,11 @@ phrase = 1 if(5) to_chat(user, "You adjust the restrictor but nothing happens, probably because its broken.") - if(I.is_wirecutter()) + if(I.get_tool_quality(TOOL_WIRECUTTER)) if(aggressiveness != 5) to_chat(user, "You broke it!") aggressiveness = 5 - if(I.is_crowbar()) + if(I.get_tool_quality(TOOL_CROWBAR)) if(!hailer) to_chat(user, "This mask has an integrated hailer, you can't remove it!") else diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index fb3ccd9604..022d148329 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -174,7 +174,7 @@ usable = 1 active = 1 permanent = 1 - var/datum/effect/effect/system/smoke_spread/bad/smoke + var/datum/effect_system/smoke_spread/bad/smoke var/smoke_strength = 8 engage_string = "Detonate" @@ -184,7 +184,7 @@ /obj/item/rig_module/self_destruct/Initialize() . = ..() - src.smoke = new /datum/effect/effect/system/smoke_spread/bad() + src.smoke = new /datum/effect_system/smoke_spread/bad() src.smoke.attach(src) /obj/item/rig_module/self_destruct/Destroy() diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm b/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm index d0fd993473..ce094698d0 100644 --- a/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm +++ b/code/modules/clothing/spacesuits/rig/modules/specific/self_destruct.dm @@ -6,7 +6,7 @@ usable = 1 active = 1 permanent = 1 - var/datum/effect/effect/system/smoke_spread/bad/smoke + var/datum/effect_system/smoke_spread/bad/smoke var/smoke_strength = 8 engage_string = "Detonate" @@ -16,7 +16,7 @@ /obj/item/rig_module/self_destruct/Initialize() . = ..() - src.smoke = new /datum/effect/effect/system/smoke_spread/bad() + src.smoke = new /datum/effect_system/smoke_spread/bad() src.smoke.attach(src) /obj/item/rig_module/self_destruct/Destroy() diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index a12d0980ef..ffd685ab7c 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -92,7 +92,7 @@ // Wiring! How exciting. var/datum/wires/rig/wires - var/datum/effect/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system var/datum/mini_hud/rig/minihud /obj/item/weapon/rig/examine() diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index 395484d53a..222cd4a67c 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -7,7 +7,7 @@ return // Pass repair items on to the chestpiece. - if(chest && (istype(W,/obj/item/stack/material) || istype(W, /obj/item/weapon/weldingtool))) + if(chest && (istype(W,/obj/item/stack/material) || W.get_tool_quality(TOOL_WELDER))) return chest.attackby(W,user) // Lock or unlock the access panel. @@ -30,7 +30,7 @@ to_chat(user, "You [locked ? "lock" : "unlock"] \the [src] access panel.") return - else if(W.is_crowbar()) + else if(W.get_tool_quality(TOOL_CROWBAR)) if(!open && locked) to_chat(user, "The access panel is locked shut.") return @@ -41,7 +41,7 @@ if(open) // Hacking. - if(W.is_wirecutter() || istype(W, /obj/item/device/multitool)) + if(W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_MULTITOOL)) if(open) wires.Interact(user) else @@ -102,7 +102,7 @@ src.cell = W return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(!air_supply) to_chat(user, "There is no tank to remove.") @@ -116,7 +116,7 @@ air_supply = null return - else if(W.is_screwdriver()) + else if(W.get_tool_quality(TOOL_SCREWDRIVER)) var/list/current_mounts = list() if(cell) current_mounts += "cell" diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 3a92bd2be1..5bc40bd84e 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -226,7 +226,7 @@ to_chat(user, "You cannot modify \the [src] while it is being worn.") return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(helmet || boots || tank) var/choice = input("What component would you like to remove?") as null|anything in list(helmet,boots,tank,cooler) if(!choice) return diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index ec0b54befa..aafc43d524 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -186,7 +186,7 @@ var/turf/picked = pick(turfs) if(!isturf(picked)) return - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, "sparks", 50, 1) diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 35ed151a45..7eeac2bc3e 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -164,10 +164,8 @@ slot = ACCESSORY_SLOT_TIE /obj/item/clothing/accessory/stethoscope/do_surgery(mob/living/carbon/human/M, mob/living/user) - if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool - return ..() - attack(M, user) //default surgery behaviour is just to scan as usual - return 1 + return attack(M, user) //default surgery behaviour is just to scan as usual + /obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) if(ishuman(M) && isliving(user)) diff --git a/code/modules/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm index 03432980dc..a1dcec860b 100644 --- a/code/modules/detectivework/tools/rag.dm +++ b/code/modules/detectivework/tools/rag.dm @@ -186,7 +186,7 @@ //also copied from matches if(reagents.get_reagent_amount("phoron")) // the phoron explodes when exposed to fire visible_message("\The [src] conflagrates violently!") - var/datum/effect/effect/system/reagents_explosion/e = new() + var/datum/effect_system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("phoron") / 2.5, 1), get_turf(src), 0, 0) e.start() qdel(src) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index ae85a577dc..3fe8c9a413 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -33,12 +33,12 @@ log transactions var/obj/item/weapon/card/held_card var/editing_security_level = 0 var/view_screen = NO_SCREEN - var/datum/effect/effect/system/spark_spread/spark_system + var/datum/effect_system/spark_spread/spark_system /obj/machinery/atm/Initialize() . = ..() machine_id = "[station_name()] RT #[num_financial_terminals++]" - spark_system = new /datum/effect/effect/system/spark_spread + spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index cd8b77a219..e516d4f5dc 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -190,7 +190,7 @@ scan_cash(SC) else if(istype(O, /obj/item/weapon/card/emag)) return ..() - else if(O.is_wrench()) + else if(O.get_tool_quality(TOOL_WRENCH)) var/obj/item/weapon/tool/wrench/W = O toggle_anchors(W, user) // Not paying: Look up price and add it to transaction_amount @@ -481,8 +481,10 @@ to_chat(usr, "The cash box is locked.") -/obj/machinery/cash_register/proc/toggle_anchors(obj/item/weapon/tool/wrench/W, mob/user) - if(manipulating) return +/obj/machinery/cash_register/proc/toggle_anchors(obj/item/weapon/W, mob/user) + if(manipulating || !W.get_tool_quality(TOOL_WRENCH)) + return + manipulating = 1 if(!anchored) user.visible_message("\The [user] begins securing \the [src] to the floor.", @@ -491,7 +493,7 @@ user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You begin unsecuring \the [src] from the floor.") playsound(src, W.usesound, 50, 1) - if(!do_after(user, 20 * W.toolspeed)) + if(!do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH))) manipulating = 0 return if(!anchored) diff --git a/code/modules/economy/coins.dm b/code/modules/economy/coins.dm index c5a5f622fc..da23adde51 100644 --- a/code/modules/economy/coins.dm +++ b/code/modules/economy/coins.dm @@ -82,7 +82,7 @@ else to_chat(user, "This cable coil appears to be empty.") return - else if(W.is_wirecutter()) + else if(W.get_tool_quality(TOOL_WIRECUTTER)) if(!string_attached) ..() return diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm index c19b877a04..1b658ad279 100644 --- a/code/modules/economy/vending.dm +++ b/code/modules/economy/vending.dm @@ -156,7 +156,7 @@ GLOBAL_LIST_EMPTY(vending_products) if(I || istype(W, /obj/item/weapon/spacecash)) attack_hand(user) return - else if(W.is_screwdriver()) + else if(W.get_tool_quality(TOOL_SCREWDRIVER)) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") playsound(src, W.usesound, 50, 1) @@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(vending_products) SStgui.update_uis(src) // Speaker switch is on the main UI, not wires UI return - else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter()) + else if(W.get_tool_quality(TOOL_MULTITOOL) || W.get_tool_quality(TOOL_WIRECUTTER)) if(panel_open) attack_hand(user) return @@ -180,14 +180,14 @@ GLOBAL_LIST_EMPTY(vending_products) to_chat(user, "You insert \the [W] into \the [src].") SStgui.update_uis(src) return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) playsound(src, W.usesound, 100, 1) if(anchored) user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") else user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") - if(do_after(user, 20 * W.toolspeed)) + if(do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH))) if(!src) return to_chat(user, "You [anchored? "un" : ""]secured \the [src]!") anchored = !anchored diff --git a/code/modules/effects/vfx/_effect_system.dm b/code/modules/effects/vfx/_effect_system.dm new file mode 100644 index 0000000000..051879cfe0 --- /dev/null +++ b/code/modules/effects/vfx/_effect_system.dm @@ -0,0 +1,37 @@ +/* This is an attempt to make some easily reusable "particle" type effect, to stop the code +constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one +defined, then set up when it is created with New(). Then this same system can just be reused each time +it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam +would spawn and follow the beaker, even if it is carried or thrown. +*/ + +/obj/effect/vfx + name = "effect" + icon = 'icons/effects/effects.dmi' + mouse_opacity = 0 + unacidable = 1//So effect are not targeted by alien acid. + pass_flags = PASSTABLE | PASSGRILLE + +/datum/effect_system + var/number = 3 + var/cardinals = 0 + var/turf/location + var/atom/holder + var/setup = 0 + +/datum/effect_system/proc/set_up(n = 3, c = 0, turf/loc) + if(n > 10) + n = 10 + number = n + cardinals = c + location = loc + setup = 1 + +/datum/effect_system/proc/attach(atom/atom) + holder = atom + +/datum/effect_system/proc/start() + +/datum/effect_system/Destroy() + holder = null + return ..() diff --git a/code/modules/effects/vfx/explosion.dm b/code/modules/effects/vfx/explosion.dm new file mode 100644 index 0000000000..dc21d62b68 --- /dev/null +++ b/code/modules/effects/vfx/explosion.dm @@ -0,0 +1,92 @@ +/obj/effect/vfx/explosion + name = "explosive particles" + icon = 'icons/effects/96x96.dmi' + icon_state = "explosion" + opacity = 1 + anchored = 1 + mouse_opacity = 0 + pixel_x = -32 + pixel_y = -32 + +/obj/effect/vfx/explosion/Initialize() + . = ..() + QDEL_IN(src, 1 SECONDS) + +/datum/effect_system/explosion/set_up(n = 0, c = 0, turf/loc) + location = get_turf(loc) + +/datum/effect_system/explosion/start() + new/obj/effect/vfx/explosion( location ) + var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles() + P.set_up(10,0,location) + P.start() + spawn(5) + var/datum/effect_system/smoke_spread/S = new/datum/effect_system/smoke_spread() + S.set_up(5,0,location,null) + S.start() + +/datum/effect_system/explosion/smokeless/start() + new/obj/effect/vfx/explosion(location) + var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles() + P.set_up(10,0,location) + P.start() + +/datum/effect_system/reagents_explosion + var/amount // TNT equivalent + var/flashing = 0 // does explosion creates flash effect? + var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion + +/datum/effect_system/reagents_explosion/set_up(amt, loc, flash = 0, flash_fact = 0) + amount = amt + if(istype(loc, /turf/)) + location = loc + else + location = get_turf(loc) + + flashing = flash + flashing_factor = flash_fact + + return + +/datum/effect_system/reagents_explosion/start() + if (amount <= 2) + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() + s.set_up(2, 1, location) + s.start() + + for(var/mob/M in viewers(5, location)) + to_chat(M, "The solution violently explodes.") + for(var/mob/M in viewers(1, location)) + if (prob (50 * amount)) + to_chat(M, "The explosion knocks you down.") + M.Weaken(rand(1,5)) + return + else + var/devst = -1 + var/heavy = -1 + var/light = -1 + var/flash = -1 + + // Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs + if (round(amount/12) > 0) + devst = devst + amount/12 + + if (round(amount/6) > 0) + heavy = heavy + amount/6 + + if (round(amount/3) > 0) + light = light + amount/3 + + if (flashing && flashing_factor) + flash = (amount/4) * flashing_factor + + for(var/mob/M in viewers(8, location)) + to_chat(M, "The solution violently explodes.") + + explosion( + location, + round(min(devst, BOMBCAP_DVSTN_RADIUS)), + round(min(heavy, BOMBCAP_HEAVY_RADIUS)), + round(min(light, BOMBCAP_LIGHT_RADIUS)), + round(min(flash, BOMBCAP_FLASH_RADIUS)) + ) diff --git a/code/modules/effects/vfx/explosion_particles.dm b/code/modules/effects/vfx/explosion_particles.dm new file mode 100644 index 0000000000..8414ebf087 --- /dev/null +++ b/code/modules/effects/vfx/explosion_particles.dm @@ -0,0 +1,28 @@ +/obj/effect/vfx/expl_particles + name = "explosive particles" + icon = 'icons/effects/effects.dmi' + icon_state = "explosion_particle" + opacity = 1 + anchored = 1 + mouse_opacity = 0 + +/obj/effect/vfx/expl_particles/Initialize() + . = ..() + QDEL_IN(src, 1.5 SECONDS) + +/datum/effect_system/expl_particles + var/total_particles = 0 + +/datum/effect_system/expl_particles/set_up(n = 10, c = 0, turf/loc) + number = n + location = get_turf(loc) + +/datum/effect_system/expl_particles/start() + var/i = 0 + for(i=0, i 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct + +/datum/effect_system/smoke_spread/start(var/I) + var/i = 0 + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/vfx/smoke/smoke = new smoke_type(src.location) + src.total_smoke++ + if(I) + smoke.color = I + var/direction = src.direction + if(!direction) + if(src.cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + for(i=0, i 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + +/datum/effect_system/spark_spread/start() + var/i = 0 + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/vfx/sparks/sparks = new /obj/effect/vfx/sparks(src.location) + src.total_sparks++ + var/direction + if(src.cardinals) + direction = pick(cardinal) + else + direction = pick(alldirs) + for(i=0, i 10) + n = 10 + number = n + cardinals = c + location = loc + +/datum/effect_system/steam_spread/start() + var/i = 0 + for(i=0, iYou feel a tug and begin pulling!") diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm index 44cde185ac..d3d6664dda 100644 --- a/code/modules/fishing/fishing_rod.dm +++ b/code/modules/fishing/fishing_rod.dm @@ -19,6 +19,7 @@ applies_material_colour = TRUE default_material = "wood" can_dull = FALSE + tool_qualities = list(TOOL_FISHING = TOOL_QUALITY_MEDIOCRE) var/strung = TRUE var/line_break = TRUE @@ -51,7 +52,7 @@ update_icon() /obj/item/weapon/material/fishing_rod/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_wirecutter() && strung) + if(I.get_tool_quality(TOOL_WIRECUTTER) && strung) strung = FALSE to_chat(user, "You cut \the [src]'s string!") update_icon() @@ -90,10 +91,10 @@ if(re.id == "nutriment" || re.id == "protein" || re.id == "glucose" || re.id == "fishbait") foodvolume += re.volume - toolspeed = initial(toolspeed) * min(0.75, (0.5 / max(0.5, (foodvolume / Bait.reagents.maximum_volume)))) + set_tool_quality(TOOL_FISHING, initial(tool_qualities[TOOL_FISHING]) * 2 * max(0.75, (foodvolume / Bait.reagents.maximum_volume))) else - toolspeed = initial(toolspeed) + set_tool_quality(TOOL_FISHING, initial(tool_qualities[TOOL_FISHING])) /obj/item/weapon/material/fishing_rod/proc/consume_bait() if(Bait) @@ -118,7 +119,7 @@ attackspeed = 2 SECONDS default_material = "titanium" - toolspeed = 0.75 + tool_qualities = list(TOOL_FISHING = TOOL_QUALITY_DECENT) /obj/item/weapon/material/fishing_rod/modern/built strung = FALSE @@ -128,4 +129,4 @@ desc = "Mass produced, but somewhat reliable." default_material = "plastic" - toolspeed = 0.9 \ No newline at end of file + tool_qualities = list(TOOL_FISHING = TOOL_QUALITY_STANDARD) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index c77683a8db..b7ce92d2c4 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -174,7 +174,7 @@ if (is_sliceable()) //these are used to allow hiding edge items in food that is not on a table/tray var/can_slice_here = isturf(src.loc) && ((locate(/obj/structure/table) in src.loc) || (locate(/obj/machinery/optable) in src.loc) || (locate(/obj/item/weapon/tray) in src.loc)) - var/hide_item = !has_edge(W) || !can_slice_here + var/hide_item = !W.edge || !can_slice_here if (hide_item) if (W.w_class >= src.w_class || is_robot_module(W)) @@ -186,7 +186,7 @@ contents += W return - if (has_edge(W)) + if (W.edge) if (!can_slice_here) to_chat(user, "You cannot slice \the [src] here! You need a table or at least a tray to do it.") return diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index bfffc59011..19d03c1e67 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -221,7 +221,7 @@ else if(istype(check, /obj/item/weapon/disk/nuclear)) to_chat(user, "You can't cook that.") return 0 - else if(I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/weapon/storage/part_replacer)) // You can't cook tools, dummy. + else if(I.get_tool_quality(TOOL_CROWBAR) || I.get_tool_quality(TOOL_SCREWDRIVER) || istype(I, /obj/item/weapon/storage/part_replacer)) // You can't cook tools, dummy. return 0 else if(!istype(check) && !istype(check, /obj/item/weapon/holder)) to_chat(user, "That's not edible.") @@ -563,7 +563,7 @@ // Produce nasty smoke. visible_message("\The [src] vomits a gout of rancid smoke!") - var/datum/effect/effect/system/smoke_spread/bad/burntfood/smoke = new /datum/effect/effect/system/smoke_spread/bad/burntfood + var/datum/effect_system/smoke_spread/bad/burntfood/smoke = new /datum/effect_system/smoke_spread/bad/burntfood playsound(src, 'sound/effects/smoke.ogg', 20, 1) smoke.attach(src) smoke.set_up(10, 0, get_turf(src), 300) diff --git a/code/modules/food/kitchen/cooking_machines/oven.dm b/code/modules/food/kitchen/cooking_machines/oven.dm index 013f7ad648..2897208414 100644 --- a/code/modules/food/kitchen/cooking_machines/oven.dm +++ b/code/modules/food/kitchen/cooking_machines/oven.dm @@ -110,7 +110,7 @@ /obj/machinery/appliance/cooker/oven/proc/manip(var/obj/item/I) // check if someone's trying to manipulate the machine - if(I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/weapon/storage/part_replacer)) + if(I.get_tool_quality(TOOL_CROWBAR) || I.get_tool_quality(TOOL_SCREWDRIVER) || istype(I, /obj/item/weapon/storage/part_replacer)) return TRUE else return FALSE diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm index 5c2467ccab..089ecee2aa 100644 --- a/code/modules/food/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -75,24 +75,24 @@ /obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob) if(src.broken > 0) - if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver + if(src.broken == 2 && O.get_tool_quality(TOOL_SCREWDRIVER)) // If it's broken and they're using a screwdriver user.visible_message( \ "\The [user] starts to fix part of the microwave.", \ "You start to fix part of the microwave." \ ) playsound(src, O.usesound, 50, 1) - if (do_after(user,20 * O.toolspeed)) + if (do_after(user,20 * O.get_tool_speed(TOOL_SCREWDRIVER))) user.visible_message( \ "\The [user] fixes part of the microwave.", \ "You have fixed part of the microwave." \ ) src.broken = 1 // Fix it a bit - else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench + else if(src.broken == 1 && O.get_tool_quality(TOOL_WRENCH)) // If it's broken and they're doing the wrench user.visible_message( \ "\The [user] starts to fix part of the microwave.", \ "You start to fix part of the microwave." \ ) - if (do_after(user,20 * O.toolspeed)) + if (do_after(user,20 * O.get_tool_speed(TOOL_WRENCH))) user.visible_message( \ "\The [user] fixes the microwave.", \ "You have fixed the microwave." \ @@ -157,10 +157,10 @@ var/obj/item/weapon/grab/G = O to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].") return 1 - else if(O.is_screwdriver()) + else if(O.get_tool_quality(TOOL_SCREWDRIVER)) default_deconstruction_screwdriver(user, O) return - else if(O.is_crowbar()) + else if(O.get_tool_quality(TOOL_CROWBAR)) if(default_deconstruction_crowbar(user, O)) return else @@ -168,7 +168,7 @@ "\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.", \ "You attempt to [src.anchored ? "unsecure" : "secure"] the microwave." ) - if (do_after(user,20/O.toolspeed)) + if (do_after(user,20/O.get_tool_speed(TOOL_CROWBAR))) user.visible_message( \ "\The [user] [src.anchored ? "unsecures" : "secures"] the microwave.", \ "You [src.anchored ? "unsecure" : "secure"] the microwave." @@ -430,7 +430,7 @@ /obj/machinery/microwave/proc/broke() - var/datum/effect/effect/system/spark_spread/s = new + var/datum/effect_system/spark_spread/s = new s.set_up(2, 1, src) s.start() src.icon_state = "mwb" // Make it look all busted up and shit diff --git a/code/modules/food/kitchen/smartfridge/engineering.dm b/code/modules/food/kitchen/smartfridge/engineering.dm index 8141ca496d..2a3a56368b 100644 --- a/code/modules/food/kitchen/smartfridge/engineering.dm +++ b/code/modules/food/kitchen/smartfridge/engineering.dm @@ -20,8 +20,10 @@ if(amount < 1) return + count = min(count, amount) + while(count > 0) - var/obj/item/stack/S = I.get_product(get_turf(src), min(count, amount)) + var/obj/item/stack/S = I.get_product(get_turf(src), count) count -= S.amount SStgui.update_uis(src) diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm index 4df4070cd6..7f7d32f74d 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm @@ -109,7 +109,7 @@ ********************/ /obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(O.is_screwdriver()) + if(O.get_tool_quality(TOOL_SCREWDRIVER)) panel_open = !panel_open user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].") playsound(src, O.usesound, 50, 1) @@ -119,7 +119,7 @@ if(wrenchable && default_unfasten_wrench(user, O, 20)) return - if(istype(O, /obj/item/device/multitool) || O.is_wirecutter()) + if(O.get_tool_quality(TOOL_MULTITOOL) || O.get_tool_quality(TOOL_WIRECUTTER)) if(panel_open) attack_hand(user) return diff --git a/code/modules/gamemaster/event2/event.dm b/code/modules/gamemaster/event2/event.dm index e35984588f..1497089c3f 100644 --- a/code/modules/gamemaster/event2/event.dm +++ b/code/modules/gamemaster/event2/event.dm @@ -76,20 +76,13 @@ This allows for events that have their announcement happen after the end itself. /datum/event2/event/proc/is_planet_z_level(z_level) - var/datum/planet/P = LAZYACCESS(SSplanets.z_to_planet, z_level) - if(!istype(P)) - return FALSE - return TRUE + return istype(LAZYACCESS(SSplanets.z_to_planet, z_level), /datum/planet) // Returns a list of empty turfs in the same area. /datum/event2/event/proc/find_random_turfs(minimum_free_space = 5, list/specific_areas = list(), ignore_occupancy = FALSE) var/list/area/grand_list_of_areas = find_random_areas(specific_areas) - if(!LAZYLEN(grand_list_of_areas)) - return list() - - for(var/thing in grand_list_of_areas) - var/list/A = thing + for(var/area/A in grand_list_of_areas) var/list/turfs = list() for(var/turf/T in A) if(!T.check_density()) @@ -98,7 +91,6 @@ This allows for events that have their announcement happen after the end itself. if(turfs.len < minimum_free_space) continue // Not enough free space. return turfs - return list() /datum/event2/event/proc/find_random_areas(list/specific_areas = list(), ignore_occupancy = FALSE) @@ -107,8 +99,7 @@ This allows for events that have their announcement happen after the end itself. var/list/area/grand_list_of_areas = get_all_existing_areas_of_types(specific_areas) . = list() - for(var/thing in shuffle(grand_list_of_areas)) - var/area/A = thing + for(var/area/A in shuffle(grand_list_of_areas)) if(A.forbid_events) continue if(!(A.z in get_location_z_levels())) @@ -182,7 +173,7 @@ This allows for events that have their announcement happen after the end itself. return if(!check_rights(R_ADMIN|R_EVENT|R_DEBUG)) - message_admins("[usr] has attempted to manipulate an event without sufficent privilages.") + message_admins("[usr] has attempted to manipulate an event without sufficent privileges.") return if(href_list["abort"]) diff --git a/code/modules/gamemaster/event2/events/cargo/shipping_error.dm b/code/modules/gamemaster/event2/events/cargo/shipping_error.dm index eaab32cb8a..a7f7e000eb 100644 --- a/code/modules/gamemaster/event2/events/cargo/shipping_error.dm +++ b/code/modules/gamemaster/event2/events/cargo/shipping_error.dm @@ -4,6 +4,7 @@ chaos = -10 // A helpful event. reusable = TRUE event_type = /datum/event2/event/shipping_error + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/shipping_error/get_weight() return (metric.count_people_with_job(/datum/job/cargo_tech) + metric.count_people_with_job(/datum/job/qm)) * 30 diff --git a/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm b/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm index 0a19ec7a65..e2dbf22bd9 100644 --- a/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm +++ b/code/modules/gamemaster/event2/events/command/manifest_malfunction.dm @@ -4,6 +4,7 @@ chaos = 10 chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT event_type = /datum/event2/event/manifest_malfunction + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/manifest_malfunction/get_weight() var/security = metric.count_people_in_department(DEPARTMENT_SECURITY) diff --git a/code/modules/gamemaster/event2/events/command/money_hacker.dm b/code/modules/gamemaster/event2/events/command/money_hacker.dm index a1dbd1e18b..b365fdaef2 100644 --- a/code/modules/gamemaster/event2/events/command/money_hacker.dm +++ b/code/modules/gamemaster/event2/events/command/money_hacker.dm @@ -4,6 +4,7 @@ chaos = 10 chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT event_type = /datum/event2/event/money_hacker + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/money_hacker/get_weight() var/command = metric.count_people_with_job(/datum/job/hop) + metric.count_people_with_job(/datum/job/captain) diff --git a/code/modules/gamemaster/event2/events/command/raise_funds.dm b/code/modules/gamemaster/event2/events/command/raise_funds.dm index 31e8816350..1e20cdce11 100644 --- a/code/modules/gamemaster/event2/events/command/raise_funds.dm +++ b/code/modules/gamemaster/event2/events/command/raise_funds.dm @@ -4,6 +4,7 @@ departments = list(DEPARTMENT_COMMAND, DEPARTMENT_CARGO) chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT event_type = /datum/event2/event/raise_funds + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/raise_funds/get_weight() var/command = metric.count_people_in_department(DEPARTMENT_COMMAND) diff --git a/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm b/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm index 54548a88dd..a4e8663323 100644 --- a/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm +++ b/code/modules/gamemaster/event2/events/engineering/airlock_failure.dm @@ -5,6 +5,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/airlock_failure var/needs_medical = FALSE + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/airlock_failure/emag name = "airlock failure - emag" diff --git a/code/modules/gamemaster/event2/events/engineering/blob.dm b/code/modules/gamemaster/event2/events/engineering/blob.dm index 3ace8f0894..18f600dc39 100644 --- a/code/modules/gamemaster/event2/events/engineering/blob.dm +++ b/code/modules/gamemaster/event2/events/engineering/blob.dm @@ -8,6 +8,7 @@ // In the distant future, if a mechanical skill system were to come into being, these vars could be replaced with skill checks so off duty people could count. var/required_fighters = 2 // Fighters refers to engineering OR security. var/required_support = 1 // Support refers to doctors AND roboticists, depending on fighter composition. + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/blob/hard name = "harder blob" diff --git a/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm b/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm index d3478bb333..f6ee4a821c 100644 --- a/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm +++ b/code/modules/gamemaster/event2/events/engineering/brand_intelligence.dm @@ -4,6 +4,7 @@ chaos = 10 chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT event_type = /datum/event2/event/brand_intelligence + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/brand_intelligence/get_weight() return 10 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) diff --git a/code/modules/gamemaster/event2/events/engineering/camera_damage.dm b/code/modules/gamemaster/event2/events/engineering/camera_damage.dm index c6c1516130..22826700a0 100644 --- a/code/modules/gamemaster/event2/events/engineering/camera_damage.dm +++ b/code/modules/gamemaster/event2/events/engineering/camera_damage.dm @@ -5,6 +5,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT reusable = TRUE event_type = /datum/event2/event/camera_damage + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/camera_damage/get_weight() return 30 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + (metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 40) diff --git a/code/modules/gamemaster/event2/events/engineering/canister_leak.dm b/code/modules/gamemaster/event2/events/engineering/canister_leak.dm index a48823151c..46ddc6fec1 100644 --- a/code/modules/gamemaster/event2/events/engineering/canister_leak.dm +++ b/code/modules/gamemaster/event2/events/engineering/canister_leak.dm @@ -9,6 +9,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT reusable = TRUE event_type = /datum/event2/event/canister_leak + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/canister_leak/get_weight() return metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 30 diff --git a/code/modules/gamemaster/event2/events/engineering/dust.dm b/code/modules/gamemaster/event2/events/engineering/dust.dm index 1a26118fbc..829c62410b 100644 --- a/code/modules/gamemaster/event2/events/engineering/dust.dm +++ b/code/modules/gamemaster/event2/events/engineering/dust.dm @@ -5,6 +5,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT reusable = TRUE event_type = /datum/event2/event/dust + regions = list(EVENT_REGION_SPACESTATION) /datum/event2/meta/dust/get_weight() return metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20 diff --git a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm index b0c52d6e07..98772faa79 100644 --- a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm +++ b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm @@ -5,6 +5,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT reusable = TRUE event_type = /datum/event2/event/gas_leak + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/gas_leak/get_weight() // Synthetics are counted in higher value because they can wirelessly connect to alarms. diff --git a/code/modules/gamemaster/event2/events/engineering/grid_check.dm b/code/modules/gamemaster/event2/events/engineering/grid_check.dm index 8b081f29e2..ea934923af 100644 --- a/code/modules/gamemaster/event2/events/engineering/grid_check.dm +++ b/code/modules/gamemaster/event2/events/engineering/grid_check.dm @@ -11,6 +11,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT reusable = TRUE event_type = /datum/event2/event/grid_check + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) // Having the turbines be way over their rated limit makes grid checks more likely. /datum/event2/meta/grid_check/proc/get_overpower() diff --git a/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm b/code/modules/gamemaster/event2/events/engineering/space_meteor_defense.dm similarity index 97% rename from code/modules/gamemaster/event2/events/engineering/meteor_defense.dm rename to code/modules/gamemaster/event2/events/engineering/space_meteor_defense.dm index 378c6b42fe..09a53d5364 100644 --- a/code/modules/gamemaster/event2/events/engineering/meteor_defense.dm +++ b/code/modules/gamemaster/event2/events/engineering/space_meteor_defense.dm @@ -1,83 +1,84 @@ -// This event gives the station an advance warning about meteors, so that they can prepare in various ways. - -/datum/event2/meta/meteor_defense - name = "meteor defense" - departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_CARGO) - chaos = 50 - chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT - event_class = "meteor defense" - event_type = /datum/event2/event/meteor_defense - -/datum/event2/meta/meteor_defense/get_weight() - // Engineers count as 20. - var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING) - if(engineers < 3) // There -must- be at least three engineers for this to be possible. - return 0 - - . = engineers * 20 - - // Cargo and AI/borgs count as 10. - var/cargo = metric.count_people_with_job(/datum/job/cargo_tech) + metric.count_people_with_job(/datum/job/qm) - var/bots = metric.count_people_in_department(DEPARTMENT_SYNTHETIC) - - . += (cargo + bots) * 10 - - -/datum/event2/event/meteor_defense - start_delay_lower_bound = 10 MINUTES - start_delay_upper_bound = 15 MINUTES - var/soon_announced = FALSE - var/direction = null // Actual dir used for which side the meteors come from. - var/dir_text = null // Direction shown in the announcement. - var/list/meteor_types = null - var/waves = null // How many times to send meteors. - var/last_wave_time = null // world.time of latest wave. - var/wave_delay = 10 SECONDS - var/wave_upper_bound = 8 // Max amount of meteors per wave. - var/wave_lower_bound = 4 // Min amount. - -/datum/event2/event/meteor_defense/proc/set_meteor_types() - meteor_types = meteors_threatening.Copy() - -/datum/event2/event/meteor_defense/set_up() - direction = pick(cardinal) // alldirs doesn't work with current meteor code unfortunately. - waves = rand(3, 6) - switch(direction) - if(NORTH) - dir_text = "aft" // For some reason this is needed. - if(SOUTH) - dir_text = "fore" - if(EAST) - dir_text = "port" - if(WEST) - dir_text = "starboard" - set_meteor_types() - -/datum/event2/event/meteor_defense/announce() - var/announcement = "Meteors are expected to approach from the [dir_text] side, in approximately [DisplayTimeText(time_to_start - world.time, 60)]." - command_announcement.Announce(announcement, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') - -/datum/event2/event/meteor_defense/wait_tick() - if(!soon_announced) - if((time_to_start - world.time) <= 5 MINUTES) - soon_announced = TRUE - var/announcement = "The incoming meteors are expected to approach from the [dir_text] side. \ - ETA to arrival is approximately [DisplayTimeText(time_to_start - world.time, 60)]." - command_announcement.Announce(announcement, "Meteor Alert - Update") - -/datum/event2/event/meteor_defense/start() - command_announcement.Announce("Incoming meteors approach from \the [dir_text] side!", "Meteor Alert - Update") - -/datum/event2/event/meteor_defense/event_tick() - if(world.time > last_wave_time + wave_delay) - last_wave_time = world.time - waves-- - message_admins("[waves] more wave\s of meteors remain.") - // Dir is reversed because the direction describes where meteors are going, not what side it's gonna hit. - spawn_meteors(rand(wave_upper_bound, wave_lower_bound), meteor_types, reverse_dir[direction]) - -/datum/event2/event/meteor_defense/should_end() - return waves <= 0 - -/datum/event2/event/meteor_defense/end() - command_announcement.Announce("\The [location_name()] will clear the incoming meteors in a moment.", "Meteor Alert - Update") +// This event gives the station an advance warning about meteors, so that they can prepare in various ways. + +/datum/event2/meta/meteor_defense + name = "meteor defense" + departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_CARGO) + chaos = 50 + chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT + event_class = "meteor defense" + event_type = /datum/event2/event/meteor_defense + regions = list(EVENT_REGION_SPACESTATION) + +/datum/event2/meta/meteor_defense/get_weight() + // Engineers count as 20. + var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING) + if(engineers < 3) // There -must- be at least three engineers for this to be possible. + return 0 + + . = engineers * 20 + + // Cargo and AI/borgs count as 10. + var/cargo = metric.count_people_with_job(/datum/job/cargo_tech) + metric.count_people_with_job(/datum/job/qm) + var/bots = metric.count_people_in_department(DEPARTMENT_SYNTHETIC) + + . += (cargo + bots) * 10 + + +/datum/event2/event/meteor_defense + start_delay_lower_bound = 10 MINUTES + start_delay_upper_bound = 15 MINUTES + var/soon_announced = FALSE + var/direction = null // Actual dir used for which side the meteors come from. + var/dir_text = null // Direction shown in the announcement. + var/list/meteor_types = null + var/waves = null // How many times to send meteors. + var/last_wave_time = null // world.time of latest wave. + var/wave_delay = 10 SECONDS + var/wave_upper_bound = 8 // Max amount of meteors per wave. + var/wave_lower_bound = 4 // Min amount. + +/datum/event2/event/meteor_defense/proc/set_meteor_types() + meteor_types = meteors_threatening.Copy() + +/datum/event2/event/meteor_defense/set_up() + direction = pick(cardinal) // alldirs doesn't work with current meteor code unfortunately. + waves = rand(3, 6) + switch(direction) + if(NORTH) + dir_text = "aft" // For some reason this is needed. + if(SOUTH) + dir_text = "fore" + if(EAST) + dir_text = "port" + if(WEST) + dir_text = "starboard" + set_meteor_types() + +/datum/event2/event/meteor_defense/announce() + var/announcement = "Meteors are expected to approach from the [dir_text] side, in approximately [DisplayTimeText(time_to_start - world.time, 60)]." + command_announcement.Announce(announcement, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') + +/datum/event2/event/meteor_defense/wait_tick() + if(!soon_announced) + if((time_to_start - world.time) <= 5 MINUTES) + soon_announced = TRUE + var/announcement = "The incoming meteors are expected to approach from the [dir_text] side. \ + ETA to arrival is approximately [DisplayTimeText(time_to_start - world.time, 60)]." + command_announcement.Announce(announcement, "Meteor Alert - Update") + +/datum/event2/event/meteor_defense/start() + command_announcement.Announce("Incoming meteors approach from \the [dir_text] side!", "Meteor Alert - Update") + +/datum/event2/event/meteor_defense/event_tick() + if(world.time > last_wave_time + wave_delay) + last_wave_time = world.time + waves-- + message_admins("[waves] more wave\s of meteors remain.") + // Dir is reversed because the direction describes where meteors are going, not what side it's gonna hit. + spawn_meteors(rand(wave_upper_bound, wave_lower_bound), meteor_types, reverse_dir[direction]) + +/datum/event2/event/meteor_defense/should_end() + return waves <= 0 + +/datum/event2/event/meteor_defense/end() + command_announcement.Announce("\The [location_name()] will clear the incoming meteors in a moment.", "Meteor Alert - Update") diff --git a/code/modules/gamemaster/event2/events/engineering/spacevine.dm b/code/modules/gamemaster/event2/events/engineering/spacevine.dm index 6620e67a0c..58662cad25 100644 --- a/code/modules/gamemaster/event2/events/engineering/spacevine.dm +++ b/code/modules/gamemaster/event2/events/engineering/spacevine.dm @@ -4,6 +4,7 @@ chaos = 10 // There's a really rare chance of vines getting something awful like phoron atmosphere but thats not really controllable. chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/spacevine + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/spacevine/get_weight() return 20 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) diff --git a/code/modules/gamemaster/event2/events/engineering/wallrot.dm b/code/modules/gamemaster/event2/events/engineering/wallrot.dm index 29d12c8524..b8547a94df 100644 --- a/code/modules/gamemaster/event2/events/engineering/wallrot.dm +++ b/code/modules/gamemaster/event2/events/engineering/wallrot.dm @@ -3,6 +3,7 @@ departments = list(DEPARTMENT_ENGINEERING) reusable = TRUE event_type = /datum/event2/event/wallrot + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/wallrot/get_weight() return (10 + metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/engineering/window_break.dm b/code/modules/gamemaster/event2/events/engineering/window_break.dm index 7aea410d45..716d79f660 100644 --- a/code/modules/gamemaster/event2/events/engineering/window_break.dm +++ b/code/modules/gamemaster/event2/events/engineering/window_break.dm @@ -9,6 +9,7 @@ reusable = TRUE chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/window_break + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/window_break/get_weight() return (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm index 6da19c32cc..ab4fa7e415 100644 --- a/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm +++ b/code/modules/gamemaster/event2/events/everyone/comms_blackout.dm @@ -5,6 +5,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT reusable = TRUE event_type = /datum/event2/event/comms_blackout + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/comms_blackout/get_weight() return 50 + metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5 diff --git a/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm b/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm index f21c341057..bb4cd0af55 100644 --- a/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm +++ b/code/modules/gamemaster/event2/events/everyone/electrical_fault.dm @@ -8,6 +8,7 @@ chaos = 10 chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT event_type = /datum/event2/event/electrical_fault + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/electrical_fault/get_weight() return 10 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) diff --git a/code/modules/gamemaster/event2/events/everyone/gravity.dm b/code/modules/gamemaster/event2/events/everyone/gravity.dm index 5426698a22..ad5cfbc13f 100644 --- a/code/modules/gamemaster/event2/events/everyone/gravity.dm +++ b/code/modules/gamemaster/event2/events/everyone/gravity.dm @@ -5,6 +5,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT reusable = TRUE event_type = /datum/event2/event/gravity + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/gravity/get_weight() return (20 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5)) / (times_ran + 1) diff --git a/code/modules/gamemaster/event2/events/everyone/infestation.dm b/code/modules/gamemaster/event2/events/everyone/infestation.dm index f51456f362..4b7aa6db7f 100644 --- a/code/modules/gamemaster/event2/events/everyone/infestation.dm +++ b/code/modules/gamemaster/event2/events/everyone/infestation.dm @@ -1,6 +1,7 @@ /datum/event2/meta/infestation event_class = "infestation" departments = list(DEPARTMENT_EVERYONE) + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/infestation/get_weight() return metric.count_people_in_department(DEPARTMENT_EVERYONE) * 10 diff --git a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm index 211aa9f973..4eea9ef272 100644 --- a/code/modules/gamemaster/event2/events/everyone/pda_spam.dm +++ b/code/modules/gamemaster/event2/events/everyone/pda_spam.dm @@ -2,6 +2,7 @@ name = "pda spam" departments = list(DEPARTMENT_EVERYONE) event_type = /datum/event2/event/pda_spam + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/pda_spam/get_weight() return metric.count_people_in_department(DEPARTMENT_EVERYONE) * 2 @@ -96,7 +97,7 @@ message = pick("Luxury watches for Blowout sale prices!",\ "Watches, Jewelry & Accessories, Bags & Wallets !",\ "Deposit 100$ and get 300$ totally free!",\ - " 100K NT.|WOWGOLD õnly $89 ",\ + " 100K NT.|WOWGOLD �nly $89 ",\ "We have been filed with a complaint from one of your customers in respect of their business relations with you.",\ "We kindly ask you to open the COMPLAINT REPORT (attached) to reply on this complaint..") if(4) diff --git a/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm b/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm index ebd137b404..e953c2333b 100644 --- a/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm +++ b/code/modules/gamemaster/event2/events/everyone/radiation_storm.dm @@ -4,6 +4,7 @@ chaos = 20 chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/radiation_storm + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/radiation_storm/get_weight() var/medical_factor = metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10 diff --git a/code/modules/gamemaster/event2/events/everyone/random_antag.dm b/code/modules/gamemaster/event2/events/everyone/random_antag.dm index fe3b58be8c..e7bfabcf5d 100644 --- a/code/modules/gamemaster/event2/events/everyone/random_antag.dm +++ b/code/modules/gamemaster/event2/events/everyone/random_antag.dm @@ -10,6 +10,7 @@ departments = list(DEPARTMENT_EVERYONE) chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/random_antagonist + regions = list(EVENT_REGION_UNIVERSAL) // This has an abnormally high weight due to antags being very important for the round, // however the weight will decay with more antags, and more attempts to add antags. diff --git a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm index bfc35440a3..1052e7849e 100644 --- a/code/modules/gamemaster/event2/events/everyone/solar_storm.dm +++ b/code/modules/gamemaster/event2/events/everyone/solar_storm.dm @@ -2,6 +2,7 @@ name = "solar storm" reusable = TRUE event_type = /datum/event2/event/solar_storm + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/solar_storm/get_weight() var/population_factor = metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 diff --git a/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm b/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm index 2d83209612..3f9a1a7ab6 100644 --- a/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm +++ b/code/modules/gamemaster/event2/events/everyone/sudden_weather_shift.dm @@ -3,6 +3,7 @@ departments = list(DEPARTMENT_EVERYONE) reusable = TRUE event_type = /datum/event2/event/sudden_weather_shift + regions = list(EVENT_REGION_PLANETSURFACE) /datum/event2/meta/sudden_weather_shift/get_weight() // The proc name is a bit misleading, it only counts players outside, not all mobs. diff --git a/code/modules/gamemaster/event2/events/medical/appendicitis.dm b/code/modules/gamemaster/event2/events/medical/appendicitis.dm index 27f5284020..f02dd658a9 100644 --- a/code/modules/gamemaster/event2/events/medical/appendicitis.dm +++ b/code/modules/gamemaster/event2/events/medical/appendicitis.dm @@ -4,6 +4,7 @@ chaos = 40 chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/appendicitis + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/appendicitis/get_weight() var/list/doctors = metric.get_people_with_job(/datum/job/doctor) diff --git a/code/modules/gamemaster/event2/events/medical/virus.dm b/code/modules/gamemaster/event2/events/medical/virus.dm index 58791d2ad1..19fc24a8e2 100644 --- a/code/modules/gamemaster/event2/events/medical/virus.dm +++ b/code/modules/gamemaster/event2/events/medical/virus.dm @@ -5,6 +5,7 @@ chaos = 40 chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT event_type = /datum/event2/event/virus + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/virus/superbug name = "viral superbug" diff --git a/code/modules/gamemaster/event2/events/security/carp_migration.dm b/code/modules/gamemaster/event2/events/security/carp_migration.dm index 12f08f3edd..999b4e6625 100644 --- a/code/modules/gamemaster/event2/events/security/carp_migration.dm +++ b/code/modules/gamemaster/event2/events/security/carp_migration.dm @@ -5,6 +5,7 @@ chaos = 30 chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/mob_spawning/carp_migration + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/carp_migration/get_weight() return 10 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 20) + (metric.count_all_space_mobs() * 40) diff --git a/code/modules/gamemaster/event2/events/security/drill_announcement.dm b/code/modules/gamemaster/event2/events/security/drill_announcement.dm index 271e2d75f1..7d806363c7 100644 --- a/code/modules/gamemaster/event2/events/security/drill_announcement.dm +++ b/code/modules/gamemaster/event2/events/security/drill_announcement.dm @@ -3,6 +3,7 @@ departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE) chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT // Don't run if we just got hit by meteors. event_type = /datum/event2/event/security_drill + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/security_drill/get_weight() var/sec = metric.count_people_in_department(DEPARTMENT_SECURITY) diff --git a/code/modules/gamemaster/event2/events/security/prison_break.dm b/code/modules/gamemaster/event2/events/security/prison_break.dm index 4684f0ae17..058104f89f 100644 --- a/code/modules/gamemaster/event2/events/security/prison_break.dm +++ b/code/modules/gamemaster/event2/events/security/prison_break.dm @@ -10,6 +10,7 @@ // the prison area. var/list/relevant_areas = list() var/list/irrelevant_areas = list() + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/prison_break/get_weight() // First, don't do this if nobody can fix the doors. diff --git a/code/modules/gamemaster/event2/events/security/rogue_drones.dm b/code/modules/gamemaster/event2/events/security/rogue_drones.dm index da40b3262f..d908698bdb 100644 --- a/code/modules/gamemaster/event2/events/security/rogue_drones.dm +++ b/code/modules/gamemaster/event2/events/security/rogue_drones.dm @@ -4,6 +4,7 @@ chaos = 40 chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/mob_spawning/rogue_drones + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/rogue_drones/get_weight() . = 10 // Start with a base weight, since this event does provide some value even if no sec is around. @@ -55,7 +56,7 @@ if(drones_to_spawn) var/number_recovered = 0 for(var/mob/living/simple_mob/mechanical/combat_drone/D in spawned_mobs) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, D.loc) sparks.start() D.z = using_map.admin_levels[1] diff --git a/code/modules/gamemaster/event2/events/security/security_advisement.dm b/code/modules/gamemaster/event2/events/security/security_advisement.dm index 6a3764e40e..5362160f90 100644 --- a/code/modules/gamemaster/event2/events/security/security_advisement.dm +++ b/code/modules/gamemaster/event2/events/security/security_advisement.dm @@ -3,6 +3,7 @@ departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE) chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT // So this won't get called in the middle of a crisis. event_type = /datum/event2/event/security_screening + regions = list(EVENT_REGION_UNIVERSAL) /datum/event2/meta/security_screening/get_weight() . = 0 diff --git a/code/modules/gamemaster/event2/events/security/spider_infestation.dm b/code/modules/gamemaster/event2/events/security/spider_infestation.dm index 244db93dd3..5f62aa1bb0 100644 --- a/code/modules/gamemaster/event2/events/security/spider_infestation.dm +++ b/code/modules/gamemaster/event2/events/security/spider_infestation.dm @@ -5,6 +5,7 @@ chaos = 30 chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/spider_infestation + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/spider_infestation/weak name = "weak spider infestation" diff --git a/code/modules/gamemaster/event2/events/security/stowaway.dm b/code/modules/gamemaster/event2/events/security/stowaway.dm index d04d350234..e234b39c51 100644 --- a/code/modules/gamemaster/event2/events/security/stowaway.dm +++ b/code/modules/gamemaster/event2/events/security/stowaway.dm @@ -6,6 +6,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT event_type = /datum/event2/event/ghost_pod_spawner/stowaway var/safe_for_extended = FALSE + regions = list(EVENT_REGION_PLAYER_MAIN_AREA) /datum/event2/meta/stowaway/normal name = "stowaway - normal" diff --git a/code/modules/gamemaster/event2/events/security/surprise_carp.dm b/code/modules/gamemaster/event2/events/security/surprise_carp.dm index 39be6d8412..f96e95bc12 100644 --- a/code/modules/gamemaster/event2/events/security/surprise_carp.dm +++ b/code/modules/gamemaster/event2/events/security/surprise_carp.dm @@ -6,6 +6,7 @@ chaos = 20 chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/surprise_carp + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/surprise_carp/get_weight() return metric.count_all_space_mobs() * 50 diff --git a/code/modules/gamemaster/event2/events/security/swarm_boarder.dm b/code/modules/gamemaster/event2/events/security/swarm_boarder.dm index 54dc03189b..63980945d1 100644 --- a/code/modules/gamemaster/event2/events/security/swarm_boarder.dm +++ b/code/modules/gamemaster/event2/events/security/swarm_boarder.dm @@ -7,6 +7,7 @@ chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT enabled = FALSE // Turns out they are in fact grossly OP. var/safe_for_extended = FALSE + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/swarm_boarder/get_weight() if(istype(ticker.mode, /datum/game_mode/extended) && !safe_for_extended) diff --git a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm index e4c89aa691..1b5cdc0d32 100644 --- a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm +++ b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm @@ -4,6 +4,7 @@ chaos = 40 chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT event_type = /datum/event2/event/ion_storm + regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE) /datum/event2/meta/ion_storm/get_weight() var/list/bots = metric.get_people_in_department(DEPARTMENT_SYNTHETIC) diff --git a/code/modules/gamemaster/event2/meta.dm b/code/modules/gamemaster/event2/meta.dm index 9a285021d7..b75084d4f4 100644 --- a/code/modules/gamemaster/event2/meta.dm +++ b/code/modules/gamemaster/event2/meta.dm @@ -14,6 +14,11 @@ // What departments the event attached might affect. var/list/departments = list(DEPARTMENT_EVERYONE) + // The region affects by this event + // Affects event weight by a similar metric to department population: + // If everybody is planetside, then a meteor storm on the station doesn't really add as much + var/list/regions = list(EVENT_REGION_UNIVERSAL) + // A guess on how disruptive to a round the event might be. If the action is chosen, the GM's // 'danger' score is increased by this number. // Negative numbers could be used to signify helpful events. diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index 3b166ecbbb..1e849d1b8d 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -232,7 +232,7 @@ for(var/turf/T in linkedholodeck) if(prob(30)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, T) s.start() T.ex_act(3) @@ -334,7 +334,7 @@ if(L.name=="Atmospheric Test Start") spawn(20) var/turf/T = get_turf(L) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, T) s.start() if(T) diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index c78dc3658e..18d81fc855 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -202,11 +202,11 @@ if(W.flags & NOBLUDGEON) return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "It's a holowindow, you can't unfasten it!") - else if(W.is_crowbar() && reinf && state <= 1) + else if(W.get_tool_quality(TOOL_CROWBAR) && reinf && state <= 1) to_chat(user, "It's a holowindow, you can't pry it!") - else if(W.is_wrench() && !anchored && (!state || !reinf)) + else if(W.get_tool_quality(TOOL_WRENCH) && !anchored && (!state || !reinf)) to_chat(user, "It's a holowindow, you can't dismantle it!") else if(W.damtype == BRUTE || W.damtype == BURN) @@ -263,7 +263,7 @@ qdel(src) /obj/structure/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) to_chat(user, "It's a holochair, you can't dismantle it!") return @@ -298,7 +298,7 @@ if(active && default_parry_check(user, attacker, damage_source) && prob(50)) user.visible_message("\The [user] parries [attack_text] with \the [src]!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 6accec414d..b2c92deda9 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -36,12 +36,12 @@ . += "The lid is open." /obj/machinery/beehive/attackby(var/obj/item/I, var/mob/user) - if(I.is_crowbar()) + if(I.get_tool_quality(TOOL_CROWBAR)) closed = !closed user.visible_message("[user] [closed ? "closes" : "opens"] \the [src].", "You [closed ? "close" : "open"] \the [src].") update_icon() return - else if(I.is_wrench()) + else if(I.get_tool_quality(TOOL_WRENCH)) anchored = !anchored playsound(src, I.usesound, 50, 1) user.visible_message("[user] [anchored ? "wrenches" : "unwrenches"] \the [src].", "You [anchored ? "wrench" : "unwrench"] \the [src].") @@ -107,7 +107,7 @@ if(smoked) to_chat(user, "The hive is smoked.") return 1 - else if(I.is_screwdriver()) + else if(I.get_tool_quality(TOOL_SCREWDRIVER)) if(bee_count) to_chat(user, "You can't dismantle \the [src] with these bees inside.") return diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 4fff198199..8997747198 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -103,7 +103,7 @@ var/injecting = min(5,max(1,get_trait(TRAIT_POTENCY)/3)) R.add_reagent(rid,injecting) - var/datum/effect/effect/system/smoke_spread/chem/spores/S = new(src) + var/datum/effect_system/smoke_spread/chem/spores/S = new(src) S.attach(T) S.set_up(R, round(get_trait(TRAIT_POTENCY)/4), 0, T) S.start() @@ -352,7 +352,7 @@ if(turfs.len) // Moves the mob, causes sparks. - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, get_turf(target)) s.start() var/turf/picked = get_turf(pick(turfs)) // Just in case... diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 194064e1b0..d143092018 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -96,7 +96,7 @@ if(default_deconstruction_screwdriver(user, W)) return - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) playsound(src, W.usesound, 100, 1) to_chat(user, "You [anchored ? "un" : ""]secure \the [src].") anchored = !anchored diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index 0054651222..74b0f6c558 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -508,18 +508,18 @@ else to_chat(user, "There are no seeds in \the [O.name].") return - else if(O.is_wrench()) + else if(O.get_tool_quality(TOOL_WRENCH)) playsound(src, O.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") - else if(O.is_screwdriver()) + else if(O.get_tool_quality(TOOL_SCREWDRIVER)) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") playsound(src, O.usesound, 50, 1) overlays.Cut() if(panel_open) overlays += image(icon, "[initial(icon_state)]-panel") - else if((O.is_wirecutter() || istype(O, /obj/item/device/multitool)) && panel_open) + else if((O.get_tool_quality(TOOL_WIRECUTTER) || O.get_tool_quality(TOOL_MULTITOOL)) && panel_open) wires.Interact(user) /obj/machinery/seed_storage/emag_act(var/remaining_charges, var/mob/user) @@ -532,7 +532,7 @@ req_access = list() req_one_access = list() to_chat(user, "\The [src]'s access mechanism shorts out.") - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, get_turf(src)) sparks.start() visible_message("\The [src]'s panel sparks!") diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index c554b3a439..d7bf72138f 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -239,7 +239,7 @@ user.setClickCooldown(user.get_attack_speed(W)) plant_controller.add_plant(src) - if(W.is_wirecutter() || istype(W, /obj/item/weapon/surgical/scalpel)) + if(W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_SCALPEL)) if(sampled) to_chat(user, "\The [src] has already been sampled recently.") return diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index bd4b48893f..061d7e68ad 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -48,7 +48,7 @@ die_off() return 0 - for(var/obj/effect/effect/smoke/chem/smoke in view(1, src)) + for(var/obj/effect/vfx/smoke/chem/smoke in view(1, src)) if(smoke.reagents.has_reagent("plantbgone")) die_off() return diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index e24e30e281..2575ef8350 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -469,7 +469,7 @@ if(O.is_open_container()) return 0 - if(O.is_wirecutter() || istype(O, /obj/item/weapon/surgical/scalpel)) + if(O.get_tool_quality(TOOL_WIRECUTTER) || O.get_tool_quality(TOOL_SCALPEL)) if(!seed) to_chat(user, "There is nothing to take a sample from in \the [src].") @@ -564,7 +564,7 @@ qdel(O) check_health() - else if(mechanical && O.is_wrench()) + else if(mechanical && O.get_tool_quality(TOOL_WRENCH)) //If there's a connector here, the portable_atmospherics setup can handle it. if(locate(/obj/machinery/atmospherics/portables_connector/) in loc) diff --git a/code/modules/hydroponics/trays/tray_process.dm b/code/modules/hydroponics/trays/tray_process.dm index 44f40b74fd..669b27cfc4 100644 --- a/code/modules/hydroponics/trays/tray_process.dm +++ b/code/modules/hydroponics/trays/tray_process.dm @@ -3,7 +3,7 @@ return // Handle nearby smoke if any. - for(var/obj/effect/effect/smoke/chem/smoke in view(1, src)) + for(var/obj/effect/vfx/smoke/chem/smoke in view(1, src)) if(smoke.reagents.total_volume) smoke.reagents.trans_to_obj(src, 5, copy = 1) diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index aea7ffc4ea..13f7bd76ce 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -233,7 +233,7 @@ visible_message("\The [user] waves \the [src] around [target].") /obj/item/device/electronic_assembly/attackby(var/obj/item/I, var/mob/user) - if(can_anchor && I.is_wrench()) + if(can_anchor && I.get_tool_quality(TOOL_WRENCH)) anchored = !anchored to_chat(user, span("notice", "You've [anchored ? "" : "un"]secured \the [src] to \the [get_turf(src)].")) if(anchored) @@ -252,14 +252,14 @@ interact(user) return TRUE - else if(I.is_crowbar()) + else if(I.get_tool_quality(TOOL_CROWBAR)) playsound(src, 'sound/items/Crowbar.ogg', 50, 1) opened = !opened to_chat(user, "You [opened ? "opened" : "closed"] \the [src].") update_icon() return TRUE - else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || I.is_screwdriver()) + else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || I.get_tool_quality(TOOL_SCREWDRIVER)) if(opened) interact(user) return TRUE @@ -359,4 +359,4 @@ // Returns TRUE if I is something that could/should have a valid interaction. Used to tell circuitclothes to hit the circuit with something instead of the clothes /obj/item/device/electronic_assembly/proc/is_valid_tool(var/obj/item/I) - return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/weapon/cell/device) || istype(I, /obj/item/device/integrated_electronics) \ No newline at end of file + return I.get_tool_quality(TOOL_CROWBAR) || I.get_tool_quality(TOOL_SCREWDRIVER) || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/weapon/cell/device) || istype(I, /obj/item/device/integrated_electronics) \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/assemblies/device.dm b/code/modules/integrated_electronics/core/assemblies/device.dm index e1180914da..31ab76b24f 100644 --- a/code/modules/integrated_electronics/core/assemblies/device.dm +++ b/code/modules/integrated_electronics/core/assemblies/device.dm @@ -12,7 +12,7 @@ . = ..() /obj/item/device/assembly/electronic_assembly/attackby(obj/item/I as obj, mob/user as mob) - if (I.is_crowbar()) + if (I.get_tool_quality(TOOL_CROWBAR)) toggle_open(user) else if (opened) EA.attackby(I, user) diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index 0a66c29127..4eec6c9ab3 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -274,7 +274,7 @@ /obj/item/weapon/tool/screwdriver, /obj/item/device/multitool ) - cant_hold = list(/obj/item/weapon/tool/screwdriver/power) + cant_hold = list(/obj/item/weapon/tool/powerdrill) /obj/item/weapon/storage/bag/circuits/basic/Initialize() . = ..() diff --git a/code/modules/integrated_electronics/subtypes/power.dm b/code/modules/integrated_electronics/subtypes/power.dm index e1e3f56c89..3a8a73c53c 100644 --- a/code/modules/integrated_electronics/subtypes/power.dm +++ b/code/modules/integrated_electronics/subtypes/power.dm @@ -84,7 +84,7 @@ /obj/item/integrated_circuit/power/transmitter/large/do_work() if(..()) // If the above code succeeds, do this below. if(prob(2)) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, get_turf(src)) sparks.start() visible_message("\The [assembly] makes some sparks!") diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index 9c7d420608..2dd4e454c9 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -38,7 +38,7 @@ /obj/item/integrated_circuit/reagent/smoke/do_work() playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3) - var/datum/effect/effect/system/smoke_spread/chem/smoke_system = new() + var/datum/effect_system/smoke_spread/chem/smoke_system = new() smoke_system.set_up(reagents, 10, 0, get_turf(src)) spawn(0) for(var/i = 1 to 8) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index dbd6eade31..00dd3bdf90 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -38,14 +38,14 @@ return else name = ("bookcase ([newname])") - else if(O.is_wrench()) + else if(O.get_tool_quality(TOOL_WRENCH)) playsound(src, O.usesound, 100, 1) to_chat(user, (anchored ? "You unfasten \the [src] from the floor." : "You secure \the [src] to the floor.")) anchored = !anchored - else if(O.is_screwdriver()) + else if(O.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, O.usesound, 75, 1) to_chat(user, "You begin dismantling \the [src].") - if(do_after(user,25 * O.toolspeed)) + if(do_after(user,25 * O.get_tool_speed(TOOL_SCREWDRIVER))) to_chat(user, "You dismantle \the [src].") new /obj/item/stack/material/wood(get_turf(src), 3) for(var/obj/item/weapon/book/b in contents) @@ -281,7 +281,7 @@ Book Cart End return scanner.computer.inventory.Add(src) to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'") - else if(istype(W, /obj/item/weapon/material/knife) || W.is_wirecutter()) + else if(istype(W, /obj/item/weapon/material/knife) || W.get_tool_quality(TOOL_WIRECUTTER)) if(carved) return to_chat(user, "You begin to carve out [title].") if(do_after(user, 30)) diff --git a/code/modules/materials/sheets/organic/tanning/hide.dm b/code/modules/materials/sheets/organic/tanning/hide.dm index e59d1e2d82..84483917d7 100644 --- a/code/modules/materials/sheets/organic/tanning/hide.dm +++ b/code/modules/materials/sheets/organic/tanning/hide.dm @@ -16,7 +16,7 @@ //Step one - dehairing. /obj/item/stack/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(has_edge(W) || is_sharp(W)) + if(W.edge || W.sharp) //visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message) user.visible_message("\The [user] starts cutting hair off \the [src]", "You start cutting the hair off \the [src]", "You hear the sound of a knife rubbing against flesh") var/scraped = 0 diff --git a/code/modules/materials/sheets/organic/wood.dm b/code/modules/materials/sheets/organic/wood.dm index eb95131425..ee558e0412 100644 --- a/code/modules/materials/sheets/organic/wood.dm +++ b/code/modules/materials/sheets/organic/wood.dm @@ -35,8 +35,8 @@ /obj/item/stack/material/log/attackby(var/obj/item/W, var/mob/user) if(!istype(W) || W.force <= 0) return ..() - if(W.sharp && W.edge) - var/time = (3 SECONDS / max(W.force / 10, 1)) * W.toolspeed + if(W.get_tool_quality(TOOL_WOODCUT)) // Not all that is sharp should chop wood + var/time = (3 SECONDS / max(W.force / 10, 1)) * W.get_tool_speed(TOOL_WOODCUT) user.setClickCooldown(time) if(do_after(user, time, src) && use(1)) to_chat(user, "You cut up a log into planks.") diff --git a/code/modules/metric/activity.dm b/code/modules/metric/activity.dm index c33c88adca..71525237d8 100644 --- a/code/modules/metric/activity.dm +++ b/code/modules/metric/activity.dm @@ -91,3 +91,15 @@ num++ if(num) . = round(. / num, 0.1) + +// Computes activity of players on a per-region basis +/datum/metric/proc/assess_player_regions() + . = list() + for(var/mob/living/L in player_list) + var/activity = assess_player_activity(L) + for(var/region in L.get_player_regions()) + .[region] += activity + + // To prevent the universal region from being chosen too often, scale it down + // If lots of players are active over a wide set of regions, this should prefer events that cover a wider area + .[EVENT_REGION_UNIVERSAL] = round(.[EVENT_REGION_UNIVERSAL] / 2, 1) \ No newline at end of file diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 06dc694313..c8f5cb062c 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -343,7 +343,7 @@ if(default_deconstruction_crowbar(user, W)) return - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) if(istype(get_turf(src), /turf/space)) to_chat(user, "You can't anchor something to empty space. Idiot.") diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index eb15d3f6c5..dc79f0ed6b 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -20,8 +20,6 @@ item_state = "jackhammer" w_class = ITEMSIZE_LARGE matter = list(MAT_STEEL = 3750) - var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO - var/sand_dig = FALSE // does this thing dig sand? origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) attack_verb = list("hit", "pierced", "sliced", "attacked") var/drill_sound = "pickaxe" @@ -30,42 +28,42 @@ var/excavation_amount = 200 var/destroy_artefacts = FALSE // some mining tools will destroy artefacts completely while avoiding side-effects. + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_MEDIOCRE) /obj/item/weapon/pickaxe/silver name = "silver pickaxe" icon_state = "spickaxe" item_state = "spickaxe" - digspeed = 30 origin_tech = list(TECH_MATERIAL = 3) desc = "This makes no metallurgic sense." + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD) /obj/item/weapon/pickaxe/drill name = "advanced mining drill" // Can dig sand as well! icon_state = "handdrill" item_state = "jackhammer" - digspeed = 30 - sand_dig = TRUE origin_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINEERING = 2) desc = "Yours is the drill that will pierce through the rock walls." drill_verb = "drilling" + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD, TOOL_SHOVEL = TOOL_QUALITY_STANDARD) /obj/item/weapon/pickaxe/jackhammer name = "sonic jackhammer" icon_state = "jackhammer" item_state = "jackhammer" - digspeed = 20 //faster than drill, but cannot dig origin_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2) desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards." drill_verb = "hammering" + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/gold name = "golden pickaxe" icon_state = "gpickaxe" item_state = "gpickaxe" - digspeed = 20 origin_tech = list(TECH_MATERIAL = 4) desc = "This makes no metallurgic sense." drill_verb = "picking" + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/plasmacutter name = "plasma cutter" @@ -73,41 +71,39 @@ item_state = "gun" w_class = ITEMSIZE_NORMAL //it is smaller than the pickaxe damtype = "fire" - digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3) desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff." drill_verb = "cutting" drill_sound = 'sound/items/Welder.ogg' sharp = 1 edge = 1 + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/diamond name = "diamond pickaxe" icon_state = "dpickaxe" item_state = "dpickaxe" - digspeed = 10 origin_tech = list(TECH_MATERIAL = 6, TECH_ENGINEERING = 4) desc = "A pickaxe with a diamond pick head." drill_verb = "picking" + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_GOOD) /obj/item/weapon/pickaxe/diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME! name = "diamond mining drill" icon_state = "diamonddrill" item_state = "jackhammer" - digspeed = 5 //Digs through walls, girders, and can dig up sand - sand_dig = TRUE origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINEERING = 5) desc = "Yours is the drill that will pierce the heavens!" drill_verb = "drilling" + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_BEST, TOOL_SHOVEL = TOOL_QUALITY_BEST) /obj/item/weapon/pickaxe/borgdrill name = "enhanced sonic jackhammer" icon_state = "jackhammer" item_state = "jackhammer" - digspeed = 15 - sand_dig = TRUE desc = "Cracks rocks with sonic blasts. This one seems like an improved design." drill_verb = "hammering" + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT, TOOL_SHOVEL = TOOL_QUALITY_DECENT) /*****************************Shovel********************************/ @@ -126,7 +122,6 @@ attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") sharp = 0 edge = 1 - var/digspeed = 40 /obj/item/weapon/shovel/wood icon_state = "whiteshovel" diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 28e8c64807..33583c45e6 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -352,39 +352,7 @@ var/list/mining_overlay_cache = list() return if(!density) - var/valid_tool = 0 - var/digspeed = 40 - - if(istype(W, /obj/item/weapon/shovel)) - var/obj/item/weapon/shovel/S = W - valid_tool = 1 - digspeed = S.digspeed - - if(istype(W, /obj/item/weapon/pickaxe)) - var/obj/item/weapon/pickaxe/P = W - if(P.sand_dig) - valid_tool = 1 - digspeed = P.digspeed - - - if(valid_tool) - if (sand_dug) - to_chat(user, "This area has already been dug.") - return - - var/turf/T = user.loc - if (!(istype(T))) - return - - to_chat(user, "You start digging.") - playsound(user, 'sound/effects/rustle1.ogg', 50, 1) - - if(!do_after(user,digspeed)) return - - to_chat(user, "You dug a hole.") - GetDrilled() - - else if(istype(W,/obj/item/weapon/storage/bag/ore)) + if(istype(W,/obj/item/weapon/storage/bag/ore)) var/obj/item/weapon/storage/bag/ore/S = W if(S.collection_mode) for(var/obj/item/weapon/ore/O in contents) @@ -423,20 +391,38 @@ var/list/mining_overlay_cache = list() to_chat(user, "The plating is going to need some support.") return + else if(W.get_tool_quality(TOOL_SHOVEL)) + var/digspeed = 40 / W.get_tool_quality(TOOL_SHOVEL) + if(sand_dug) + to_chat(user, "This area has already been dug.") + return + + var/turf/T = user.loc + if(!istype(T)) + return + + to_chat(user, "You start digging.") + playsound(user, 'sound/effects/rustle1.ogg', 50, 1) + + if(!do_after(user,digspeed)) + return + + to_chat(user, "You dug a hole.") + GetDrilled() else - if (istype(W, /obj/item/device/core_sampler)) + if(istype(W, /obj/item/device/core_sampler)) geologic_data.UpdateNearbyArtifactInfo(src) var/obj/item/device/core_sampler/C = W C.sample_item(src, user) return - if (istype(W, /obj/item/device/depth_scanner)) + if(istype(W, /obj/item/device/depth_scanner)) var/obj/item/device/depth_scanner/C = W C.scan_atom(user, src) return - if (istype(W, /obj/item/device/measuring_tape)) + if(istype(W, /obj/item/device/measuring_tape)) var/obj/item/device/measuring_tape/P = W user.visible_message("\The [user] extends \a [P] towards \the [src].","You extend \the [P] towards \the [src].") if(do_after(user, 15)) @@ -453,12 +439,13 @@ var/list/mining_overlay_cache = list() to_chat(user, "\The [src] has been excavated to a depth of [excavation_level]cm.") return - if (istype(W, /obj/item/weapon/pickaxe)) - if(!istype(user.loc, /turf)) + if(istype(W, /obj/item/weapon/pickaxe)) + if(!isturf(user.loc)) return + var/digspeed = 40 / W.get_tool_quality(TOOL_MINING) var/obj/item/weapon/pickaxe/P = W - if(last_act + P.digspeed > world.time)//prevents message spam + if(last_act + digspeed > world.time)//prevents message spam return last_act = world.time @@ -474,7 +461,7 @@ var/list/mining_overlay_cache = list() wreckfinds(P.destroy_artefacts) to_chat(user, "You start [P.drill_verb][fail_message].") - if(do_after(user,P.digspeed)) + if(do_after(user,digspeed)) if(finds && finds.len) var/datum/find/F = finds[1] diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm index 393f97c30b..2905d9ad51 100644 --- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm +++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm @@ -216,7 +216,7 @@ prize_list += new /datum/data/mining_equipment(name, path, cost) /obj/machinery/mineral/equipment_vendor/ex_act(severity, target) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(prob(50 / severity) && severity < 3) diff --git a/code/modules/mob/living/bot/SLed209bot.dm b/code/modules/mob/living/bot/SLed209bot.dm index c4fd4b2767..8354cf68d2 100644 --- a/code/modules/mob/living/bot/SLed209bot.dm +++ b/code/modules/mob/living/bot/SLed209bot.dm @@ -150,7 +150,7 @@ qdel(W) if(8) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 100, 1) var/turf/T = get_turf(user) to_chat(user, "Now attaching the gun to the frame...") diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index bfe6d54b0a..283b57fd27 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -101,7 +101,7 @@ else to_chat(user, "Access denied.") return - else if(O.is_screwdriver()) + else if(O.get_tool_quality(TOOL_SCREWDRIVER)) if(!locked) open = !open to_chat(user, "Maintenance panel is now [open ? "opened" : "closed"].") diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index a17434d886..322362b95d 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -137,7 +137,7 @@ if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() qdel(src) diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index f0e58c455f..730c19da50 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -44,7 +44,7 @@ else new /obj/item/clothing/suit/storage/vest(Tsec) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() @@ -188,7 +188,7 @@ qdel(W) if(8) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 100, 1) var/turf/T = get_turf(user) to_chat(user, "Now attaching the gun to the frame...") diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm index d0ebbc91ad..1fae7f8c48 100644 --- a/code/modules/mob/living/bot/edCLNbot.dm +++ b/code/modules/mob/living/bot/edCLNbot.dm @@ -65,7 +65,7 @@ else new /obj/item/device/assembly/prox_sensor(Tsec) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() qdel(src) @@ -193,7 +193,7 @@ qdel(W) if(7) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 100, 1) var/turf/T = get_turf(user) to_chat(user, "Attatching the mop to the frame...") diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index 1577e0d8e4..7a105d360c 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -279,7 +279,7 @@ if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() qdel(src) diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index 8f8a8588fe..d29775d91c 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -304,7 +304,7 @@ new /obj/item/robot_parts/l_arm(Tsec) var/obj/item/stack/tile/floor/T = new /obj/item/stack/tile/floor(Tsec) T.amount = amount - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() qdel(src) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 6c3f77852c..72d7ce363f 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -344,7 +344,7 @@ if(emagged && prob(25)) playsound(src, 'sound/voice/medbot/minsult.ogg', 50, 0) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() qdel(src) diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm index e92cb3e208..d74f86ae89 100644 --- a/code/modules/mob/living/bot/mulebot.dm +++ b/code/modules/mob/living/bot/mulebot.dm @@ -258,7 +258,7 @@ new /obj/item/stack/rods(Tsec) new /obj/item/stack/cable_coil/cut(Tsec) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index ba63dcd527..f3adf730b6 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -360,7 +360,7 @@ if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 4f37526a27..f524a1a69f 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -260,7 +260,7 @@ src.searching = 0 - 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("\The [src] buzzes quietly, and the golden lights fade away. Perhaps you could try again?") @@ -278,7 +278,7 @@ // to_chat(src.brainmob, "Use say #b to speak to other artificial intelligences.") src.brainmob.mind.assigned_role = "Synthetic Brain" - 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("\The [src] chimes quietly.") diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 488eda6e5c..c69440c879 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -66,7 +66,7 @@ to_chat(src.brainmob, "Use say #b to speak to other artificial intelligences.") src.brainmob.mind.assigned_role = "Positronic Brain" - 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("The positronic brain beeps as it loads a personality.") playsound(src, 'sound/misc/boobeebeep.ogg', 50, 1) @@ -80,7 +80,7 @@ src.searching = 0 icon_state = "posibrain" - 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("The positronic brain buzzes and beeps, and the golden lights fade away. Perhaps you could try again?") playsound(src, 'sound/misc/buzzbeep.ogg', 50, 1) diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index c14e635083..a5fee0fab9 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -73,7 +73,7 @@ if(wear_mask && (wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT)) return - for(var/obj/effect/effect/smoke/chem/smoke in view(1, src)) + for(var/obj/effect/vfx/smoke/chem/smoke in view(1, src)) if(smoke.reagents.total_volume) smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1) //maybe check air pressure here or something to see if breathing in smoke is even possible. diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 9eefeaecc5..f160027c9c 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -189,7 +189,7 @@ if(31 to INFINITY) Weaken(10) //This should work for now, more is really silly and makes you lay there forever - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, loc) s.start() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index df195a495e..3d8dad93eb 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -13,8 +13,8 @@ return 0 //Apply weapon damage - var/weapon_sharp = is_sharp(I) - var/weapon_edge = has_edge(I) + var/weapon_sharp = I.sharp + var/weapon_edge = I.edge var/hit_embed_chance = I.embed_chance if(prob(getarmor(hit_zone, "melee"))) //melee armour provides a chance to turn sharp/edge weapon attacks into blunt ones weapon_sharp = 0 diff --git a/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm b/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm index 2c28214f92..7b4d8583cd 100644 --- a/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm +++ b/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm @@ -39,7 +39,7 @@ if(generate_id_gender) identifying_gender = pick(list(MALE, FEMALE, PLURAL, NEUTER)) - ..(loc, generate_species) + . = ..(loc, generate_species) h_style = to_wear_hair diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 013c033482..c80e9a739a 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -154,7 +154,7 @@ amount *= M.incoming_damage_percent if(!isnull(M.incoming_brute_damage_percent)) amount *= M.incoming_brute_damage_percent - O.take_damage(amount, 0, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source) + O.take_damage(amount, 0, damage_source.sharp, damage_source.edge, damage_source) else for(var/datum/modifier/M in modifiers) if(!isnull(M.incoming_healing_percent)) @@ -175,7 +175,7 @@ amount *= M.incoming_damage_percent if(!isnull(M.incoming_fire_damage_percent)) amount *= M.incoming_fire_damage_percent - O.take_damage(0, amount, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source) + O.take_damage(0, amount, damage_source.sharp, damage_source.edge, damage_source) else for(var/datum/modifier/M in modifiers) if(!isnull(M.incoming_healing_percent)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index cdfef35b59..b356944655 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -441,14 +441,13 @@ emp_act var/armor = run_armor_check(affecting, "melee", O.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here if(armor < 100) - apply_damage(throw_damage, dtype, zone, armor, soaked, is_sharp(O), has_edge(O), O) + apply_damage(throw_damage, dtype, zone, armor, soaked, O.sharp, O.edge, O) //thrown weapon embedded object code. if(dtype == BRUTE && istype(O,/obj/item)) var/obj/item/I = O if (!is_robot_module(I)) - var/sharp = is_sharp(I) var/damage = throw_damage if (soaked) damage -= soaked @@ -456,12 +455,11 @@ emp_act damage /= armor+1 //blunt objects should really not be embedding in things unless a huge amount of force is involved - var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3) - var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class - + var/embed_chance = I.sharp ? damage/I.w_class : damage/(I.w_class*3) + var/embed_threshold = I.sharp ? 5*I.w_class : 15*I.w_class //Sharp objects will always embed if they do enough damage. //Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold - if((sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance))) + if((I.sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance))) affecting.embed(I) // Begin BS12 momentum-transfer code. diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 6f25e2c36f..467322081f 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -92,7 +92,7 @@ stance_damage += 2 if(prob(10)) visible_message("\The [src]'s [E.name] [pick("twitches", "shudders")] and sparks!") - var/datum/effect/effect/system/spark_spread/spark_system = new () + var/datum/effect_system/spark_spread/spark_system = new () spark_system.set_up(5, 0, src) spark_system.attach(src) spark_system.start() @@ -177,7 +177,7 @@ custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [E.name] malfunctioning!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) spark_system.start() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c5dbe89fc5..7c9e2bf23b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1136,3 +1136,23 @@ // Each mob does vision a bit differently so this is just for inheritence and also so overrided procs can make the vision apply instantly if they call `..()`. /mob/living/proc/disable_spoiler_vision() handle_vision() + +/mob/living/proc/get_player_regions() + // A living player is always in a universal region + . = list(EVENT_REGION_UNIVERSAL) + + var/turf/T = get_turf(src) + var/obj/effect/overmap/visitable/M = get_overmap_sector(T.z) + + if(istype(M)) + if(M.in_space) + if(T.z in using_map.station_levels) + . |= EVENT_REGION_SPACESTATION + else + . |= EVENT_REGION_DEEPSPACE + else + . |= EVENT_REGION_PLANETSURFACE + + var/datum/map_z_level/zlevel = using_map.zlevels["[T.z]"] + if(istype(zlevel)) + . |= zlevel.event_regions diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index b6e6ffc03f..81238fff6b 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -115,8 +115,8 @@ //Armor var/soaked = get_armor_soak(def_zone, P.check_armour, P.armor_penetration) var/absorb = run_armor_check(def_zone, P.check_armour, P.armor_penetration) - var/proj_sharp = is_sharp(P) - var/proj_edge = has_edge(P) + var/proj_sharp = P.sharp + var/proj_edge = P.edge if ((proj_sharp || proj_edge) && (soaked >= round(P.damage*0.8))) proj_sharp = 0 @@ -246,8 +246,8 @@ if(!effective_force || blocked >= 100) return 0 //Apply weapon damage - var/weapon_sharp = is_sharp(I) - var/weapon_edge = has_edge(I) + var/weapon_sharp = I.sharp + var/weapon_edge = I.edge if(getsoak(hit_zone, "melee",) - (I.armor_penetration/5) > round(effective_force*0.8)) //soaking a hit turns sharp attacks into blunt ones weapon_sharp = 0 @@ -282,7 +282,7 @@ var/soaked = get_armor_soak(null, "melee") - apply_damage(throw_damage, dtype, null, armor, soaked, is_sharp(O), has_edge(O), O) + apply_damage(throw_damage, dtype, null, armor, soaked, O.sharp, O.edge, O) O.throwing = 0 //it hit, so stop moving diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 5006c24c8a..ebcd89f9d1 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -760,14 +760,14 @@ var/list/ai_verbs_default = list( var/obj/item/device/aicard/card = W card.grab_ai(src, user) - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(user == deployed_shell) to_chat(user, "The shell's subsystems resist your efforts to tamper with your bolts.") return if(anchored) playsound(src, W.usesound, 50, 1) user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") - if(!do_after(user,40 * W.toolspeed)) + if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH))) user.visible_message("\The [user] decides not to unbolt \the [src].") return user.visible_message("\The [user] finishes unfastening \the [src]!") @@ -776,7 +776,7 @@ var/list/ai_verbs_default = list( else playsound(src, W.usesound, 50, 1) user.visible_message("\The [user] starts to bolt \the [src] to the plating...") - if(!do_after(user,40 * W.toolspeed)) + if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH))) user.visible_message("\The [user] decides not to bolt \the [src].") return user.visible_message("\The [user] finishes fastening down \the [src]!") diff --git a/code/modules/mob/living/silicon/death.dm b/code/modules/mob/living/silicon/death.dm index f6bb92cb40..a88ed17f4e 100644 --- a/code/modules/mob/living/silicon/death.dm +++ b/code/modules/mob/living/silicon/death.dm @@ -1,6 +1,6 @@ /mob/living/silicon/gib() ..("gibbed-r") - gibs(loc, null, /obj/effect/gibspawner/robot) + gibs(loc, null, /obj/effect/spawner/gibs/robot) /mob/living/silicon/dust() ..("dust-r", /obj/effect/decal/remains/robot) diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm index e4f461179d..755010d1bc 100644 --- a/code/modules/mob/living/silicon/pai/life.dm +++ b/code/modules/mob/living/silicon/pai/life.dm @@ -5,7 +5,7 @@ if(src.cable) if(get_dist(src, src.cable) > 1) - 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("The data cable rapidly retracts back into its spool.", 3, "You hear a click and the sound of wire spooling rapidly.", 2) playsound(src, 'sound/machines/click.ogg', 50, 1) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index fcc1fd62df..06fe2447ee 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -162,7 +162,7 @@ src.silence_time = world.timeofday + 120 * 10 // Silence for 2 minutes to_chat(src, "Communication circuit overload. Shutting down and reloading communication circuits - speech and messaging functionality will be unavailable until the reboot is complete.") if(prob(20)) - 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("A shower of sparks spray from [src]'s inner workings.", 3, "You hear and smell the ozone hiss of electrical sparks being expelled violently.", 2) return src.death(0) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index a2a0e3e411..ef0589cca0 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -178,7 +178,7 @@ var/list/mob_hat_cache = list() to_chat(user, "\The [src] is not compatible with \the [W].") return - else if (W.is_crowbar()) + else if (W.get_tool_quality(TOOL_CROWBAR)) to_chat(user, "\The [src] is hermetically sealed. You can't open the case.") return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index addab67ae1..c86976e01b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -76,8 +76,8 @@ var/modtype = "Default" var/lower_mod = 0 var/jetpack = 0 - var/datum/effect/effect/system/ion_trail_follow/ion_trail = null - var/datum/effect/effect/system/spark_spread/spark_system//So they can initialize sparks whenever/N + var/datum/effect_system/ion_trail_follow/ion_trail = null + var/datum/effect_system/spark_spread/spark_system//So they can initialize sparks whenever/N var/jeton = 0 var/killswitch = 0 var/killswitch_time = 60 @@ -99,7 +99,7 @@ ) /mob/living/silicon/robot/Initialize(var/ml, var/unfinished = 0) - spark_system = new /datum/effect/effect/system/spark_spread() + spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) @@ -540,7 +540,7 @@ for(var/mob/O in viewers(user, null)) O.show_message(text("[user] has fixed some of the burnt wires on [src]!"), 1) - else if (W.is_crowbar() && user.a_intent != I_HURT) // crowbar means open or close the cover + else if (W.get_tool_quality(TOOL_CROWBAR) && user.a_intent != I_HURT) // crowbar means open or close the cover if(opened) if(cell) to_chat(user, "You close the cover.") @@ -617,26 +617,26 @@ C.brute_damage = 0 C.electronics_damage = 0 - else if (W.is_wirecutter() || istype(W, /obj/item/device/multitool)) + else if (W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_MULTITOOL)) if (wiresexposed) wires.Interact(user) else to_chat(user, "You can't reach the wiring.") - else if(W.is_screwdriver() && opened && !cell) // haxing + else if(W.get_tool_quality(TOOL_SCREWDRIVER) && opened && !cell) // haxing wiresexposed = !wiresexposed to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") playsound(src, W.usesound, 50, 1) updateicon() - else if(W.is_screwdriver() && opened && cell) // radio + else if(W.get_tool_quality(TOOL_SCREWDRIVER) && opened && cell) // radio if(radio) radio.attackby(W,user)//Push it to the radio to let it handle everything else to_chat(user, "Unable to locate a radio.") updateicon() - else if(W.is_wrench() && opened && !cell) + else if(W.get_tool_quality(TOOL_WRENCH) && opened && !cell) if(bolt) to_chat(user,"You begin removing \the [bolt].") diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index b719abc1b7..d6cf390806 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -81,7 +81,7 @@ /mob/living/silicon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 0.0, var/def_zone = null, var/stun = 1) if(shock_damage > 0) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, loc) s.start() diff --git a/code/modules/mob/living/simple_mob/butchering.dm b/code/modules/mob/living/simple_mob/butchering.dm index c03c6b8015..a1df4087de 100644 --- a/code/modules/mob/living/simple_mob/butchering.dm +++ b/code/modules/mob/living/simple_mob/butchering.dm @@ -2,7 +2,4 @@ gib_on_butchery = TRUE /mob/living/simple_mob/can_butcher(var/mob/user, var/obj/item/I) // Override for special butchering checks. - . = ..() - - if(. && (!is_sharp(I) || !has_edge(I))) - return FALSE + return ..() && I.sharp && I.edge \ No newline at end of file diff --git a/code/modules/mob/living/simple_mob/combat.dm b/code/modules/mob/living/simple_mob/combat.dm index 1dce673601..73045b51da 100644 --- a/code/modules/mob/living/simple_mob/combat.dm +++ b/code/modules/mob/living/simple_mob/combat.dm @@ -86,6 +86,10 @@ //The actual top-level ranged attack proc /mob/living/simple_mob/proc/shoot_target(atom/A) set waitfor = FALSE + + if(!istype(A) || QDELETED(A)) + return + setClickCooldown(get_attack_speed()) face_atom(A) diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm index b17274bd2f..355bdc62ce 100644 --- a/code/modules/mob/living/simple_mob/defense.dm +++ b/code/modules/mob/living/simple_mob/defense.dm @@ -187,7 +187,7 @@ apply_damage(damage = shock_damage, damagetype = BURN, def_zone = null, blocked = null, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE) playsound(src, "sparks", 50, 1, -1) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, loc) s.start() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm index 1a3d98b772..c3b32d84b6 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm @@ -74,7 +74,7 @@ "rad" = 0 ) - var/datum/effect/effect/system/smoke_spread/frost/smoke_special + var/datum/effect_system/smoke_spread/frost/smoke_special say_list_type = /datum/say_list/frostfly ai_holder_type = /datum/ai_holder/simple_mob/ranged/kiting/threatening/frostfly diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/moth.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/moth.dm index 489c464b7a..e88fb531ba 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/moth.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/moth.dm @@ -59,7 +59,7 @@ var/energy = 100 var/max_energy = 100 - var/datum/effect/effect/system/smoke_spread/mothspore/smoke_spore + var/datum/effect_system/smoke_spread/mothspore/smoke_spore say_list_type = /datum/say_list/tymisian ai_holder_type = /datum/ai_holder/simple_mob/ranged/kiting/threatening/frostfly //Uses frostfly AI, since so similar mechanically @@ -80,12 +80,13 @@ threaten_sound = 'sound/effects/spray3.ogg' stand_down_sound = 'sound/effects/squelch1.ogg' -/obj/effect/effect/smoke/elemental/mothspore + +/obj/effect/vfx/smoke/elemental/mothspore name = "spore cloud" desc = "A dust cloud filled with disorienting bacterial spores." color = "#80AB82" -/obj/effect/effect/smoke/elemental/mothspore/affect(mob/living/L) //Similar to a very weak flash, but depends on breathing instead of eye protection. +/obj/effect/vfx/smoke/elemental/mothspore/affect(mob/living/L) //Similar to a very weak flash, but depends on breathing instead of eye protection. if(iscarbon(L)) var/mob/living/carbon/C = L if(C.stat != DEAD) @@ -97,8 +98,8 @@ H.eye_blurry = max(H.eye_blurry, spore_strength) H.adjustHalLoss(10 * (spore_strength / 5)) -/datum/effect/effect/system/smoke_spread/mothspore - smoke_type = /obj/effect/effect/smoke/elemental/mothspore +/datum/effect_system/smoke_spread/mothspore + smoke_type = /obj/effect/vfx/smoke/elemental/mothspore /mob/living/simple_mob/animal/sif/tymisian/do_special_attack(atom/A) . = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm index 60532385ad..3c6fc36667 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm @@ -301,6 +301,10 @@ /mob/living/simple_mob/humanoid/merc/ranged/sniper/shoot_target(atom/A) set waitfor = FALSE + + if(!istype(A) || QDELETED(A)) + return + setClickCooldown(get_attack_speed()) face_atom(A) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/combat_drone.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/combat_drone.dm index 14d1365fb9..35d78884b4 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/combat_drone.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/combat_drone.dm @@ -59,7 +59,7 @@ ai_holder_type = /datum/ai_holder/simple_mob/ranged/kiting/threatening say_list_type = /datum/say_list/malf_drone - var/datum/effect/effect/system/ion_trail_follow/ion_trail = null + var/datum/effect_system/ion_trail_follow/ion_trail = null var/obj/item/shield_projector/shields = null /mob/living/simple_mob/mechanical/combat_drone/Initialize() diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm index a12b2c7c09..583802549e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm @@ -60,7 +60,7 @@ /obj/item/weapon/ore = 5 ) - var/datum/effect/effect/system/ion_trail_follow/ion_trail = null + var/datum/effect_system/ion_trail_follow/ion_trail = null var/obj/item/shield_projector/shields = null var/obj/item/weapon/storage/bag/ore/my_storage = null diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm index 3f4091b0c2..17dab28b5e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm @@ -73,7 +73,7 @@ ..() visible_message("\The [src] disintegrates!") new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() qdel(src) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm index b1494bc268..22f7b8379a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm @@ -29,7 +29,7 @@ ..() visible_message(span("warning","\The [src] blows apart!")) new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() qdel(src) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm index 077cf1ebac..67a2bff49a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm @@ -53,6 +53,7 @@ melee_damage_upper = 15 projectile_dispersion = 5 projectile_accuracy = -15 + projectilesound = 'sound/weapons/mech_autocannon.ogg' // Also beefy, but tries to stay at their 'home', ideal for base defense. /mob/living/simple_mob/mechanical/hivebot/ranged_damage/strong/guard @@ -113,6 +114,7 @@ name = "siege engine hivebot" desc = "A large robot capable of delivering long range bombardment." projectiletype = /obj/item/projectile/arc/test + projectilesound = 'sound/weapons/mech_mortar.ogg' icon_scale_x = 2 icon_scale_y = 2 icon_state = "red" diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm index 4049ba0370..e1a044c30b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm @@ -230,7 +230,7 @@ icon_state = "mortar" /obj/item/projectile/arc/explosive_rocket/on_impact(turf/T) - new /obj/effect/explosion(T) // Weak explosions don't produce this on their own, apparently. + new /obj/effect/vfx/explosion(T) // Weak explosions don't produce this on their own, apparently. explosion(T, 0, 0, 2, adminlog = FALSE) /mob/living/simple_mob/mechanical/mecha/combat/gygax/dark/advanced/proc/launch_microsingularity(atom/target) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/hoverpod.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/hoverpod.dm index a0f442f909..ddeec67e63 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/hoverpod.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/hoverpod.dm @@ -29,14 +29,13 @@ base_attack_cooldown = 2 SECONDS organ_names = /decl/mob_organ_names/hoverpod - - var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/datum/effect_system/ion_trail_follow/ion_trail /mob/living/simple_mob/mechanical/mecha/hoverpod/manned pilot_type = /mob/living/simple_mob/humanoid/merc/ranged /mob/living/simple_mob/mechanical/mecha/hoverpod/Initialize() - ion_trail = new /datum/effect/effect/system/ion_trail_follow() + ion_trail = new /datum/effect_system/ion_trail_follow() ion_trail.set_up(src) ion_trail.start() return ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm index c2afc8b546..3c1446142a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm @@ -35,7 +35,7 @@ ai_holder_type = /datum/ai_holder/simple_mob/melee say_list_type = /datum/say_list/malf_drone - var/datum/effect/effect/system/spark_spread/sparks + var/datum/effect_system/spark_spread/sparks var/wreckage = /obj/effect/decal/mecha_wreckage/gygax/dark var/pilot_type = null // Set to spawn a pilot when destroyed. Setting this also makes the mecha vulnerable to things that affect sentient minds. var/deflect_chance = 10 // Chance to outright stop an attack, just like a normal exosuit. diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm index 94737e4b67..35dd3c6411 100644 --- a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm +++ b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm @@ -64,7 +64,7 @@ if(!(P.damage_type == BRUTE || P.damage_type == BURN)) projectile_dam_type = BRUTE incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to brute for physical projectiles, though severely decreased. - apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P) + apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, P.sharp, P.edge, P) return -1 //Doesn't reflect non-beams or non-energy projectiles. They just smack and drop with little to no effect. else visible_message("The [P.name] gets reflected by [src]'s shell!", \ @@ -74,7 +74,7 @@ if(!(P.damage_type == BRUTE || P.damage_type == BURN)) projectile_dam_type = BURN incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to burn for energy-type projectiles, though severely decreased. - apply_damage(incoming_damage, P.damage_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P) + apply_damage(incoming_damage, P.damage_type, null, armorcheck, soakedcheck, P.sharp, P.edge, P) // Find a turf near or on the original location to bounce to if(P.starting) diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/combat.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/combat.dm index 2cda9bfc7e..f466bde00c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/combat.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/combat.dm @@ -28,7 +28,7 @@ L.buckled.unbuckle_mob() // To prevent an exploit where being buckled prevents slimes from jumping on you. L.stuttering = max(L.stuttering, stun_power) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, L) s.start() diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm index b0988c28dd..c1b0f3b3f0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm @@ -358,9 +358,9 @@ to_chat(src, span("warning", "There wasn't an unoccupied spot to teleport to.")) return FALSE - var/datum/effect/effect/system/spark_spread/s1 = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s1 = new /datum/effect_system/spark_spread s1.set_up(5, 1, T) - var/datum/effect/effect/system/spark_spread/s2 = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s2 = new /datum/effect_system/spark_spread s2.set_up(5, 1, target_turf) diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index 24c02c1add..3defb5b740 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -146,7 +146,7 @@ try_install_component(user, C) else to_chat(user, "This component is too large for \the [src].") - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) var/list/components = get_all_components() if(components.len) to_chat(user, "Remove all components from \the [src] before disassembling it.") @@ -171,7 +171,7 @@ to_chat(user, "You repair \the [src].") return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) var/list/all_components = get_all_components() if(!all_components.len) to_chat(user, "This device doesn't have any components installed.") diff --git a/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm b/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm index 9ba516a02c..52005fd6b9 100644 --- a/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm +++ b/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm @@ -25,7 +25,7 @@ name = "telescreen" /obj/item/modular_computer/telescreen/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) if(anchored) shutdown_computer() anchored = FALSE diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index 5d0e291336..928caff65c 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -24,7 +24,7 @@ computer.visible_message("\The [computer]'s screen brightly flashes and loud electrical buzzing is heard.") computer.enabled = 0 computer.update_icon() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(10, 1, computer.loc) s.start() diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm index 5a50bb0545..d048c55cb3 100644 --- a/code/modules/multiz/pipes.dm +++ b/code/modules/multiz/pipes.dm @@ -80,7 +80,7 @@ /obj/machinery/atmospherics/pipe/zpipe/proc/burst() src.visible_message("\The [src] bursts!"); playsound(src, 'sound/effects/bang.ogg', 25, 1) - var/datum/effect/effect/system/smoke_spread/smoke = new + var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) smoke.start() qdel(src) // NOT qdel. diff --git a/code/modules/organs/internal/augment/armmounted.dm b/code/modules/organs/internal/augment/armmounted.dm index c22988de83..27e7a4334a 100644 --- a/code/modules/organs/internal/augment/armmounted.dm +++ b/code/modules/organs/internal/augment/armmounted.dm @@ -21,7 +21,7 @@ integrated_object_type = /obj/item/weapon/gun/energy/laser/mounted/augment /obj/item/organ/internal/augment/armmounted/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) switch(organ_tag) if(O_AUG_L_FOREARM) organ_tag = O_AUG_R_FOREARM @@ -66,7 +66,7 @@ integrated_object_type = /obj/item/weapon/portable_scanner /obj/item/organ/internal/augment/armmounted/hand/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) switch(organ_tag) if(O_AUG_L_HAND) organ_tag = O_AUG_R_HAND @@ -110,7 +110,7 @@ integrated_object_type = null /obj/item/organ/internal/augment/armmounted/shoulder/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) switch(organ_tag) if(O_AUG_L_UPPERARM) organ_tag = O_AUG_R_UPPERARM @@ -166,8 +166,6 @@ integrated_object_type = null - toolspeed = 0.8 - var/list/integrated_tools = list( /obj/item/weapon/tool/screwdriver = null, /obj/item/weapon/tool/wrench = null, @@ -211,7 +209,8 @@ integrated_tools[path] = new path(src) var/obj/item/I = integrated_tools[path] I.canremove = FALSE - I.toolspeed = toolspeed + for(var/quality in I.tool_qualities) + I.set_tool_quality(quality, TOOL_QUALITY_MEDIOCRE) I.my_augment = src I.name = "integrated [I.name]" diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 103c64a925..cc9baf8314 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -458,20 +458,11 @@ var/list/organ_cache = list() return ..() /obj/item/organ/proc/can_butcher(var/obj/item/O, var/mob/living/user) - if(butcherable && meat_type) - - if(istype(O, /obj/machinery/gibber)) // The great equalizer. - return TRUE - - if(robotic >= ORGAN_ROBOT) - if(O.is_screwdriver()) - return TRUE - - else - if(is_sharp(O) && has_edge(O)) - return TRUE - - return FALSE + return (butcherable && meat_type) && ( \ + istype(O, /obj/machinery/gibber) || \ + (robotic >= ORGAN_ROBOT && O.get_tool_quality(TOOL_SCREWDRIVER)) || \ + (O.sharp && O.edge) + ) /obj/item/organ/proc/butcher(var/obj/item/O, var/mob/living/user, var/atom/newtarget) if(robotic >= ORGAN_ROBOT) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index a50397bcb2..8bab16150f 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -1236,7 +1236,7 @@ Note that amputating the affected organ does in fact remove the infection from t "Your [src.name] explodes!",\ "You hear an explosion!") explosion(get_turf(owner),-1,-1,2,3) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, victim) spark_system.attach(owner) spark_system.start() diff --git a/code/modules/overmap/overmap_shuttle.dm b/code/modules/overmap/overmap_shuttle.dm index 4a571c1a06..aa48cf0138 100644 --- a/code/modules/overmap/overmap_shuttle.dm +++ b/code/modules/overmap/overmap_shuttle.dm @@ -167,7 +167,7 @@ ..() /obj/structure/fuel_port/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) if(opened) to_chat(user, "You tightly shut \the [src] door.") playsound(src, 'sound/effects/locker_close.ogg', 25, 0, -3) diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index 9c68cb26fa..374992b65f 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -193,7 +193,7 @@ toggle() if(heat > critical_heat) src.visible_message("\The [src] violently spews out sparks!") - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 5c2031df83..50bf0830d3 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -120,7 +120,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins SSnanoui.update_uis(src) /obj/machinery/photocopier/faxmachine/attackby(obj/item/O as obj, mob/user as mob) - if(O.is_multitool() && panel_open) + if(O.get_tool_quality(TOOL_MULTITOOL) && panel_open) var/input = sanitize(input(usr, "What Department ID would you like to give this fax machine?", "Multitool-Fax Machine Interface", department)) if(!input) to_chat(usr, "No input found. Please hang up and try your call again.") diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index c4fa72a9b5..4939645484 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -38,14 +38,14 @@ P.loc = src open_animation() SStgui.update_uis(src) - else if(P.is_wrench()) + else if(P.get_tool_quality(TOOL_WRENCH)) playsound(src, P.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") - else if(P.is_screwdriver()) + else if(P.get_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "You begin taking the [name] apart.") playsound(src, P.usesound, 50, 1) - if(do_after(user, 10 * P.toolspeed)) + if(do_after(user, 10 * P.get_tool_speed(TOOL_SCREWDRIVER))) playsound(src, P.usesound, 50, 1) to_chat(user, "You take the [name] apart.") new /obj/item/stack/material/steel( src.loc, 4 ) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 0a10eabc23..77b7b08e6d 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -35,7 +35,7 @@ if(istype(W, /obj/item/weapon/storage)) empty_bin(user, W) return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) playsound(src, W.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 5d554b05d3..a47507392c 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -156,7 +156,7 @@ qdel(O) else to_chat(user, "This cartridge is not yet ready for replacement! Use up the rest of the toner.") - else if(O.is_wrench()) + else if(O.get_tool_quality(TOOL_WRENCH)) playsound(src, O.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm index 4b561c9844..a442c048d6 100644 --- a/code/modules/pda/core_apps.dm +++ b/code/modules/pda/core_apps.dm @@ -35,7 +35,7 @@ if(1) // Configure pAI device pda.pai.attack_self(usr) if(2) // Eject pAI device - var/turf/T = get_turf_or_move(pda.loc) + var/turf/T = get_turf(pda.loc) if(T) pda.pai.loc = T pda.pai = null diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm index f08c9ca507..027f940d9a 100644 --- a/code/modules/pda/pda.dm +++ b/code/modules/pda/pda.dm @@ -230,14 +230,14 @@ var/global/list/obj/item/device/pda/PDAs = list() empulse(P.loc, 1, 2, 4, 6, 1) message += "Your [P] emits a wave of electromagnetic energy!" if(i>=25 && i<=40) //Smoke - var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem + var/datum/effect_system/smoke_spread/chem/S = new /datum/effect_system/smoke_spread/chem S.attach(P.loc) S.set_up(P, 10, 0, P.loc) playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3) S.start() message += "Large clouds of smoke billow forth from your [P]!" if(i>=40 && i<=45) //Bad smoke - var/datum/effect/effect/system/smoke_spread/bad/B = new /datum/effect/effect/system/smoke_spread/bad + var/datum/effect_system/smoke_spread/bad/B = new /datum/effect_system/smoke_spread/bad B.attach(P.loc) B.set_up(P, 10, 0, P.loc) playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3) @@ -252,7 +252,7 @@ var/global/list/obj/item/device/pda/PDAs = list() M.apply_effects(1,0,0,0,1) message += "Your [P] flashes with a blinding white light! You feel weaker." if(i>=85) //Sparks - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, P.loc) s.start() message += "Your [P] begins to spark violently!" diff --git a/code/modules/persistence/noticeboard.dm b/code/modules/persistence/noticeboard.dm index edccbc4c67..06c6b3da9e 100644 --- a/code/modules/persistence/noticeboard.dm +++ b/code/modules/persistence/noticeboard.dm @@ -85,7 +85,7 @@ icon_state = "[base_icon_state][LAZYLEN(notices)]" /obj/structure/noticeboard/attackby(var/obj/item/weapon/thing, var/mob/user) - if(thing.is_screwdriver()) + if(thing.get_tool_quality(TOOL_SCREWDRIVER)) var/choice = input("Which direction do you wish to place the noticeboard?", "Noticeboard Offset") as null|anything in list("North", "South", "East", "West") if(choice && Adjacent(user) && thing.loc == user && !user.incapacitated()) playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) @@ -103,7 +103,7 @@ pixel_x = -32 pixel_y = 0 return - else if(thing.is_wrench()) + else if(thing.get_tool_quality(TOOL_WRENCH)) visible_message(SPAN_WARNING("\The [user] begins dismantling \the [src].")) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 50, src)) diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm index 09c96fc4c8..b418a42db0 100644 --- a/code/modules/planet/sif.dm +++ b/code/modules/planet/sif.dm @@ -337,7 +337,7 @@ var/datum/planet/sif/planet_sif = null "A bright flash heralds the approach of a storm." ) outdoor_sounds_type = /datum/looping_sound/weather/rain/heavy - indoor_sounds_type = /datum/looping_sound/weather/rain/heavy/indoors + indoor_sounds_type = /datum/looping_sound/weather/rain/indoors/heavy transition_chances = list( diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index c5a0e152c0..bb28b70ba4 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -140,7 +140,7 @@ /obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user) if(!istype(W) || !user) return - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) if(!anchored) playsound(src, W.usesound, 75, 1) user.visible_message("[user.name] secures the [src.name] to the floor.", \ diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index c2a676019c..901447c1cc 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -480,14 +480,14 @@ GLOBAL_LIST_EMPTY(apcs) if(issilicon(user) && get_dist(src,user) > 1) return attack_hand(user) add_fingerprint(user) - if(W.is_crowbar() && opened) + if(W.get_tool_quality(TOOL_CROWBAR) && opened) if(has_electronics == APC_HAS_ELECTRONICS_WIRED) if(terminal) to_chat(user, "Disconnect the wires first.") return playsound(src, W.usesound, 50, 1) to_chat(user, "You begin to remove the power control board...") //lpeters - fixed grammar issues //Ner - grrrrrr - if(do_after(user, 50 * W.toolspeed)) + if(do_after(user, 50 * W.get_tool_speed(TOOL_CROWBAR))) if(has_electronics == APC_HAS_ELECTRONICS_WIRED) has_electronics = APC_HAS_ELECTRONICS_NONE if((stat & BROKEN)) @@ -504,7 +504,7 @@ GLOBAL_LIST_EMPTY(apcs) else if(opened != 2) //cover isn't removed opened = 0 update_icon() - else if(W.is_crowbar() && !(stat & BROKEN) ) + else if(W.get_tool_quality(TOOL_CROWBAR) && !(stat & BROKEN) ) if(coverlocked && !(stat & MAINT)) to_chat(user, "The cover is locked and cannot be opened.") return @@ -530,7 +530,7 @@ GLOBAL_LIST_EMPTY(apcs) "You insert the power cell.") chargecount = 0 update_icon() - else if (W.is_screwdriver()) // haxing + else if (W.get_tool_quality(TOOL_SCREWDRIVER)) // haxing if(opened) if(cell) to_chat(user, "Remove the power cell first.") @@ -575,7 +575,7 @@ GLOBAL_LIST_EMPTY(apcs) if(C.amount >= 10 && !terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED) var/obj/structure/cable/N = T.get_cable_node() if(prob(50) && electrocute_mob(usr, N, N)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(user.stunned) @@ -586,7 +586,7 @@ GLOBAL_LIST_EMPTY(apcs) "You add cables to the APC frame.") make_terminal() terminal.connect_to_network() - else if(W.is_wirecutter() && terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED) + else if(W.get_tool_quality(TOOL_WIRECUTTER) && terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED) var/turf/T = loc if(istype(T) && !T.is_plating()) to_chat(user, "You must remove the floor plating in front of the APC first.") @@ -594,10 +594,10 @@ GLOBAL_LIST_EMPTY(apcs) user.visible_message("[user.name] starts dismantling the [src]'s power terminal.", \ "You begin to cut the cables...") playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 50 * W.toolspeed)) + if(do_after(user, 50 * W.get_tool_speed(TOOL_WIRECUTTER))) if(terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(usr.stunned) @@ -618,7 +618,7 @@ GLOBAL_LIST_EMPTY(apcs) else if(istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics == APC_HAS_ELECTRONICS_NONE && ((stat & BROKEN))) to_chat(user, "The [src] is too broken for that. Repair it first.") return - else if(istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics == APC_HAS_ELECTRONICS_NONE && !terminal) + else if(W.get_tool_quality(TOOL_WELDER) && opened && has_electronics == APC_HAS_ELECTRONICS_NONE && !terminal) var/obj/item/weapon/weldingtool/WT = W if(WT.get_fuel() < 3) to_chat(user, "You need more welding fuel to complete this task.") @@ -627,7 +627,7 @@ GLOBAL_LIST_EMPTY(apcs) "You start welding the APC frame...", \ "You hear welding.") playsound(src, WT.usesound, 25, 1) - if(do_after(user, 50 * WT.toolspeed)) + if(do_after(user, 50 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.remove_fuel(3, user)) return if(emagged || (stat & BROKEN) || opened==2) new /obj/item/stack/material/steel(loc) @@ -685,9 +685,10 @@ GLOBAL_LIST_EMPTY(apcs) "You hear a bang!") update_icon() else - if(istype(user, /mob/living/silicon)) - return attack_hand(user) - if(!opened && wiresexposed && (istype(W, /obj/item/device/multitool) || W.is_wirecutter() || istype(W, /obj/item/device/assembly/signaler))) + if(istype(user, /mob/living/silicon) || ( \ + !opened && wiresexposed && ( \ + W.get_tool_quality(TOOL_MULTITOOL) || W.get_tool_quality(TOOL_WIRECUTTER) || istype(W, /obj/item/device/assembly/signaler) + ) ) ) return attack_hand(user) //Placeholder until someone can do take_damage() for APCs or something. to_chat(user, "The [name] looks too sturdy to bash open with \the [W.name].") diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index b8256f6b58..032eda7a6c 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -176,7 +176,7 @@ var/list/possible_cable_coil_colours = list( if(!T.is_plating()) return - if(W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WIRECUTTER)) var/obj/item/stack/cable_coil/CC if(d1 == UP || d2 == UP) to_chat(user, "You must cut this cable from above.") @@ -241,7 +241,7 @@ var/list/possible_cable_coil_colours = list( if(!prob(prb)) return 0 if (electrocute_mob(user, powernet, src, siemens_coeff)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() if(usr.stunned) @@ -510,7 +510,7 @@ var/list/possible_cable_coil_colours = list( stacktype = /obj/item/stack/cable_coil drop_sound = 'sound/items/drop/accessory.ogg' pickup_sound = 'sound/items/pickup/accessory.ogg' - tool_qualities = list(TOOL_CABLE_COIL) + tool_qualities = list(TOOL_CABLE_COIL = TOOL_QUALITY_STANDARD) /obj/item/stack/cable_coil/cyborg name = "cable coil synthesizer" @@ -947,7 +947,7 @@ var/list/possible_cable_coil_colours = list( slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined", "flogged") stacktype = null - toolspeed = 0.25 + tool_qualities = list(TOOL_CABLE_COIL = TOOL_QUALITY_GOOD) /obj/item/stack/cable_coil/alien/Initialize(var/ml, length = MAXCOIL, var/param_color = null) //There has to be a better way to do this. . = ..() diff --git a/code/modules/power/cable_ender.dm b/code/modules/power/cable_ender.dm index 20ca1fdd05..bda5115053 100644 --- a/code/modules/power/cable_ender.dm +++ b/code/modules/power/cable_ender.dm @@ -24,7 +24,7 @@ /obj/structure/cable/ender/attackby(obj/item/W, mob/user) src.add_fingerprint(user) - if(W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WIRECUTTER)) to_chat(user, " These cables are too tough to be cut with those [W.name].") return else if(istype(W, /obj/item/stack/cable_coil)) diff --git a/code/modules/power/cable_heavyduty.dm b/code/modules/power/cable_heavyduty.dm index 692dcd73d9..76122c53b6 100644 --- a/code/modules/power/cable_heavyduty.dm +++ b/code/modules/power/cable_heavyduty.dm @@ -17,7 +17,7 @@ if(!T.is_plating()) return - if(W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WIRECUTTER)) to_chat(usr, "These cables are too tough to be cut with those [W.name].") return else if(istype(W, /obj/item/stack/cable_coil)) diff --git a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm index adb661c25b..b70a28120c 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm @@ -68,7 +68,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors) cur_assembly = W return - if(W.is_wrench() || W.is_screwdriver() || W.is_crowbar() || istype(W, /obj/item/weapon/storage/part_replacer)) + if(W.get_tool_quality(TOOL_WRENCH) || W.get_tool_quality(TOOL_SCREWDRIVER) || W.get_tool_quality(TOOL_CROWBAR) || istype(W, /obj/item/weapon/storage/part_replacer)) if(injecting) to_chat(user, "Shut \the [src] off first!") return diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index c6ad30ccc5..2e2062b565 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -136,7 +136,7 @@ GLOBAL_LIST_EMPTY(all_turbines) //Exceeding maximum power leads to some power loss if(effective_gen > max_power && prob(5)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() stored_energy *= 0.5 @@ -169,7 +169,7 @@ GLOBAL_LIST_EMPTY(all_turbines) attack_hand(user) /obj/machinery/power/generator/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.", \ diff --git a/code/modules/power/grid_checker.dm b/code/modules/power/grid_checker.dm index 224eade429..124359bc88 100644 --- a/code/modules/power/grid_checker.dm +++ b/code/modules/power/grid_checker.dm @@ -38,12 +38,12 @@ /obj/machinery/power/grid_checker/attackby(obj/item/W, mob/user) if(!user) return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) default_deconstruction_screwdriver(user, W) opened = !opened - else if(W.is_crowbar()) + else if(W.get_tool_quality(TOOL_CROWBAR)) default_deconstruction_crowbar(user, W) - else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter()) + else if(W.get_tool_quality(TOOL_MULTITOOL) || W.get_tool_quality(TOOL_WIRECUTTER)) attack_hand(user) /obj/machinery/power/grid_checker/attack_hand(mob/user) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 216144f6b9..99b09893b5 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -103,11 +103,11 @@ var/global/list/light_type_cache = list() add_fingerprint(user) return - if (W.is_wrench()) + if (W.get_tool_quality(TOOL_WRENCH)) if (src.stage == 1) playsound(src, W.usesound, 75, 1) to_chat(usr, "You begin deconstructing [src].") - if (!do_after(usr, 30 * W.toolspeed)) + if (!do_after(usr, 30 * W.get_tool_speed(TOOL_WRENCH))) return new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded ) user.visible_message("[user.name] deconstructs [src].", \ @@ -122,7 +122,7 @@ var/global/list/light_type_cache = list() to_chat(usr, "You have to unscrew the case first.") return - if(W.is_wirecutter()) + if(W.get_tool_quality(TOOL_WIRECUTTER)) if (src.stage != 2) return src.stage = 1 src.update_icon() @@ -142,7 +142,7 @@ var/global/list/light_type_cache = list() "You add wires to [src].") return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) if (src.stage == 2) src.stage = 3 src.update_icon() @@ -558,7 +558,7 @@ var/global/list/light_type_cache = list() // attempt to stick weapon into light socket else if(status == LIGHT_EMPTY) - if(W.is_screwdriver()) //If it's a screwdriver open it. + if(W.get_tool_quality(TOOL_SCREWDRIVER)) //If it's a screwdriver open it. playsound(src, W.usesound, 75, 1) user.visible_message("[user.name] opens [src]'s casing.", \ "You open [src]'s casing.", "You hear a noise.") @@ -568,7 +568,7 @@ var/global/list/light_type_cache = list() to_chat(user, "You stick \the [W] into the light socket!") if(has_power() && !(W.flags & NOCONDUCT)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() //if(!user.mutations & COLD_RESISTANCE) @@ -576,7 +576,7 @@ var/global/list/light_type_cache = list() electrocute_mob(user, get_area(src), src, rand(0.7,1.0)) /obj/machinery/light/flamp/attackby(obj/item/W, mob/user) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) anchored = !anchored playsound(src, W.usesound, 50, 1) to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") @@ -589,7 +589,7 @@ var/global/list/light_type_cache = list() return else - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 75, 1) user.visible_message("[user.name] removes [src]'s lamp shade.", \ "You remove [src]'s lamp shade.", "You hear a noise.") @@ -754,7 +754,7 @@ var/global/list/light_type_cache = list() if(status == LIGHT_OK || status == LIGHT_BURNED) playsound(src, 'sound/effects/Glasshit.ogg', 75, 1) if(on) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() status = LIGHT_BROKEN diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm index dffcce3da7..4090349889 100644 --- a/code/modules/power/pacman2.dm +++ b/code/modules/power/pacman2.dm @@ -71,7 +71,7 @@ O.loc = src to_chat(user, "You add the phoron tank to the generator.") else if(!active) - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) anchored = !anchored playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) if(anchored) @@ -79,14 +79,14 @@ else to_chat(user, "You unsecure the generator from the floor.") SSmachines.makepowernets() - else if(O.is_screwdriver()) + else if(O.get_tool_quality(TOOL_SCREWDRIVER)) open = !open playsound(src, O.usesound, 50, 1) if(open) to_chat(user, "You open the access panel.") else to_chat(user, "You close the access panel.") - else if(O.is_crowbar() && !open) + else if(O.get_tool_quality(TOOL_CROWBAR) && !open) playsound(src, O.usesound, 50, 1) var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc) for(var/obj/item/I in component_parts) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index f5c3d81676..f75c966a14 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -275,7 +275,7 @@ updateUsrDialog() return else if(!active) - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) if(!anchored) connect_to_network() to_chat(user, "You secure the generator to the floor.") diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index c3b79601e7..1cb8857ec5 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -71,11 +71,11 @@ var/global/list/rad_collectors = list() W.loc = src update_icons() return 1 - else if(W.is_crowbar()) + else if(W.get_tool_quality(TOOL_CROWBAR)) if(P && !src.locked) eject() return 1 - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(P) to_chat(user, "Remove the phoron tank first.") return 1 diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 23e0946bfc..2cc8bcbff0 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -136,7 +136,7 @@ playsound(src, 'sound/weapons/emitter.ogg', 25, 1) if(prob(35)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() @@ -147,7 +147,7 @@ /obj/machinery/power/emitter/attackby(obj/item/W, mob/user) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) if(active) to_chat(user, "Turn off [src] first.") return @@ -171,7 +171,7 @@ to_chat(user, "\The [src] needs to be unwelded from the floor.") return - if(istype(W, /obj/item/weapon/weldingtool)) + if(W.get_tool_quality(TOOL_WELDER)) var/obj/item/weapon/weldingtool/WT = W if(active) to_chat(user, "Turn off [src] first.") @@ -185,7 +185,7 @@ user.visible_message("[user.name] starts to weld [src] to the floor.", \ "You start to weld [src] to the floor.", \ "You hear welding") - if (do_after(user,20 * WT.toolspeed)) + if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return state = 2 to_chat(user, "You weld [src] to the floor.") @@ -198,7 +198,7 @@ user.visible_message("[user.name] starts to cut [src] free from the floor.", \ "You start to cut [src] free from the floor.", \ "You hear welding") - if (do_after(user,20 * WT.toolspeed)) + if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return state = 1 to_chat(user, "You cut [src] free from the floor.") diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index ef3258d8c1..a8ef213e60 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -103,7 +103,7 @@ field_generator power level display if(active) to_chat(user, "The [src] needs to be off.") return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) switch(state) if(0) state = 1 @@ -122,7 +122,7 @@ field_generator power level display if(2) to_chat(user, "The [src.name] needs to be unwelded from the floor.") return - else if(istype(W, /obj/item/weapon/weldingtool)) + else if(W.get_tool_quality(TOOL_WELDER)) var/obj/item/weapon/weldingtool/WT = W switch(state) if(0) @@ -134,7 +134,7 @@ field_generator power level display user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \ "You start to weld the [src] to the floor.", \ "You hear welding") - if (do_after(user,20 * WT.toolspeed)) + if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return state = 2 to_chat(user, "You weld the field generator to the floor.") @@ -146,7 +146,7 @@ field_generator power level display user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \ "You start to cut the [src] free from the floor.", \ "You hear welding") - if (do_after(user,20 * WT.toolspeed)) + if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER))) if(!src || !WT.isOn()) return state = 1 to_chat(user, "You cut the [src] free from the floor.") diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 213b37d01a..9bf4e48c03 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -17,7 +17,7 @@ if(src) qdel(src) /obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) anchored = !anchored playsound(src, W.usesound, 75, 1) if(anchored) @@ -29,13 +29,13 @@ "You unsecure the [src.name] from the floor.", \ "You hear a ratchet.") return - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) panel_open = !panel_open playsound(src, W.usesound, 50, 1) visible_message("\The [user] adjusts \the [src]'s mechanisms.") if(panel_open && do_after(user, 30)) to_chat(user, "\The [src] looks like it could be modified.") - if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity) + if(panel_open && do_after(user, 80 * W.get_tool_speed(TOOL_SCREWDRIVER))) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity) playsound(src, W.usesound, 50, 1) to_chat(user, "\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow..") else diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 6d7108fbd6..bba1137ed8 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -125,13 +125,8 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin . += "It is assembled." /obj/structure/particle_accelerator/attackby(obj/item/W, mob/user) - if(istool(W)) - if(src.process_tool_hit(W,user)) - return - ..() - return - - + return src.process_tool_hit(W,user) || ..() + /obj/structure/particle_accelerator/Moved(atom/old_loc, direction, forced = FALSE) . = ..() if(master?.active) @@ -197,21 +192,21 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin /obj/structure/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user) if(!(O) || !(user)) - return 0 + return FALSE if(!ismob(user) || !isobj(O)) - return 0 + return FALSE var/temp_state = src.construction_state switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) playsound(src, O.usesound, 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) playsound(src, O.usesound, 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ @@ -223,27 +218,27 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin "You add some wires.") temp_state++ if(2) - if(O.is_wirecutter())//TODO:Shock user if its on? + if(O.get_tool_quality(TOOL_WIRECUTTER))//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(O.is_screwdriver()) + else if(O.get_tool_quality(TOOL_SCREWDRIVER)) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(O.is_screwdriver()) + if(O.get_tool_quality(TOOL_SCREWDRIVER)) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- if(temp_state == src.construction_state)//Nothing changed - return 0 - else - src.construction_state = temp_state - if(src.construction_state < 3)//Was taken apart, update state - update_state() - update_icon() - return 1 + return FALSE + + src.construction_state = temp_state + if(src.construction_state < 3)//Was taken apart, update state + update_state() + update_icon() + return TRUE @@ -305,11 +300,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin /obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user) - if(istool(W)) - if(src.process_tool_hit(W,user)) - return - ..() - return + return src.process_tool_hit(W,user) || ..() /obj/machinery/particle_accelerator/ex_act(severity) switch(severity) @@ -332,20 +323,20 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin /obj/machinery/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user) if(!(O) || !(user)) - return 0 + return FALSE if(!ismob(user) || !isobj(O)) - return 0 + return FALSE var/temp_state = src.construction_state switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) playsound(src, O.usesound, 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(O.is_wrench()) + if(O.get_tool_quality(TOOL_WRENCH)) playsound(src, O.usesound, 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ @@ -357,29 +348,29 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin "You add some wires.") temp_state++ if(2) - if(O.is_wirecutter())//TODO:Shock user if its on? + if(O.get_tool_quality(TOOL_WIRECUTTER))//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(O.is_screwdriver()) + else if(O.get_tool_quality(TOOL_SCREWDRIVER)) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(O.is_screwdriver()) + if(O.get_tool_quality(TOOL_SCREWDRIVER)) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- active = 0 if(temp_state == src.construction_state)//Nothing changed - return 0 - else - if(src.construction_state < 3)//Was taken apart, update state - update_state() - if(use_power) - update_use_power(USE_POWER_OFF) - src.construction_state = temp_state - if(src.construction_state >= 3) - update_use_power(USE_POWER_IDLE) - update_icon() - return 1 + return FALSE + + if(src.construction_state < 3)//Was taken apart, update state + update_state() + if(use_power) + update_use_power(USE_POWER_OFF) + src.construction_state = temp_state + if(src.construction_state >= 3) + update_use_power(USE_POWER_IDLE) + update_icon() + return TRUE diff --git a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm index adff836cee..208a9099b0 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm @@ -71,7 +71,7 @@ to_chat(user, "You add \the [reagent_container] to \the [src].") update_icon() return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) anchored = !anchored playsound(src, W.usesound, 75, 1) if(anchored) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 365fda6b50..6580f7e77e 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -308,7 +308,7 @@ GLOBAL_LIST_EMPTY(smeses) stat = 0 return FALSE - else if(W.is_wirecutter() && !building_terminal) + else if(W.get_tool_quality(TOOL_WIRECUTTER) && !building_terminal) building_terminal = TRUE var/obj/machinery/power/terminal/term for(var/obj/machinery/power/terminal/T in get_turf(user)) @@ -326,9 +326,9 @@ GLOBAL_LIST_EMPTY(smeses) else to_chat(user, "You begin to cut the cables...") playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 50 * W.toolspeed)) + if(do_after(user, 50 * W.get_tool_speed(TOOL_WIRECUTTER))) if (prob(50) && electrocute_mob(usr, term.powernet, term)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() building_terminal = FALSE diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index 45b44d64f8..015eb98fa8 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -94,7 +94,7 @@ // This also causes the SMES to quickly discharge, and has small chance of breaking lights connected to APCs in the powernet. /obj/machinery/power/smes/buildable/process() if(!grounding && (Percentage() > 5)) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() charge -= (output_level_max * SMESRATE) @@ -178,7 +178,7 @@ // Preparations - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread // Check if user has protected gloves. var/user_protected = 0 if(h_user.gloves) @@ -328,14 +328,14 @@ failure_probability = 0 // Crowbar - Disassemble the SMES. - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) if (terminals.len) to_chat(user, "You have to disassemble the terminal first!") return playsound(src, W.usesound, 50, 1) to_chat(user, "You begin to disassemble the [src]!") - if (do_after(usr, (100 * cur_coils) * W.toolspeed)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar + if (do_after(usr, (100 * cur_coils) * W.get_tool_speed(TOOL_CROWBAR))) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar if (failure_probability && prob(failure_probability)) total_system_failure(failure_probability, user) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 086b887931..b3f50e69d4 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -55,7 +55,7 @@ GLOBAL_LIST_EMPTY(solars_list) /obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user) - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) playsound(src, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar panel.") if(do_after(user, 50)) @@ -212,13 +212,13 @@ GLOBAL_LIST_EMPTY(solars_list) if (!isturf(loc)) return 0 if(!anchored) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) anchored = 1 user.visible_message("[user] wrenches the solar assembly into place.") playsound(src, W.usesound, 75, 1) return 1 else - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) anchored = 0 user.visible_message("[user] unwrenches the solar assembly from it's place.") playsound(src, W.usesound, 75, 1) @@ -247,7 +247,7 @@ GLOBAL_LIST_EMPTY(solars_list) user.visible_message("[user] inserts the electronics into the solar assembly.") return 1 else - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) new /obj/item/weapon/tracker_electronics(src.loc) tracker = 0 user.visible_message("[user] takes out the electronics from the solar assembly.") @@ -407,7 +407,7 @@ GLOBAL_LIST_EMPTY(solars_list) return data /obj/machinery/power/solar_control/attackby(obj/item/I, user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, I.usesound, 50, 1) if(do_after(user, 20)) if (src.stat & BROKEN) diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 5c262b5983..268435530d 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -50,13 +50,13 @@ //if(default_deconstruction_screwdriver(user, "coil_open[anchored]", "coil[anchored]", W)) if(default_deconstruction_screwdriver(user, W)) - return + return FALSE if(default_part_replacement(user, W)) - return + return FALSE if(default_unfasten_wrench(user, W)) - return + return FALSE if(default_deconstruction_crowbar(user, W)) - return + return FALSE if(is_wire_tool(W)) return wires.Interact(user) return ..() diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index c03d7db3b6..13cf964462 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -51,7 +51,7 @@ /obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user) - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) playsound(src, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar tracker.") if(do_after(user, 50)) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 42b875deba..f17ec28758 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -31,7 +31,7 @@ update_icon() /obj/item/ammo_casing/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) if(!BB) to_chat(user, "There is no bullet in the casing to inscribe anything into.") return diff --git a/code/modules/projectiles/ammunition/smartmag.dm b/code/modules/projectiles/ammunition/smartmag.dm index 3cc4add9cb..cf301c487a 100644 --- a/code/modules/projectiles/ammunition/smartmag.dm +++ b/code/modules/projectiles/ammunition/smartmag.dm @@ -87,7 +87,7 @@ update_icon() return - else if(I.is_screwdriver()) + else if(I.get_tool_quality(TOOL_SCREWDRIVER)) if(attached_cell) to_chat(user, "You begin removing \the [attached_cell] from \the [src].") if(do_after(user, 10)) // Faster than doing it by hand diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 2f470b0f0e..89130c3ff9 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -250,11 +250,11 @@ verbs += /obj/item/weapon/gun/verb/allow_dna return - if(A.is_screwdriver()) + if(A.get_tool_quality(TOOL_SCREWDRIVER)) if(dna_lock && attached_lock && !attached_lock.controller_lock) to_chat(user, "You begin removing \the [attached_lock] from \the [src].") playsound(src, A.usesound, 50, 1) - if(do_after(user, 25 * A.toolspeed)) + if(do_after(user, 25 * A.get_tool_speed(TOOL_SCREWDRIVER))) to_chat(user, "You remove \the [attached_lock] from \the [src].") user.put_in_hands(attached_lock) dna_lock = 0 diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index 9de4027392..cf82927a8f 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -166,7 +166,7 @@ else to_chat(user, "[src] already has a cell installed.") - else if(W.is_screwdriver()) + else if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(cell) var/obj/item/C = cell C.loc = get_turf(user) @@ -274,7 +274,7 @@ else to_chat(user, "You need at least three plastic sheets to complete this task.") return - else if(W.is_screwdriver()) + else if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(buildstate == 5) to_chat(user, "You secure the crossbow's various parts.") playsound(src, W.usesound, 50, 1) diff --git a/code/modules/projectiles/guns/magnetic/bore.dm b/code/modules/projectiles/guns/magnetic/bore.dm index eea444fbf6..185f868f2b 100644 --- a/code/modules/projectiles/guns/magnetic/bore.dm +++ b/code/modules/projectiles/guns/magnetic/bore.dm @@ -86,7 +86,7 @@ /obj/item/weapon/gun/magnetic/matfed/attackby(var/obj/item/thing, var/mob/user) if(removable_components) - if(thing.is_crowbar()) + if(thing.get_tool_quality(TOOL_CROWBAR)) if(!manipulator) to_chat(user, "\The [src] has no manipulator installed.") return diff --git a/code/modules/projectiles/guns/magnetic/magnetic.dm b/code/modules/projectiles/guns/magnetic/magnetic.dm index 607265217f..51af9029de 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic.dm @@ -155,7 +155,7 @@ update_icon() return - if(thing.is_screwdriver()) + if(thing.get_tool_quality(TOOL_SCREWDRIVER)) if(!capacitor) to_chat(user, "\The [src] has no capacitor installed.") return @@ -286,7 +286,7 @@ spawn(15) audible_message("\The [src]'s power supply begins to overload as the device crumples!", runemessage = "VWRRRRRRRR") //Why are you still holding this? playsound(src, 'sound/effects/grillehit.ogg', 10, 1) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() var/turf/T = get_turf(src) sparks.set_up(2, 1, T) sparks.start() diff --git a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm index 003d6c956c..e2e27703bf 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm @@ -66,7 +66,7 @@ increment_construction_stage() return - if(thing.is_screwdriver() && construction_stage >= 9) + if(thing.get_tool_quality(TOOL_SCREWDRIVER) && construction_stage >= 9) user.visible_message("\The [user] secures \the [src] and finishes it off.") playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) var/obj/item/weapon/gun/magnetic/coilgun = new(loc) diff --git a/code/modules/projectiles/guns/modular_guns.dm b/code/modules/projectiles/guns/modular_guns.dm index 61e5039874..45bb68a48f 100644 --- a/code/modules/projectiles/guns/modular_guns.dm +++ b/code/modules/projectiles/guns/modular_guns.dm @@ -51,12 +51,12 @@ FireModeModify() /obj/item/weapon/gun/energy/modular/attackby(obj/item/O, mob/user) - if(O.is_screwdriver()) + if(O.get_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "You [assembled ? "disassemble" : "assemble"] the gun.") assembled = !assembled playsound(src, O.usesound, 50, 1) return - if(O.is_crowbar()) + if(O.get_tool_quality(TOOL_CROWBAR)) if(assembled == 1) to_chat(user, "Disassemble the [src] first!") return diff --git a/code/modules/projectiles/projectile/arc.dm b/code/modules/projectiles/projectile/arc.dm index 331bbadb0c..08cba6222b 100644 --- a/code/modules/projectiles/projectile/arc.dm +++ b/code/modules/projectiles/projectile/arc.dm @@ -11,6 +11,7 @@ icon_state = "fireball" // WIP movement_type = UNSTOPPABLE plane = ABOVE_PLANE // Since projectiles are 'in the air', they might visually overlap mobs while in flight, so the projectile needs to be above their plane. + fire_sound = 'sound/weapons/mech_mortar.ogg' var/fired_dir = null // Which direction was the projectile fired towards. Needed to invert the projectile turning based on if facing left or right. var/distance_to_fly = null // How far, in pixels, to fly for. Will call on_range() when this is passed. var/visual_y_offset = -16 // Adjusts how high the projectile and its shadow start, visually. This is so the projectile and shadow align with the center of the tile. @@ -114,7 +115,7 @@ // This is a test projectile in the sense that its testing the code to make sure it works, // as opposed to a 'can I hit this thing' projectile. /obj/item/projectile/arc/test/on_impact(turf/T) - new /obj/effect/explosion(T) + new /obj/effect/vfx/explosion(T) T.color = "#FF0000" // Generic, Hivebot related @@ -187,7 +188,7 @@ T.visible_message("\The [src] covers \the [T] in a corrosive paste!") for(var/turf/simulated/floor/F in view(2, T)) spawn() - var/obj/effect/effect/water/splash = new(T) + var/obj/effect/vfx/water/splash = new(T) splash.create_reagents(15) splash.reagents.add_reagent("stomacid", 5) splash.reagents.add_reagent("blood", 10,list("blood_colour" = "#ec4940")) diff --git a/code/modules/projectiles/projectile/blob.dm b/code/modules/projectiles/projectile/blob.dm index b3869a1cde..657cac06ef 100644 --- a/code/modules/projectiles/projectile/blob.dm +++ b/code/modules/projectiles/projectile/blob.dm @@ -28,7 +28,7 @@ /obj/item/projectile/energy/blob/on_impact(var/atom/A) if(splatter) var/turf/location = get_turf(src) - var/datum/effect/effect/system/smoke_spread/chem/blob/S = new /datum/effect/effect/system/smoke_spread/chem/blob + var/datum/effect_system/smoke_spread/chem/blob/S = new /datum/effect_system/smoke_spread/chem/blob S.attach(location) S.set_up(reagents, rand(1, splatter_volume), 0, location) playsound(location, 'sound/effects/slime_squish.ogg', 30, 1, -3) diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index 916737bb00..3aef9f83cd 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -45,12 +45,12 @@ playsound(src, 'sound/effects/snap.ogg', 50, 1) src.visible_message("\The [src] explodes in a bright flash!") - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(2, 1, T) sparks.start() new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows - new /obj/effect/effect/smoke/illumination(T, 5, brightness, brightness, light_colour) + new /obj/effect/vfx/smoke/illumination(T, 5, brightness, brightness, light_colour) //blinds people like the flash round, but can also be used for temporary illumination /obj/item/projectile/energy/flash/flare @@ -66,7 +66,7 @@ ..() //initial flash //residual illumination - new /obj/effect/effect/smoke/illumination(src.loc, rand(190,240) SECONDS, 8, 3, light_colour) //same lighting power as flare + new /obj/effect/vfx/smoke/illumination(src.loc, rand(190,240) SECONDS, 8, 3, light_colour) //same lighting power as flare /obj/item/projectile/energy/electrode name = "electrode" @@ -239,6 +239,7 @@ /obj/item/projectile/energy/phase name = "phase wave" icon_state = "phase" + fire_sound = 'sound/weapons/Gunshot_phase.ogg' range = 6 damage = 5 SA_bonus_damage = 45 // 50 total on animals diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 9fcc1c1979..bd42b7de6c 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -10,11 +10,11 @@ combustion = TRUE /obj/item/projectile/energy/fireball/on_hit(var/atom/target, var/blocked = 0) - new /obj/effect/explosion(get_turf(target)) + new /obj/effect/vfx/explosion(get_turf(target)) explosion(target, -1, 0, 2) ..() /obj/item/projectile/energy/fireball/on_impact(var/atom/target) - new /obj/effect/explosion(get_turf(target)) + new /obj/effect/vfx/explosion(get_turf(target)) explosion(target, -1, 0, 2) ..() diff --git a/code/modules/reagents/hoses/connector.dm b/code/modules/reagents/hoses/connector.dm index e165877041..9742a66f28 100644 --- a/code/modules/reagents/hoses/connector.dm +++ b/code/modules/reagents/hoses/connector.dm @@ -3,7 +3,7 @@ . = ..() if(locate(/obj/item/hose_connector) in src) - if(O.is_wirecutter()) + if(O.get_tool_quality(TOOL_WIRECUTTER)) var/list/available_sockets = list() for(var/obj/item/hose_connector/HC in src) diff --git a/code/modules/reagents/machinery/dispenser/dispenser2.dm b/code/modules/reagents/machinery/dispenser/dispenser2.dm index d53dac4ba5..53deea0445 100644 --- a/code/modules/reagents/machinery/dispenser/dispenser2.dm +++ b/code/modules/reagents/machinery/dispenser/dispenser2.dm @@ -76,10 +76,10 @@ SStgui.update_uis(src) /obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) playsound(src, W.usesound, 50, 1) to_chat(user, "You begin to [anchored ? "un" : ""]fasten \the [src].") - if (do_after(user, 20 * W.toolspeed)) + if (do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH))) user.visible_message( "\The [user] [anchored ? "un" : ""]fastens \the [src].", "You have [anchored ? "un" : ""]fastened \the [src].", @@ -91,7 +91,7 @@ else if(istype(W, /obj/item/weapon/reagent_containers/chem_disp_cartridge)) add_cartridge(W, user) - else if(W.is_screwdriver()) + else if(W.get_tool_quality(TOOL_SCREWDRIVER)) var/label = input(user, "Which cartridge would you like to remove?", "Chemical Dispenser") as null|anything in cartridges if(!label) return var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label) diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm index 86ebf35f10..bdae0485f1 100644 --- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm +++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm @@ -64,12 +64,12 @@ return if(2.0) if (prob(50)) - new /obj/effect/effect/water(src.loc) + new /obj/effect/vfx/water(src.loc) qdel(src) return if(3.0) if (prob(5)) - new /obj/effect/effect/water(src.loc) + new /obj/effect/vfx/water(src.loc) qdel(src) return else @@ -133,7 +133,7 @@ /obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob) src.add_fingerprint(user) - if (W.is_wrench()) + if (W.get_tool_quality(TOOL_WRENCH)) user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \ "You wrench [src]'s faucet [modded ? "closed" : "open"]") modded = modded ? 0 : 1 @@ -265,7 +265,7 @@ return 1 /obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob) - if(I.is_wrench()) + if(I.get_tool_quality(TOOL_WRENCH)) src.add_fingerprint(user) if(bottle) playsound(src, I.usesound, 50, 1) @@ -283,14 +283,14 @@ user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") else user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") - if(do_after(user, 20 * I.toolspeed, src)) + if(do_after(user, 20 * I.get_tool_speed(TOOL_WRENCH), src)) if(!src) return to_chat(user, "You [anchored? "un" : ""]secured \the [src]!") anchored = !anchored playsound(src, I.usesound, 50, 1) return - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) if(cupholder) playsound(src, I.usesound, 50, 1) to_chat(user, "You take the cup dispenser off.") @@ -305,7 +305,7 @@ if(!bottle && !cupholder) playsound(src, I.usesound, 50, 1) to_chat(user, "You start taking the water-cooler apart.") - if(do_after(user, 20 * I.toolspeed) && !bottle && !cupholder) + if(do_after(user, 20 * I.get_tool_speed(TOOL_SCREWDRIVER)) && !bottle && !cupholder) to_chat(user, "You take the water-cooler apart.") new /obj/item/stack/material/plastic( src.loc, 4 ) qdel(src) diff --git a/code/modules/reagents/machinery/pump.dm b/code/modules/reagents/machinery/pump.dm index 6c9302d61e..a8767f9fdf 100644 --- a/code/modules/reagents/machinery/pump.dm +++ b/code/modules/reagents/machinery/pump.dm @@ -141,18 +141,18 @@ /obj/machinery/pump/attackby(obj/item/weapon/W, mob/user) . = TRUE - if(W.is_screwdriver() && !open) + if(W.get_tool_quality(TOOL_SCREWDRIVER) && !open) to_chat(user, SPAN_NOTICE("You [unlocked ? "screw" : "unscrew"] the battery panel.")) unlocked = !unlocked - else if(W.is_crowbar() && unlocked) + else if(W.get_tool_quality(TOOL_CROWBAR) && unlocked) to_chat(user, open ? \ "You crowbar the battery panel in place." : \ "You remove the battery panel." \ ) open = !open - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(on) to_chat(user, "\The [src] is active. Turn it off before trying to move it!") return FALSE diff --git a/code/modules/reagents/reactions/distilling/distilling.dm b/code/modules/reagents/reactions/distilling/distilling.dm index 5944a75846..d7c86b46b5 100644 --- a/code/modules/reagents/reactions/distilling/distilling.dm +++ b/code/modules/reagents/reactions/distilling/distilling.dm @@ -186,7 +186,7 @@ if(prob(1)) var/turf/T = get_turf(holder.my_atom) - var/datum/effect/effect/system/smoke_spread/frost/F = new (holder.my_atom) + var/datum/effect_system/smoke_spread/frost/F = new (holder.my_atom) F.set_up(6, 0, T) F.start() return diff --git a/code/modules/reagents/reactions/instant/instant.dm b/code/modules/reagents/reactions/instant/instant.dm index d49856e8d3..910aa07c79 100644 --- a/code/modules/reagents/reactions/instant/instant.dm +++ b/code/modules/reagents/reactions/instant/instant.dm @@ -644,7 +644,7 @@ mix_message = null /decl/chemical_reaction/instant/explosion_potassium/on_reaction(var/datum/reagents/holder, var/created_volume) - var/datum/effect/effect/system/reagents_explosion/e = new() + var/datum/effect_system/reagents_explosion/e = new() e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0) if(isliving(holder.my_atom)) e.amount *= 0.5 @@ -664,7 +664,7 @@ /decl/chemical_reaction/instant/flash_powder/on_reaction(var/datum/reagents/holder, var/created_volume) var/location = get_turf(holder.my_atom) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(2, 1, location) s.start() for(var/mob/living/carbon/M in viewers(world.view, location)) @@ -709,7 +709,7 @@ log_is_important = 1 /decl/chemical_reaction/instant/nitroglycerin/on_reaction(var/datum/reagents/holder, var/created_volume) - var/datum/effect/effect/system/reagents_explosion/e = new() + var/datum/effect_system/reagents_explosion/e = new() e.set_up(round (created_volume/2, 1), holder.my_atom, 0, 0) if(isliving(holder.my_atom)) e.amount *= 0.5 @@ -745,7 +745,7 @@ /decl/chemical_reaction/instant/chemsmoke/on_reaction(var/datum/reagents/holder, var/created_volume) var/location = get_turf(holder.my_atom) - var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem + var/datum/effect_system/smoke_spread/chem/S = new /datum/effect_system/smoke_spread/chem S.attach(location) S.set_up(holder, created_volume, 0, location) playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) @@ -768,7 +768,7 @@ for(var/mob/M in viewers(5, location)) to_chat(M, "The solution spews out foam!") - var/datum/effect/effect/system/foam_spread/s = new() + var/datum/effect_system/foam_spread/s = new() s.set_up(created_volume, location, holder, 0) s.start() holder.clear_reagents() @@ -787,7 +787,7 @@ for(var/mob/M in viewers(5, location)) to_chat(M, "The solution spews out a metalic foam!") - var/datum/effect/effect/system/foam_spread/s = new() + var/datum/effect_system/foam_spread/s = new() s.set_up(created_volume, location, holder, 1) s.start() return @@ -805,7 +805,7 @@ for(var/mob/M in viewers(5, location)) to_chat(M, "The solution spews out a metalic foam!") - var/datum/effect/effect/system/foam_spread/s = new() + var/datum/effect_system/foam_spread/s = new() s.set_up(created_volume, location, holder, 2) s.start() return diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 71785807ec..6dc5c366af 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -277,7 +277,7 @@ user.drop_from_inventory(src) qdel(src) return - else if(D.is_wirecutter()) + else if(D.get_tool_quality(TOOL_WIRECUTTER)) to_chat(user, "You cut a big hole in \the [src] with \the [D]. It's kinda useless as a bucket now.") user.put_in_hands(new /obj/item/clothing/head/helmet/bucket) user.drop_from_inventory(src) diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 186386e58f..0d9457f12c 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -60,7 +60,7 @@ reagents.splash(A, amount_per_transfer_from_this) else spawn(0) - var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src)) + var/obj/effect/vfx/water/chempuff/D = new/obj/effect/vfx/water/chempuff(get_turf(src)) var/turf/my_target = get_turf(A) D.create_reagents(amount_per_transfer_from_this) if(!src) @@ -187,7 +187,7 @@ for(var/a = 1 to 3) spawn(0) if(reagents.total_volume < 1) break - var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src)) + var/obj/effect/vfx/water/chempuff/D = new/obj/effect/vfx/water/chempuff(get_turf(src)) var/turf/my_target = the_targets[a] D.create_reagents(amount_per_transfer_from_this) if(!src) @@ -272,7 +272,7 @@ spawn(0) if(reagents.total_volume < 1) break playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6) - var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src)) + var/obj/effect/vfx/water/chempuff/D = new/obj/effect/vfx/water/chempuff(get_turf(src)) var/turf/my_target = the_targets[a] D.create_reagents(amount_per_transfer_from_this) if(!src) @@ -289,7 +289,7 @@ spawn(0) if(!src || !reagents.total_volume) return - var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(src)) + var/obj/effect/vfx/water/W = new /obj/effect/vfx/water(get_turf(src)) var/turf/my_target if(a <= the_targets.len) my_target = the_targets[a] diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 37dd909a74..573d336280 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -275,14 +275,14 @@ if(default_deconstruction_screwdriver(user, I)) return - if(istype(I, /obj/item/weapon/weldingtool)) + if(I.get_tool_quality(TOOL_WELDER)) if(panel_open) var/obj/item/weapon/weldingtool/WT = I 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, "You deconstruct the frame.") new /obj/item/stack/material/steel( src.loc, 2 ) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 1182e61596..c27eded961 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -246,7 +246,7 @@ var/obj/structure/disposalpipe/CP = locate() in T // wrench: (un)anchor - if(I.is_wrench()) + if(I.get_tool_quality(TOOL_WRENCH)) if(anchored) anchored = 0 if(ispipe) @@ -285,13 +285,13 @@ update() // weldingtool: convert to real pipe - else if(istype(I, /obj/item/weapon/weldingtool)) + else if(I.get_tool_quality(TOOL_WELDER)) if(anchored) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src, W.usesound, 100, 1) to_chat(user, "Welding the [nicetype] in place.") - if(do_after(user, 20 * W.toolspeed)) + if(do_after(user, 20 * W.get_tool_speed(TOOL_WELDER))) if(!src || !W.isOn()) return to_chat(user, "The [nicetype] has been welded in place!") update() // TODO: Make this neat diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 73308fe7f1..340a230e34 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -56,7 +56,7 @@ src.add_fingerprint(user) if(mode<=0) // It's off - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) if(contents.len > 0) to_chat(user, "Eject the items first!") return @@ -70,7 +70,7 @@ playsound(src, I.usesound, 50, 1) to_chat(user, "You attach the screws around the power connection.") return - else if(istype(I, /obj/item/weapon/weldingtool) && mode==-1) + else if(I.get_tool_quality(TOOL_WELDER) && mode==-1) if(contents.len > 0) to_chat(user, "Eject the items first!") return @@ -79,7 +79,7 @@ playsound(src, W.usesound, 100, 1) to_chat(user, "You start slicing the floorweld off the disposal unit.") - if(do_after(user,20 * W.toolspeed)) + if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER))) if(!src || !W.isOn()) return to_chat(user, "You sliced the floorweld off the disposal unit.") var/obj/structure/disposalconstruct/C = new (src.loc) @@ -1554,7 +1554,7 @@ if(!I || !user) return src.add_fingerprint(user) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) if(mode==0) mode=1 to_chat(user, "You remove the screws around the power connection.") @@ -1565,12 +1565,12 @@ to_chat(user, "You attach the screws around the power connection.") playsound(src, I.usesound, 50, 1) return - else if(istype(I, /obj/item/weapon/weldingtool) && mode==1) + else if(I.get_tool_quality(TOOL_WELDER) && mode==1) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src, W.usesound, 100, 1) to_chat(user, "You start slicing the floorweld off the disposal outlet.") - if(do_after(user,20 * W.toolspeed)) + if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER))) if(!src || !W.isOn()) return to_chat(user, "You sliced the floorweld off the disposal outlet.") var/obj/structure/disposalconstruct/C = new (src.loc) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 969526be79..6a4baa6b22 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -430,19 +430,19 @@ if(!I || !user) return - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) c_mode = !c_mode playsound(src, I.usesound, 50, 1) to_chat(user, "You [c_mode ? "remove" : "attach"] the screws around the power connection.") return - if(istype(I, /obj/item/weapon/weldingtool) && c_mode==1) + if(I.get_tool_quality(TOOL_WELDER) && c_mode==1) var/obj/item/weapon/weldingtool/W = I if(!W.remove_fuel(0,user)) to_chat(user, "You need more welding fuel to complete this task.") return playsound(src, W.usesound, 50, 1) to_chat(user, "You start slicing the floorweld off the delivery chute.") - if(do_after(user,20 * W.toolspeed)) + if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER))) if(!src || !W.isOn()) return to_chat(user, "You sliced the floorweld off the delivery chute.") var/obj/structure/disposalconstruct/C = new (src.loc) diff --git a/code/modules/research/designs/engineering.dm b/code/modules/research/designs/engineering.dm index 9fa557426c..efaa33c8a1 100644 --- a/code/modules/research/designs/engineering.dm +++ b/code/modules/research/designs/engineering.dm @@ -19,7 +19,7 @@ id = "handdrill" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 300, "silver" = 100) - build_path = /obj/item/weapon/tool/screwdriver/power + build_path = /obj/item/weapon/tool/powerdrill sort_string = "NAAAB" /datum/design/item/tool/jaws_life @@ -28,7 +28,7 @@ id = "jawslife" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 300, "silver" = 100) - build_path = /obj/item/weapon/tool/crowbar/power + build_path = /obj/item/weapon/tool/hydraulic_cutter sort_string = "NAAAC" // Other devices diff --git a/code/modules/research/designs/medical.dm b/code/modules/research/designs/medical.dm index bd095ae430..4db3c0c75a 100644 --- a/code/modules/research/designs/medical.dm +++ b/code/modules/research/designs/medical.dm @@ -40,7 +40,7 @@ id = "scalpel_manager" req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 7, TECH_MAGNET = 5, TECH_DATA = 4) materials = list (MAT_STEEL = 12500, "glass" = 7500, "silver" = 1500, "gold" = 1500, "diamond" = 750) - build_path = /obj/item/weapon/surgical/scalpel/manager + build_path = /obj/item/weapon/surgical/manager sort_string = "KAAAD" /datum/design/item/medical/saw_manager diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 8956e9e3c8..9c9b011de2 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -42,10 +42,10 @@ event_triggered_by = usr broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "You begin removing the faceplate from the [src]") playsound(src, W.usesound, 50, 1) - if(do_after(user, 10 * W.toolspeed)) + if(do_after(user, 10 * W.get_tool_speed(TOOL_SCREWDRIVER))) to_chat(user, "You remove the faceplate from the [src]") var/obj/structure/frame/A = new /obj/structure/frame(loc) var/obj/item/weapon/circuitboard/M = new circuit(A) diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm index 9c113c3186..469adeb887 100644 --- a/code/modules/shieldgen/directional_shield.dm +++ b/code/modules/shieldgen/directional_shield.dm @@ -102,7 +102,7 @@ if(always_on) create_shields() GLOB.moved_event.register(src, src, .proc/moved_event) - ..() + return ..() /obj/item/shield_projector/Destroy() destroy_shields() diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index f02f03bbec..5d451cbefd 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -280,7 +280,7 @@ return 1 /obj/machinery/shieldgen/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 100, 1) if(is_open) to_chat(user, "You close the panel.") @@ -300,7 +300,7 @@ to_chat(user, "You repair the [src]!") update_icon() - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(locked) to_chat(user, "The bolts are covered, unlocking this would retract the covers.") return diff --git a/code/modules/shieldgen/sheldwallgen.dm b/code/modules/shieldgen/sheldwallgen.dm index 4d31397ec1..9f57d65adf 100644 --- a/code/modules/shieldgen/sheldwallgen.dm +++ b/code/modules/shieldgen/sheldwallgen.dm @@ -157,7 +157,7 @@ /obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user) - if(W.is_wrench()) + if(W.get_tool_quality(TOOL_WRENCH)) if(active) to_chat(user, "Turn off the field generator first.") return diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index 35cd71e134..ab04717d10 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -32,7 +32,7 @@ to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]") . = 1 updateDialog() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() @@ -46,7 +46,7 @@ updateDialog() else to_chat(user, "Access denied.") - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) src.anchored = !src.anchored playsound(src, W.usesound, 75, 1) src.visible_message("[bicon(src)] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].") diff --git a/code/modules/shieldgen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm index 222c6ad6d4..cc2ca7211e 100644 --- a/code/modules/shieldgen/shield_gen.dm +++ b/code/modules/shieldgen/shield_gen.dm @@ -53,7 +53,7 @@ to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]") . = 1 updateDialog() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(5, 1, src) s.start() @@ -66,7 +66,7 @@ updateDialog() else to_chat(user, "Access denied.") - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) src.anchored = !src.anchored playsound(src, W.usesound, 75, 1) src.visible_message("[bicon(src)] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].") diff --git a/code/modules/spells/aoe_turf/blink.dm b/code/modules/spells/aoe_turf/blink.dm index f78572a3ba..bb3298de1c 100644 --- a/code/modules/spells/aoe_turf/blink.dm +++ b/code/modules/spells/aoe_turf/blink.dm @@ -23,7 +23,7 @@ user.buckled = null user.forceMove(T) - var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() + var/datum/effect_system/smoke_spread/smoke = new /datum/effect_system/smoke_spread() smoke.set_up(3, 0, starting) smoke.start() diff --git a/code/modules/spells/spell_code.dm b/code/modules/spells/spell_code.dm index 5ab0643450..1e152f3ddb 100644 --- a/code/modules/spells/spell_code.dm +++ b/code/modules/spells/spell_code.dm @@ -158,16 +158,16 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now if(istype(target,/mob/living) && message) to_chat(target, "[message]") if(sparks_spread) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is sparks.start() if(smoke_spread) if(smoke_spread == 1) - var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() + var/datum/effect_system/smoke_spread/smoke = new /datum/effect_system/smoke_spread() smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() else if(smoke_spread == 2) - var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad() + var/datum/effect_system/smoke_spread/bad/smoke = new /datum/effect_system/smoke_spread/bad() smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is smoke.start() diff --git a/code/modules/spells/targeted/ethereal_jaunt.dm b/code/modules/spells/targeted/ethereal_jaunt.dm index c38fc9c488..6d55fd9545 100644 --- a/code/modules/spells/targeted/ethereal_jaunt.dm +++ b/code/modules/spells/targeted/ethereal_jaunt.dm @@ -64,7 +64,7 @@ flick("reappear",animation) /spell/targeted/ethereal_jaunt/proc/jaunt_steam(var/mobloc) - var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() + var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() steam.set_up(10, 0, mobloc) steam.start() diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index 6a48eb198d..743322742c 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -7,12 +7,12 @@ // Bone Glue Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/glue_bone +/decl/surgery_step/glue_bone allowed_tools = list( /obj/item/weapon/surgical/bonegel = 100 ) - allowed_procs = list(IS_SCREWDRIVER = 75) + allowed_procs = list(TOOL_SCREWDRIVER = 75) can_infect = 1 blood_level = 1 @@ -20,7 +20,7 @@ min_duration = 50 max_duration = 60 -/datum/surgery_step/glue_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/glue_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -28,7 +28,7 @@ return 0 return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0 -/datum/surgery_step/glue_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/glue_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if (affected.stage == 0) user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool]." , \ @@ -36,13 +36,13 @@ target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50) ..() -/datum/surgery_step/glue_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/glue_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] applies some [tool] to [target]'s bone in [affected.name]", \ "You apply some [tool] to [target]'s bone in [affected.name] with \the [tool].") affected.stage = 1 -/datum/surgery_step/glue_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/glue_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \ "Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!") @@ -51,17 +51,17 @@ // Bone Setting Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/set_bone +/decl/surgery_step/set_bone allowed_tools = list( /obj/item/weapon/surgical/bonesetter = 100 ) - allowed_procs = list(IS_WRENCH = 75) + allowed_procs = list(TOOL_WRENCH = 75) min_duration = 60 max_duration = 70 -/datum/surgery_step/set_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/set_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -69,14 +69,14 @@ return 0 return affected && affected.organ_tag != BP_HEAD && !(affected.robotic >= ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 -/datum/surgery_step/set_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/set_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool]." , \ "You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].") target.custom_pain("The pain in your [affected.name] is going to make you pass out!", 50) ..() -/datum/surgery_step/set_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/set_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if (affected.status & ORGAN_BROKEN) user.visible_message("[user] sets the bone in [target]'s [affected.name] in place with \the [tool].", \ @@ -87,7 +87,7 @@ "You set the bone in [target]'s [affected.name] in the WRONG place with \the [tool].") affected.fracture() -/datum/surgery_step/set_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/set_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!" , \ "Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!") @@ -97,17 +97,17 @@ // Skull Mending Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/mend_skull +/decl/surgery_step/mend_skull allowed_tools = list( /obj/item/weapon/surgical/bonesetter = 100 ) - allowed_procs = list(IS_WRENCH = 75) + allowed_procs = list(TOOL_WRENCH = 75) min_duration = 60 max_duration = 70 -/datum/surgery_step/mend_skull/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/mend_skull/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -115,18 +115,18 @@ return 0 return affected && affected.organ_tag == BP_HEAD && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 -/datum/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is beginning to piece together [target]'s skull with \the [tool]." , \ "You are beginning to piece together [target]'s skull with \the [tool].") ..() -/datum/surgery_step/mend_skull/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/mend_skull/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] sets [target]'s skull with \the [tool]." , \ "You set [target]'s skull with \the [tool].") affected.stage = 2 -/datum/surgery_step/mend_skull/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/mend_skull/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging [target]'s face with \the [tool]!" , \ "Your hand slips, damaging [target]'s face with \the [tool]!") @@ -138,12 +138,12 @@ // Bone Fixing Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/finish_bone +/decl/surgery_step/finish_bone allowed_tools = list( /obj/item/weapon/surgical/bonegel = 100 ) - allowed_procs = list(IS_SCREWDRIVER = 75) + allowed_procs = list(TOOL_SCREWDRIVER = 75) can_infect = 1 blood_level = 1 @@ -151,7 +151,7 @@ min_duration = 50 max_duration = 60 -/datum/surgery_step/finish_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/finish_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -159,20 +159,20 @@ return 0 return affected && affected.open >= 2 && !(affected.robotic >= ORGAN_ROBOT) && affected.stage == 2 -/datum/surgery_step/finish_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/finish_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].", \ "You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].") ..() -/datum/surgery_step/finish_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/finish_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has mended the damaged bones in [target]'s [affected.name] with \the [tool]." , \ "You have mended the damaged bones in [target]'s [affected.name] with \the [tool]." ) affected.status &= ~ORGAN_BROKEN affected.stage = 0 -/datum/surgery_step/finish_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/finish_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \ "Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!") @@ -181,7 +181,7 @@ // Bone Clamp Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/clamp_bone +/decl/surgery_step/clamp_bone allowed_tools = list( /obj/item/weapon/surgical/bone_clamp = 100 ) @@ -192,7 +192,7 @@ min_duration = 70 max_duration = 90 -/datum/surgery_step/clamp_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/clamp_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -200,7 +200,7 @@ return 0 return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0 -/datum/surgery_step/clamp_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/clamp_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if (affected.stage == 0) user.visible_message("[user] starts repairing the damaged bones in [target]'s [affected.name] with \the [tool]." , \ @@ -208,13 +208,13 @@ target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50) ..() -/datum/surgery_step/clamp_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/clamp_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] sets the bone in [target]'s [affected.name] with \the [tool].", \ "You sets [target]'s bone in [affected.name] with \the [tool].") affected.status &= ~ORGAN_BROKEN -/datum/surgery_step/clamp_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/clamp_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!" , \ "Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!") diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index d69c456f7c..4145fb1da6 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -2,12 +2,12 @@ ////////////////////////////////////////////////////////////////// // GENERIC RIBCAGE SURGERY // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/open_encased +/decl/surgery_step/open_encased priority = 2 can_infect = 1 blood_level = 1 -/datum/surgery_step/open_encased/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 @@ -20,7 +20,7 @@ // Rib Sawing Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/open_encased/saw +/decl/surgery_step/open_encased/saw allowed_tools = list( /obj/item/weapon/surgical/circular_saw = 100, \ /obj/item/weapon/material/knife/machete/hatchet = 75 @@ -29,13 +29,13 @@ min_duration = 50 max_duration = 70 -/datum/surgery_step/open_encased/saw/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/saw/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) return ..() && affected && affected.open == 2 -/datum/surgery_step/open_encased/saw/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/saw/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -45,7 +45,7 @@ target.custom_pain("Something hurts horribly in your [affected.name]!", 60) ..() -/datum/surgery_step/open_encased/saw/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/saw/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -54,7 +54,7 @@ "You have cut [target]'s [affected.encased] open with \the [tool].") affected.open = 2.5 -/datum/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -69,23 +69,23 @@ // Rib Opening Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/open_encased/retract +/decl/surgery_step/open_encased/retract allowed_tools = list( /obj/item/weapon/surgical/retractor = 100 ) - allowed_procs = list(IS_CROWBAR = 75) + allowed_procs = list(TOOL_CROWBAR = 75) min_duration = 30 max_duration = 40 -/datum/surgery_step/open_encased/retract/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/retract/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) return ..() && affected && affected.open == 2.5 -/datum/surgery_step/open_encased/retract/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/retract/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -96,7 +96,7 @@ target.custom_pain("Something hurts horribly in your [affected.name]!", 40) ..() -/datum/surgery_step/open_encased/retract/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/retract/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -106,7 +106,7 @@ affected.open = 3 -/datum/surgery_step/open_encased/retract/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/retract/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -122,23 +122,23 @@ // Rib Closing Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/open_encased/close +/decl/surgery_step/open_encased/close allowed_tools = list( /obj/item/weapon/surgical/retractor = 100, ) - allowed_procs = list(IS_CROWBAR = 75) + allowed_procs = list(TOOL_CROWBAR = 75) min_duration = 20 max_duration = 40 -/datum/surgery_step/open_encased/close/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/close/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) return (..() && affected && affected.open == 3) -/datum/surgery_step/open_encased/close/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/close/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -149,7 +149,7 @@ target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() -/datum/surgery_step/open_encased/close/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/close/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -160,7 +160,7 @@ affected.open = 2.5 -/datum/surgery_step/open_encased/close/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/close/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -180,23 +180,23 @@ // Rib Mending Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/open_encased/mend +/decl/surgery_step/open_encased/mend allowed_tools = list( /obj/item/weapon/surgical/bonegel = 100 ) - allowed_procs = list(IS_SCREWDRIVER = 75) + allowed_procs = list(TOOL_SCREWDRIVER = 75) min_duration = 20 max_duration = 40 -/datum/surgery_step/open_encased/mend/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/mend/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) return ..() && affected && affected.open == 2.5 -/datum/surgery_step/open_encased/mend/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/mend/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -207,7 +207,7 @@ target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() -/datum/surgery_step/open_encased/mend/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/mend/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -221,7 +221,7 @@ /////////////////////////////////////////////////////////////// // Saw/Retractor/Gel Combi-open and close. /////////////////////////////////////////////////////////////// -/datum/surgery_step/open_encased/advancedsaw_open +/decl/surgery_step/open_encased/advancedsaw_open allowed_tools = list( /obj/item/weapon/surgical/circular_saw/manager = 100 ) @@ -231,13 +231,13 @@ min_duration = 60 max_duration = 90 -/datum/surgery_step/open_encased/advancedsaw_open/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/advancedsaw_open/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) return ..() && affected && affected.open >= 2 && affected.open < 3 -/datum/surgery_step/open_encased/advancedsaw_open/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/advancedsaw_open/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -247,7 +247,7 @@ target.custom_pain("Something hurts horribly in your [affected.name]!", 60) ..() -/datum/surgery_step/open_encased/advancedsaw_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/advancedsaw_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -256,7 +256,7 @@ "You have cut [target]'s [affected.encased] wide open with \the [tool].") affected.open = 3 -/datum/surgery_step/open_encased/advancedsaw_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/advancedsaw_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -270,7 +270,7 @@ affected.fracture() -/datum/surgery_step/open_encased/advancedsaw_mend +/decl/surgery_step/open_encased/advancedsaw_mend allowed_tools = list( /obj/item/weapon/surgical/circular_saw/manager = 100 ) @@ -280,13 +280,13 @@ min_duration = 30 max_duration = 60 -/datum/surgery_step/open_encased/advancedsaw_mend/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/advancedsaw_mend/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) return (..() && affected && affected.open == 3) -/datum/surgery_step/open_encased/advancedsaw_mend/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/advancedsaw_mend/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -297,7 +297,7 @@ target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() -/datum/surgery_step/open_encased/advancedsaw_mend/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/open_encased/advancedsaw_mend/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/surgery/external_repair.dm b/code/modules/surgery/external_repair.dm index 93c04175d2..4dbac80d08 100644 --- a/code/modules/surgery/external_repair.dm +++ b/code/modules/surgery/external_repair.dm @@ -2,13 +2,13 @@ ////////////////////////////////////////////////////////////////// // LIMB REPAIR SURGERY // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/repairflesh/ +/decl/surgery_step/repairflesh/ priority = 1 can_infect = 1 blood_level = 1 req_open = 1 -/datum/surgery_step/repairflesh/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (target.stat == DEAD) // Sorry defibs, your subjects need to have pumping fluids for these to work. return 0 if (isslime(target)) @@ -33,7 +33,7 @@ // SCAN STEP // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/repairflesh/scan_injury +/decl/surgery_step/repairflesh/scan_injury allowed_tools = list( /obj/item/weapon/autopsy_scanner = 100, /obj/item/device/analyzer = 10 @@ -46,7 +46,7 @@ min_duration = 20 max_duration = 40 -/datum/surgery_step/repairflesh/scan_injury/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/scan_injury/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected.burn_stage || affected.brute_stage) @@ -54,13 +54,13 @@ return 1 return 0 -/datum/surgery_step/repairflesh/scan_injury/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/scan_injury/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] begins scanning [target]'s [affected] with \the [tool].", \ "You begin scanning [target]'s [affected] with \the [tool].") ..() -/datum/surgery_step/repairflesh/scan_injury/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/scan_injury/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] finishes scanning [target]'s [affected].", \ "You finish scanning [target]'s [affected].") @@ -73,7 +73,7 @@ to_chat(user, "\The muscle in [target]'s [affected] is notably charred.") affected.burn_stage = max(1, affected.burn_stage) -/datum/surgery_step/repairflesh/scan_injury/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/scan_injury/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, dropping \the [tool] onto [target]'s [affected]!" , \ "Your hand slips, dropping \the [tool] onto [target]'s [affected]!" ) @@ -83,7 +83,7 @@ // BURN STEP // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/repairflesh/repair_burns +/decl/surgery_step/repairflesh/repair_burns allowed_tools = list( /obj/item/stack/medical/advanced/ointment = 100, /obj/item/stack/medical/ointment = 50, @@ -96,7 +96,7 @@ min_duration = 90 max_duration = 120 -/datum/surgery_step/repairflesh/repair_burns/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_burns/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected.burn_stage < 1 || !(affected.burn_dam)) @@ -106,7 +106,7 @@ return 1 return 0 -/datum/surgery_step/repairflesh/repair_burns/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_burns/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(istype(tool, /obj/item/weapon/tape_roll) || istype(tool, /obj/item/taperoll)) user.visible_message("[user] begins taping up [target]'s [affected] with \the [tool].", \ @@ -120,7 +120,7 @@ "You begin coating the charred tissue in [target]'s [affected] with \the [tool].") ..() -/datum/surgery_step/repairflesh/repair_burns/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_burns/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(istype(tool, /obj/item/weapon/tape_roll) || istype(tool, /obj/item/taperoll)) user.visible_message("[user] finishes taping up [target]'s [affected] with \the [tool].", \ @@ -134,7 +134,7 @@ T.use(1) ..() -/datum/surgery_step/repairflesh/repair_burns/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_burns/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing up [target]'s [affected] with \the [tool].", \ "Your hand slips, tearing up [target]'s [affected] with \the [tool].") @@ -149,7 +149,7 @@ // BRUTE STEP // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/repairflesh/repair_brute +/decl/surgery_step/repairflesh/repair_brute allowed_tools = list( /obj/item/stack/medical/advanced/bruise_pack = 100, /obj/item/stack/medical/bruise_pack = 50, @@ -162,7 +162,7 @@ min_duration = 90 max_duration = 120 -/datum/surgery_step/repairflesh/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected.brute_stage < 1 || !(affected.brute_dam)) @@ -172,7 +172,7 @@ return 1 return 0 -/datum/surgery_step/repairflesh/repair_brute/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_brute/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(istype(tool, /obj/item/weapon/tape_roll) || istype(tool, /obj/item/taperoll)) user.visible_message("[user] begins taping up [target]'s [affected] with \the [tool].", \ @@ -186,7 +186,7 @@ "You begin coating the tissue in [target]'s [affected] with \the [tool].") ..() -/datum/surgery_step/repairflesh/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(istype(tool, /obj/item/weapon/tape_roll) || istype(tool, /obj/item/taperoll)) user.visible_message("[user] finishes taping up [target]'s [affected] with \the [tool].", \ @@ -200,7 +200,7 @@ T.use(1) ..() -/datum/surgery_step/repairflesh/repair_brute/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/repairflesh/repair_brute/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing up [target]'s [affected] with \the [tool].", \ "Your hand slips, tearing up [target]'s [affected] with \the [tool].") diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index b670497fc9..c160c6eefb 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -3,12 +3,12 @@ // FACE SURGERY // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/face +/decl/surgery_step/face priority = 2 req_open = 0 can_infect = 0 -/datum/surgery_step/face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -22,7 +22,7 @@ // Face Opening Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/cut_face +/decl/surgery_step/generic/cut_face allowed_tools = list( /obj/item/weapon/surgical/scalpel = 100, \ /obj/item/weapon/material/knife = 75, \ @@ -32,20 +32,20 @@ min_duration = 90 max_duration = 110 -/datum/surgery_step/generic/cut_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target_zone == O_MOUTH && target.op_stage.face == 0 -/datum/surgery_step/generic/cut_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \ "You start to cut open [target]'s face and neck with \the [tool].") ..() -/datum/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has cut open [target]'s face and neck with \the [tool]." , \ " You have cut open[target]'s face and neck with \the [tool].",) target.op_stage.face = 1 -/datum/surgery_step/generic/cut_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \ "Your hand slips, slicing [target]'s throat wth \the [tool]!" ) @@ -56,7 +56,7 @@ // Vocal Cord/Face Repair Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/face/mend_vocal +/decl/surgery_step/face/mend_vocal allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ /obj/item/stack/cable_coil = 75, \ @@ -66,20 +66,20 @@ min_duration = 70 max_duration = 90 -/datum/surgery_step/face/mend_vocal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/mend_vocal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target.op_stage.face == 1 -/datum/surgery_step/face/mend_vocal/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/mend_vocal/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \ "You start mending [target]'s vocal cords with \the [tool].") ..() -/datum/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] mends [target]'s vocal cords with \the [tool].", \ "You mend [target]'s vocal cords with \the [tool].") target.op_stage.face = 2 -/datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \ "Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!") target.AdjustLosebreath(10) @@ -88,31 +88,31 @@ // Face Fixing Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/face/fix_face +/decl/surgery_step/face/fix_face allowed_tools = list( /obj/item/weapon/surgical/retractor = 100, \ /obj/item/weapon/material/kitchen/utensil/fork = 75 ) - allowed_procs = list(IS_CROWBAR = 55) + allowed_procs = list(TOOL_CROWBAR = 55) min_duration = 80 max_duration = 100 -/datum/surgery_step/face/fix_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/fix_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target.op_stage.face == 2 -/datum/surgery_step/face/fix_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/fix_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts pulling the skin on [target]'s face back in place with \the [tool].", \ "You start pulling the skin on [target]'s face back in place with \the [tool].") ..() -/datum/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] pulls the skin on [target]'s face back in place with \the [tool].", \ "You pull the skin on [target]'s face back in place with \the [tool].") target.op_stage.face = 3 -/datum/surgery_step/face/fix_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/fix_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \ "Your hand slips, tearing skin on [target]'s face with \the [tool]!") @@ -122,7 +122,7 @@ // Face Cauterizing Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/face/cauterize +/decl/surgery_step/face/cauterize allowed_tools = list( /obj/item/weapon/surgical/cautery = 100, \ /obj/item/clothing/mask/smokable/cigarette = 75, \ @@ -133,15 +133,15 @@ min_duration = 70 max_duration = 100 -/datum/surgery_step/face/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target.op_stage.face > 0 -/datum/surgery_step/face/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool]." , \ "You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].") ..() -/datum/surgery_step/face/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] cauterizes the incision on [target]'s face and neck with \the [tool].", \ "You cauterize the incision on [target]'s face and neck with \the [tool].") @@ -152,7 +152,7 @@ h.disfigured = 0 target.op_stage.face = 0 -/datum/surgery_step/face/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/face/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \ "Your hand slips, leaving a small burn on [target]'s face with \the [tool]!") diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index a5ccd15050..6c73036a1a 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -3,10 +3,10 @@ // COMMON STEPS // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/ +/decl/surgery_step/generic/ can_infect = 1 -/datum/surgery_step/generic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (isslime(target)) return 0 if (target_zone == O_EYES) //there are specific steps for eye surgery @@ -28,7 +28,7 @@ // Scalpel Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/cut_open +/decl/surgery_step/generic/cut_open allowed_tools = list( /obj/item/weapon/surgical/scalpel = 100, \ /obj/item/weapon/material/knife = 75, \ @@ -39,19 +39,19 @@ min_duration = 90 max_duration = 110 -/datum/surgery_step/generic/cut_open/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_open/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == 0 && target_zone != O_MOUTH -/datum/surgery_step/generic/cut_open/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_open/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \ "You start the incision on [target]'s [affected.name] with \the [tool].") target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!", 40) ..() -/datum/surgery_step/generic/cut_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has made an incision on [target]'s [affected.name] with \the [tool].", \ "You have made an incision on [target]'s [affected.name] with \the [tool].",) @@ -62,7 +62,7 @@ affected.createwound(CUT, 1) -/datum/surgery_step/generic/cut_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!", \ "Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!") @@ -72,7 +72,7 @@ // Laser Scalpel Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/cut_with_laser +/decl/surgery_step/generic/cut_with_laser allowed_tools = list( /obj/item/weapon/surgical/scalpel/laser3 = 95, \ /obj/item/weapon/surgical/scalpel/laser2 = 85, \ @@ -84,19 +84,19 @@ min_duration = 90 max_duration = 110 -/datum/surgery_step/generic/cut_with_laser/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_with_laser/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == 0 && target_zone != O_MOUTH -/datum/surgery_step/generic/cut_with_laser/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_with_laser/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \ "You start the bloodless incision on [target]'s [affected.name] with \the [tool].") target.custom_pain("You feel a horrible, searing pain in your [affected.name]!", 50) ..() -/datum/surgery_step/generic/cut_with_laser/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_with_laser/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].", \ "You have made a bloodless incision on [target]'s [affected.name] with \the [tool].",) @@ -107,7 +107,7 @@ affected.organ_clamp() spread_germs_to_organ(affected, user) -/datum/surgery_step/generic/cut_with_laser/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cut_with_laser/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!") @@ -118,9 +118,9 @@ // Incision Management Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/incision_manager +/decl/surgery_step/generic/incision_manager allowed_tools = list( - /obj/item/weapon/surgical/scalpel/manager = 100 + /obj/item/weapon/surgical/manager = 100 ) priority = 2 @@ -128,19 +128,19 @@ min_duration = 80 max_duration = 120 -/datum/surgery_step/generic/incision_manager/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/incision_manager/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == 0 && target_zone != O_MOUTH -/datum/surgery_step/generic/incision_manager/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/incision_manager/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \ "You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].") target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!", 50) ..() -/datum/surgery_step/generic/incision_manager/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/incision_manager/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].", \ "You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].",) @@ -153,7 +153,7 @@ affected.organ_clamp() affected.open = 2 -/datum/surgery_step/generic/incision_manager/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/incision_manager/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!", \ "Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!") @@ -164,7 +164,7 @@ // Hemostat Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/clamp_bleeders +/decl/surgery_step/generic/clamp_bleeders allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ /obj/item/stack/cable_coil = 75, \ @@ -174,26 +174,26 @@ min_duration = 40 max_duration = 60 -/datum/surgery_step/generic/clamp_bleeders/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/clamp_bleeders/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open && (affected.status & ORGAN_BLEEDING) -/datum/surgery_step/generic/clamp_bleeders/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/clamp_bleeders/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \ "You start clamping bleeders in [target]'s [affected.name] with \the [tool].") target.custom_pain("The pain in your [affected.name] is maddening!", 40) ..() -/datum/surgery_step/generic/clamp_bleeders/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/clamp_bleeders/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] clamps bleeders in [target]'s [affected.name] with \the [tool].", \ "You clamp bleeders in [target]'s [affected.name] with \the [tool].") affected.organ_clamp() spread_germs_to_organ(affected, user) -/datum/surgery_step/generic/clamp_bleeders/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/clamp_bleeders/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!",) @@ -203,23 +203,23 @@ // Retractor Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/retract_skin +/decl/surgery_step/generic/retract_skin allowed_tools = list( /obj/item/weapon/surgical/retractor = 100, \ /obj/item/weapon/material/kitchen/utensil/fork = 50 ) - allowed_procs = list(IS_CROWBAR = 75) + allowed_procs = list(TOOL_CROWBAR = 75) min_duration = 30 max_duration = 40 -/datum/surgery_step/generic/retract_skin/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/retract_skin/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == 1 //&& !(affected.status & ORGAN_BLEEDING) -/datum/surgery_step/generic/retract_skin/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/retract_skin/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]." var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]." @@ -233,7 +233,7 @@ target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40) ..() -/datum/surgery_step/generic/retract_skin/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/retract_skin/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = "[user] keeps the incision open on [target]'s [affected.name] with \the [tool]." var/self_msg = "You keep the incision open on [target]'s [affected.name] with \the [tool]." @@ -246,7 +246,7 @@ user.visible_message(msg, self_msg) affected.open = 2 -/datum/surgery_step/generic/retract_skin/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/retract_skin/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = "[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!" var/self_msg = "Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!" @@ -263,7 +263,7 @@ // Cauterize Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/cauterize +/decl/surgery_step/generic/cauterize allowed_tools = list( /obj/item/weapon/surgical/cautery = 100, \ /obj/item/clothing/mask/smokable/cigarette = 75, \ @@ -274,19 +274,19 @@ min_duration = 70 max_duration = 100 -/datum/surgery_step/generic/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open && target_zone != O_MOUTH -/datum/surgery_step/generic/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \ "You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].") target.custom_pain("Your [affected.name] is being burned!", 40) ..() -/datum/surgery_step/generic/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] cauterizes the incision on [target]'s [affected.name] with \the [tool].", \ "You cauterize the incision on [target]'s [affected.name] with \the [tool].") @@ -294,7 +294,7 @@ affected.germ_level = 0 affected.status &= ~ORGAN_BLEEDING -/datum/surgery_step/generic/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!") @@ -304,7 +304,7 @@ // Amputation Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/generic/amputate +/decl/surgery_step/generic/amputate allowed_tools = list( /obj/item/weapon/surgical/circular_saw = 100, \ /obj/item/weapon/material/knife/machete/hatchet = 75 @@ -314,7 +314,7 @@ min_duration = 110 max_duration = 160 -/datum/surgery_step/generic/amputate/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/amputate/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (target_zone == O_EYES) //there are specific steps for eye surgery return 0 if (!hasorgans(target)) @@ -324,20 +324,20 @@ return 0 return !affected.cannot_amputate -/datum/surgery_step/generic/amputate/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/amputate/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \ "You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].") target.custom_pain("Your [affected.amputation_point] is being ripped apart!", 100) ..() -/datum/surgery_step/generic/amputate/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/amputate/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \ "You amputate [target]'s [affected.name] with \the [tool].") affected.droplimb(1,DROPLIMB_EDGE) -/datum/surgery_step/generic/amputate/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/generic/amputate/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!") diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index 87817c6e27..98f6ca8e00 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -4,10 +4,10 @@ // ITEM PLACEMENT SURGERY // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/cavity +/decl/surgery_step/cavity priority = 1 -/datum/surgery_step/cavity/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -15,7 +15,7 @@ return 0 return affected && affected.open == (affected.encased ? 3 : 2) && !(affected.status & ORGAN_BLEEDING) -/datum/surgery_step/cavity/proc/get_max_wclass(var/obj/item/organ/external/affected) +/decl/surgery_step/cavity/proc/get_max_wclass(var/obj/item/organ/external/affected) switch (affected.organ_tag) if (BP_HEAD) return ITEMSIZE_TINY @@ -25,7 +25,7 @@ return ITEMSIZE_SMALL return 0 -/datum/surgery_step/cavity/proc/get_cavity(var/obj/item/organ/external/affected) +/decl/surgery_step/cavity/proc/get_cavity(var/obj/item/organ/external/affected) switch (affected.organ_tag) if (BP_HEAD) return "cranial" @@ -35,7 +35,7 @@ return "abdominal" return "" -/datum/surgery_step/cavity/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!") @@ -45,7 +45,7 @@ // Space Making Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/cavity/make_space +/decl/surgery_step/cavity/make_space allowed_tools = list( /obj/item/weapon/surgical/surgicaldrill = 100, \ /obj/item/weapon/pen = 75, \ @@ -55,12 +55,12 @@ min_duration = 60 max_duration = 80 -/datum/surgery_step/cavity/make_space/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/make_space/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && !affected.cavity -/datum/surgery_step/cavity/make_space/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/make_space/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \ "You start making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." ) @@ -68,7 +68,7 @@ affected.cavity = 1 ..() -/datum/surgery_step/cavity/make_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/make_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) user.visible_message("[user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \ "You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." ) @@ -77,7 +77,7 @@ // Cavity Closing Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/cavity/close_space +/decl/surgery_step/cavity/close_space priority = 2 allowed_tools = list( /obj/item/weapon/surgical/cautery = 100, \ @@ -89,12 +89,12 @@ min_duration = 60 max_duration = 80 -/datum/surgery_step/cavity/close_space/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/close_space/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.cavity -/datum/surgery_step/cavity/close_space/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/close_space/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts mending [target]'s [get_cavity(affected)] cavity wall with \the [tool].", \ "You start mending [target]'s [get_cavity(affected)] cavity wall with \the [tool]." ) @@ -102,7 +102,7 @@ affected.cavity = 0 ..() -/datum/surgery_step/cavity/close_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/close_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) user.visible_message("[user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].", \ " You mend[target]'s [get_cavity(affected)] cavity walls with \the [tool]." ) @@ -111,14 +111,14 @@ // Item Implantation Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/cavity/place_item +/decl/surgery_step/cavity/place_item priority = 0 allowed_tools = list(/obj/item = 100) min_duration = 80 max_duration = 100 -/datum/surgery_step/cavity/place_item/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/place_item/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(!istype(tool)) return FALSE if(..()) @@ -133,14 +133,14 @@ total_volume += I.w_class return total_volume <= get_max_wclass(affected) -/datum/surgery_step/cavity/place_item/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/place_item/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \ "You start putting \the [tool] inside [target]'s [get_cavity(affected)] cavity." ) //Nobody will probably ever see this, but I made these two blue. ~CK target.custom_pain("The pain in your chest is living hell!",1) ..() -/datum/surgery_step/cavity/place_item/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/place_item/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) user.visible_message("[user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \ @@ -159,18 +159,18 @@ // IMPLANT/ITEM REMOVAL SURGERY ////////////////////////////////////////////////////////////////// -/datum/surgery_step/cavity/implant_removal +/decl/surgery_step/cavity/implant_removal allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ /obj/item/weapon/material/kitchen/utensil/fork = 20 ) - allowed_procs = list(IS_WIRECUTTER = 75) + allowed_procs = list(TOOL_WIRECUTTER = 75) min_duration = 80 max_duration = 100 -/datum/surgery_step/cavity/implant_removal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/implant_removal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected.organ_tag == BP_HEAD) var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name["brain"] @@ -178,14 +178,14 @@ else return ..() -/datum/surgery_step/cavity/implant_removal/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/implant_removal/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts poking around inside [target]'s [affected.name] with \the [tool].", \ "You start poking around inside [target]'s [affected.name] with \the [tool]." ) target.custom_pain("The pain in your [affected.name] is living hell!",1) ..() -/datum/surgery_step/cavity/implant_removal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/implant_removal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) var/find_prob = 0 @@ -234,7 +234,7 @@ user.visible_message("[user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.", \ "You could not find anything inside [target]'s [affected.name]." ) -/datum/surgery_step/cavity/implant_removal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/cavity/implant_removal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) ..() var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) if (affected.implants.len) diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index 0219149996..9ebefd807f 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -3,12 +3,12 @@ // LIMB SURGERY // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/limb/ - priority = 3 // Must be higher than /datum/surgery_step/internal +/decl/surgery_step/limb/ + priority = 3 // Must be higher than /decl/surgery_step/internal req_open = 0 can_infect = 0 -/datum/surgery_step/limb/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -21,13 +21,13 @@ // Limb Attachment Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/limb/attach +/decl/surgery_step/limb/attach allowed_tools = list(/obj/item/organ/external = 100) min_duration = 50 max_duration = 70 -/datum/surgery_step/limb/attach/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/attach/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(!istype(tool)) return FALSE var/obj/item/organ/external/E = tool @@ -48,12 +48,12 @@ else return 1 -/datum/surgery_step/limb/attach/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/attach/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = tool user.visible_message("[user] starts attaching [E.name] to [target]'s [E.amputation_point].", \ "You start attaching [E.name] to [target]'s [E.amputation_point].") -/datum/surgery_step/limb/attach/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/attach/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = tool user.visible_message("[user] has attached [target]'s [E.name] to the [E.amputation_point].", \ "You have attached [target]'s [E.name] to the [E.amputation_point].") @@ -70,7 +70,7 @@ target.updatehealth() target.UpdateDamageIcon() -/datum/surgery_step/limb/attach/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/attach/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = tool user.visible_message(" [user]'s hand slips, damaging [target]'s [E.amputation_point]!", \ " Your hand slips, damaging [target]'s [E.amputation_point]!") @@ -80,7 +80,7 @@ // Limb Connection Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/limb/connect +/decl/surgery_step/limb/connect allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ /obj/item/stack/cable_coil = 75, \ @@ -91,16 +91,16 @@ min_duration = 100 max_duration = 120 -/datum/surgery_step/limb/connect/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/connect/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = target.get_organ(target_zone) return E && !E.is_stump() && (E.status & ORGAN_CUT_AWAY) -/datum/surgery_step/limb/connect/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/connect/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = target.get_organ(target_zone) user.visible_message("[user] starts connecting tendons and muscles in [target]'s [E.amputation_point] with [tool].", \ "You start connecting tendons and muscle in [target]'s [E.amputation_point].") -/datum/surgery_step/limb/connect/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/connect/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = target.get_organ(target_zone) user.visible_message("[user] has connected tendons and muscles in [target]'s [E.amputation_point] with [tool].", \ "You have connected tendons and muscles in [target]'s [E.amputation_point] with [tool].") @@ -109,7 +109,7 @@ target.updatehealth() target.UpdateDamageIcon() -/datum/surgery_step/limb/connect/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/connect/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = tool user.visible_message(" [user]'s hand slips, damaging [target]'s [E.amputation_point]!", \ " Your hand slips, damaging [target]'s [E.amputation_point]!") @@ -119,13 +119,13 @@ // Robolimb Attachment Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/limb/mechanize +/decl/surgery_step/limb/mechanize allowed_tools = list(/obj/item/robot_parts = 100) min_duration = 80 max_duration = 100 -/datum/surgery_step/limb/mechanize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/mechanize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..() && istype(tool)) var/obj/item/robot_parts/p = tool if (p.part) @@ -133,11 +133,11 @@ return 0 return isnull(target.get_organ(target_zone)) -/datum/surgery_step/limb/mechanize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/mechanize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts attaching \the [tool] to [target].", \ "You start attaching \the [tool] to [target].") -/datum/surgery_step/limb/mechanize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/mechanize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/robot_parts/L = tool user.visible_message("[user] has attached \the [tool] to [target].", \ "You have attached \the [tool] to [target].") @@ -161,7 +161,7 @@ qdel(tool) -/datum/surgery_step/limb/mechanize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/limb/mechanize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message(" [user]'s hand slips, damaging [target]'s flesh!", \ " Your hand slips, damaging [target]'s flesh!") target.apply_damage(10, BRUTE, null, sharp=1) diff --git a/code/modules/surgery/neck.dm b/code/modules/surgery/neck.dm index 6b970ad4c2..37e372aeb1 100644 --- a/code/modules/surgery/neck.dm +++ b/code/modules/surgery/neck.dm @@ -3,12 +3,12 @@ // BRAINSTEM SURGERY // ////////////////////////////////////////////////////////////////////// -/datum/surgery_step/brainstem +/decl/surgery_step/brainstem priority = 2 req_open = 1 can_infect = 1 -/datum/surgery_step/brainstem/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -22,7 +22,7 @@ // Blood Vessel Mending ///////////////////////////// -/datum/surgery_step/brainstem/mend_vessels +/decl/surgery_step/brainstem/mend_vessels priority = 1 allowed_tools = list( /obj/item/weapon/surgical/FixOVein = 100, @@ -32,20 +32,20 @@ min_duration = 80 max_duration = 100 -/datum/surgery_step/brainstem/mend_vessels/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vessels/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 0 -/datum/surgery_step/brainstem/mend_vessels/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vessels/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to mend the blood vessels on [target]'s brainstem with \the [tool].", \ "You start to mend the blood vessels on [target]'s brainstem with \the [tool].") ..() -/datum/surgery_step/brainstem/mend_vessels/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vessels/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has mended the blood vessels on [target]'s brainstem with \the [tool]." , \ " You have mended the blood vessels on [target]'s brainstem with \the [tool].",) target.op_stage.brainstem = 1 -/datum/surgery_step/brainstem/mend_vessels/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vessels/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing at [target]'s brainstem with \the [tool]!" , \ "Your hand slips, tearing at [target]'s brainstem with \the [tool]!" ) @@ -56,7 +56,7 @@ // Bone Drilling ///////////////////////////// -/datum/surgery_step/brainstem/drill_vertebrae +/decl/surgery_step/brainstem/drill_vertebrae priority = 3 //Do this instead of expanding the skull cavity allowed_tools = list( /obj/item/weapon/surgical/surgicaldrill = 100, @@ -64,20 +64,20 @@ /obj/item/weapon/pickaxe = 5 ) - allowed_procs = list(IS_SCREWDRIVER = 75) + allowed_procs = list(TOOL_SCREWDRIVER = 75) min_duration = 200 //Very. Very. Carefully. max_duration = 300 -/datum/surgery_step/brainstem/drill_vertebrae/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/drill_vertebrae/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 1 -/datum/surgery_step/brainstem/drill_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/drill_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to drill around [target]'s brainstem with \the [tool].", \ "You start to drill around [target]'s brainstem with \the [tool].") ..() -/datum/surgery_step/brainstem/drill_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/drill_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has drilled around [target]'s brainstem with \the [tool]." , \ " You have drilled around [target]'s brainstem with \the [tool].",) @@ -85,7 +85,7 @@ target.op_stage.brainstem = 2 affected.fracture() //Does not apply damage, simply breaks it if it wasn't already. Doesn't stop a defib on its own. -/datum/surgery_step/brainstem/drill_vertebrae/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/drill_vertebrae/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, shredding [target]'s brainstem with \the [tool]!" , \ "Your hand slips, shredding [target]'s brainstem with \the [tool]!" ) @@ -99,32 +99,32 @@ // Bone Cleaning ///////////////////////////// -/datum/surgery_step/brainstem/clean_chips +/decl/surgery_step/brainstem/clean_chips priority = 3 //Do this instead of picking around for implants. allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, /obj/item/weapon/melee/changeling/claw = 40) //Surprisingly, claws are kind of okay at picking things out. - allowed_procs = list(IS_WIRECUTTER = 60) + allowed_procs = list(TOOL_WIRECUTTER = 60) min_duration = 90 max_duration = 120 -/datum/surgery_step/brainstem/clean_chips/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/clean_chips/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 2 -/datum/surgery_step/brainstem/clean_chips/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/clean_chips/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to pick around [target]'s brainstem for bone chips with \the [tool].", \ "You start to pick around [target]'s brainstem for bone chips with \the [tool].") ..() -/datum/surgery_step/brainstem/clean_chips/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/clean_chips/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has cleaned around [target]'s brainstem with \the [tool]." , \ " You have cleaned around [target]'s brainstem with \the [tool].",) target.AdjustParalysis(10) //Still invasive. target.op_stage.brainstem = 3 -/datum/surgery_step/brainstem/clean_chips/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/clean_chips/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!" , \ "Your hand slips, gouging [target]'s brainstem with \the [tool]!" ) @@ -138,7 +138,7 @@ // Spinal Cord Repair ///////////////////////////// -/datum/surgery_step/brainstem/mend_cord +/decl/surgery_step/brainstem/mend_cord priority = 1 //Do this after IB. allowed_tools = list( /obj/item/weapon/surgical/FixOVein = 100, @@ -149,22 +149,22 @@ min_duration = 100 max_duration = 200 -/datum/surgery_step/brainstem/mend_cord/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_cord/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 3 -/datum/surgery_step/brainstem/mend_cord/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_cord/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to fuse [target]'s spinal cord with \the [tool].", \ "You start to fuse [target]'s spinal cord with \the [tool].") ..() -/datum/surgery_step/brainstem/mend_cord/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_cord/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has fused [target]'s spinal cord with \the [tool]." , \ " You have fused [target]'s spinal cord with \the [tool].",) target.op_stage.brainstem = 4 target.AdjustParalysis(5) target.add_modifier(/datum/modifier/franken_sickness, 20 MINUTES) -/datum/surgery_step/brainstem/mend_cord/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_cord/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!" , \ "Your hand slips, tearing at [target]'s spinal cord with \the [tool]!" ) @@ -178,7 +178,7 @@ // Vertebrae repair ///////////////////////////// -/datum/surgery_step/brainstem/mend_vertebrae +/decl/surgery_step/brainstem/mend_vertebrae priority = 3 //Do this instead of fixing bones. allowed_tools = list( /obj/item/weapon/surgical/bonegel = 100, @@ -188,21 +188,21 @@ min_duration = 100 max_duration = 160 -/datum/surgery_step/brainstem/mend_vertebrae/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vertebrae/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 4 -/datum/surgery_step/brainstem/mend_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to mend [target]'s opened vertebrae with \the [tool].", \ "You start to mend [target]'s opened vertebrae with \the [tool].") ..() -/datum/surgery_step/brainstem/mend_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has mended [target]'s vertebrae with \the [tool]." , \ " You have mended [target]'s vertebrae with \the [tool].",) target.can_defib = 1 target.op_stage.brainstem = 5 -/datum/surgery_step/brainstem/mend_vertebrae/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/mend_vertebrae/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!" , \ "Your hand slips, tearing at [target]'s spinal cord with \the [tool]!" ) @@ -216,32 +216,32 @@ // Realign tissues ///////////////////////////// -/datum/surgery_step/brainstem/realign_tissue +/decl/surgery_step/brainstem/realign_tissue priority = 3 //Do this instead of searching for objects in the skull. allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, /obj/item/weapon/melee/changeling/claw = 20) //Claws. Good for digging, not so much for moving. - allowed_procs = list(IS_WIRECUTTER = 60) + allowed_procs = list(TOOL_WIRECUTTER = 60) min_duration = 90 max_duration = 120 -/datum/surgery_step/brainstem/realign_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/realign_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 5 -/datum/surgery_step/brainstem/realign_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/realign_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to realign the tissues in [target]'s skull with \the [tool].", \ "You start to realign the tissues in [target]'s skull with \the [tool].") ..() -/datum/surgery_step/brainstem/realign_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/realign_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has realigned the tissues in [target]'s skull back into place with \the [tool]." , \ " You have realigned the tissues in [target]'s skull back into place with \the [tool].",) target.AdjustParalysis(5) //I n v a s i v e target.op_stage.brainstem = 0 //The cycle begins anew. -/datum/surgery_step/brainstem/realign_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/brainstem/realign_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!" , \ "Your hand slips, gouging [target]'s brainstem with \the [tool]!" ) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 499706006f..22b1e2042b 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -1,10 +1,10 @@ // Internal surgeries. -/datum/surgery_step/internal +/decl/surgery_step/internal priority = 2 can_infect = 1 blood_level = 1 -/datum/surgery_step/internal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return 0 @@ -19,13 +19,13 @@ // ALIEN EMBRYO SURGERY // ////////////////////////////////////////////////////////////////// // Here for future reference incase it's needed. See: Alien_embryo.dm and Alien_facehugger.dm /* -/datum/surgery_step/internal/remove_embryo +/decl/surgery_step/internal/remove_embryo allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ /obj/item/weapon/material/kitchen/utensil/fork = 20 ) - allowed_procs = list(IS_WIRECUTTER = 75) + allowed_procs = list(TOOL_WIRECUTTER = 75) blood_level = 2 min_duration = 80 @@ -59,7 +59,7 @@ ////////////////////////////////////////////////////////////////// // CHEST INTERNAL ORGAN SURGERY // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/internal/fix_organ +/decl/surgery_step/internal/fix_organ allowed_tools = list( /obj/item/stack/medical/advanced/bruise_pack= 100, \ /obj/item/stack/medical/bruise_pack = 20 @@ -68,7 +68,7 @@ min_duration = 70 max_duration = 90 -/datum/surgery_step/internal/fix_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/fix_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -81,7 +81,7 @@ break return ..() && is_organ_damaged -/datum/surgery_step/internal/fix_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/fix_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/tool_name = "\the [tool]" if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack)) tool_name = "regenerative membrane" @@ -102,7 +102,7 @@ target.custom_pain("The pain in your [affected.name] is living hell!", 100) ..() -/datum/surgery_step/internal/fix_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/fix_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/tool_name = "\the [tool]" if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack)) tool_name = "regenerative membrane" @@ -125,7 +125,7 @@ if(I.organ_tag == O_LUNGS) target.SetLosebreath(0) -/datum/surgery_step/internal/fix_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/fix_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -149,7 +149,7 @@ // Organ Detaching Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/internal/detatch_organ/ +/decl/surgery_step/internal/detatch_organ/ allowed_tools = list( /obj/item/weapon/surgical/scalpel = 100, \ @@ -160,7 +160,7 @@ min_duration = 90 max_duration = 110 -/datum/surgery_step/internal/detatch_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/detatch_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!..()) return 0 @@ -188,7 +188,7 @@ return ..() && organ_to_remove -/datum/surgery_step/internal/detatch_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/detatch_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \ @@ -196,7 +196,7 @@ target.custom_pain("The pain in your [affected.name] is living hell!", 100) ..() -/datum/surgery_step/internal/detatch_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/detatch_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has separated [target]'s [target.op_stage.current_organ] with \the [tool]." , \ "You have separated [target]'s [target.op_stage.current_organ] with \the [tool].") @@ -204,7 +204,7 @@ if(I && istype(I)) I.status |= ORGAN_CUT_AWAY -/datum/surgery_step/internal/detatch_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/detatch_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!") @@ -214,19 +214,19 @@ // Organ Removal Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/internal/remove_organ +/decl/surgery_step/internal/remove_organ allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ /obj/item/weapon/material/kitchen/utensil/fork = 20 ) - allowed_procs = list(IS_WIRECUTTER = 75) + allowed_procs = list(TOOL_WIRECUTTER = 75) min_duration = 60 max_duration = 80 -/datum/surgery_step/internal/remove_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/remove_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!..()) return 0 @@ -248,13 +248,13 @@ target.op_stage.current_organ = organ_to_remove return ..() -/datum/surgery_step/internal/remove_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/remove_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You start removing [target]'s [target.op_stage.current_organ] with \the [tool].") target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100) ..() -/datum/surgery_step/internal/remove_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/remove_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has removed [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You have removed [target]'s [target.op_stage.current_organ] with \the [tool].") @@ -265,7 +265,7 @@ O.removed(user) target.op_stage.current_organ = null -/datum/surgery_step/internal/remove_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/remove_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") @@ -275,7 +275,7 @@ // Organ Replacement Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/internal/replace_organ +/decl/surgery_step/internal/replace_organ allowed_tools = list( /obj/item/organ = 100 ) @@ -283,7 +283,7 @@ min_duration = 60 max_duration = 80 -/datum/surgery_step/internal/replace_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/replace_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/internal/O = tool var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -327,14 +327,14 @@ return ..() && organ_missing && organ_compatible -/datum/surgery_step/internal/replace_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/replace_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \ "You start transplanting \the [tool] into [target]'s [affected.name].") target.custom_pain("Someone's rooting around in your [affected.name]!", 100) ..() -/datum/surgery_step/internal/replace_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/replace_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has transplanted \the [tool] into [target]'s [affected.name].", \ "You have transplanted \the [tool] into [target]'s [affected.name].") @@ -343,7 +343,7 @@ user.remove_from_mob(O) O.replaced(target,affected) -/datum/surgery_step/internal/replace_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/replace_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips, damaging \the [tool]!", \ "Your hand slips, damaging \the [tool]!") var/obj/item/organ/I = tool @@ -354,7 +354,7 @@ // Organ Attaching Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/internal/attach_organ +/decl/surgery_step/internal/attach_organ allowed_tools = list( /obj/item/weapon/surgical/FixOVein = 100, \ /obj/item/stack/cable_coil = 75 @@ -363,7 +363,7 @@ min_duration = 100 max_duration = 120 -/datum/surgery_step/internal/attach_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/attach_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!..()) return 0 @@ -385,13 +385,13 @@ target.op_stage.current_organ = organ_to_replace return ..() -/datum/surgery_step/internal/attach_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/attach_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].") target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!", 100) ..() -/datum/surgery_step/internal/attach_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/attach_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \ "You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].") @@ -399,7 +399,7 @@ if(I && istype(I)) I.status &= ~ORGAN_CUT_AWAY -/datum/surgery_step/internal/attach_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/attach_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!") @@ -409,7 +409,7 @@ // Organ Ripping Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/internal/rip_organ +/decl/surgery_step/internal/rip_organ allowed_tools = list( /obj/item/weapon/surgical/scalpel/ripper = 100 @@ -422,7 +422,7 @@ min_duration = 60 max_duration = 80 -/datum/surgery_step/internal/rip_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/rip_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!..()) return 0 @@ -444,13 +444,13 @@ target.op_stage.current_organ = organ_to_remove return ..() -/datum/surgery_step/internal/rip_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/rip_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts ripping [target]'s [target.op_stage.current_organ] out with \the [tool].", \ "You start ripping [target]'s [target.op_stage.current_organ] out with \the [tool].") target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100) ..() -/datum/surgery_step/internal/rip_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/rip_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has ripped [target]'s [target.op_stage.current_organ] out with \the [tool].", \ "You have ripped [target]'s [target.op_stage.current_organ] out with \the [tool].") @@ -461,7 +461,7 @@ O.removed(user) target.op_stage.current_organ = null -/datum/surgery_step/internal/rip_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/internal/rip_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index fe7d004dc4..e10ba2444f 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -7,7 +7,7 @@ // Internal Bleeding Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/fix_vein +/decl/surgery_step/fix_vein priority = 2 allowed_tools = list( /obj/item/weapon/surgical/FixOVein = 100, \ @@ -19,7 +19,7 @@ min_duration = 70 max_duration = 90 -/datum/surgery_step/fix_vein/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_vein/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(!hasorgans(target)) return 0 @@ -34,14 +34,14 @@ return affected.open == (affected.encased ? 3 : 2) && internal_bleeding -/datum/surgery_step/fix_vein/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_vein/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \ "You start patching the damaged vein in [target]'s [affected.name] with \the [tool].") target.custom_pain("The pain in [affected.name] is unbearable!", 100) ..() -/datum/surgery_step/fix_vein/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_vein/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].", \ "You have patched the damaged vein in [target]'s [affected.name] with \the [tool].") @@ -51,7 +51,7 @@ affected.update_damages() if (ishuman(user) && prob(40)) user:bloody_hands(target, 0) -/datum/surgery_step/fix_vein/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_vein/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \ "Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!") @@ -60,7 +60,7 @@ /////////////////////////////////////////////////////////////// // Necrosis Surgery Step 1 /////////////////////////////////////////////////////////////// -/datum/surgery_step/fix_dead_tissue //Debridement +/decl/surgery_step/fix_dead_tissue //Debridement priority = 2 allowed_tools = list( /obj/item/weapon/surgical/scalpel = 100, \ @@ -74,7 +74,7 @@ min_duration = 110 max_duration = 160 -/datum/surgery_step/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(!hasorgans(target)) return 0 @@ -87,20 +87,20 @@ return affected && affected.open >= 2 && (affected.status & ORGAN_DEAD) -/datum/surgery_step/fix_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \ "You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].") target.custom_pain("The pain in [affected.name] is unbearable!", 100) ..() -/datum/surgery_step/fix_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].", \ "You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].") affected.open = 3 -/datum/surgery_step/fix_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/fix_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!") @@ -109,7 +109,7 @@ /////////////////////////////////////////////////////////////// // Necrosis Surgery Step 2 /////////////////////////////////////////////////////////////// -/datum/surgery_step/treat_necrosis +/decl/surgery_step/treat_necrosis priority = 2 allowed_tools = list( /obj/item/weapon/reagent_containers/dropper = 100, @@ -125,7 +125,7 @@ min_duration = 50 max_duration = 60 -/datum/surgery_step/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!istype(tool, /obj/item/weapon/reagent_containers)) return 0 @@ -144,14 +144,14 @@ return 0 return affected && affected.open == 3 && (affected.status & ORGAN_DEAD) -/datum/surgery_step/treat_necrosis/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/treat_necrosis/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \ "You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50) ..() -/datum/surgery_step/treat_necrosis/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/treat_necrosis/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if (!istype(tool, /obj/item/weapon/reagent_containers)) @@ -167,7 +167,7 @@ user.visible_message("[user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name].", \ "You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].") -/datum/surgery_step/treat_necrosis/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/treat_necrosis/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if (!istype(tool, /obj/item/weapon/reagent_containers)) @@ -186,7 +186,7 @@ // Hardsuit Removal Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/hardsuit +/decl/surgery_step/hardsuit allowed_tools = list( /obj/item/weapon/weldingtool = 80, /obj/item/weapon/surgical/circular_saw = 60, @@ -200,7 +200,7 @@ min_duration = 120 max_duration = 180 -/datum/surgery_step/hardsuit/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/hardsuit/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(!istype(target)) return 0 if(istype(tool,/obj/item/weapon/weldingtool)) @@ -209,7 +209,7 @@ return 0 return (target_zone == BP_TORSO) && ((istype(target.back, /obj/item/weapon/rig) && !(target.back.canremove)) || (istype(target.belt, /obj/item/weapon/rig) && !(target.belt.canremove))) -/datum/surgery_step/hardsuit/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/hardsuit/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/weapon/rig/rig = target.back if(!istype(rig)) rig = target.belt @@ -219,7 +219,7 @@ "You start cutting through the support systems of \the [rig] on [target] with \the [tool].") ..() -/datum/surgery_step/hardsuit/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/hardsuit/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/weapon/rig/rig = target.back if(!istype(rig)) rig = target.belt @@ -229,6 +229,6 @@ user.visible_message("[user] has cut through the support systems of \the [rig] on [target] with \the [tool].", \ "You have cut through the support systems of \the [rig] on [target] with \the [tool].") -/datum/surgery_step/hardsuit/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/hardsuit/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s [tool] can't quite seem to get through the metal...", \ "\The [tool] can't quite seem to get through the metal. It's weakening, though - try again.") diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 964e2a87f1..bc28847768 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -3,10 +3,10 @@ // COMMON STEPS // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/ +/decl/surgery_step/robotics/ can_infect = 0 -/datum/surgery_step/robotics/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (isslime(target)) return 0 if (target_zone == O_EYES) //there are specific steps for eye surgery @@ -28,7 +28,7 @@ // Unscrew Hatch Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/unscrew_hatch +/decl/surgery_step/robotics/unscrew_hatch allowed_tools = list( /obj/item/weapon/coin = 50, /obj/item/weapon/material/knife = 50 @@ -41,24 +41,24 @@ min_duration = 90 max_duration = 110 -/datum/surgery_step/robotics/unscrew_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/unscrew_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == 0 && target_zone != O_MOUTH -/datum/surgery_step/robotics/unscrew_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/unscrew_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ "You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].") ..() -/datum/surgery_step/robotics/unscrew_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/unscrew_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ "You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].",) affected.open = 1 -/datum/surgery_step/robotics/unscrew_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/unscrew_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].", \ "Your [tool] slips, failing to unscrew [target]'s [affected.name].") @@ -67,7 +67,7 @@ // Open Hatch Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/open_hatch +/decl/surgery_step/robotics/open_hatch allowed_tools = list( /obj/item/weapon/surgical/retractor = 100, /obj/item/weapon/material/kitchen/utensil = 50 @@ -78,24 +78,24 @@ min_duration = 30 max_duration = 40 -/datum/surgery_step/robotics/open_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/open_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == 1 -/datum/surgery_step/robotics/open_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/open_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].", "You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].") ..() -/datum/surgery_step/robotics/open_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/open_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ "You open the maintenance hatch on [target]'s [affected.name] with \the [tool].") affected.open = 3 -/datum/surgery_step/robotics/open_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/open_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].", "Your [tool] slips, failing to open the hatch on [target]'s [affected.name].") @@ -104,7 +104,7 @@ // Close Hatch Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/close_hatch +/decl/surgery_step/robotics/close_hatch allowed_tools = list( /obj/item/weapon/surgical/retractor = 100, /obj/item/weapon/material/kitchen/utensil = 50 @@ -115,25 +115,25 @@ min_duration = 70 max_duration = 100 -/datum/surgery_step/robotics/close_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/close_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open && target_zone != O_MOUTH -/datum/surgery_step/robotics/close_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/close_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \ "You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].") ..() -/datum/surgery_step/robotics/close_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/close_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \ "You close and secure the hatch on [target]'s [affected.name] with \the [tool].") affected.open = 0 affected.germ_level = 0 -/datum/surgery_step/robotics/close_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/close_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].", "Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].") @@ -142,7 +142,7 @@ // Brute Repair Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/repair_brute +/decl/surgery_step/robotics/repair_brute allowed_tools = list( /obj/item/weapon/weldingtool = 100, /obj/item/weapon/pickaxe/plasmacutter = 50 @@ -151,7 +151,7 @@ min_duration = 50 max_duration = 60 -/datum/surgery_step/robotics/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(istype(tool, /obj/item/weapon/weldingtool)) @@ -160,20 +160,20 @@ return 0 return affected && affected.open == 3 && (affected.disfigured || affected.brute_dam > 0) && target_zone != O_MOUTH -/datum/surgery_step/robotics/repair_brute/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_brute/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \ "You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].") ..() -/datum/surgery_step/robotics/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \ "You finish patching damage to [target]'s [affected.name] with \the [tool].") affected.heal_damage(rand(30,50),0,1,1) affected.disfigured = 0 -/datum/surgery_step/robotics/repair_brute/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_brute/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].", "Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].") @@ -183,7 +183,7 @@ // Burn Repair Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/repair_burn +/decl/surgery_step/robotics/repair_burn allowed_tools = list( /obj/item/stack/cable_coil = 100 ) @@ -191,7 +191,7 @@ min_duration = 50 max_duration = 60 -/datum/surgery_step/robotics/repair_burn/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_burn/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(istype(tool, /obj/item/stack/cable_coil)) @@ -208,20 +208,20 @@ return affected && affected.open == 3 && (affected.disfigured || affected.burn_dam > 0) && target_zone != O_MOUTH -/datum/surgery_step/robotics/repair_burn/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_burn/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] begins to splice new cabling into [target]'s [affected.name]." , \ "You begin to splice new cabling into [target]'s [affected.name].") ..() -/datum/surgery_step/robotics/repair_burn/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_burn/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] finishes splicing cable into [target]'s [affected.name].", \ "You finishes splicing new cable into [target]'s [affected.name].") affected.heal_damage(0,rand(30,50),1,1) affected.disfigured = 0 -/datum/surgery_step/robotics/repair_burn/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/repair_burn/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] causes a short circuit in [target]'s [affected.name]!", "You cause a short circuit in [target]'s [affected.name]!") @@ -231,7 +231,7 @@ // Robot Organ Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/fix_organ_robotic //For artificial organs +/decl/surgery_step/robotics/fix_organ_robotic //For artificial organs allowed_tools = list( /obj/item/stack/nanopaste = 100, \ /obj/item/weapon/surgical/bonegel = 30, \ @@ -242,7 +242,7 @@ min_duration = 70 max_duration = 90 -/datum/surgery_step/robotics/fix_organ_robotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/fix_organ_robotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -254,7 +254,7 @@ break return affected.open == 3 && is_organ_damaged -/datum/surgery_step/robotics/fix_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/fix_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -268,7 +268,7 @@ target.custom_pain("The pain in your [affected.name] is living hell!",1) ..() -/datum/surgery_step/robotics/fix_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/fix_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -282,7 +282,7 @@ if(I.organ_tag == O_EYES) target.sdisabilities &= ~BLIND -/datum/surgery_step/robotics/fix_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/fix_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (!hasorgans(target)) return var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -301,7 +301,7 @@ // Robot Organ Detaching Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/detatch_organ_robotic +/decl/surgery_step/robotics/detatch_organ_robotic allowed_tools = list( /obj/item/device/multitool = 100 @@ -310,7 +310,7 @@ min_duration = 90 max_duration = 110 -/datum/surgery_step/robotics/detatch_organ_robotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/detatch_organ_robotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(!(affected && (affected.robotic >= ORGAN_ROBOT))) return 0 @@ -333,12 +333,12 @@ return ..() && organ_to_remove -/datum/surgery_step/robotics/detatch_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/detatch_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool]." ) ..() -/datum/surgery_step/robotics/detatch_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/detatch_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool]." , \ "You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].") @@ -346,7 +346,7 @@ if(I && istype(I)) I.status |= ORGAN_CUT_AWAY -/datum/surgery_step/robotics/detatch_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/detatch_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips, disconnecting \the [tool].", \ "Your hand slips, disconnecting \the [tool].") @@ -354,13 +354,13 @@ // Robot Organ Attaching Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/attach_organ_robotic +/decl/surgery_step/robotics/attach_organ_robotic allowed_procs = list(IS_SCREWDRIVER = 100) min_duration = 100 max_duration = 120 -/datum/surgery_step/robotics/attach_organ_robotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/attach_organ_robotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(!(affected && (affected.robotic >= ORGAN_ROBOT))) return 0 @@ -382,12 +382,12 @@ target.op_stage.current_organ = organ_to_replace return ..() -/datum/surgery_step/robotics/attach_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/attach_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].") ..() -/datum/surgery_step/robotics/attach_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/attach_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \ "You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].") @@ -395,7 +395,7 @@ if(I && istype(I)) I.status &= ~ORGAN_CUT_AWAY -/datum/surgery_step/robotics/attach_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/attach_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips, disconnecting \the [tool].", \ "Your hand slips, disconnecting \the [tool].") @@ -403,7 +403,7 @@ // MMI Insertion Surgery /////////////////////////////////////////////////////////////// -/datum/surgery_step/robotics/install_mmi +/decl/surgery_step/robotics/install_mmi allowed_tools = list( /obj/item/device/mmi = 100 ) @@ -411,7 +411,7 @@ min_duration = 60 max_duration = 80 -/datum/surgery_step/robotics/install_mmi/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_mmi/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(target_zone != BP_HEAD) return @@ -441,13 +441,13 @@ return 1 -/datum/surgery_step/robotics/install_mmi/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_mmi/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts installing \the [tool] into [target]'s [affected.name].", \ "You start installing \the [tool] into [target]'s [affected.name].") ..() -/datum/surgery_step/robotics/install_mmi/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_mmi/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has installed \the [tool] into [target]'s [affected.name].", \ "You have installed \the [tool] into [target]'s [affected.name].") @@ -477,7 +477,7 @@ target.real_name = target.name return -/datum/surgery_step/robotics/install_mmi/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_mmi/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips.", \ "Your hand slips.") @@ -485,7 +485,7 @@ * Install a Diona Nymph into a Nymph Mech */ -/datum/surgery_step/robotics/install_nymph +/decl/surgery_step/robotics/install_nymph allowed_tools = list( /obj/item/weapon/holder/diona = 100 ) @@ -493,7 +493,7 @@ min_duration = 60 max_duration = 80 -/datum/surgery_step/robotics/install_nymph/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_nymph/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(target_zone != BP_TORSO) return @@ -528,13 +528,13 @@ return 1 -/datum/surgery_step/robotics/install_nymph/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_nymph/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts setting \the [tool] into [target]'s [affected.name].", \ "You start setting \the [tool] into [target]'s [affected.name].") ..() -/datum/surgery_step/robotics/install_nymph/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_nymph/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] has installed \the [tool] into [target]'s [affected.name].", \ "You have installed \the [tool] into [target]'s [affected.name].") @@ -570,6 +570,6 @@ target.name = new_name target.real_name = target.name -/datum/surgery_step/robotics/install_nymph/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/robotics/install_nymph/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips.", \ "Your hand slips.") diff --git a/code/modules/surgery/slimes.dm b/code/modules/surgery/slimes.dm index 1c2a748c38..3fab099152 100644 --- a/code/modules/surgery/slimes.dm +++ b/code/modules/surgery/slimes.dm @@ -2,16 +2,16 @@ // SLIME CORE EXTRACTION // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/slime +/decl/surgery_step/slime is_valid_target(mob/living/simple_animal/slime/target) return istype(target, /mob/living/simple_animal/slime/) -/datum/surgery_step/slime/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) return target.stat == 2 -/datum/surgery_step/slime/cut_flesh +/decl/surgery_step/slime/cut_flesh allowed_tools = list( /obj/item/weapon/surgical/scalpel = 100, \ /obj/item/weapon/material/knife = 75, \ @@ -21,25 +21,25 @@ min_duration = 30 max_duration = 50 -/datum/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) return ..() && istype(target) && target.core_removal_stage == 0 -/datum/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \ "You start cutting through [target]'s flesh with \the [tool].") -/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) user.visible_message("[user] cuts through [target]'s flesh with \the [tool].", \ "You cut through [target]'s flesh with \the [tool], revealing its silky innards.") target.core_removal_stage = 1 -/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \ "Your hand slips, tearing [target]'s flesh with \the [tool]!") -/datum/surgery_step/slime/cut_innards +/decl/surgery_step/slime/cut_innards allowed_tools = list( /obj/item/weapon/surgical/scalpel = 100, \ /obj/item/weapon/material/knife = 75, \ @@ -49,25 +49,25 @@ min_duration = 30 max_duration = 50 -/datum/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) return ..() && istype(target) && target.core_removal_stage == 1 -/datum/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \ "You start cutting [target]'s silky innards apart with \the [tool].") -/datum/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) user.visible_message("[user] cuts [target]'s innards apart with \the [tool], exposing the cores.", \ "You cut [target]'s innards apart with \the [tool], exposing the cores.") target.core_removal_stage = 2 -/datum/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips, tearing [target]'s innards with \the [tool]!", \ "Your hand slips, tearing [target]'s innards with \the [tool]!") -/datum/surgery_step/slime/saw_core +/decl/surgery_step/slime/saw_core allowed_tools = list( /obj/item/weapon/surgical/circular_saw = 100, \ /obj/item/weapon/material/knife/machete/hatchet = 75 @@ -76,14 +76,14 @@ min_duration = 50 max_duration = 70 -/datum/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) return ..() && (istype(target) && target.core_removal_stage == 2 && target.cores > 0) //This is being passed a human as target, unsure why. -/datum/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \ "You start cutting out one of [target]'s cores with \the [tool].") -/datum/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) target.cores-- user.visible_message("[user] cuts out one of [target]'s cores with \the [tool].",, \ "You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.") @@ -94,7 +94,7 @@ target.icon_state = "slime extracted" -/datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) +/decl/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool) var/datum/gender/T = gender_datums[user.get_visible_gender()] user.visible_message("[user]'s hand slips, causing [T.him] to miss the core!", \ "Your hand slips, causing you to miss the core!") \ No newline at end of file diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index dcbfcd9736..f331439ae2 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -3,7 +3,7 @@ /obj/ var/surgery_odds = 0 // Used for tables/etc which can have surgery done of them. -/datum/surgery_step +/decl/surgery_step var/priority = 0 //steps with higher priority would be attempted first var/req_open = 1 //1 means the part must be cut open, 0 means it doesn't @@ -28,30 +28,20 @@ var/blood_level = 0 //returns how well tool is suited for this step -/datum/surgery_step/proc/tool_quality(obj/item/tool) - for (var/T in allowed_tools) - if (istype(tool,T)) - return allowed_tools[T] +/decl/surgery_step/proc/tool_quality(obj/item/tool) + if(!tool) + return 0 + if(tool.type in allowed_tools) + return allowed_tools[tool.type] for(var/P in allowed_procs) - switch(P) - if(IS_SCREWDRIVER) - if(tool.is_screwdriver()) - return allowed_procs[P] - if(IS_CROWBAR) - if(tool.is_crowbar()) - return allowed_procs[P] - if(IS_WIRECUTTER) - if(tool.is_wirecutter()) - return allowed_procs[P] - if(IS_WRENCH) - if(tool.is_wrench()) - return allowed_procs[P] + if(tool.get_tool_quality(P)) + return allowed_procs[P] return 0 // Checks if this step applies to the user mob at all -/datum/surgery_step/proc/is_valid_target(mob/living/carbon/human/target) +/decl/surgery_step/proc/is_valid_target(mob/living/carbon/human/target) if(!hasorgans(target)) return 0 @@ -70,7 +60,7 @@ // Let's check if stuff blocks us from doing surgery on them // TODO: make it based on area coverage rather than just forbid spacesuits? // Returns true if target organ is covered -/datum/surgery_step/proc/coverage_check(mob/living/user, mob/living/carbon/human/target, obj/item/organ/external/affected, obj/item/tool) +/decl/surgery_step/proc/coverage_check(mob/living/user, mob/living/carbon/human/target, obj/item/organ/external/affected, obj/item/tool) if(!affected) return FALSE @@ -84,11 +74,11 @@ return FALSE // checks whether this step can be applied with the given user and target -/datum/surgery_step/proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return 0 // does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too -/datum/surgery_step/proc/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/proc/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) if (can_infect && affected) spread_germs_to_organ(affected, user) @@ -101,15 +91,13 @@ return // does stuff to end the step, which is normally print a message + do whatever this step changes -/datum/surgery_step/proc/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/proc/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return // stuff that happens when the step fails -/datum/surgery_step/proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) +/decl/surgery_step/proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return null - - /proc/spread_germs_to_organ(var/obj/item/organ/external/E, var/mob/living/carbon/human/user) if(!istype(user) || !istype(E)) return @@ -119,30 +107,20 @@ E.germ_level = max(germ_level,E.germ_level) //as funny as scrubbing microbes out with clean gloves is - no. - -/obj/item/proc/can_do_surgery(mob/living/carbon/M, mob/living/user) -// if(M == user) -// return 0 - if(!ishuman(M)) - return 1 - - return 1 - /obj/item/proc/do_surgery(mob/living/carbon/M, mob/living/user) - if(!can_do_surgery(M, user)) - return 0 if(!istype(M)) - return 0 + return FALSE if (user.a_intent == I_HURT) //check for Hippocratic Oath - return 0 + return FALSE var/zone = user.zone_sel.selecting if(zone in M.op_stage.in_progress) //Can't operate on someone repeatedly. to_chat(user, "You can't operate on this area while surgery is already in progress.") - return 1 + return TRUE - for(var/datum/surgery_step/S in surgery_steps) + for(var/decl/surgery_step/S in surgery_steps) //check if tool is right or close enough and if this step is possible - if(S.tool_quality(src)) + var/qual = S.tool_quality(src) + if(qual) var/step_is_valid = S.can_use(user, M, zone, src) if(step_is_valid && S.is_valid_target(M)) @@ -150,16 +128,18 @@ to_chat(user, "You focus on attempting to perform surgery upon yourself.") if(!do_after(user, 3 SECONDS, M)) - return 0 + return FALSE if(step_is_valid == SURGERY_FAILURE) // This is a failure that already has a message for failing. - return 1 + return TRUE M.op_stage.in_progress += zone S.begin_step(user, M, zone, src) //start on it var/success = TRUE // Bad tools make it less likely to succeed. - if(!prob(S.tool_quality(src))) + //if(!prob(S.tool_chance(src))) + if((ispath(qual) && !prob(S.allowed_tools[qual])) || \ + (istext(qual) && !prob(S.allowed_procs[qual]))) success = FALSE // Bad or no surface may mean failure as well. @@ -170,7 +150,12 @@ // Not staying still fails you too. if(success) var/calc_duration = rand(S.min_duration, S.max_duration) - if(!do_mob(user, M, calc_duration * toolspeed, zone)) + if(istext(qual)) + calc_duration *= src.get_tool_speed(qual) + else if(ispath(qual)) + calc_duration *= src.tool_qualities[1] // Hack to get around still matching on types + + if(!do_mob(user, M, calc_duration, zone)) success = FALSE to_chat(user, "You must remain close to and keep focused on your patient to conduct surgery.") @@ -183,8 +168,8 @@ if (ishuman(M)) var/mob/living/carbon/human/H = M H.update_surgery() - return 1 //don't want to do weapony things after surgery - return 0 + return TRUE //don't want to do weapony things after surgery + return FALSE /proc/sort_surgeries() var/gap = surgery_steps.len @@ -196,8 +181,8 @@ if(gap < 1) gap = 1 for(var/i = 1; gap + i <= surgery_steps.len; i++) - var/datum/surgery_step/l = surgery_steps[i] //Fucking hate - var/datum/surgery_step/r = surgery_steps[gap+i] //how lists work here + var/decl/surgery_step/l = surgery_steps[i] //Fucking hate + var/decl/surgery_step/r = surgery_steps[gap+i] //how lists work here if(l.priority < r.priority) surgery_steps.Swap(i, gap + i) swapped = 1 diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index c9eb7dbbd0..f95651dd47 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -136,7 +136,7 @@ return if(istype(W, /obj/item/weapon/melee/energy/blade)) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(src, 'sound/weapons/blade1.ogg', 50, 1) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 2a6829b87c..67a9afabb4 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -99,7 +99,7 @@ /obj/structure/table/attackby(obj/item/weapon/W, mob/user) - if(reinforced && W.is_screwdriver()) + if(reinforced && W.get_tool_quality(TOOL_SCREWDRIVER)) remove_reinforced(W, user) if(!reinforced) update_desc() @@ -107,7 +107,7 @@ update_material() return 1 - if(carpeted && W.is_crowbar()) + if(carpeted && W.get_tool_quality(TOOL_CROWBAR)) user.visible_message("\The [user] removes the carpet from \the [src].", "You remove the carpet from \the [src].") new carpeted_type(loc) @@ -127,7 +127,7 @@ else to_chat(user, "You don't have enough carpet!") - if(!reinforced && !carpeted && material && W.is_wrench()) + if(!reinforced && !carpeted && material && W.get_tool_quality(TOOL_WRENCH)) remove_material(W, user) if(!material) update_connections(1) @@ -138,16 +138,16 @@ update_material() return 1 - if(!carpeted && !reinforced && !material && W.is_wrench()) - dismantle(W, user) - return 1 + if(!carpeted && !reinforced && !material && W.get_tool_quality(TOOL_WRENCH)) + return dismantle(W, user) + - if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool)) + if(health < maxhealth && W.get_tool_quality(TOOL_WELDER)) var/obj/item/weapon/weldingtool/F = W if(F.welding) to_chat(user, "You begin reparing damage to \the [src].") playsound(src, F.usesound, 50, 1) - if(!do_after(user, 20 * F.toolspeed) || !F.remove_fuel(1, user)) + if(!do_after(user, 20 * F.get_tool_speed(TOOL_WELDER)) || !F.remove_fuel(1, user)) return user.visible_message("\The [user] repairs some damage to \the [src].", "You repair some damage to \the [src].") @@ -272,25 +272,28 @@ return null /obj/structure/table/proc/remove_reinforced(obj/item/weapon/S, mob/user) - reinforced = common_material_remove(user, reinforced, 40 * S.toolspeed, "reinforcements", "screws", S.usesound) + reinforced = common_material_remove(user, reinforced, 40 * S.get_tool_speed(TOOL_SCREWDRIVER), "reinforcements", "screws", S.usesound) /obj/structure/table/proc/remove_material(obj/item/weapon/W, mob/user) - material = common_material_remove(user, material, 20 * W.toolspeed, "plating", "bolts", W.usesound) + material = common_material_remove(user, material, 20 * W.get_tool_speed(TOOL_WRENCH), "plating", "bolts", W.usesound) /obj/structure/table/proc/dismantle(obj/item/W, mob/user) - if(manipulating) return - manipulating = 1 + if(manipulating) + return FALSE + if(!W.get_tool_quality(TOOL_WRENCH)) + return FALSE + manipulating = TRUE user.visible_message("\The [user] begins dismantling \the [src].", "You begin dismantling \the [src].") playsound(src, W.usesound, 50, 1) - if(!do_after(user, 20 * W.toolspeed)) - manipulating = 0 - return + if(!do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH))) + manipulating = FALSE + return FALSE user.visible_message("\The [user] dismantles \the [src].", "You dismantle \the [src].") new /obj/item/stack/material/steel(src.loc) qdel(src) - return + return TRUE // Returns a list of /obj/item/weapon/material/shard objects that were created as a result of this table's breakage. // Used for !fun! things such as embedding shards in the faces of tableslammed people. diff --git a/code/modules/tools/tool_quality.dm b/code/modules/tools/tool_quality.dm new file mode 100644 index 0000000000..dbfb2a1379 --- /dev/null +++ b/code/modules/tools/tool_quality.dm @@ -0,0 +1,40 @@ +/obj/item + var/list/tool_qualities = list() + +/obj/item/examine(mob/user) + . = ..() + for(var/qual in tool_qualities) + var/msg + switch(tool_qualities[qual]) + if(TOOL_QUALITY_WORST) + msg += "very poor " + if(TOOL_QUALITY_POOR) + msg += "poor " + if(TOOL_QUALITY_MEDIOCRE) + msg += "mediocre " + if(TOOL_QUALITY_STANDARD) + msg += "" + if(TOOL_QUALITY_DECENT) + msg += "decent " + if(TOOL_QUALITY_GOOD) + msg += "pretty good " + if(TOOL_QUALITY_BEST) + msg += "very good " + . += "It looks like it can be used as a [msg][qual]." + +/atom/proc/get_tool_quality(tool_quality) + return TOOL_QUALITY_NONE + +/// Used to check for a specific tool quality on an item. +/// Returns the value of `tool_quality` if it is found, else 0. +/obj/item/get_tool_quality(quality) + return LAZYFIND(tool_qualities, quality) + +/obj/item/proc/set_tool_quality(tool, quality) + tool_qualities[tool] = quality + +/obj/item/proc/get_tool_speed(quality) + return LAZYFIND(tool_qualities, quality) + +/obj/item/proc/get_use_time(quality, base_time) + return LAZYFIND(tool_qualities, quality) ? base_time / tool_qualities[quality] : -1 \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools/combitool.dm b/code/modules/tools/tools/combitool.dm similarity index 99% rename from code/game/objects/items/weapons/tools/combitool.dm rename to code/modules/tools/tools/combitool.dm index cd507a5644..ca2be54a94 100644 --- a/code/game/objects/items/weapons/tools/combitool.dm +++ b/code/modules/tools/tools/combitool.dm @@ -29,7 +29,7 @@ if(loc == user && tools.len) . += "It has the following fittings:" for(var/obj/item/tool in tools) - . += "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]") + . += "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]" /obj/item/weapon/combitool/Initialize() . = ..() diff --git a/code/game/objects/items/weapons/tools/crowbar.dm b/code/modules/tools/tools/crowbar.dm similarity index 77% rename from code/game/objects/items/weapons/tools/crowbar.dm rename to code/modules/tools/tools/crowbar.dm index 2fccff9aae..20e897685a 100644 --- a/code/game/objects/items/weapons/tools/crowbar.dm +++ b/code/modules/tools/tools/crowbar.dm @@ -10,7 +10,6 @@ slot_flags = SLOT_BELT force = 6 throwforce = 7 - pry = 1 item_state = "crowbar" w_class = ITEMSIZE_SMALL origin_tech = list(TECH_ENGINEERING = 1) @@ -19,8 +18,7 @@ usesound = 'sound/items/crowbar.ogg' drop_sound = 'sound/items/drop/crowbar.ogg' pickup_sound = 'sound/items/pickup/crowbar.ogg' - toolspeed = 1 - tool_qualities = list(TOOL_CROWBAR) + tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_STANDARD) /obj/item/weapon/tool/crowbar/red icon = 'icons/obj/tools.dmi' @@ -48,7 +46,7 @@ icon = 'icons/obj/abductor.dmi' usesound = 'sound/weapons/sonic_jackhammer.ogg' icon_state = "crowbar" - toolspeed = 0.1 + tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_BEST) origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4) /obj/item/weapon/tool/crowbar/hybrid @@ -57,7 +55,7 @@ catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_crowbar) icon_state = "hybcrowbar" usesound = 'sound/weapons/sonic_jackhammer.ogg' - toolspeed = 0.4 + tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_DECENT) origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 3) reach = 2 @@ -66,36 +64,23 @@ desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics." usesound = 'sound/items/jaws_pry.ogg' force = 10 - toolspeed = 0.5 + tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_DECENT) -/obj/item/weapon/tool/crowbar/power +/obj/item/weapon/tool/hydraulic_cutter name = "jaws of life" - desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head." + desc = "A set of jaws of life, compressed through the magic of science." icon_state = "jaws_pry" item_state = "jawsoflife" matter = list(MAT_METAL=150, MAT_SILVER=50) origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) usesound = 'sound/items/jaws_pry.ogg' force = 15 - toolspeed = 0.25 - var/obj/item/weapon/tool/wirecutters/power/counterpart = null + var/state = 0 // Technically boolean, but really a state machine + tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_GOOD) -/obj/item/weapon/tool/crowbar/power/Initialize(var/ml, no_counterpart = TRUE) - . = ..() - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/tool/crowbar/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - QDEL_NULL(counterpart) - return ..() - -/obj/item/weapon/tool/crowbar/power/attack_self(mob/user) +/obj/item/weapon/tool/hydraulic_cutter/attack_self(mob/user) playsound(src, 'sound/items/change_jaws.ogg', 50, 1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) + set_tool_quality(TOOL_CROWBAR, state ? TOOL_QUALITY_GOOD : TOOL_QUALITY_NONE) + set_tool_quality(TOOL_WIRECUTTER, state ? TOOL_QUALITY_NONE : TOOL_QUALITY_GOOD) + state = !state to_chat(user, "You attach the cutting jaws to [src].") diff --git a/code/game/objects/items/weapons/tools/screwdriver.dm b/code/modules/tools/tools/screwdriver.dm similarity index 81% rename from code/game/objects/items/weapons/tools/screwdriver.dm rename to code/modules/tools/tools/screwdriver.dm index e8a578dc7d..43c8cebb13 100644 --- a/code/game/objects/items/weapons/tools/screwdriver.dm +++ b/code/modules/tools/tools/screwdriver.dm @@ -20,8 +20,7 @@ matter = list(MAT_STEEL = 75) attack_verb = list("stabbed") sharp = 1 - toolspeed = 1 - tool_qualities = list(TOOL_SCREWDRIVER) + tool_qualities = list(TOOL_SCREWDRIVER = TOOL_QUALITY_STANDARD) var/random_color = TRUE /obj/item/weapon/tool/screwdriver/Initialize() @@ -83,7 +82,7 @@ icon_state = "screwdriver_a" item_state = "screwdriver_black" usesound = 'sound/items/pshoom.ogg' - toolspeed = 0.1 + tool_qualities = list(TOOL_SCREWDRIVER = TOOL_QUALITY_BEST) random_color = FALSE /obj/item/weapon/tool/screwdriver/hybrid @@ -94,7 +93,7 @@ origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3) w_class = ITEMSIZE_NORMAL usesound = 'sound/effects/uncloak.ogg' - toolspeed = 0.4 + tool_qualities = list(TOOL_SCREWDRIVER = TOOL_QUALITY_DECENT) random_color = FALSE reach = 2 @@ -102,11 +101,11 @@ name = "powered screwdriver" desc = "An electrical screwdriver, designed to be both precise and quick." usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.5 + tool_qualities = list(TOOL_SCREWDRIVER = TOOL_QUALITY_DECENT) -/obj/item/weapon/tool/screwdriver/power +/obj/item/weapon/tool/powerdrill name = "hand drill" - desc = "A simple powered hand drill. It's fitted with a screw bit." + desc = "A simple powered hand drill." icon_state = "drill_screw" item_state = "drill" matter = list(MAT_STEEL = 150, MAT_SILVER = 50) @@ -120,26 +119,12 @@ attack_verb = list("drilled", "screwed", "jabbed", "whacked") hitsound = 'sound/items/drill_hit.ogg' usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.25 - random_color = FALSE - var/obj/item/weapon/tool/wrench/power/counterpart = null + var/state = 0 // Technically boolean, but really a state machine + tool_qualities = list(TOOL_SCREWDRIVER = TOOL_QUALITY_GOOD) -/obj/item/weapon/tool/screwdriver/power/Initialize(var/ml, no_counterpart = TRUE) - . = ..() - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/tool/screwdriver/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - QDEL_NULL(counterpart) - return ..() - -/obj/item/weapon/tool/screwdriver/power/attack_self(mob/user) +/obj/item/weapon/tool/powerdrill/attack_self(mob/user) playsound(src,'sound/items/change_drill.ogg',50,1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) - to_chat(user, "You attach the bolt driver bit to [src].") + set_tool_quality(TOOL_SCREWDRIVER, state ? TOOL_QUALITY_GOOD : TOOL_QUALITY_NONE) + set_tool_quality(TOOL_WRENCH, state ? TOOL_QUALITY_NONE : TOOL_QUALITY_GOOD) + state = !state + to_chat(user, "You attach the bolt driver bit to [src].") \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/modules/tools/tools/weldingtool.dm similarity index 97% rename from code/game/objects/items/weapons/tools/weldingtool.dm rename to code/modules/tools/tools/weldingtool.dm index 3f45de2bdf..efa123fc8d 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/modules/tools/tools/weldingtool.dm @@ -22,7 +22,7 @@ //R&D tech level origin_tech = list(TECH_ENGINEERING = 1) - tool_qualities = list(TOOL_WELDER) + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_STANDARD) //Welding tool specific stuff var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) @@ -38,7 +38,6 @@ var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect. var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG. var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel. - toolspeed = 1 drop_sound = 'sound/items/drop/weldingtool.ogg' pickup_sound = 'sound/items/pickup/weldingtool.ogg' @@ -277,6 +276,7 @@ else if(T) T.visible_message("\The [src] turns on.") playsound(src, acti_sound, 50, 1) + set_tool_quality(TOOL_WELDER, initial(tool_qualities[TOOL_WELDER])) src.force = 15 src.damtype = "fire" src.w_class = ITEMSIZE_LARGE @@ -299,6 +299,7 @@ else if(T) T.visible_message("\The [src] turns off.") playsound(src, deac_sound, 50, 1) + set_tool_quality(TOOL_WELDER, TOOL_QUALITY_NONE) src.force = 3 src.damtype = "brute" src.w_class = initial(src.w_class) @@ -366,7 +367,7 @@ /obj/item/weapon/weldingtool/largetank/cyborg name = "integrated welding tool" desc = "An advanced welder designed to be used in robotic systems." - toolspeed = 0.5 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_DECENT) /obj/item/weapon/weldingtool/hugetank name = "upgraded welding tool" @@ -385,7 +386,7 @@ w_class = ITEMSIZE_SMALL matter = list(MAT_METAL = 30, MAT_GLASS = 10) change_icons = 0 - toolspeed = 2 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_MEDIOCRE) eye_safety_modifier = 1 // Safer on eyes. /datum/category_item/catalogue/anomalous/precursor_a/alien_welder @@ -418,7 +419,7 @@ catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_welder) icon = 'icons/obj/abductor.dmi' icon_state = "welder" - toolspeed = 0.1 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_BEST) flame_color = "#6699FF" // Light bluish. eye_safety_modifier = 2 change_icons = 0 @@ -438,7 +439,7 @@ w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3) matter = list(MAT_STEEL = 70, "glass" = 120) - toolspeed = 0.5 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_DECENT) change_icons = 0 flame_intensity = 3 always_process = TRUE @@ -456,7 +457,7 @@ icon_state = "hybwelder" max_fuel = 80 //more max fuel is better! Even if it doesn't actually use fuel. eye_safety_modifier = -2 // Brighter than the sun. Literally, you can look at the sun with a welding mask of proper grade, this will burn through that. - toolspeed = 0.25 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_GOOD) w_class = ITEMSIZE_NORMAL flame_intensity = 5 origin_tech = list(TECH_ENGINEERING = 5, TECH_PHORON = 4, TECH_PRECURSOR = 1) @@ -473,7 +474,7 @@ max_fuel = 10 w_class = ITEMSIZE_NO_CONTAINER matter = null - toolspeed = 1.25 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_MEDIOCRE) change_icons = 0 flame_intensity = 1 eye_safety_modifier = 1 @@ -521,7 +522,7 @@ desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank." icon_state = "tubewelder" max_fuel = 5 - toolspeed = 1.75 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_POOR) eye_safety_modifier = 2 /* @@ -656,7 +657,7 @@ use_external_power = 1 /obj/item/weapon/weldingtool/electric/mounted/cyborg - toolspeed = 0.5 + tool_qualities = list(TOOL_WELDER = TOOL_QUALITY_DECENT) /obj/item/weapon/weldingtool/electric/mounted/exosuit var/obj/item/mecha_parts/mecha_equipment/equip_mount = null diff --git a/code/game/objects/items/weapons/tools/wirecutters.dm b/code/modules/tools/tools/wirecutters.dm similarity index 69% rename from code/game/objects/items/weapons/tools/wirecutters.dm rename to code/modules/tools/tools/wirecutters.dm index 4f50e0d491..4c2ecefefe 100644 --- a/code/game/objects/items/weapons/tools/wirecutters.dm +++ b/code/modules/tools/tools/wirecutters.dm @@ -21,8 +21,7 @@ pickup_sound = 'sound/items/pickup/wirecutter.ogg' sharp = 1 edge = 1 - toolspeed = 1 - tool_qualities = list(TOOL_WIRECUTTER) + tool_qualities = list(TOOL_WIRECUTTER = TOOL_QUALITY_STANDARD) var/random_color = TRUE /obj/item/weapon/tool/wirecutters/Initialize() @@ -63,7 +62,7 @@ catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_wirecutters) icon = 'icons/obj/abductor.dmi' icon_state = "cutters" - toolspeed = 0.1 + tool_qualities = list(TOOL_WIRECUTTER = TOOL_QUALITY_BEST) origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4) random_color = FALSE @@ -71,7 +70,7 @@ name = "wirecutters" desc = "This cuts wires. With science." usesound = 'sound/items/jaws_cut.ogg' - toolspeed = 0.5 + tool_qualities = list(TOOL_WIRECUTTER = TOOL_QUALITY_GOOD) /obj/item/weapon/tool/wirecutters/hybrid name = "strange wirecutters" @@ -81,38 +80,6 @@ origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2) attack_verb = list("pinched", "nipped", "warped", "blasted") usesound = 'sound/effects/stealthoff.ogg' - toolspeed = 0.4 + tool_qualities = list(TOOL_WIRECUTTER = TOOL_QUALITY_GOOD) reach = 2 - -/obj/item/weapon/tool/wirecutters/power - name = "jaws of life" - desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head." - icon_state = "jaws_cutter" - item_state = "jawsoflife" - origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) - matter = list(MAT_METAL=150, MAT_SILVER=50) - usesound = 'sound/items/jaws_cut.ogg' - force = 15 - toolspeed = 0.25 - random_color = FALSE - var/obj/item/weapon/tool/crowbar/power/counterpart = null - -/obj/item/weapon/tool/wirecutters/power/Initialize(var/ml, no_counterpart = TRUE) - . = ..(ml) - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/tool/wirecutters/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - QDEL_NULL(counterpart) - return ..() - -/obj/item/weapon/tool/wirecutters/power/attack_self(mob/user) - playsound(src, 'sound/items/change_jaws.ogg', 50, 1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) - to_chat(user, "You attach the pry jaws to [src].") + diff --git a/code/game/objects/items/weapons/tools/wrench.dm b/code/modules/tools/tools/wrench.dm similarity index 67% rename from code/game/objects/items/weapons/tools/wrench.dm rename to code/modules/tools/tools/wrench.dm index acab3459b8..a2fb549499 100644 --- a/code/game/objects/items/weapons/tools/wrench.dm +++ b/code/modules/tools/tools/wrench.dm @@ -14,16 +14,15 @@ matter = list(MAT_STEEL = 150) attack_verb = list("bashed", "battered", "bludgeoned", "whacked") usesound = 'sound/items/ratchet.ogg' - toolspeed = 1 drop_sound = 'sound/items/drop/wrench.ogg' pickup_sound = 'sound/items/pickup/wrench.ogg' - tool_qualities = list(TOOL_WRENCH) + tool_qualities = list(TOOL_WRENCH = TOOL_QUALITY_STANDARD) /obj/item/weapon/tool/wrench/cyborg name = "automatic wrench" desc = "An advanced robotic wrench. Can be found in industrial synthetic shells." usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.5 + tool_qualities = list(TOOL_WRENCH = TOOL_QUALITY_DECENT) /obj/item/weapon/tool/wrench/hybrid // Slower and bulkier than normal power tools, but it has the power of reach. If reach even worked half the time. name = "strange wrench" @@ -37,7 +36,7 @@ origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2) attack_verb = list("bashed", "battered", "bludgeoned", "whacked", "warped", "blasted") usesound = 'sound/effects/stealthoff.ogg' - toolspeed = 0.5 + tool_qualities = list(TOOL_WRENCH = TOOL_QUALITY_DECENT) reach = 2 @@ -63,40 +62,6 @@ icon = 'icons/obj/abductor.dmi' icon_state = "wrench" usesound = 'sound/effects/empulse.ogg' - toolspeed = 0.1 + tool_qualities = list(TOOL_WRENCH = TOOL_QUALITY_BEST) origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 5) - -/obj/item/weapon/tool/wrench/power - name = "hand drill" - desc = "A simple powered hand drill. It's fitted with a bolt bit." - icon_state = "drill_bolt" - item_state = "drill" - usesound = 'sound/items/drill_use.ogg' - matter = list(MAT_STEEL = 150, MAT_SILVER = 50) - origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) - force = 8 - w_class = ITEMSIZE_SMALL - throwforce = 8 - attack_verb = list("drilled", "screwed", "jabbed") - toolspeed = 0.25 - var/obj/item/weapon/tool/screwdriver/power/counterpart = null - -/obj/item/weapon/tool/wrench/power/Initialize(var/ml, no_counterpart = TRUE) - . = ..() - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/tool/wrench/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - QDEL_NULL(counterpart) - return ..() - -/obj/item/weapon/tool/wrench/power/attack_self(mob/user) - playsound(src,'sound/items/change_drill.ogg',50,1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) - to_chat(user, "You attach the screw driver bit to [src].") + diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm index 715fbccec9..376b70a9af 100644 --- a/code/modules/vehicles/bike.dm +++ b/code/modules/vehicles/bike.dm @@ -25,13 +25,13 @@ paint_color = "#ffffff" - var/datum/effect/effect/system/ion_trail_follow/ion + var/datum/effect_system/ion_trail_follow/ion var/kickstand = 1 /obj/vehicle/bike/Initialize() . = ..() cell = new /obj/item/weapon/cell/high(src) - ion = new /datum/effect/effect/system/ion_trail_follow() + ion = new /datum/effect_system/ion_trail_follow() ion.set_up(src) turn_off() icon_state = "[bike_icon]_off" diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index c1ee89d700..a69c418159 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -67,7 +67,7 @@ return ..() /obj/vehicle/train/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(open && W.is_wirecutter()) + if(open && W.get_tool_quality(TOOL_WIRECUTTER)) passenger_allowed = !passenger_allowed user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") else diff --git a/code/modules/vehicles/construction.dm b/code/modules/vehicles/construction.dm index 1b3320b339..d2e31a7ef5 100644 --- a/code/modules/vehicles/construction.dm +++ b/code/modules/vehicles/construction.dm @@ -129,7 +129,7 @@ return if(7) - if(W.is_wrench() || W.is_screwdriver()) + if(W.get_tool_quality(TOOL_WRENCH) || W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 50, 1) to_chat(user, "You begin your finishing touches on \the [src].") if(do_after(user, 20) && build_stage == 7) @@ -177,7 +177,7 @@ return if(2) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 50, 1) to_chat(user, "You close up \the [src].") var/obj/vehicle/train/trolley/trailer/product = new(src) @@ -258,7 +258,7 @@ return if(6) - if(W.is_wrench() || W.is_screwdriver()) + if(W.get_tool_quality(TOOL_WRENCH) || W.get_tool_quality(TOOL_SCREWDRIVER)) playsound(src, W.usesound, 50, 1) to_chat(user, "You begin your finishing touches on \the [src].") if(do_after(user, 20) && build_stage == 6) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 3fb12292ae..1a540394a6 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -92,13 +92,13 @@ if(istype(W, /obj/item/weapon/hand_labeler)) return if(mechanical) - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) if(!locked) open = !open update_icon() to_chat(user, "Maintenance panel is now [open ? "opened" : "closed"].") playsound(src, W.usesound, 50, 1) - else if(W.is_crowbar() && cell && open) + else if(W.get_tool_quality(TOOL_CROWBAR) && cell && open) remove_cell(user) else if(istype(W, /obj/item/weapon/cell) && !cell && open) @@ -233,7 +233,7 @@ new /obj/item/stack/rods(Tsec) new /obj/item/stack/rods(Tsec) new /obj/item/stack/cable_coil/cut(Tsec) - new /obj/effect/gibspawner/robot(Tsec) + new /obj/effect/spawner/gibs/robot(Tsec) new /obj/effect/decal/cleanable/blood/oil(src.loc) if(cell) diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm index aaa65ce9e7..75f98e4f9a 100644 --- a/code/modules/virus2/centrifuge.dm +++ b/code/modules/virus2/centrifuge.dm @@ -10,7 +10,7 @@ var/datum/disease2/disease/virus2 = null /obj/machinery/computer/centrifuge/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(O.is_screwdriver()) + if(O.get_tool_quality(TOOL_SCREWDRIVER)) return ..(O,user) if(default_unfasten_wrench(user, O, 20)) diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index fb682f51d1..4976a0a3e3 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -12,7 +12,7 @@ var/scanning = 0 /obj/machinery/computer/diseasesplicer/attackby(var/obj/item/I as obj, var/mob/user as mob) - if(I.is_screwdriver()) + if(I.get_tool_quality(TOOL_SCREWDRIVER)) return ..(I,user) if(default_unfasten_wrench(user, I, 20)) diff --git a/code/modules/xenoarcheaology/boulder.dm b/code/modules/xenoarcheaology/boulder.dm index 0a0495f5d4..c6c805b70c 100644 --- a/code/modules/xenoarcheaology/boulder.dm +++ b/code/modules/xenoarcheaology/boulder.dm @@ -50,14 +50,15 @@ if(istype(I, /obj/item/weapon/pickaxe)) var/obj/item/weapon/pickaxe/P = I + var/digspeed = 40 / P.get_tool_quality(TOOL_MINING) - if(last_act + P.digspeed > world.time)//prevents message spam + if(last_act + digspeed > world.time)//prevents message spam return last_act = world.time to_chat(user, "You start [P.drill_verb] [src].") - if(!do_after(user, P.digspeed)) + if(!do_after(user, digspeed)) return to_chat(user, "You finish [P.drill_verb] [src].") diff --git a/code/modules/xenoarcheaology/effects/teleport.dm b/code/modules/xenoarcheaology/effects/teleport.dm index 2c766323db..56b19238d0 100644 --- a/code/modules/xenoarcheaology/effects/teleport.dm +++ b/code/modules/xenoarcheaology/effects/teleport.dm @@ -12,13 +12,13 @@ if (user.buckled) user.buckled.unbuckle_mob() - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, get_turf(user)) sparks.start() user.Move(pick(trange(50, get_turf(holder)))) - sparks = new /datum/effect/effect/system/spark_spread() + sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, user.loc) sparks.start() @@ -33,12 +33,12 @@ if(M.buckled) M.buckled.unbuckle_mob() - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, get_turf(M)) sparks.start() M.Move(pick(trange(50, T))) - sparks = new /datum/effect/effect/system/spark_spread() + sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, M.loc) sparks.start() @@ -53,11 +53,11 @@ if(M.buckled) M.buckled.unbuckle_mob() - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, get_turf(M)) sparks.start() M.Move(pick(trange(50, T))) - sparks = new /datum/effect/effect/system/spark_spread() + sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, M.loc) sparks.start() diff --git a/code/modules/xenoarcheaology/tools/coolant_tank.dm b/code/modules/xenoarcheaology/tools/coolant_tank.dm index 2975cf0749..45a0b0a259 100644 --- a/code/modules/xenoarcheaology/tools/coolant_tank.dm +++ b/code/modules/xenoarcheaology/tools/coolant_tank.dm @@ -18,7 +18,7 @@ explode() /obj/structure/reagent_dispensers/coolanttank/proc/explode() - var/datum/effect/effect/system/smoke_spread/S = new /datum/effect/effect/system/smoke_spread + var/datum/effect_system/smoke_spread/S = new /datum/effect_system/smoke_spread S.set_up(5, 0, src.loc) playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3) diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm index 3db06689d7..4def7b4495 100644 --- a/code/modules/xenoarcheaology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -127,7 +127,7 @@ /obj/machinery/suspension_gen/attackby(obj/item/weapon/W as obj, mob/user as mob) if(!locked && !suspension_field && default_deconstruction_screwdriver(user, W)) return - else if(W.is_wrench()) + else if(W.get_tool_quality(TOOL_WRENCH)) if(!suspension_field) if(anchored) anchored = 0 diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index 0fded5da50..72f3cc1f5e 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -4,7 +4,6 @@ icon_state = "pick_brush" item_state = "syringe_0" slot_flags = SLOT_EARS - digspeed = 20 force = 0 throwforce = 0 desc = "Thick metallic wires for clearing away dust and loose scree (1 centimetre excavation depth)." @@ -12,6 +11,7 @@ drill_sound = 'sound/weapons/thudswoosh.ogg' drill_verb = "brushing" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/one_pick name = "2cm pick" @@ -19,12 +19,12 @@ icon_state = "pick1" item_state = "syringe_0" force = 2 - digspeed = 20 desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)." excavation_amount = 2 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/two_pick name = "4cm pick" @@ -32,12 +32,12 @@ icon_state = "pick2" item_state = "syringe_0" force = 2 - digspeed = 20 desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)." excavation_amount = 4 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/three_pick name = "6cm pick" @@ -45,12 +45,12 @@ icon_state = "pick3" item_state = "syringe_0" force = 3 - digspeed = 20 desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)." excavation_amount = 6 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/four_pick name = "8cm pick" @@ -58,12 +58,12 @@ icon_state = "pick4" item_state = "syringe_0" force = 3 - digspeed = 20 desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)." excavation_amount = 8 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/five_pick name = "10cm pick" @@ -71,12 +71,12 @@ icon_state = "pick5" item_state = "syringe_0" force = 5 - digspeed = 20 desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)." excavation_amount = 10 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/six_pick name = "12cm pick" @@ -84,12 +84,12 @@ icon_state = "pick6" item_state = "syringe_0" force = 5 - digspeed = 20 desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)." excavation_amount = 12 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT) /obj/item/weapon/pickaxe/hand name = "hand pickaxe" @@ -97,12 +97,12 @@ icon_state = "pick_hand" item_state = "syringe_0" force = 10 - digspeed = 30 desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)." excavation_amount = 30 drill_sound = 'sound/items/Crowbar.ogg' drill_verb = "clearing" w_class = ITEMSIZE_SMALL + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Pack for holding pickaxes @@ -165,13 +165,13 @@ icon_state = "excavationdrill2" item_state = "syringe_0" excavation_amount = 15 - digspeed = 30 desc = "Advanced archaeological drill combining ultrasonic excitation and bluespace manipulation to provide extreme precision. The tip is adjustable from 1 to 30 cm." drill_sound = 'sound/weapons/thudswoosh.ogg' drill_verb = "drilling" force = 5 w_class = 2 attack_verb = list("drilled") + tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD) /obj/item/weapon/pickaxe/excavationdrill/attack_self(mob/user as mob) var/depth = input("Put the desired depth (1-30 centimeters).", "Set Depth", 30) as num diff --git a/code/modules/xenobio/items/slime_objects.dm b/code/modules/xenobio/items/slime_objects.dm index 5e48a99767..b8382314de 100644 --- a/code/modules/xenobio/items/slime_objects.dm +++ b/code/modules/xenobio/items/slime_objects.dm @@ -43,7 +43,7 @@ icon_state = "slime cube" if(searching == 1) searching = 0 - 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("The activity in the cube dies down. Maybe it will spark another time.") diff --git a/code/modules/xenobio2/machinery/core_extractor.dm b/code/modules/xenobio2/machinery/core_extractor.dm index 5b38a939da..3d1b334e4f 100644 --- a/code/modules/xenobio2/machinery/core_extractor.dm +++ b/code/modules/xenobio2/machinery/core_extractor.dm @@ -26,11 +26,11 @@ /obj/machinery/slime/extractor/attackby(var/obj/item/W, var/mob/user) //Let's try to deconstruct first. - if(W.is_screwdriver() && !inuse) + if(W.get_tool_quality(TOOL_SCREWDRIVER) && !inuse) default_deconstruction_screwdriver(user, W) return - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) default_deconstruction_crowbar(user, W) return diff --git a/code/modules/xenobio2/machinery/injector.dm b/code/modules/xenobio2/machinery/injector.dm index 250e4cbc73..fb345f4ff2 100644 --- a/code/modules/xenobio2/machinery/injector.dm +++ b/code/modules/xenobio2/machinery/injector.dm @@ -88,11 +88,11 @@ /obj/machinery/xenobio2/manualinjector/attackby(var/obj/item/W, var/mob/user) //Let's try to deconstruct first. - if(W.is_screwdriver()) + if(W.get_tool_quality(TOOL_SCREWDRIVER)) default_deconstruction_screwdriver(user, W) return - if(W.is_crowbar() && !occupant) + if(W.get_tool_quality(TOOL_CROWBAR) && !occupant) default_deconstruction_crowbar(user, W) return diff --git a/code/modules/xenobio2/machinery/slime_replicator.dm b/code/modules/xenobio2/machinery/slime_replicator.dm index 9e4969d635..ce6b899b4f 100644 --- a/code/modules/xenobio2/machinery/slime_replicator.dm +++ b/code/modules/xenobio2/machinery/slime_replicator.dm @@ -24,11 +24,11 @@ /obj/machinery/slime/replicator/attackby(var/obj/item/W, var/mob/user) //Let's try to deconstruct first. - if(W.is_screwdriver() && !inuse) + if(W.get_tool_quality(TOOL_SCREWDRIVER) && !inuse) default_deconstruction_screwdriver(user, W) return - if(W.is_crowbar()) + if(W.get_tool_quality(TOOL_CROWBAR)) default_deconstruction_crowbar(user, W) return diff --git a/code/modules/xenobio2/mob/slime/slime_monkey.dm b/code/modules/xenobio2/mob/slime/slime_monkey.dm index 39660b1728..bb384e719c 100644 --- a/code/modules/xenobio2/mob/slime/slime_monkey.dm +++ b/code/modules/xenobio2/mob/slime/slime_monkey.dm @@ -29,7 +29,7 @@ Slime cube lives here. icon_state = "slime cube" if(searching == 1) searching = 0 - 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("The activity in the cube dies down. Maybe it will spark another time.") @@ -42,7 +42,7 @@ Slime cube lives here. S.mind.assigned_role = "Promethean" S.set_species("Promethean") S.shapeshifter_set_colour("#05FF9B") - for(var/mob/M in viewers(get_turf_or_move(loc))) + for(var/mob/M in viewers(get_turf(loc))) M.show_message("The monkey cube suddenly takes the shape of a humanoid!") var/newname = sanitize(input(S, "You are a Promethean. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN) if(newname) diff --git a/code/modules/xenobio2/mob/xeno procs.dm b/code/modules/xenobio2/mob/xeno procs.dm index 131555d3bd..a65e84965b 100644 --- a/code/modules/xenobio2/mob/xeno procs.dm +++ b/code/modules/xenobio2/mob/xeno procs.dm @@ -52,7 +52,7 @@ Divergence proc, used in mutation to make unique datums. return //Let's handle some chemical smoke, for scientific smoke bomb purposes. - for(var/obj/effect/effect/smoke/chem/smoke in view(1, src)) + for(var/obj/effect/vfx/smoke/chem/smoke in view(1, src)) if(smoke.reagents.total_volume) smoke.reagents.trans_to_mob(src, 10, CHEM_BLOOD, copy = 1) diff --git a/icons/mob/species/teshari/back.dmi b/icons/mob/species/teshari/back.dmi index 9de0f3544c..cdf3c6e559 100644 Binary files a/icons/mob/species/teshari/back.dmi and b/icons/mob/species/teshari/back.dmi differ diff --git a/icons/mob/species/teshari/belt.dmi b/icons/mob/species/teshari/belt.dmi index fa68573c10..54741b82c0 100644 Binary files a/icons/mob/species/teshari/belt.dmi and b/icons/mob/species/teshari/belt.dmi differ diff --git a/icons/mob/species/teshari/head.dmi b/icons/mob/species/teshari/head.dmi index 038fb9cc3d..0bb0637c4e 100644 Binary files a/icons/mob/species/teshari/head.dmi and b/icons/mob/species/teshari/head.dmi differ diff --git a/icons/mob/species/teshari/masks.dmi b/icons/mob/species/teshari/masks.dmi index 9d9b6afb77..6fde2b8e38 100644 Binary files a/icons/mob/species/teshari/masks.dmi and b/icons/mob/species/teshari/masks.dmi differ diff --git a/icons/mob/species/teshari/suit.dmi b/icons/mob/species/teshari/suit.dmi index 714b0408a5..09d72fa461 100644 Binary files a/icons/mob/species/teshari/suit.dmi and b/icons/mob/species/teshari/suit.dmi differ diff --git a/icons/mob/species/teshari/uniform.dmi b/icons/mob/species/teshari/uniform.dmi index aab4dcfe06..37fcf0c76b 100644 Binary files a/icons/mob/species/teshari/uniform.dmi and b/icons/mob/species/teshari/uniform.dmi differ diff --git a/maps/overmap/example_sector2.dmm b/maps/overmap/example_sector2.dmm index 16ee3cc6a9..f3eaecf1f1 100644 --- a/maps/overmap/example_sector2.dmm +++ b/maps/overmap/example_sector2.dmm @@ -59,8 +59,8 @@ "bg" = (/obj/effect/alien/weeds{icon_state = "weeds1"},/obj/item/clothing/mask/facehugger{icon_state = "facehugger_dead"; stat = 2},/turf/simulated/floor/plating,/area/mine/abandoned) "bh" = (/obj/item/weapon/shard,/obj/structure/lattice,/turf/space,/area) "bi" = (/obj/item/weapon/shard{icon_state = "small"},/turf/simulated/floor/plating/airless,/area/mine/abandoned) -"bj" = (/obj/effect/gibspawner/robot,/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/mine/abandoned) -"bk" = (/obj/effect/gibspawner/human,/turf/simulated/floor/airless{icon_state = "damaged2"},/area/mine/abandoned) +"bj" = (/obj/effect/spawner/gibs/robot,/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/mine/abandoned) +"bk" = (/obj/effect/spawner/gibs/human,/turf/simulated/floor/airless{icon_state = "damaged2"},/area/mine/abandoned) "bl" = (/obj/effect/alien/weeds{icon_state = "weeds1"},/obj/effect/decal/remains/xeno,/turf/simulated/floor/plating,/area/mine/abandoned) "bm" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating/airless,/area/mine/abandoned) "bn" = (/obj/item/weapon/shard,/turf/simulated/floor/plating/airless,/area/mine/abandoned) @@ -106,7 +106,7 @@ "cb" = (/obj/effect/decal/remains/xeno,/turf/simulated/floor,/area/mine/abandoned) "cc" = (/obj/effect/alien/weeds{icon_state = "weeds"},/turf/simulated/floor/airless{icon_state = "damaged3"},/area/mine/abandoned) "cd" = (/turf/simulated/floor{icon_state = "green"; dir = 8},/area/mine/abandoned) -"ce" = (/obj/effect/gibspawner/human,/turf/simulated/floor/airless{icon_state = "damaged5"},/area/mine/abandoned) +"ce" = (/obj/effect/spawner/gibs/human,/turf/simulated/floor/airless{icon_state = "damaged5"},/area/mine/abandoned) "cf" = (/obj/item/clothing/mask/facehugger{icon_state = "facehugger_dead"; stat = 2},/turf/simulated/floor,/area/mine/abandoned) "cg" = (/obj/effect/alien/weeds{icon_state = "weeds"},/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/mine/abandoned) "ch" = (/obj/effect/decal/remains/human,/turf/simulated/floor{icon_state = "green"; dir = 8},/area/mine/abandoned) diff --git a/maps/southern_cross/southern_cross_defines.dm b/maps/southern_cross/southern_cross_defines.dm index 16de26b0f0..1e17dc2e27 100644 --- a/maps/southern_cross/southern_cross_defines.dm +++ b/maps/southern_cross/southern_cross_defines.dm @@ -167,6 +167,7 @@ flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER|MAP_LEVEL_CONSOLES holomap_legend_x = 220 holomap_legend_y = 160 + event_regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_PLAYER_MAIN_AREA) /datum/map_z_level/southern_cross/station/station_one z = Z_LEVEL_STATION_ONE @@ -197,24 +198,28 @@ name = "Empty" flags = MAP_LEVEL_PLAYER transit_chance = 76 + event_regions = list(EVENT_REGION_DEEPSPACE) /datum/map_z_level/southern_cross/surface z = Z_LEVEL_SURFACE name = "Plains" flags = MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED|MAP_LEVEL_CONSOLES base_turf = /turf/simulated/floor/outdoors/rocks + event_regions = list(EVENT_REGION_PLANETSURFACE, EVENT_REGION_PLAYER_MAIN_AREA) /datum/map_z_level/southern_cross/surface_mine z = Z_LEVEL_SURFACE_MINE name = "Mountains" flags = MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED|MAP_LEVEL_CONSOLES base_turf = /turf/simulated/floor/outdoors/rocks + event_regions = list(EVENT_REGION_PLANETSURFACE, EVENT_REGION_SUBTERRANEAN) /datum/map_z_level/southern_cross/surface_wild z = Z_LEVEL_SURFACE_WILD name = "Wilderness" flags = MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED|MAP_LEVEL_CONTACT|MAP_LEVEL_CONSOLES base_turf = /turf/simulated/floor/outdoors/rocks + event_regions = list(EVENT_REGION_PLANETSURFACE) /datum/map_z_level/southern_cross/misc z = Z_LEVEL_MISC diff --git a/maps/submaps/engine_submaps/engine.dm b/maps/submaps/engine_submaps/engine.dm index ba69fe54fa..fc93e915db 100644 --- a/maps/submaps/engine_submaps/engine.dm +++ b/maps/submaps/engine_submaps/engine.dm @@ -3,6 +3,7 @@ name = "Engine Loader" var/clean_turfs // A list of lists, where each list is (x, ) +INITIALIZE_IMMEDIATE(/obj/effect/landmark/engine_loader) /obj/effect/landmark/engine_loader/Initialize() if(SSmapping.engine_loader) warning("Duplicate engine_loader landmarks: [log_info_line(src)] and [log_info_line(SSmapping.engine_loader)]") diff --git a/maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm b/maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm index adeb82580f..8b6c4b164a 100644 --- a/maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm +++ b/maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm @@ -23,7 +23,7 @@ "aw" = (/obj/structure/frame,/turf/simulated/shuttle/floor/black,/area/submap/crashedcontainmentshuttle) "ax" = (/obj/item/frame/mirror,/obj/item/weapon/material/shard{icon_state = "medium"},/turf/simulated/shuttle/wall/dark,/area/submap/crashedcontainmentshuttle) "ay" = (/obj/effect/decal/mecha_wreckage/gygax{anchored = 1},/turf/simulated/shuttle/floor/black,/area/submap/crashedcontainmentshuttle) -"az" = (/obj/effect/gibspawner/generic,/turf/simulated/shuttle/floor/black,/area/submap/crashedcontainmentshuttle) +"az" = (/obj/effect/spawner/gibs/generic,/turf/simulated/shuttle/floor/black,/area/submap/crashedcontainmentshuttle) "aA" = (/obj/structure/closet/medical_wall,/turf/simulated/shuttle/wall/dark,/area/submap/crashedcontainmentshuttle) "aB" = (/obj/machinery/artifact/predefined/hungry_statue,/obj/structure/largecrate,/turf/simulated/shuttle/floor/red,/area/submap/crashedcontainmentshuttle) "aC" = (/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) @@ -50,13 +50,13 @@ "aX" = (/obj/item/weapon/circuitboard/broken,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) "aY" = (/obj/item/clothing/suit/space/cult,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) "aZ" = (/obj/effect/decal/remains/robot,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) -"ba" = (/obj/effect/decal/remains/human,/obj/effect/gibspawner/human,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) +"ba" = (/obj/effect/decal/remains/human,/obj/effect/spawner/gibs/human,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) "bb" = (/obj/effect/decal/cleanable/blood/drip,/turf/simulated/shuttle/floor/black,/area/submap/crashedcontainmentshuttle) "bc" = (/obj/structure/door_assembly,/turf/simulated/shuttle/floor/white,/area/submap/crashedcontainmentshuttle) "bd" = (/obj/item/clothing/head/helmet/space/cult,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) "be" = (/obj/item/weapon/material/knife/ritual,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) "bf" = (/obj/structure/bed/chair/office/dark{dir = 8},/obj/effect/decal/remains/human,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) -"bg" = (/obj/effect/gibspawner/generic,/turf/template_noop,/area/submap/crashedcontainmentshuttle) +"bg" = (/obj/effect/spawner/gibs/generic,/turf/template_noop,/area/submap/crashedcontainmentshuttle) "bh" = (/obj/effect/decal/remains/human,/turf/simulated/shuttle/floor/yellow,/area/submap/crashedcontainmentshuttle) "bi" = (/obj/item/weapon/circuitboard/broken,/obj/effect/decal/remains/human,/obj/item/weapon/gun/energy/laser,/turf/simulated/shuttle/floor/black,/area/submap/crashedcontainmentshuttle) "bj" = (/obj/item/device/gps/internal/poi,/turf/simulated/shuttle/floor/red,/area/submap/crashedcontainmentshuttle) @@ -89,7 +89,7 @@ "bK" = (/obj/random/landmine,/turf/simulated/shuttle/floor/yellow,/area/submap/crashedcontainmentshuttle) "bL" = (/obj/effect/decal/cleanable/blood,/obj/random/landmine,/turf/simulated/shuttle/floor/red,/area/submap/crashedcontainmentshuttle) "bM" = (/obj/structure/reagent_dispensers/fueltank,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) -"bN" = (/obj/structure/toilet{dir = 8},/obj/effect/gibspawner/generic,/obj/effect/decal/remains/human,/obj/item/weapon/card/id/syndicate{age = "\\42"; blood_type = "\\O+"; desc = "A strange ID card."; dna_hash = "\[REDACTED]"; fingerprint_hash = "\\------"; name = "Aaron Presley's ID Card(Delivery Service) "; registered_name = "Aaron Presley"; sex = "\\Male"},/turf/simulated/shuttle/floor/white,/area/submap/crashedcontainmentshuttle) +"bN" = (/obj/structure/toilet{dir = 8},/obj/effect/spawner/gibs/generic,/obj/effect/decal/remains/human,/obj/item/weapon/card/id/syndicate{age = "\\42"; blood_type = "\\O+"; desc = "A strange ID card."; dna_hash = "\[REDACTED]"; fingerprint_hash = "\\------"; name = "Aaron Presley's ID Card(Delivery Service) "; registered_name = "Aaron Presley"; sex = "\\Male"},/turf/simulated/shuttle/floor/white,/area/submap/crashedcontainmentshuttle) "bO" = (/obj/effect/decal/cleanable/liquid_fuel,/obj/effect/decal/remains/human,/obj/item/weapon/flame/lighter/random,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/crashedcontainmentshuttle) (1,1,1) = {" diff --git a/maps/submaps/surface_submaps/mountains/quarantineshuttle.dmm b/maps/submaps/surface_submaps/mountains/quarantineshuttle.dmm index 2c0b30631e..e3ce0de5cc 100644 --- a/maps/submaps/surface_submaps/mountains/quarantineshuttle.dmm +++ b/maps/submaps/surface_submaps/mountains/quarantineshuttle.dmm @@ -112,11 +112,11 @@ "ch" = (/obj/structure/table/steel,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) "ci" = (/obj/structure/table/steel,/obj/item/weapon/reagent_containers/syringe/antiviral,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) "cj" = (/obj/structure/table/steel,/obj/item/weapon/reagent_containers/spray/cleaner{desc = "Someone has crossed out the 'Space' from Space Cleaner and written in Chemistry. Scrawled on the back is, 'Okay, whoever filled this with polytrinic acid, it was only funny the first time. It was hard enough replacing the CMO's first cat!'"; name = "Chemistry Cleaner"},/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) -"ck" = (/obj/structure/table/steel,/obj/item/weapon/tool/crowbar/power,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) +"ck" = (/obj/structure/table/steel,/obj/item/weapon/tool/hydraulic_cutter,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) "cl" = (/obj/structure/table/rack,/obj/item/clothing/head/bio_hood,/obj/item/clothing/suit/bio_suit,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) "cm" = (/obj/item/weapon/weldingtool/largetank,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) "cn" = (/obj/structure/closet/crate/medical,/turf/simulated/mineral/floor/ignore_mapgen,/area/submap/cave/qShuttle) - + (1,1,1) = {" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/maps/submaps/surface_submaps/plains/hotspring.dmm b/maps/submaps/surface_submaps/plains/hotspring.dmm index 70f5fe2d85..b1bb8c5109 100644 --- a/maps/submaps/surface_submaps/plains/hotspring.dmm +++ b/maps/submaps/surface_submaps/plains/hotspring.dmm @@ -1,35 +1,35 @@ "a" = (/turf/template_noop,/area/submap/hotspring) "c" = (/obj/structure/bonfire/sifwood,/turf/simulated/floor/outdoors/dirt,/area/submap/hotspring) -"d" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline/corner{dir = 4},/area/submap/hotspring) +"d" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline/corner{dir = 4},/area/submap/hotspring) "e" = (/obj/structure/window/reinforced{dir = 8; health = 1e+006},/obj/structure/loot_pile/maint/trash,/turf/simulated/floor/outdoors/grass/sif,/area/submap/hotspring) "f" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/hotspring) "g" = (/turf/simulated/floor/outdoors/mud,/area/submap/hotspring) "h" = (/obj/structure/window/reinforced{dir = 8; health = 1e+006},/turf/simulated/floor/outdoors/grass/sif,/area/submap/hotspring) "i" = (/obj/random/trash,/turf/simulated/floor/outdoors/grass/sif,/area/submap/hotspring) "j" = (/obj/structure/table/rack,/obj/item/weapon/storage/fancy/candle_box,/obj/item/weapon/flame/lighter/random{pixel_x = 7},/obj/item/weapon/storage/fancy/candle_box{pixel_x = -6},/obj/item/weapon/storage/firstaid{pixel_x = 4; pixel_y = -6},/obj/item/weapon/wrapping_paper,/turf/simulated/floor/wood/sif,/area/submap/hotspring) -"k" = (/obj/effect/effect/steam,/obj/effect/map_effect/interval/effect_emitter/steam,/turf/simulated/floor/water,/area/submap/hotspring) -"m" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline/corner,/area/submap/hotspring) +"k" = (/obj/effect/vfx/steam,/obj/effect/map_effect/interval/effect_emitter/steam,/turf/simulated/floor/water,/area/submap/hotspring) +"m" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline/corner,/area/submap/hotspring) "n" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/hotspring) "o" = (/obj/structure/table/woodentable,/obj/item/weapon/material/harpoon,/obj/item/pizzabox/vegetable,/turf/simulated/floor/wood/sif,/area/submap/hotspring) -"p" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline{dir = 1},/area/submap/hotspring) +"p" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline{dir = 1},/area/submap/hotspring) "r" = (/obj/item/weapon/material/shard,/obj/structure/bed/chair{dir = 1},/turf/simulated/floor/wood/sif,/area/submap/hotspring) "s" = (/obj/random/junk,/turf/simulated/floor/outdoors/dirt,/area/submap/hotspring) "t" = (/obj/structure/table/bench/wooden,/turf/simulated/floor/outdoors/dirt,/area/submap/hotspring) "u" = (/obj/random/junk,/turf/simulated/floor/outdoors/mud,/area/submap/hotspring) -"v" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline/corner{dir = 1},/area/submap/hotspring) +"v" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline/corner{dir = 1},/area/submap/hotspring) "w" = (/obj/structure/closet/crate/bin,/turf/simulated/floor/wood/sif/broken,/area/submap/hotspring) "x" = (/obj/structure/table/woodentable,/obj/item/trash/candle,/turf/simulated/floor/wood/sif,/area/submap/hotspring) -"z" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline/corner{dir = 8},/area/submap/hotspring) +"z" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline/corner{dir = 8},/area/submap/hotspring) "A" = (/obj/item/weapon/material/shard,/turf/template_noop,/area/submap/hotspring) -"C" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline{dir = 8},/area/submap/hotspring) +"C" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline{dir = 8},/area/submap/hotspring) "D" = (/obj/structure/window/reinforced{dir = 4; health = 1e+006},/turf/template_noop,/area/submap/hotspring) -"E" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline,/area/submap/hotspring) +"E" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline,/area/submap/hotspring) "F" = (/turf/simulated/floor/outdoors/dirt,/area/submap/hotspring) "H" = (/obj/random/trash,/turf/simulated/floor/outdoors/mud,/area/submap/hotspring) -"I" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline{dir = 9},/area/submap/hotspring) +"I" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline{dir = 9},/area/submap/hotspring) "J" = (/obj/structure/simple_door/sifwood,/turf/simulated/floor/wood/sif,/area/submap/hotspring) "K" = (/turf/simulated/floor/outdoors/grass/sif,/area/submap/hotspring) -"L" = (/obj/item/weapon/inflatable_duck,/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline,/area/submap/hotspring) +"L" = (/obj/item/weapon/inflatable_duck,/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline,/area/submap/hotspring) "M" = (/obj/random/junk,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif/broken,/area/submap/hotspring) "N" = (/turf/simulated/floor/outdoors/rocks,/area/submap/hotspring) "O" = (/obj/structure/loot_pile/maint/trash,/turf/template_noop,/area/submap/hotspring) @@ -37,7 +37,7 @@ "R" = (/obj/structure/window/reinforced{dir = 8; health = 1e+006},/obj/item/weapon/material/shard,/obj/structure/loot_pile/maint/trash,/turf/template_noop,/area/submap/hotspring) "T" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif/broken,/area/submap/hotspring) "U" = (/obj/structure/table/rack,/obj/item/clothing/under/swimsuit/striped,/obj/item/clothing/under/swimsuit/stripper/stripper_pink,/turf/simulated/floor/wood/sif,/area/submap/hotspring) -"V" = (/obj/effect/effect/steam,/turf/simulated/floor/water/shoreline{dir = 6},/area/submap/hotspring) +"V" = (/obj/effect/vfx/steam,/turf/simulated/floor/water/shoreline{dir = 6},/area/submap/hotspring) "X" = (/obj/random/junk,/obj/random/junk,/turf/simulated/floor/outdoors/dirt,/area/submap/hotspring) "Y" = (/turf/simulated/wall/log_sif,/area/submap/hotspring) "Z" = (/obj/item/weapon/material/shard,/obj/item/weapon/material/shard{pixel_x = 5},/turf/template_noop,/area/submap/hotspring) diff --git a/maps/submaps/surface_submaps/plains/lonehome.dmm b/maps/submaps/surface_submaps/plains/lonehome.dmm index e756de4de1..6ac42745d8 100644 --- a/maps/submaps/surface_submaps/plains/lonehome.dmm +++ b/maps/submaps/surface_submaps/plains/lonehome.dmm @@ -134,7 +134,7 @@ "RI" = (/obj/structure/window/reinforced{dir = 8; health = 1e+006},/turf/simulated/floor/outdoors/dirt,/area/submap/lonehome) "Sd" = (/obj/structure/fence/corner,/turf/template_noop,/area/submap/lonehome) "Sp" = (/obj/item/weapon/material/shard,/obj/item/weapon/material/shard{pixel_x = 5; pixel_y = 3},/turf/simulated/floor/outdoors/dirt,/area/submap/lonehome) -"SN" = (/obj/structure/bed/chair/wood/wings{dir = 1},/obj/effect/gibspawner/human,/turf/simulated/floor/carpet/sblucarpet,/area/submap/lonehome) +"SN" = (/obj/structure/bed/chair/wood/wings{dir = 1},/obj/effect/spawner/gibs/human,/turf/simulated/floor/carpet/sblucarpet,/area/submap/lonehome) "Tg" = (/obj/item/weapon/material/kitchen/utensil/fork,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood,/area/submap/lonehome) "Tw" = (/obj/item/weapon/cell/high/empty,/turf/simulated/floor/carpet/sblucarpet,/area/submap/lonehome) "TX" = (/obj/item/clothing/suit/storage/apron/white,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled/white,/area/submap/lonehome) diff --git a/maps/submaps/surface_submaps/wilderness/Rockybase.dmm b/maps/submaps/surface_submaps/wilderness/Rockybase.dmm index 974807d38c..5844b83f8e 100644 --- a/maps/submaps/surface_submaps/wilderness/Rockybase.dmm +++ b/maps/submaps/surface_submaps/wilderness/Rockybase.dmm @@ -5,7 +5,7 @@ "ae" = (/obj/effect/decal/remains,/turf/template_noop,/area/submap/Rockybase) "af" = (/turf/template_noop,/area/submap/Rockybase) "ag" = (/obj/structure/flora/tree/sif,/turf/template_noop,/area/submap/Rockybase) -"ah" = (/obj/effect/gibspawner/robot,/turf/template_noop,/area/submap/Rockybase) +"ah" = (/obj/effect/spawner/gibs/robot,/turf/template_noop,/area/submap/Rockybase) "ai" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/Rockybase) "aj" = (/obj/effect/decal/remains/robot,/turf/template_noop,/area/template_noop) "ak" = (/mob/living/simple_mob/mechanical/combat_drone/lesser,/turf/template_noop,/area/submap/Rockybase) @@ -184,8 +184,8 @@ "dC" = (/obj/machinery/vending/hydroseeds,/obj/effect/floor_decal/corner/lime/border{icon_state = "bordercolor"; dir = 10},/turf/simulated/floor/tiled,/area/submap/Rockybase) "dD" = (/obj/structure/closet/crate/secure/hydrosec,/obj/effect/floor_decal/corner/lime/border{icon_state = "bordercolor"; dir = 6},/turf/simulated/floor/tiled,/area/submap/Rockybase) "dE" = (/obj/machinery/portable_atmospherics/hydroponics/soil,/obj/structure/gravemarker{dir = 1},/turf/template_noop,/area/template_noop) -"dF" = (/obj/effect/gibspawner/robot,/turf/template_noop,/area/template_noop) -"dG" = (/obj/effect/gibspawner/human,/turf/template_noop,/area/template_noop) +"dF" = (/obj/effect/spawner/gibs/robot,/turf/template_noop,/area/template_noop) +"dG" = (/obj/effect/spawner/gibs/human,/turf/template_noop,/area/template_noop) (1,1,1) = {" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/maps/submaps/surface_submaps/wilderness/borglab.dmm b/maps/submaps/surface_submaps/wilderness/borglab.dmm index b2865e495d..4005f31387 100644 --- a/maps/submaps/surface_submaps/wilderness/borglab.dmm +++ b/maps/submaps/surface_submaps/wilderness/borglab.dmm @@ -1,227 +1,228 @@ -"aa" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/random/maintenance,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"ab" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/random/energy,/turf/simulated/floor/plating,/area/submap/BorgLab) -"ac" = (/obj/machinery/light_construct{dir = 1},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/mob/living/simple_mob/humanoid/merc/ranged{health = 15; maxHealth = 15},/turf/simulated/floor/plating,/area/submap/BorgLab) -"ad" = (/obj/effect/floor_decal/sign/c,/turf/simulated/wall/r_wall,/area/submap/BorgLab) -"ae" = (/obj/effect/floor_decal/rust/mono_rusted3,/obj/random/maintenance/research,/mob/living/simple_mob/humanoid/merc/ranged/ionrifle{health = 15; maxHealth = 15},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"af" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/mono_rusted3,/obj/effect/decal/cleanable/generic,/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ag" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/mob/living/simple_mob/humanoid/merc/melee/sword/poi{health = 15; maxHealth = 15},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ah" = (/obj/effect/floor_decal/industrial/warning,/obj/machinery/light/small/emergency/flicker,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/random/contraband,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ai" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/mob/living/simple_mob/humanoid/merc/ranged{health = 15; maxHealth = 15},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"aj" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/random/energy/highend,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"ak" = (/obj/effect/floor_decal/techfloor/orange,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"al" = (/obj/effect/floor_decal/techfloor/orange,/obj/random/contraband,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"bj" = (/obj/structure/bed/padded,/obj/item/weapon/bedsheet/brown,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"bz" = (/obj/random/trash,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"bE" = (/obj/structure/closet/secure_closet/chemical{locked = 0},/obj/item/weapon/storage/box/pillbottles,/obj/item/weapon/storage/box/syringes,/obj/item/weapon/tool/screwdriver,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"bI" = (/obj/structure/window/reinforced,/obj/structure/grille/broken,/obj/item/weapon/material/shard{pixel_y = 10},/obj/item/weapon/material/shard{pixel_x = 6},/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"bL" = (/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/BorgLab) -"bN" = (/obj/machinery/artifact_analyser,/obj/effect/floor_decal/rust/mono_rusted3,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"bY" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/structure/loot_pile/surface/bones,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"cA" = (/obj/effect/floor_decal/sign/d,/turf/simulated/wall/r_wall,/area/submap/BorgLab) -"cC" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/structure/sink{dir = 4; pixel_x = 11},/turf/simulated/floor/tiled/freezer,/area/submap/BorgLab) -"cZ" = (/obj/effect/floor_decal/techfloor/orange,/obj/structure/loot_pile/surface/drone,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"dd" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"de" = (/obj/machinery/portable_atmospherics/powered/scrubber/huge,/obj/effect/floor_decal/rust,/obj/machinery/light_construct,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"dK" = (/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"dT" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"ej" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"eV" = (/obj/effect/floor_decal/industrial/warning/corner{dir = 4},/obj/structure/table/standard,/obj/structure/railing,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"fh" = (/obj/effect/floor_decal/rust,/obj/effect/gibspawner/robot,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ga" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/item/weapon/material/shard{pixel_x = -3; pixel_y = -6},/obj/item/weapon/material/shard,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"gc" = (/obj/structure/railing{dir = 1},/obj/machinery/light/small/emergency/flicker{dir = 8},/turf/simulated/floor/plating,/area/submap/BorgLab) -"gf" = (/obj/structure/table/standard,/obj/item/weapon/reagent_containers/food/snacks/burrito_cheese,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/item/weapon/cell/super/empty,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"gh" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/machinery/light_construct{dir = 1},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"gN" = (/obj/structure/window/reinforced/tinted/frosted{dir = 4},/obj/random/junk,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"he" = (/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/structure/window/reinforced{dir = 8; health = 1e+006},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"hW" = (/obj/machinery/door/airlock/maintenance/common,/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) -"ic" = (/obj/structure/window/reinforced/tinted/frosted{dir = 4},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"if" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/random/single,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ii" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/machinery/firealarm{pixel_y = 24},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"iS" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"iY" = (/obj/structure/loot_pile/maint/boxfort,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/BorgLab) -"jf" = (/obj/effect/floor_decal/rust,/obj/random/trash,/turf/simulated/floor/plating,/area/submap/BorgLab) -"jz" = (/obj/machinery/light/small/emergency/flicker{dir = 8},/obj/effect/floor_decal/rust/color_rustedcee{dir = 4},/obj/machinery/button/remote/blast_door{dir = 8; id = "borg"},/turf/simulated/floor/tiled/dark,/area/submap/BorgLab) -"jR" = (/obj/effect/floor_decal/techfloor/orange,/obj/item/weapon/broken_gun/ionrifle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"kj" = (/obj/effect/floor_decal/rust,/obj/random/junk,/obj/random/trash,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"kt" = (/obj/item/device/mass_spectrometer/adv,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"kI" = (/obj/machinery/door/airlock/maintenance/rnd{req_one_access = null},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) -"lz" = (/obj/machinery/light_switch,/turf/simulated/wall/r_wall,/area/submap/BorgLab) -"lJ" = (/obj/effect/floor_decal/rust,/obj/structure/sink{dir = 4; pixel_x = 11},/obj/machinery/light/small/emergency/flicker{dir = 1},/turf/simulated/floor/plating,/area/submap/BorgLab) -"lU" = (/obj/machinery/chem_master,/obj/effect/floor_decal/rust/mono_rusted3,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ma" = (/obj/effect/floor_decal/sign/b,/turf/simulated/wall/r_wall,/area/submap/BorgLab) -"mf" = (/obj/machinery/door/airlock/maintenance/common,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) -"mi" = (/obj/structure/closet/radiation,/obj/random/maintenance,/obj/random/maintenance,/obj/random/maintenance,/obj/effect/floor_decal/rust/color_rustedcee,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ms" = (/obj/machinery/door/airlock/maintenance/rnd{req_one_access = null},/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) -"mw" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/random/multiple/gun/projectile/rifle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"mB" = (/obj/machinery/door/window/brigdoor/westright{dir = 2; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"mE" = (/obj/effect/floor_decal/techfloor/orange,/obj/item/weapon/storage/backpack/holding/duffle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"nb" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ne" = (/obj/machinery/door/window/brigdoor/westright{dir = 1; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"nk" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"ny" = (/obj/structure/curtain/open/shower,/obj/effect/floor_decal/borderfloor/cee{dir = 4},/obj/effect/floor_decal/rust,/obj/machinery/shower{dir = 4; pixel_x = 5},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"nW" = (/obj/effect/floor_decal/rust,/obj/structure/table,/obj/effect/floor_decal/rust/mono_rusted3,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"oa" = (/obj/effect/floor_decal/industrial/warning,/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"op" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"pe" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/random/trash,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"pY" = (/obj/machinery/power/port_gen/pacman,/obj/structure/cable/blue{d2 = 2; icon_state = "0-2"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"qa" = (/obj/structure/table/standard,/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight,/obj/effect/floor_decal/rust/mono_rusted2,/turf/simulated/floor/tiled/dark,/area/submap/BorgLab) -"qW" = (/turf/simulated/floor/plating,/area/submap/BorgLab) -"ra" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"rO" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard{pixel_x = 6},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"rP" = (/obj/machinery/firealarm{dir = 8; pixel_x = -24},/obj/random/junk,/turf/simulated/floor/plating,/area/submap/BorgLab) -"sr" = (/turf/simulated/floor/outdoors/dirt,/area/template_noop) -"sK" = (/obj/structure/closet/crate/secure/loot,/turf/simulated/floor/plating,/area/submap/BorgLab) -"ta" = (/obj/structure/bed/padded,/obj/item/weapon/bedsheet/brown,/obj/machinery/light_construct{dir = 8},/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) -"th" = (/obj/effect/floor_decal/rust,/obj/structure/table,/obj/random/maintenance/research,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"tr" = (/obj/machinery/light_construct/small{dir = 1},/obj/machinery/portable_atmospherics/canister/phoron,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/color_rustedfull,/turf/simulated/floor/plating,/area/submap/BorgLab) -"tx" = (/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"ty" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"tX" = (/obj/effect/wingrille_spawn/reinforced,/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"ub" = (/obj/effect/floor_decal/industrial/warning,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"ug" = (/obj/machinery/door/window/brigdoor/westright{dir = 2; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"uQ" = (/obj/effect/gibspawner/human,/obj/random/trash,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"uX" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/structure/closet/crate/secure/loot,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"wq" = (/obj/structure/table/standard,/obj/item/weapon/phone,/obj/effect/floor_decal/rust/mono_rusted2,/turf/simulated/floor/tiled/dark,/area/submap/BorgLab) -"wt" = (/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"xh" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/gibspawner/human,/obj/random/trash,/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"xk" = (/obj/structure/sign/warning/caution,/turf/simulated/wall/r_wall,/area/submap/BorgLab) -"xu" = (/obj/machinery/artifact_scanpad,/obj/effect/floor_decal/industrial/warning/corner{dir = 1},/obj/effect/floor_decal/rust/mono_rusted3,/obj/machinery/artifact/predefined/hungry_statue,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"xz" = (/obj/structure/bed,/obj/effect/floor_decal/techfloor/orange{dir = 1},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"xO" = (/obj/effect/decal/cleanable/generic,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"xU" = (/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"yq" = (/obj/structure/grille/broken,/obj/item/weapon/material/shard,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"yz" = (/obj/effect/floor_decal/industrial/warning,/obj/item/weapon/material/shard{pixel_x = -3; pixel_y = -6},/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"yB" = (/obj/random/trash,/mob/living/simple_mob/mechanical/mecha/hoverpod,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"yI" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"yR" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ze" = (/obj/structure/loot_pile/maint/technical,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/BorgLab) -"zk" = (/turf/simulated/floor/tiled,/area/submap/BorgLab) -"As" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"AI" = (/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Bl" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Bq" = (/obj/random/trash,/mob/living/simple_mob/mechanical/mining_drone,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Cf" = (/obj/structure/table/standard,/obj/effect/floor_decal/industrial/warning/corner{dir = 8},/obj/effect/floor_decal/rust,/obj/item/weapon/module/power_control,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Cz" = (/obj/item/stack/material/phoron{amount = 10},/turf/simulated/floor/plating,/area/submap/BorgLab) -"CA" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"CS" = (/obj/effect/floor_decal/rust,/obj/effect/gibspawner/robot,/turf/simulated/floor/plating,/area/submap/BorgLab) -"CX" = (/obj/structure/table/standard,/obj/random/junk,/obj/random/trash,/obj/random/maintenance/research,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Dj" = (/obj/structure/table/standard,/obj/item/weapon/reagent_containers/glass/beaker/large,/obj/item/weapon/reagent_containers/dropper,/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Dq" = (/turf/template_noop,/area/submap/BorgLab) -"Ds" = (/obj/effect/floor_decal/rust,/obj/structure/closet/firecloset/full/double,/obj/effect/floor_decal/rust/color_rustedfull,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Dv" = (/obj/structure/toilet,/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled/freezer,/area/submap/BorgLab) -"DF" = (/turf/template_noop,/area/template_noop) -"DW" = (/obj/random/trash,/obj/random/maintenance/research,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Fj" = (/obj/effect/floor_decal/industrial/warning,/obj/item/weapon/material/shard{pixel_y = 10},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Ft" = (/obj/effect/floor_decal/industrial/warning,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Fu" = (/obj/item/weapon/storage/box/beakers,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Fv" = (/obj/structure/table/standard,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/maintenance/research,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Gy" = (/obj/random/maintenance/research,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Gz" = (/mob/living/simple_mob/mechanical/mining_drone,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"GA" = (/obj/machinery/door/airlock/maintenance/common,/turf/simulated/floor/plating,/area/submap/BorgLab) -"GC" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"GS" = (/obj/item/stack/material/gold{amount = 25},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Ic" = (/obj/random/trash,/mob/living/simple_mob/mechanical/mecha/ripley/deathripley,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Jd" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Jh" = (/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard,/obj/effect/floor_decal/rust/mono_rusted3,/obj/random/trash,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Jm" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Jo" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/item/weapon/material/shard{pixel_y = 10},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"Jp" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Jr" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"JZ" = (/obj/effect/floor_decal/industrial/warning/corner,/obj/structure/railing{dir = 1},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"KH" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/item/weapon/material/shard{pixel_y = 10},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"Lr" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/grille/broken,/obj/item/weapon/material/shard{pixel_x = -3; pixel_y = -6},/obj/item/weapon/material/shard{pixel_y = 10},/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"Lz" = (/obj/structure/table/standard,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/trash,/obj/random/maintenance/research,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"LB" = (/obj/item/stack/material/phoron{amount = 10},/obj/random/toolbox,/obj/random/toolbox,/obj/item/weapon/storage/box/lights/mixed,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/item/stack/material/phoron{amount = 10},/obj/structure/table/rack,/turf/simulated/floor/plating,/area/submap/BorgLab) -"LC" = (/obj/effect/gibspawner/human,/mob/living/simple_mob/mechanical/mecha/odysseus/murdysseus{faction = "corrupt"},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"MT" = (/obj/machinery/space_heater,/obj/effect/floor_decal/rust,/obj/machinery/light/small/emergency/flicker{dir = 4},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Nb" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Nj" = (/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Nq" = (/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Ns" = (/obj/effect/floor_decal/rust,/obj/effect/gibspawner/robot,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Nt" = (/obj/effect/floor_decal/industrial/warning/corner{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/floor_decal/industrial/warning/corner,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Nv" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/mono_rusted3,/obj/effect/floor_decal/industrial/warning{dir = 4},/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"NB" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"NC" = (/obj/structure/grille/broken,/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/structure/window/reinforced{dir = 1},/obj/item/weapon/material/shard,/obj/item/weapon/material/shard{pixel_y = 10},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Oq" = (/obj/effect/floor_decal/rust,/obj/random/trash,/obj/item/stack/material/phoron{amount = 10},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Oz" = (/obj/item/weapon/pickaxe/plasmacutter,/obj/machinery/firealarm{pixel_y = 24},/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"OD" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"OH" = (/obj/effect/wingrille_spawn/reinforced,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"OW" = (/obj/structure/table/standard,/obj/item/device/flashlight/lamp,/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/item/weapon/broken_gun/laserrifle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Pf" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Qe" = (/obj/effect/map_effect/interval/sound_emitter/energy_gunfight,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Qg" = (/turf/simulated/mineral/ignore_mapgen,/area/template_noop) -"Qn" = (/obj/structure/window/reinforced/tinted/frosted{dir = 4},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Qs" = (/obj/effect/floor_decal/industrial/warning,/obj/machinery/light/small/emergency/flicker,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Qz" = (/obj/effect/floor_decal/rust,/obj/structure/loot_pile/surface/drone,/turf/simulated/floor/plating,/area/submap/BorgLab) -"QW" = (/obj/structure/closet/l3closet/general,/obj/effect/floor_decal/rust,/obj/random/maintenance/medical,/obj/random/maintenance/medical,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/effect/floor_decal/rust/color_rustedcee,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Rt" = (/obj/effect/floor_decal/industrial/warning{dir = 8},/obj/random/maintenance/research,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"RG" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/BorgLab) -"RL" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) -"RP" = (/turf/simulated/floor/outdoors/dirt,/area/submap/BorgLab) -"Su" = (/obj/effect/floor_decal/techfloor/orange,/obj/item/stack/material/uranium{amount = 15},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Sy" = (/obj/structure/windoor_assembly{dir = 4},/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"SG" = (/obj/effect/floor_decal/industrial/warning/corner{dir = 8},/obj/effect/floor_decal/industrial/warning/corner{dir = 4},/turf/simulated/floor/tiled,/area/submap/BorgLab) -"SZ" = (/obj/effect/floor_decal/techfloor/orange,/obj/structure/loot_pile/surface/bones,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Tj" = (/obj/structure/table/standard,/obj/machinery/chemical_dispenser/full,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Tp" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Tv" = (/obj/effect/floor_decal/sign/a,/turf/simulated/wall/r_wall,/area/submap/BorgLab) -"TD" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"TN" = (/obj/structure/closet/l3closet/virology,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) -"TU" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) -"TW" = (/obj/effect/gibspawner/human,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Uj" = (/obj/structure/closet/firecloset/full/double,/obj/effect/floor_decal/rust{pixel_y = 1},/obj/machinery/light/small/emergency/flicker{dir = 1},/obj/random/maintenance,/obj/random/maintenance/medical,/obj/effect/floor_decal/rust/color_rustedcee,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Uy" = (/obj/effect/floor_decal/rust,/obj/random/trash,/obj/random/maintenance/research,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Uz" = (/obj/machinery/shower{dir = 1},/obj/structure/curtain/open/shower,/obj/effect/floor_decal/borderfloorwhite/cee{dir = 1},/obj/item/weapon/soap/nanotrasen,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled/freezer,/area/submap/BorgLab) -"UM" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"UV" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) -"UW" = (/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/structure/window/reinforced{dir = 1},/obj/structure/grille/broken,/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"Vc" = (/obj/effect/floor_decal/industrial/warning,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Vh" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Vr" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"VH" = (/obj/structure/cable/blue,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/item/frame/apc,/turf/simulated/floor/plating,/area/submap/BorgLab) -"VU" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Wh" = (/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) -"Wq" = (/obj/effect/floor_decal/rust,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/plating,/area/submap/BorgLab) -"WK" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/item/weapon/broken_gun/laser_retro,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/plating,/area/submap/BorgLab) -"WQ" = (/turf/simulated/wall/r_wall,/area/submap/BorgLab) -"WR" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/industrial/warning/cee{dir = 4},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"XG" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/mono_rusted3,/obj/effect/gibspawner/human,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Yk" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Yy" = (/obj/structure/table/steel,/obj/item/weapon/coin/phoron,/obj/item/weapon/storage/toolbox/syndicate/powertools,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/maintenance/research,/obj/random/maintenance/research,/turf/simulated/floor/plating,/area/submap/BorgLab) -"YD" = (/obj/effect/wingrille_spawn/reinforced,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) -"YZ" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Za" = (/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"Zc" = (/obj/structure/railing,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Zn" = (/obj/item/device/measuring_tape,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Zq" = (/obj/machinery/door/window/brigdoor/westright{dir = 1; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) -"Zt" = (/obj/effect/wingrille_spawn/reinforced,/turf/simulated/floor/plating,/area/submap/BorgLab) -"Zy" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -"ZO" = (/obj/effect/floor_decal/rust,/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"aa" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/random/maintenance,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"ab" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/random/energy,/turf/simulated/floor/plating,/area/submap/BorgLab) +"ac" = (/obj/machinery/light_construct{dir = 1},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/mob/living/simple_mob/humanoid/merc/ranged{health = 15; maxHealth = 15},/turf/simulated/floor/plating,/area/submap/BorgLab) +"ad" = (/obj/effect/floor_decal/sign/c,/turf/simulated/wall/r_wall,/area/submap/BorgLab) +"ae" = (/obj/effect/floor_decal/rust/mono_rusted3,/obj/random/maintenance/research,/mob/living/simple_mob/humanoid/merc/ranged/ionrifle{health = 15; maxHealth = 15},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"af" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/mono_rusted3,/obj/effect/decal/cleanable/generic,/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ag" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/mob/living/simple_mob/humanoid/merc/melee/sword/poi{health = 15; maxHealth = 15},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ah" = (/obj/effect/floor_decal/industrial/warning,/obj/machinery/light/small/emergency/flicker,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/random/contraband,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ai" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/mob/living/simple_mob/humanoid/merc/ranged{health = 15; maxHealth = 15},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"aj" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/random/energy/highend,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"ak" = (/obj/effect/floor_decal/techfloor/orange,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"al" = (/obj/effect/floor_decal/techfloor/orange,/obj/random/contraband,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"bj" = (/obj/structure/bed/padded,/obj/item/weapon/bedsheet/brown,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"bz" = (/obj/random/trash,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"bE" = (/obj/structure/closet/secure_closet/chemical{locked = 0},/obj/item/weapon/storage/box/pillbottles,/obj/item/weapon/storage/box/syringes,/obj/item/weapon/tool/screwdriver,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"bI" = (/obj/structure/window/reinforced,/obj/structure/grille/broken,/obj/item/weapon/material/shard{pixel_y = 10},/obj/item/weapon/material/shard{pixel_x = 6},/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"bL" = (/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/BorgLab) +"bN" = (/obj/machinery/artifact_analyser,/obj/effect/floor_decal/rust/mono_rusted3,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"bY" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/structure/loot_pile/surface/bones,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"cA" = (/obj/effect/floor_decal/sign/d,/turf/simulated/wall/r_wall,/area/submap/BorgLab) +"cC" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/structure/sink{dir = 4; pixel_x = 11},/turf/simulated/floor/tiled/freezer,/area/submap/BorgLab) +"cZ" = (/obj/effect/floor_decal/techfloor/orange,/obj/structure/loot_pile/surface/drone,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"dd" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"de" = (/obj/machinery/portable_atmospherics/powered/scrubber/huge,/obj/effect/floor_decal/rust,/obj/machinery/light_construct,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"dK" = (/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"dT" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"ej" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"eV" = (/obj/effect/floor_decal/industrial/warning/corner{dir = 4},/obj/structure/table/standard,/obj/structure/railing,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"fh" = (/obj/effect/floor_decal/rust,/obj/effect/spawner/gibs/robot,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ga" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/item/weapon/material/shard{pixel_x = -3; pixel_y = -6},/obj/item/weapon/material/shard,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"gc" = (/obj/structure/railing{dir = 1},/obj/machinery/light/small/emergency/flicker{dir = 8},/turf/simulated/floor/plating,/area/submap/BorgLab) +"gf" = (/obj/structure/table/standard,/obj/item/weapon/reagent_containers/food/snacks/burrito_cheese,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/item/weapon/cell/super/empty,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"gh" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/machinery/light_construct{dir = 1},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"gN" = (/obj/structure/window/reinforced/tinted/frosted{dir = 4},/obj/random/junk,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"he" = (/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/structure/window/reinforced{dir = 8; health = 1e+006},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"hW" = (/obj/machinery/door/airlock/maintenance/common,/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) +"ic" = (/obj/structure/window/reinforced/tinted/frosted{dir = 4},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"if" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/random/single,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ii" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/machinery/firealarm{pixel_y = 24},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"iS" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"iY" = (/obj/structure/loot_pile/maint/boxfort,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/BorgLab) +"jf" = (/obj/effect/floor_decal/rust,/obj/random/trash,/turf/simulated/floor/plating,/area/submap/BorgLab) +"jz" = (/obj/machinery/light/small/emergency/flicker{dir = 8},/obj/effect/floor_decal/rust/color_rustedcee{dir = 4},/obj/machinery/button/remote/blast_door{dir = 8; id = "borg"},/turf/simulated/floor/tiled/dark,/area/submap/BorgLab) +"jR" = (/obj/effect/floor_decal/techfloor/orange,/obj/item/weapon/broken_gun/ionrifle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"kj" = (/obj/effect/floor_decal/rust,/obj/random/junk,/obj/random/trash,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"kt" = (/obj/item/device/mass_spectrometer/adv,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"kI" = (/obj/machinery/door/airlock/maintenance/rnd{req_one_access = null},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) +"lz" = (/obj/machinery/light_switch,/turf/simulated/wall/r_wall,/area/submap/BorgLab) +"lJ" = (/obj/effect/floor_decal/rust,/obj/structure/sink{dir = 4; pixel_x = 11},/obj/machinery/light/small/emergency/flicker{dir = 1},/turf/simulated/floor/plating,/area/submap/BorgLab) +"lU" = (/obj/machinery/chem_master,/obj/effect/floor_decal/rust/mono_rusted3,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ma" = (/obj/effect/floor_decal/sign/b,/turf/simulated/wall/r_wall,/area/submap/BorgLab) +"mf" = (/obj/machinery/door/airlock/maintenance/common,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) +"mi" = (/obj/structure/closet/radiation,/obj/random/maintenance,/obj/random/maintenance,/obj/random/maintenance,/obj/effect/floor_decal/rust/color_rustedcee,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ms" = (/obj/machinery/door/airlock/maintenance/rnd{req_one_access = null},/turf/simulated/floor/tiled/techmaint,/area/submap/BorgLab) +"mw" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/random/multiple/gun/projectile/rifle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"mB" = (/obj/machinery/door/window/brigdoor/westright{dir = 2; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"mE" = (/obj/effect/floor_decal/techfloor/orange,/obj/item/weapon/storage/backpack/holding/duffle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"nb" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ne" = (/obj/machinery/door/window/brigdoor/westright{dir = 1; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"nk" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"ny" = (/obj/structure/curtain/open/shower,/obj/effect/floor_decal/borderfloor/cee{dir = 4},/obj/effect/floor_decal/rust,/obj/machinery/shower{dir = 4; pixel_x = 5},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"nW" = (/obj/effect/floor_decal/rust,/obj/structure/table,/obj/effect/floor_decal/rust/mono_rusted3,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"oa" = (/obj/effect/floor_decal/industrial/warning,/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"op" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"pe" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/random/trash,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"pY" = (/obj/machinery/power/port_gen/pacman,/obj/structure/cable/blue{d2 = 2; icon_state = "0-2"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"qa" = (/obj/structure/table/standard,/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight,/obj/effect/floor_decal/rust/mono_rusted2,/turf/simulated/floor/tiled/dark,/area/submap/BorgLab) +"qW" = (/turf/simulated/floor/plating,/area/submap/BorgLab) +"ra" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"rO" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard{pixel_x = 6},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"rP" = (/obj/machinery/firealarm{dir = 8; pixel_x = -24},/obj/random/junk,/turf/simulated/floor/plating,/area/submap/BorgLab) +"sr" = (/turf/simulated/floor/outdoors/dirt,/area/template_noop) +"sK" = (/obj/structure/closet/crate/secure/loot,/turf/simulated/floor/plating,/area/submap/BorgLab) +"ta" = (/obj/structure/bed/padded,/obj/item/weapon/bedsheet/brown,/obj/machinery/light_construct{dir = 8},/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) +"th" = (/obj/effect/floor_decal/rust,/obj/structure/table,/obj/random/maintenance/research,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"tr" = (/obj/machinery/light_construct/small{dir = 1},/obj/machinery/portable_atmospherics/canister/phoron,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/color_rustedfull,/turf/simulated/floor/plating,/area/submap/BorgLab) +"tx" = (/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"ty" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"tX" = (/obj/effect/wingrille_spawn/reinforced,/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"ub" = (/obj/effect/floor_decal/industrial/warning,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"ug" = (/obj/machinery/door/window/brigdoor/westright{dir = 2; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"uQ" = (/obj/effect/spawner/gibs/human,/obj/random/trash,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"uX" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/structure/closet/crate/secure/loot,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"wq" = (/obj/structure/table/standard,/obj/item/weapon/phone,/obj/effect/floor_decal/rust/mono_rusted2,/turf/simulated/floor/tiled/dark,/area/submap/BorgLab) +"wt" = (/obj/effect/floor_decal/industrial/hatch/yellow,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"xh" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/spawner/gibs/human,/obj/random/trash,/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"xk" = (/obj/structure/sign/warning/caution,/turf/simulated/wall/r_wall,/area/submap/BorgLab) +"xu" = (/obj/machinery/artifact_scanpad,/obj/effect/floor_decal/industrial/warning/corner{dir = 1},/obj/effect/floor_decal/rust/mono_rusted3,/obj/machinery/artifact/predefined/hungry_statue,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"xz" = (/obj/structure/bed,/obj/effect/floor_decal/techfloor/orange{dir = 1},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"xO" = (/obj/effect/decal/cleanable/generic,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"xU" = (/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"yq" = (/obj/structure/grille/broken,/obj/item/weapon/material/shard,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"yz" = (/obj/effect/floor_decal/industrial/warning,/obj/item/weapon/material/shard{pixel_x = -3; pixel_y = -6},/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"yB" = (/obj/random/trash,/mob/living/simple_mob/mechanical/mecha/hoverpod,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"yI" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"yR" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ze" = (/obj/structure/loot_pile/maint/technical,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/BorgLab) +"zk" = (/turf/simulated/floor/tiled,/area/submap/BorgLab) +"As" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"AI" = (/mob/living/simple_mob/mechanical/combat_drone/lesser{faction = "corrupt"},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Bl" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Bq" = (/obj/random/trash,/mob/living/simple_mob/mechanical/mining_drone,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Cf" = (/obj/structure/table/standard,/obj/effect/floor_decal/industrial/warning/corner{dir = 8},/obj/effect/floor_decal/rust,/obj/item/weapon/module/power_control,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Cz" = (/obj/item/stack/material/phoron{amount = 10},/turf/simulated/floor/plating,/area/submap/BorgLab) +"CA" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"CS" = (/obj/effect/floor_decal/rust,/obj/effect/spawner/gibs/robot,/turf/simulated/floor/plating,/area/submap/BorgLab) +"CX" = (/obj/structure/table/standard,/obj/random/junk,/obj/random/trash,/obj/random/maintenance/research,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Dj" = (/obj/structure/table/standard,/obj/item/weapon/reagent_containers/glass/beaker/large,/obj/item/weapon/reagent_containers/dropper,/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Dq" = (/turf/template_noop,/area/submap/BorgLab) +"Ds" = (/obj/effect/floor_decal/rust,/obj/structure/closet/firecloset/full/double,/obj/effect/floor_decal/rust/color_rustedfull,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Dv" = (/obj/structure/toilet,/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled/freezer,/area/submap/BorgLab) +"DF" = (/turf/template_noop,/area/template_noop) +"DW" = (/obj/random/trash,/obj/random/maintenance/research,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Fj" = (/obj/effect/floor_decal/industrial/warning,/obj/item/weapon/material/shard{pixel_y = 10},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Ft" = (/obj/effect/floor_decal/industrial/warning,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Fu" = (/obj/item/weapon/storage/box/beakers,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Fv" = (/obj/structure/table/standard,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/maintenance/research,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Gy" = (/obj/random/maintenance/research,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Gz" = (/mob/living/simple_mob/mechanical/mining_drone,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"GA" = (/obj/machinery/door/airlock/maintenance/common,/turf/simulated/floor/plating,/area/submap/BorgLab) +"GC" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"GS" = (/obj/item/stack/material/gold{amount = 25},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Ic" = (/obj/random/trash,/mob/living/simple_mob/mechanical/mecha/ripley/deathripley,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Jd" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Jh" = (/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard,/obj/effect/floor_decal/rust/mono_rusted3,/obj/random/trash,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Jm" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Jo" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/item/weapon/material/shard{pixel_y = 10},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"Jp" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Jr" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"JZ" = (/obj/effect/floor_decal/industrial/warning/corner,/obj/structure/railing{dir = 1},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"KH" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/item/weapon/material/shard{pixel_y = 10},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"Lr" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/grille/broken,/obj/item/weapon/material/shard{pixel_x = -3; pixel_y = -6},/obj/item/weapon/material/shard{pixel_y = 10},/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"Lz" = (/obj/structure/table/standard,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/trash,/obj/random/maintenance/research,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"LB" = (/obj/item/stack/material/phoron{amount = 10},/obj/random/toolbox,/obj/random/toolbox,/obj/item/weapon/storage/box/lights/mixed,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/item/stack/material/phoron{amount = 10},/obj/structure/table/rack,/turf/simulated/floor/plating,/area/submap/BorgLab) +"LC" = (/obj/effect/spawner/gibs/human,/mob/living/simple_mob/mechanical/mecha/odysseus/murdysseus{faction = "corrupt"},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"MT" = (/obj/machinery/space_heater,/obj/effect/floor_decal/rust,/obj/machinery/light/small/emergency/flicker{dir = 4},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Nb" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Nj" = (/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Nq" = (/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Ns" = (/obj/effect/floor_decal/rust,/obj/effect/spawner/gibs/robot,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Nt" = (/obj/effect/floor_decal/industrial/warning/corner{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/floor_decal/industrial/warning/corner,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Nv" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/mono_rusted3,/obj/effect/floor_decal/industrial/warning{dir = 4},/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"NB" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"NC" = (/obj/structure/grille/broken,/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/structure/window/reinforced{dir = 1},/obj/item/weapon/material/shard,/obj/item/weapon/material/shard{pixel_y = 10},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Oq" = (/obj/effect/floor_decal/rust,/obj/random/trash,/obj/item/stack/material/phoron{amount = 10},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Oz" = (/obj/item/weapon/pickaxe/plasmacutter,/obj/machinery/firealarm{pixel_y = 24},/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"OD" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"OH" = (/obj/effect/wingrille_spawn/reinforced,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"OW" = (/obj/structure/table/standard,/obj/item/device/flashlight/lamp,/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/item/weapon/broken_gun/laserrifle,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Pf" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Qe" = (/obj/effect/map_effect/interval/sound_emitter/energy_gunfight,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Qg" = (/turf/simulated/mineral/ignore_mapgen,/area/template_noop) +"Qn" = (/obj/structure/window/reinforced/tinted/frosted{dir = 4},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Qs" = (/obj/effect/floor_decal/industrial/warning,/obj/machinery/light/small/emergency/flicker,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Qz" = (/obj/effect/floor_decal/rust,/obj/structure/loot_pile/surface/drone,/turf/simulated/floor/plating,/area/submap/BorgLab) +"QW" = (/obj/structure/closet/l3closet/general,/obj/effect/floor_decal/rust,/obj/random/maintenance/medical,/obj/random/maintenance/medical,/obj/random/maintenance/research,/obj/random/maintenance/research,/obj/effect/floor_decal/rust/color_rustedcee,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Rt" = (/obj/effect/floor_decal/industrial/warning{dir = 8},/obj/random/maintenance/research,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"RG" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/BorgLab) +"RL" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) +"RP" = (/turf/simulated/floor/outdoors/dirt,/area/submap/BorgLab) +"Su" = (/obj/effect/floor_decal/techfloor/orange,/obj/item/stack/material/uranium{amount = 15},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Sy" = (/obj/structure/windoor_assembly{dir = 4},/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"SG" = (/obj/effect/floor_decal/industrial/warning/corner{dir = 8},/obj/effect/floor_decal/industrial/warning/corner{dir = 4},/turf/simulated/floor/tiled,/area/submap/BorgLab) +"SZ" = (/obj/effect/floor_decal/techfloor/orange,/obj/structure/loot_pile/surface/bones,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Tj" = (/obj/structure/table/standard,/obj/machinery/chemical_dispenser/full,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Tp" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Tv" = (/obj/effect/floor_decal/sign/a,/turf/simulated/wall/r_wall,/area/submap/BorgLab) +"TD" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"TN" = (/obj/structure/closet/l3closet/virology,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) +"TU" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) +"TW" = (/obj/effect/spawner/gibs/human,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Uj" = (/obj/structure/closet/firecloset/full/double,/obj/effect/floor_decal/rust{pixel_y = 1},/obj/machinery/light/small/emergency/flicker{dir = 1},/obj/random/maintenance,/obj/random/maintenance/medical,/obj/effect/floor_decal/rust/color_rustedcee,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Uy" = (/obj/effect/floor_decal/rust,/obj/random/trash,/obj/random/maintenance/research,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Uz" = (/obj/machinery/shower{dir = 1},/obj/structure/curtain/open/shower,/obj/effect/floor_decal/borderfloorwhite/cee{dir = 1},/obj/item/weapon/soap/nanotrasen,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled/freezer,/area/submap/BorgLab) +"UM" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"UV" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/turf/simulated/floor/plating,/area/submap/BorgLab) +"UW" = (/obj/structure/window/reinforced{dir = 4; health = 1e+006},/obj/structure/window/reinforced{dir = 1},/obj/structure/grille/broken,/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"Vc" = (/obj/effect/floor_decal/industrial/warning,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Vh" = (/obj/effect/floor_decal/industrial/warning,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Vr" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"VH" = (/obj/structure/cable/blue,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/item/frame/apc,/turf/simulated/floor/plating,/area/submap/BorgLab) +"VU" = (/obj/effect/floor_decal/industrial/warning{dir = 1},/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Wh" = (/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/reinforced,/area/submap/BorgLab) +"Wq" = (/obj/effect/floor_decal/rust,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/plating,/area/submap/BorgLab) +"WK" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/item/weapon/broken_gun/laser_retro,/mob/living/simple_mob/mechanical/viscerator/mercenary,/mob/living/simple_mob/mechanical/viscerator/mercenary,/turf/simulated/floor/plating,/area/submap/BorgLab) +"WQ" = (/turf/simulated/wall/r_wall,/area/submap/BorgLab) +"WR" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/industrial/warning/cee{dir = 4},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"XG" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust/mono_rusted3,/obj/effect/spawner/gibs/human,/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Yk" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Yy" = (/obj/structure/table/steel,/obj/item/weapon/coin/phoron,/obj/item/weapon/storage/toolbox/syndicate/powertools,/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/maintenance/research,/obj/random/maintenance/research,/turf/simulated/floor/plating,/area/submap/BorgLab) +"YD" = (/obj/effect/wingrille_spawn/reinforced,/obj/machinery/door/blast/regular{dir = 8; id = "borg"; layer = 3.3; name = "Containment Door"},/turf/simulated/floor/plating,/area/submap/BorgLab) +"YZ" = (/obj/effect/floor_decal/rust,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Za" = (/obj/effect/floor_decal/rust,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"Zc" = (/obj/structure/railing,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Zn" = (/obj/item/device/measuring_tape,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Zq" = (/obj/machinery/door/window/brigdoor/westright{dir = 1; name = "Containment Pen"; req_one_access = list(43,1)},/obj/effect/floor_decal/industrial/hatch/yellow,/obj/effect/decal/cleanable/generic,/obj/machinery/door/blast/regular/open{dir = 4},/turf/simulated/floor/plating,/area/submap/BorgLab) +"Zt" = (/obj/effect/wingrille_spawn/reinforced,/turf/simulated/floor/plating,/area/submap/BorgLab) +"Zy" = (/obj/effect/floor_decal/rust,/obj/effect/floor_decal/rust,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) +"ZO" = (/obj/effect/floor_decal/rust,/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled,/area/submap/BorgLab) -(1,1,1) = {" -DFDFDFDFsrQgQgDFsrDFQgDFDFDFDFDFDFDFDFDFDFDFsrDFDFDFDFDFDFDFDFDF -DFDFQgsrQgQgQgQgQgQgQgDFDFDFDFDFDFDFDFDFDFDFDFsrDFDFQgQgQgQgDFDF -DFDFQgQgQgQgQgQgQgQgQgQgQgDFDFDFDFDFDFDFDFDFQgbLbLQgQgQgQgQgDFDF -DFDFsrQgWQWQWQWQWQWQQgQgQgQgQgDFQgQgQgDFQgQgQgiYbLbLbLRPDqsrDFDF -DFDFsrQgWQpYtrYyLBWQQgQgQgQgQgQgQgQgQgQgQgQgQgRGRGRGDqDqDqDFDFDF -DFsrQgQgWQVHTUOqCzWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGDqRPDFDFDF -DFDFQgWQWQWQWQGAWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGDqDFDFDF -DFDFQgWQmiUjQWQnDvWQaaxzOWWQuXTDNjWQmwTDbYWQpeWKJrWQWQRGRGDFDFDF -DFQgQgWQrPZayISycCWQjfLCnkWQTWGzuQWQTUyBtxWQWhxOWqWQWQWQRGQgDFDF -srQgQgWQtagfbjicUzWQVcJpabWQUVVcUMWQVcODVcWQyzububWQsKWQWQQgDFDF -DFQgQgWQNsZOCAgNWQWQbIugOHWQYDwtyqWQYDmBYDWQJomBYDlzWQWQWQWQWQDF -srQgWQWQZtmfNCWQWQeVRLejPfghyRrarOiiAsAsifacGCVriSNtWQnylJWQZcsr -QgQgWQTjlUCANqOzhWzkNjXGnWLzFvaeJhaftyCSCXththBlYkNvkIYZWRmsQesr -QgQgWQDjkjktdTUyZtJZagnbYZahFtJmYkaiddoaNbQsFjqWVhSGWQTNDsWQgcDF -QgWQxkCfYkfhGyMTWQWQYDneYDcALrneheadUWdKOHmaKHZqtXTvWQWQWQWQWQDF -QgWQjzRtFuZyDWxUqaWQJdajVUWQJdRLopWQgaTpopWQNBopJdWQqWWQWQQgDFDF -QgWQxkxubNdebEZnwqWQtxIctxWQGSBqtxWQbzAItxWQNjxhtxWQWQWQQgDFDFDF -QgQgWQWQWQWQWQWQWQWQSuNjjRWQSZNjcZWQakNjmEWQQzSZalWQWQRGQgDFDFDF -DFQgQgRGRGRGRGRGRGWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGDFsrDFDF -DFsrQgRGRGRGRGRGRGRGWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGRGRPDFsrDF -DFDFDFRGRGRGiYbLRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGzebLRPDFDFDF -DFsrDFRPbLbLbLRPRPDFDFQgQgQgDFQgQgQgQgQgQgRGRGRGRGRPbLbLRPQgDFDF -DFDFDFRPQgQgbLRPDFDFDFDFDFDFDFDFDFDFQgQgDFDFDFDFRPRPRPQgQgQgDFDF -DFDFsrDFQgQgQgDFDFsrDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFQgQgQgDFDF -DFDFDFDFDFDFDFsrDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFsrDFDFDFDFDFDFDF -"} +(1,1,1) = {" +DFDFDFDFsrQgQgDFsrDFQgDFDFDFDFDFDFDFDFDFDFDFsrDFDFDFDFDFDFDFDFDF +DFDFQgsrQgQgQgQgQgQgQgDFDFDFDFDFDFDFDFDFDFDFDFsrDFDFQgQgQgQgDFDF +DFDFQgQgQgQgQgQgQgQgQgQgQgDFDFDFDFDFDFDFDFDFQgbLbLQgQgQgQgQgDFDF +DFDFsrQgWQWQWQWQWQWQQgQgQgQgQgDFQgQgQgDFQgQgQgiYbLbLbLRPDqsrDFDF +DFDFsrQgWQpYtrYyLBWQQgQgQgQgQgQgQgQgQgQgQgQgQgRGRGRGDqDqDqDFDFDF +DFsrQgQgWQVHTUOqCzWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGDqRPDFDFDF +DFDFQgWQWQWQWQGAWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGDqDFDFDF +DFDFQgWQmiUjQWQnDvWQaaxzOWWQuXTDNjWQmwTDbYWQpeWKJrWQWQRGRGDFDFDF +DFQgQgWQrPZayISycCWQjfLCnkWQTWGzuQWQTUyBtxWQWhxOWqWQWQWQRGQgDFDF +srQgQgWQtagfbjicUzWQVcJpabWQUVVcUMWQVcODVcWQyzububWQsKWQWQQgDFDF +DFQgQgWQNsZOCAgNWQWQbIugOHWQYDwtyqWQYDmBYDWQJomBYDlzWQWQWQWQWQDF +srQgWQWQZtmfNCWQWQeVRLejPfghyRrarOiiAsAsifacGCVriSNtWQnylJWQZcsr +QgQgWQTjlUCANqOzhWzkNjXGnWLzFvaeJhaftyCSCXththBlYkNvkIYZWRmsQesr +QgQgWQDjkjktdTUyZtJZagnbYZahFtJmYkaiddoaNbQsFjqWVhSGWQTNDsWQgcDF +QgWQxkCfYkfhGyMTWQWQYDneYDcALrneheadUWdKOHmaKHZqtXTvWQWQWQWQWQDF +QgWQjzRtFuZyDWxUqaWQJdajVUWQJdRLopWQgaTpopWQNBopJdWQqWWQWQQgDFDF +QgWQxkxubNdebEZnwqWQtxIctxWQGSBqtxWQbzAItxWQNjxhtxWQWQWQQgDFDFDF +QgQgWQWQWQWQWQWQWQWQSuNjjRWQSZNjcZWQakNjmEWQQzSZalWQWQRGQgDFDFDF +DFQgQgRGRGRGRGRGRGWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGDFsrDFDF +DFsrQgRGRGRGRGRGRGRGWQWQWQWQWQWQWQWQWQWQWQWQWQWQWQRGRGRGRPDFsrDF +DFDFDFRGRGRGiYbLRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGRGzebLRPDFDFDF +DFsrDFRPbLbLbLRPRPDFDFQgQgQgDFQgQgQgQgQgQgRGRGRGRGRPbLbLRPQgDFDF +DFDFDFRPQgQgbLRPDFDFDFDFDFDFDFDFDFDFQgQgDFDFDFDFRPRPRPQgQgQgDFDF +DFDFsrDFQgQgQgDFDFsrDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFQgQgQgDFDF +DFDFDFDFDFDFDFsrDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFsrDFDFDFDFDFDFDF +"} + diff --git a/maps/submaps/surface_submaps/wilderness/deathden.dmm b/maps/submaps/surface_submaps/wilderness/deathden.dmm index bf2542946f..99de781901 100644 --- a/maps/submaps/surface_submaps/wilderness/deathden.dmm +++ b/maps/submaps/surface_submaps/wilderness/deathden.dmm @@ -22,7 +22,7 @@ "hK" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_y = 6},/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_x = 5; pixel_y = -8},/obj/item/weapon/material/shard,/obj/item/weapon/material/shard{pixel_y = 10},/turf/template_noop,/area/submap/DeathDen) "ig" = (/obj/random/maintenance/cargo,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "is" = (/obj/random/soap,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled/freezer,/area/submap/DeathDen) -"ix" = (/obj/effect/gibspawner/human,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) +"ix" = (/obj/effect/spawner/gibs/human,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "iR" = (/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/turf/template_noop,/area/template_noop) "ji" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_x = 6; pixel_y = 4},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "kc" = (/obj/item/weapon/flame/lighter/zippo/gonzo,/obj/random/trash,/obj/random/junk,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) @@ -40,7 +40,7 @@ "nO" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_x = 6; pixel_y = 4},/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "oj" = (/obj/random/trash,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "oG" = (/obj/item/stack/material/supermatter{amount = 5},/obj/effect/floor_decal/carpet{dir = 4},/obj/item/weapon/scrying,/obj/structure/table/sifwooden_reinforced,/turf/simulated/floor/carpet/turcarpet,/area/submap/DeathDen) -"oI" = (/obj/effect/gibspawner/human,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) +"oI" = (/obj/effect/spawner/gibs/human,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "oL" = (/obj/structure/gravemarker,/obj/random/humanoidremains,/obj/item/clothing/suit/cultrobes/alt{pixel_x = 4; pixel_y = 3},/obj/item/weapon/material/knife/machete,/obj/structure/closet/grave{opened = 0},/turf/template_noop,/area/submap/DeathDen) "oS" = (/obj/structure/gravemarker,/obj/random/humanoidremains,/obj/item/clothing/suit/cultrobes/alt{pixel_x = 4; pixel_y = 3},/obj/item/weapon/material/knife/hook,/obj/structure/closet/grave{opened = 0},/turf/template_noop,/area/submap/DeathDen) "oX" = (/obj/structure/barricade,/obj/structure/grille/broken/rustic,/obj/item/weapon/material/shard,/turf/simulated/floor/tiled/asteroid_steel,/area/submap/DeathDen) @@ -71,7 +71,7 @@ "yn" = (/turf/simulated/floor/outdoors/dirt,/area/template_noop) "yL" = (/obj/structure/table/wooden_reinforced,/obj/item/weapon/flame/candle/everburn,/obj/item/weapon/material/shard{pixel_x = -3; pixel_y = -6},/obj/item/weapon/material/shard{pixel_x = 6; pixel_y = -6},/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "yS" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_x = 6; pixel_y = 4},/obj/effect/floor_decal/carpet{dir = 8},/obj/random/maintenance/engineering,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/carpet/turcarpet,/area/submap/DeathDen) -"yZ" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn,/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_y = 6},/obj/effect/floor_decal/carpet,/obj/effect/gibspawner/human,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/carpet/turcarpet,/area/submap/DeathDen) +"yZ" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn,/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_y = 6},/obj/effect/floor_decal/carpet,/obj/effect/spawner/gibs/human,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/carpet/turcarpet,/area/submap/DeathDen) "zV" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_y = 6},/mob/living/simple_mob/animal/sif/savik,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "An" = (/obj/structure/simple_door/iron,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/DeathDen) "Ap" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/DeathDen) @@ -95,7 +95,7 @@ "Kj" = (/obj/structure/windoor_assembly,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/tiled/freezer,/area/submap/DeathDen) "Kn" = (/obj/effect/floor_decal/carpet{dir = 1},/turf/simulated/floor/carpet/turcarpet,/area/submap/DeathDen) "Ky" = (/obj/structure/table/bench/wooden,/turf/simulated/floor/wood/sif/broken,/area/submap/DeathDen) -"KG" = (/mob/living/simple_mob/humanoid/clown,/obj/effect/gibspawner/human,/turf/simulated/floor/tiled/freezer,/area/submap/DeathDen) +"KG" = (/mob/living/simple_mob/humanoid/clown,/obj/effect/spawner/gibs/human,/turf/simulated/floor/tiled/freezer,/area/submap/DeathDen) "MO" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/DeathDen) "Nu" = (/obj/structure/bed/chair/wood{dir = 4},/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "Oh" = (/obj/structure/gravemarker,/obj/structure/closet/grave{opened = 0},/obj/random/humanoidremains,/obj/item/clothing/suit/cultrobes/alt{pixel_x = 4; pixel_y = 3},/obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial,/turf/template_noop,/area/submap/DeathDen) @@ -113,7 +113,7 @@ "Uj" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_y = 6},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif/broken,/area/submap/DeathDen) "Up" = (/obj/structure/windoor_assembly,/obj/random/trash,/mob/living/simple_mob/animal/sif/savik,/turf/simulated/floor/tiled/freezer,/area/submap/DeathDen) "UR" = (/obj/item/weapon/stool/padded,/obj/item/clothing/suit/cultrobes/magusred,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) -"WH" = (/obj/effect/gibspawner/human,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) +"WH" = (/obj/effect/spawner/gibs/human,/obj/random/junk,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "Ym" = (/obj/structure/simple_door/sifwood,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/submap/DeathDen) "Zb" = (/obj/item/weapon/reagent_containers/food/snacks/candy_corn{pixel_x = 5; pixel_y = -8},/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) "Zg" = (/obj/random/trash,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood/sif,/area/submap/DeathDen) diff --git a/maps/submaps/surface_submaps/wilderness/demonpool.dmm b/maps/submaps/surface_submaps/wilderness/demonpool.dmm index b76c1ba1f2..16977a543a 100644 --- a/maps/submaps/surface_submaps/wilderness/demonpool.dmm +++ b/maps/submaps/surface_submaps/wilderness/demonpool.dmm @@ -102,7 +102,7 @@ /turf/simulated/floor/outdoors/dirt, /area/submap/DemonPool) "hF" = ( -/obj/effect/gibspawner/human, +/obj/effect/spawner/gibs/human, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/outdoors/dirt{ @@ -143,7 +143,7 @@ /turf/simulated/floor/outdoors/dirt, /area/template_noop) "jG" = ( -/obj/effect/gibspawner/human, +/obj/effect/spawner/gibs/human, /obj/effect/rune, /turf/simulated/floor/cult, /area/submap/DemonPool) @@ -199,7 +199,7 @@ }, /area/submap/DemonPool) "mO" = ( -/obj/effect/gibspawner/human, +/obj/effect/spawner/gibs/human, /obj/item/clothing/head/culthood/alt, /turf/simulated/floor/cult, /area/submap/DemonPool) @@ -398,7 +398,7 @@ }, /area/submap/DemonPool) "CY" = ( -/obj/effect/gibspawner/human, +/obj/effect/spawner/gibs/human, /turf/simulated/floor/outdoors/rocks{ outdoors = 0 }, @@ -475,7 +475,7 @@ }, /area/submap/DemonPool) "KR" = ( -/obj/effect/gibspawner/human, +/obj/effect/spawner/gibs/human, /turf/simulated/floor/cult, /area/submap/DemonPool) "Lh" = ( @@ -512,7 +512,7 @@ }, /area/submap/DemonPool) "NI" = ( -/obj/effect/gibspawner/human, +/obj/effect/spawner/gibs/human, /obj/fire, /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/cult, @@ -641,7 +641,7 @@ /turf/simulated/floor, /area/submap/DemonPool) "Zc" = ( -/obj/effect/gibspawner/human, +/obj/effect/spawner/gibs/human, /obj/item/weapon/beartrap/hunting{ anchored = 1; deployed = 1 diff --git a/maps/submaps/surface_submaps/wilderness/derelictengine.dmm b/maps/submaps/surface_submaps/wilderness/derelictengine.dmm index c7b101b031..870f4a1587 100644 --- a/maps/submaps/surface_submaps/wilderness/derelictengine.dmm +++ b/maps/submaps/surface_submaps/wilderness/derelictengine.dmm @@ -63,7 +63,7 @@ "iB" = (/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) "iF" = (/obj/effect/floor_decal/techfloor{dir = 8},/mob/living/simple_mob/mechanical/hivebot/tank/armored/anti_laser,/obj/effect/floor_decal/techfloor/hole/right{dir = 8},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "iK" = (/obj/structure/prop/alien/computer/camera,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) -"iO" = (/obj/effect/gibspawner/robot,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) +"iO" = (/obj/effect/spawner/gibs/robot,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "iQ" = (/obj/item/trash/material/metal,/turf/simulated/floor/plating,/area/submap/DerelictEngine) "iW" = (/obj/effect/floor_decal/techfloor{dir = 4},/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) "iZ" = (/obj/effect/floor_decal/techfloor{dir = 8},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) @@ -81,7 +81,7 @@ "lj" = (/obj/machinery/artifact,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "lr" = (/obj/structure/prop/alien/dispenser{pixel_x = -27},/obj/effect/floor_decal/techfloor{dir = 4},/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "ls" = (/obj/item/weapon/surgical/circular_saw/alien,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) -"lD" = (/obj/effect/floor_decal/techfloor{dir = 8},/obj/effect/gibspawner/human,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) +"lD" = (/obj/effect/floor_decal/techfloor{dir = 8},/obj/effect/spawner/gibs/human,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "lV" = (/obj/effect/floor_decal/techfloor{dir = 9},/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "lX" = (/obj/item/weapon/material/shard/phoron{pixel_x = -9; pixel_y = -7},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "lY" = (/obj/structure/bed/alien,/obj/effect/decal/remains/xeno,/obj/effect/floor_decal/techfloor/orange{dir = 4},/obj/effect/floor_decal/techfloor/orange{dir = 8},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) @@ -177,7 +177,7 @@ "yB" = (/obj/structure/closet/alien,/obj/item/prop/alien/junk,/obj/item/weapon/tool/crowbar/alien,/obj/item/weapon/tool/wirecutters/alien,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "yE" = (/obj/effect/floor_decal/techfloor/orange{dir = 4},/obj/structure/cable/green{d1 = 1; d2 = 8; icon_state = "1-8"},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "yQ" = (/obj/effect/floor_decal/techfloor/orange{dir = 8},/obj/effect/floor_decal/techfloor/orange{dir = 4},/mob/living/simple_mob/mechanical/hivebot/ranged_damage/rapid,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) -"yZ" = (/obj/effect/floor_decal/techfloor{dir = 4},/obj/effect/gibspawner/robot,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) +"yZ" = (/obj/effect/floor_decal/techfloor{dir = 4},/obj/effect/spawner/gibs/robot,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "zb" = (/obj/structure/prop/alien/pod/open,/obj/structure/prop/alien/pod/open,/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) "zd" = (/obj/structure/particle_accelerator/particle_emitter/right{anchored = 1; dir = 4},/obj/effect/floor_decal/techfloor/orange/corner{dir = 8},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "zf" = (/obj/structure/cable/green{d2 = 4; icon_state = "0-4"},/obj/machinery/power/tesla_coil/pre_mapped,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) @@ -201,7 +201,7 @@ "Bo" = (/obj/effect/floor_decal/techfloor{dir = 4},/obj/item/weapon/gun/energy/sniperrifle,/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) "Bs" = (/obj/effect/floor_decal/techfloor/orange{dir = 8},/obj/effect/decal/cleanable/ash,/turf/simulated/floor/plating,/area/submap/DerelictEngine) "Bz" = (/obj/structure/shuttle/engine/propulsion/burst,/turf/simulated/floor/outdoors/rocks,/area/submap/DerelictEngine) -"BG" = (/obj/effect/gibspawner/human,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) +"BG" = (/obj/effect/spawner/gibs/human,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "BR" = (/obj/machinery/door/airlock/alien/locked,/turf/simulated/shuttle/floor/voidcraft,/area/submap/DerelictEngine) "BX" = (/obj/structure/cable/green{d2 = 4; icon_state = "0-4"},/obj/machinery/power/tesla_coil/pre_mapped,/obj/effect/decal/cleanable/ash,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "Cl" = (/obj/effect/floor_decal/techfloor{dir = 8},/obj/machinery/giga_drill,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) @@ -237,7 +237,7 @@ "GU" = (/obj/machinery/fusion_fuel_injector/mapped{dir = 8},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "Hb" = (/obj/effect/floor_decal/techfloor{dir = 9},/mob/living/simple_mob/mechanical/hivebot/tank/meatshield,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "Hi" = (/obj/structure/prop/alien/pod/open,/obj/effect/floor_decal/techfloor/orange{dir = 10},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) -"HE" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/effect/floor_decal/techfloor/hole/right{dir = 1},/obj/effect/gibspawner/human,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) +"HE" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/effect/floor_decal/techfloor/hole/right{dir = 1},/obj/effect/spawner/gibs/human,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "HH" = (/obj/effect/floor_decal/techfloor/orange{dir = 1},/obj/effect/decal/cleanable/ash,/turf/simulated/floor/plating,/area/submap/DerelictEngine) "HL" = (/obj/effect/floor_decal/techfloor/orange,/obj/effect/decal/cleanable/molten_item,/turf/simulated/floor/plating,/area/submap/DerelictEngine) "HS" = (/turf/simulated/floor/greengrid,/area/submap/DerelictEngine) @@ -254,7 +254,7 @@ "IV" = (/obj/effect/floor_decal/techfloor/orange{dir = 9},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "Ja" = (/obj/machinery/fusion_fuel_injector/mapped{dir = 4},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "Je" = (/obj/effect/floor_decal/techfloor{dir = 4},/obj/random/mob/robotic/hivebot,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) -"Jg" = (/obj/effect/gibspawner/human,/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) +"Jg" = (/obj/effect/spawner/gibs/human,/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) "Ji" = (/obj/effect/floor_decal/techfloor/orange{dir = 10},/obj/effect/decal/cleanable/generic,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "Jm" = (/obj/structure/cable/green{d1 = 1; d2 = 8; icon_state = "1-8"},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/effect/decal/cleanable/ash,/turf/simulated/floor/plating,/area/submap/DerelictEngine) "JG" = (/obj/effect/floor_decal/techfloor{dir = 4},/obj/structure/particle_accelerator/particle_emitter/right{dir = 8},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) @@ -309,7 +309,7 @@ "SF" = (/turf/template_noop,/area/template_noop) "ST" = (/obj/effect/floor_decal/techfloor/orange{dir = 8},/obj/effect/floor_decal/techfloor/orange{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/item/prop/alien/junk,/obj/structure/table/alien,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "SV" = (/mob/living/simple_mob/mechanical/hivebot/ranged_damage/rapid,/obj/effect/floor_decal/techfloor{dir = 4},/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) -"SW" = (/obj/effect/gibspawner/robot,/turf/simulated/floor/outdoors/rocks,/area/template_noop) +"SW" = (/obj/effect/spawner/gibs/robot,/turf/simulated/floor/outdoors/rocks,/area/template_noop) "Tt" = (/turf/simulated/floor/outdoors/dirt,/area/template_noop) "Tz" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/item/trash/material/metal,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "TB" = (/obj/structure/bed/alien,/obj/effect/decal/remains/xeno,/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) @@ -324,7 +324,7 @@ "Um" = (/obj/structure/bed/alien,/obj/effect/decal/remains/xeno,/obj/effect/floor_decal/techfloor{dir = 8},/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "Uv" = (/obj/effect/floor_decal/industrial/warning/full,/obj/structure/prop/lock/projectile{pixel_y = 6},/turf/simulated/floor/greengrid,/area/submap/DerelictEngine) "Uw" = (/obj/structure/particle_accelerator/fuel_chamber{dir = 8},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) -"UQ" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/effect/decal/cleanable/generic,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/gibspawner/human,/turf/simulated/floor/plating,/area/submap/DerelictEngine) +"UQ" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/effect/decal/cleanable/generic,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/spawner/gibs/human,/turf/simulated/floor/plating,/area/submap/DerelictEngine) "UV" = (/obj/structure/table/alien,/obj/effect/floor_decal/techfloor/orange{dir = 8},/obj/effect/floor_decal/techfloor/orange{dir = 4},/obj/item/weapon/gun/energy/alien,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "UW" = (/obj/effect/floor_decal/techfloor/orange/corner{dir = 1},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/green{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor/plating,/area/submap/DerelictEngine) "UZ" = (/obj/item/clothing/accessory/medal/dungeon/alien_ufo{desc = "It vaguely like a star. It looks like something an alien admiral might've worn. Probably."; name = "alien admiral's medal"},/obj/item/weapon/telecube/precursor/mated/zone,/obj/item/clothing/head/helmet/alien/tank,/obj/structure/table/alien,/turf/simulated/floor/greengrid,/area/submap/DerelictEngine) @@ -333,7 +333,7 @@ "Vk" = (/obj/item/weapon/oar{desc = "Used to provide propulsion to a space ship."; force = 50; name = "Alien oar"; throw_range = 10; throw_speed = 5; throwforce = 30},/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) "Vn" = (/obj/machinery/porta_turret/alien{faction = "hivebot"},/turf/simulated/shuttle/floor/alienplating/external,/area/submap/DerelictEngine) "Vs" = (/mob/living/simple_mob/mechanical/hivebot/tank/armored,/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) -"Vy" = (/obj/effect/gibspawner/robot,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) +"Vy" = (/obj/effect/spawner/gibs/robot,/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "VA" = (/obj/structure/loot_pile/surface/alien/medical,/turf/simulated/shuttle/floor/alien,/area/submap/DerelictEngine) "VP" = (/obj/machinery/particle_accelerator/control_box{anchored = 1},/obj/effect/floor_decal/techfloor/orange{dir = 1},/turf/simulated/floor/tiled/techfloor,/area/submap/DerelictEngine) "VQ" = (/turf/simulated/floor/plating,/area/submap/DerelictEngine) diff --git a/maps/submaps/surface_submaps/wilderness/wolfden.dmm b/maps/submaps/surface_submaps/wilderness/wolfden.dmm index 5b510161b6..1cd95c22bb 100644 --- a/maps/submaps/surface_submaps/wilderness/wolfden.dmm +++ b/maps/submaps/surface_submaps/wilderness/wolfden.dmm @@ -1,6 +1,6 @@ "a" = (/turf/simulated/floor/outdoors/dirt,/area/submap/WolfDen) "b" = (/mob/living/simple_mob/animal/sif/shantak,/turf/template_noop,/area/submap/WolfDen) -"c" = (/obj/item/weapon/bone,/obj/effect/decal/cleanable/dirt,/obj/effect/gibspawner/human,/obj/random/maintenance/engineering,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/WolfDen) +"c" = (/obj/item/weapon/bone,/obj/effect/decal/cleanable/dirt,/obj/effect/spawner/gibs/human,/obj/random/maintenance/engineering,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/WolfDen) "e" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/random/junk,/obj/random/maintenance/cargo,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/WolfDen) "i" = (/obj/random/maintenance/security,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/WolfDen) "j" = (/obj/random/gun/random,/obj/random/junk,/turf/simulated/floor/outdoors/rocks{outdoors = 0},/area/submap/WolfDen) diff --git a/maps/submaps/surface_submaps/wilderness/xenohive.dmm b/maps/submaps/surface_submaps/wilderness/xenohive.dmm index 901e79b762..6215391c64 100644 --- a/maps/submaps/surface_submaps/wilderness/xenohive.dmm +++ b/maps/submaps/surface_submaps/wilderness/xenohive.dmm @@ -14,7 +14,7 @@ "gS" = (/obj/effect/alien/resin/wall,/turf/simulated/mineral/ignore_mapgen,/area/template_noop) "hx" = (/obj/effect/alien/weeds,/obj/machinery/telecomms/broadcaster,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor,/area/submap/XenoHive) "im" = (/obj/item/stack/animalhide/xeno,/obj/effect/alien/weeds,/obj/structure/table/rack,/turf/simulated/floor/outdoors/rocks{outdoors = 0},/area/submap/XenoHive) -"iF" = (/obj/structure/bed/chair{dir = 8},/obj/effect/alien/weeds,/obj/effect/gibspawner/human,/turf/simulated/floor/tiled/steel_dirty,/area/submap/XenoHive) +"iF" = (/obj/structure/bed/chair{dir = 8},/obj/effect/alien/weeds,/obj/effect/spawner/gibs/human,/turf/simulated/floor/tiled/steel_dirty,/area/submap/XenoHive) "iJ" = (/obj/effect/alien/weeds,/obj/effect/alien/weeds,/obj/machinery/light/small/emergency/flicker{dir = 1},/turf/simulated/floor,/area/submap/XenoHive) "jY" = (/mob/living/simple_mob/animal/space/alien/queen/empress,/obj/effect/alien/weeds,/turf/simulated/floor,/area/submap/XenoHive) "kl" = (/obj/effect/alien/weeds,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/XenoHive) @@ -44,10 +44,10 @@ "AA" = (/obj/effect/alien/resin/wall,/obj/effect/alien/weeds,/turf/simulated/mineral/ignore_mapgen,/area/submap/XenoHive) "AB" = (/obj/effect/alien/resin/wall,/turf/simulated/mineral/ignore_mapgen,/area/submap/XenoHive) "BD" = (/obj/effect/alien/resin/membrane,/obj/effect/alien/weeds,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/XenoHive) -"Cb" = (/obj/structure/bed/chair,/obj/effect/alien/weeds,/obj/effect/gibspawner/human,/turf/simulated/floor/tiled/steel_dirty,/area/submap/XenoHive) +"Cb" = (/obj/structure/bed/chair,/obj/effect/alien/weeds,/obj/effect/spawner/gibs/human,/turf/simulated/floor/tiled/steel_dirty,/area/submap/XenoHive) "Ce" = (/obj/effect/alien/weeds,/obj/random/maintenance/security,/obj/random/maintenance/security,/obj/random/maintenance/security,/obj/item/organ/internal/eyes/replicant,/obj/structure/safe,/obj/random/multiple/gun/projectile/rifle,/obj/random/contraband,/turf/simulated/floor,/area/submap/XenoHive) "CR" = (/obj/effect/alien/resin/wall,/turf/simulated/floor/outdoors/dirt,/area/template_noop) -"De" = (/obj/effect/alien/weeds,/obj/effect/gibspawner/human,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/XenoHive) +"De" = (/obj/effect/alien/weeds,/obj/effect/spawner/gibs/human,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/XenoHive) "Dh" = (/mob/living/simple_mob/animal/space/alien/sentinel,/obj/effect/alien/weeds,/turf/simulated/floor/outdoors/dirt{outdoors = 0},/area/submap/XenoHive) "Et" = (/turf/simulated/mineral/ignore_mapgen,/area/submap/XenoHive) "FE" = (/mob/living/simple_mob/animal/space/alien/drone,/obj/effect/alien/weeds,/turf/simulated/floor,/area/submap/XenoHive) diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 7c812add6b..4b8131e36e 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -113,7 +113,7 @@ var/list/all_maps = list() var/list/unit_test_z_levels //To test more than Z1, set your z-levels to test here. var/list/planet_datums_to_make = list() // Types of `/datum/planet`s that will be instantiated by SSPlanets. - + /datum/map/New() ..() if(zlevel_datum_type) @@ -270,15 +270,19 @@ var/list/all_maps = list() var/turf/base_turf // Type path of the base turf for this z var/transit_chance = 0 // Percentile chance this z will be chosen for map-edge space transit. -// Holomaps + // Holomaps var/holomap_offset_x = -1 // Number of pixels to offset the map right (for centering) for this z var/holomap_offset_y = -1 // Number of pixels to offset the map up (for centering) for this z var/holomap_legend_x = 96 // x position of the holomap legend for this z var/holomap_legend_y = 96 // y position of the holomap legend for this z -// Skybox + // Skybox var/datum/skybox_settings/custom_skybox // Can override skybox type here for this z + // List of regions for GameMaster events + var/list/event_regions = list() + + // Default constructor applies itself to the parent map datum /datum/map_z_level/New(var/datum/map/map) if(!z) return diff --git a/polaris.dme b/polaris.dme index e61b166efc..c6d2470fd3 100644 --- a/polaris.dme +++ b/polaris.dme @@ -36,6 +36,7 @@ #include "code\__defines\crafting.dm" #include "code\__defines\damage_organs.dm" #include "code\__defines\dna.dm" +#include "code\__defines\events.dm" #include "code\__defines\flags.dm" #include "code\__defines\gamemode.dm" #include "code\__defines\holomap.dm" @@ -294,7 +295,6 @@ #include "code\datums\components\crafting\crafting.dm" #include "code\datums\components\crafting\crafting_external.dm" #include "code\datums\components\crafting\recipes.dm" -#include "code\datums\components\crafting\tool_quality.dm" #include "code\datums\elements\_element.dm" #include "code\datums\game_masters\_common.dm" #include "code\datums\game_masters\default.dm" @@ -916,13 +916,9 @@ #include "code\game\objects\structures.dm" #include "code\game\objects\weapons.dm" #include "code\game\objects\effects\bump_teleporter.dm" -#include "code\game\objects\effects\effect_system.dm" -#include "code\game\objects\effects\explosion_particles.dm" -#include "code\game\objects\effects\gibs.dm" #include "code\game\objects\effects\glowshroom.dm" #include "code\game\objects\effects\item_pickup_ghost.dm" #include "code\game\objects\effects\landmarks.dm" -#include "code\game\objects\effects\manifest.dm" #include "code\game\objects\effects\mines.dm" #include "code\game\objects\effects\misc.dm" #include "code\game\objects\effects\overlays.dm" @@ -960,7 +956,7 @@ #include "code\game\objects\effects\prop\columnblast.dm" #include "code\game\objects\effects\prop\snake.dm" #include "code\game\objects\effects\spawners\bombspawner.dm" -#include "code\game\objects\effects\spawners\gibspawner.dm" +#include "code\game\objects\effects\spawners\gibs.dm" #include "code\game\objects\effects\spawners\graffiti.dm" #include "code\game\objects\effects\temporary_visuals\miscellaneous.dm" #include "code\game\objects\effects\temporary_visuals\temporary_visual.dm" @@ -1189,11 +1185,6 @@ #include "code\game\objects\items\weapons\tanks\jetpack.dm" #include "code\game\objects\items\weapons\tanks\tank_types.dm" #include "code\game\objects\items\weapons\tanks\tanks.dm" -#include "code\game\objects\items\weapons\tools\crowbar.dm" -#include "code\game\objects\items\weapons\tools\screwdriver.dm" -#include "code\game\objects\items\weapons\tools\weldingtool.dm" -#include "code\game\objects\items\weapons\tools\wirecutters.dm" -#include "code\game\objects\items\weapons\tools\wrench.dm" #include "code\game\objects\random\_random.dm" #include "code\game\objects\random\guns_and_ammo.dm" #include "code\game\objects\random\maintenance.dm" @@ -1757,6 +1748,13 @@ #include "code\modules\economy\TradeDestinations.dm" #include "code\modules\economy\vending.dm" #include "code\modules\economy\vending_machines.dm" +#include "code\modules\effects\vfx\_effect_system.dm" +#include "code\modules\effects\vfx\explosion.dm" +#include "code\modules\effects\vfx\explosion_particles.dm" +#include "code\modules\effects\vfx\ion_trail.dm" +#include "code\modules\effects\vfx\smoke.dm" +#include "code\modules\effects\vfx\sparks.dm" +#include "code\modules\effects\vfx\steam.dm" #include "code\modules\emotes\emote_define.dm" #include "code\modules\emotes\emote_mob.dm" #include "code\modules\emotes\definitions\_mob.dm" @@ -1902,7 +1900,7 @@ #include "code\modules\gamemaster\event2\events\engineering\dust.dm" #include "code\modules\gamemaster\event2\events\engineering\gas_leak.dm" #include "code\modules\gamemaster\event2\events\engineering\grid_check.dm" -#include "code\modules\gamemaster\event2\events\engineering\meteor_defense.dm" +#include "code\modules\gamemaster\event2\events\engineering\space_meteor_defense.dm" #include "code\modules\gamemaster\event2\events\engineering\spacevine.dm" #include "code\modules\gamemaster\event2\events\engineering\wallrot.dm" #include "code\modules\gamemaster\event2\events\engineering\window_break.dm" @@ -3121,6 +3119,13 @@ #include "code\modules\tgui\states\physical.dm" #include "code\modules\tgui\states\self.dm" #include "code\modules\tgui\states\zlevel.dm" +#include "code\modules\tools\tool_quality.dm" +#include "code\modules\tools\tools\combitool.dm" +#include "code\modules\tools\tools\crowbar.dm" +#include "code\modules\tools\tools\screwdriver.dm" +#include "code\modules\tools\tools\weldingtool.dm" +#include "code\modules\tools\tools\wirecutters.dm" +#include "code\modules\tools\tools\wrench.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\turbolift\_turbolift.dm" #include "code\modules\turbolift\turbolift.dm" diff --git a/sound/effects/weather/indoorrain_end.ogg b/sound/effects/weather/indoorrain_end.ogg new file mode 100644 index 0000000000..c82039d95b Binary files /dev/null and b/sound/effects/weather/indoorrain_end.ogg differ diff --git a/sound/effects/weather/indoorrain_mid.ogg b/sound/effects/weather/indoorrain_mid.ogg new file mode 100644 index 0000000000..60ab5f1624 Binary files /dev/null and b/sound/effects/weather/indoorrain_mid.ogg differ diff --git a/sound/effects/weather/indoorrain_start.ogg b/sound/effects/weather/indoorrain_start.ogg new file mode 100644 index 0000000000..23165836a1 Binary files /dev/null and b/sound/effects/weather/indoorrain_start.ogg differ diff --git a/sound/machines/closet/closet_close.ogg b/sound/machines/closet/closet_close.ogg new file mode 100644 index 0000000000..124f5d85f5 Binary files /dev/null and b/sound/machines/closet/closet_close.ogg differ diff --git a/sound/machines/closet/closet_open.ogg b/sound/machines/closet/closet_open.ogg new file mode 100644 index 0000000000..86cbcea0d0 Binary files /dev/null and b/sound/machines/closet/closet_open.ogg differ diff --git a/sound/machines/closet/closet_wood_close.ogg b/sound/machines/closet/closet_wood_close.ogg new file mode 100644 index 0000000000..b315c0d97c Binary files /dev/null and b/sound/machines/closet/closet_wood_close.ogg differ diff --git a/sound/machines/closet/closet_wood_open.ogg b/sound/machines/closet/closet_wood_open.ogg new file mode 100644 index 0000000000..4657581ff2 Binary files /dev/null and b/sound/machines/closet/closet_wood_open.ogg differ diff --git a/sound/machines/closet/crate_close.ogg b/sound/machines/closet/crate_close.ogg new file mode 100644 index 0000000000..5371e97ea6 Binary files /dev/null and b/sound/machines/closet/crate_close.ogg differ diff --git a/sound/machines/closet/crate_open.ogg b/sound/machines/closet/crate_open.ogg new file mode 100644 index 0000000000..cd4c88161d Binary files /dev/null and b/sound/machines/closet/crate_open.ogg differ diff --git a/sound/mecha/mech_enter.ogg b/sound/mecha/mech_enter.ogg new file mode 100644 index 0000000000..768ffec745 Binary files /dev/null and b/sound/mecha/mech_enter.ogg differ diff --git a/sound/mecha/mech_exit.ogg b/sound/mecha/mech_exit.ogg new file mode 100644 index 0000000000..3218525842 Binary files /dev/null and b/sound/mecha/mech_exit.ogg differ diff --git a/sound/weapons/Gunshot_phase.ogg b/sound/weapons/Gunshot_phase.ogg new file mode 100644 index 0000000000..abfe12c0d9 Binary files /dev/null and b/sound/weapons/Gunshot_phase.ogg differ diff --git a/sound/weapons/mech_autocannon.ogg b/sound/weapons/mech_autocannon.ogg new file mode 100644 index 0000000000..bce835541f Binary files /dev/null and b/sound/weapons/mech_autocannon.ogg differ diff --git a/sound/weapons/mech_mortar.ogg b/sound/weapons/mech_mortar.ogg new file mode 100644 index 0000000000..de4e827e66 Binary files /dev/null and b/sound/weapons/mech_mortar.ogg differ diff --git a/sound/weapons/mech_shotgun.ogg b/sound/weapons/mech_shotgun.ogg new file mode 100644 index 0000000000..04b9cb0a5a Binary files /dev/null and b/sound/weapons/mech_shotgun.ogg differ