mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 13:46:53 +01:00
Merge pull request #8384 from Atermonera/cynosure_map
Updates Cynosure map to master
This commit is contained in:
@@ -160,8 +160,8 @@ Pipelines + Other Objects -> Pipe network
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
if((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// Deconstruct into a pipe item.
|
||||
/obj/machinery/atmospherics/proc/deconstruct()
|
||||
@@ -228,3 +228,21 @@ Pipelines + Other Objects -> Pipe network
|
||||
// pixel_x = PIPE_PIXEL_OFFSET_X(piping_layer)
|
||||
// pixel_y = PIPE_PIXEL_OFFSET_Y(piping_layer)
|
||||
// layer = initial(layer) + PIPE_LAYER_OFFSET(piping_layer)
|
||||
|
||||
/obj/machinery/atmospherics/default_deconstruction_wrench(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return FALSE
|
||||
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warnng'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
|
||||
else
|
||||
playsound(src, W.usesound, 50, 1, preference = /datum/client_preference/pickup_sounds)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
add_fingerprint(user)
|
||||
return TRUE
|
||||
@@ -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.", \
|
||||
|
||||
@@ -279,23 +279,12 @@
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (unlocked)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
#undef REGULATE_NONE
|
||||
#undef REGULATE_INPUT
|
||||
|
||||
@@ -240,20 +240,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && use_power)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
@@ -80,21 +80,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(!W.is_wrench())
|
||||
if(!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
/obj/machinery/atmospherics/omni/attack_hand(user as mob)
|
||||
if(..())
|
||||
|
||||
@@ -147,22 +147,11 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if(!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (connected_device)
|
||||
if(connected_device)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], dettach \the [connected_device] first.</span>")
|
||||
return 1
|
||||
if (locate(/obj/machinery/portable_atmospherics, src.loc))
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
if(locate(/obj/machinery/portable_atmospherics, src.loc))
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
@@ -52,20 +52,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
// Housekeeping and pipe network stuff below
|
||||
/obj/machinery/atmospherics/trinary/get_neighbor_nodes_for_init()
|
||||
|
||||
@@ -327,23 +327,13 @@
|
||||
go_to_side()
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if(!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (istype(src, /obj/machinery/atmospherics/tvalve/digital))
|
||||
if(istype(src, /obj/machinery/atmospherics/tvalve/digital))
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it's too complicated.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warnng'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/mirrored
|
||||
icon_state = "map_tvalvem0"
|
||||
|
||||
@@ -67,21 +67,10 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && !T.is_plating())
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
|
||||
return 1
|
||||
if (!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
@@ -161,14 +161,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>Now welding the vent.</span>")
|
||||
if(do_after(user, 20 * WT.toolspeed))
|
||||
if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.isOn()) return
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(!welded)
|
||||
@@ -416,27 +416,16 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && use_power)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
var/turf/T = src.loc
|
||||
if (node && node.level==1 && isturf(T) && !T.is_plating())
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
#undef DEFAULT_PRESSURE_DELTA
|
||||
|
||||
|
||||
@@ -264,27 +264,17 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && use_power)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
var/turf/T = src.loc
|
||||
if (node && node.level==1 && isturf(T) && !T.is_plating())
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/datum/pipe_network/network_node2
|
||||
|
||||
/obj/machinery/atmospherics/valve/open
|
||||
open = 1
|
||||
open = TRUE
|
||||
icon_state = "map_valve1"
|
||||
|
||||
/obj/machinery/atmospherics/valve/update_icon(animation)
|
||||
@@ -61,7 +61,7 @@
|
||||
network_node1 = new_network
|
||||
|
||||
if(new_network.normal_members.Find(src))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
new_network.normal_members += src
|
||||
|
||||
@@ -89,9 +89,10 @@
|
||||
node2 = null
|
||||
|
||||
/obj/machinery/atmospherics/valve/proc/open()
|
||||
if(open) return 0
|
||||
if(open)
|
||||
return FALSE
|
||||
|
||||
open = 1
|
||||
open = TRUE
|
||||
update_icon()
|
||||
|
||||
if(network_node1&&network_node2)
|
||||
@@ -99,17 +100,17 @@
|
||||
network_node2 = network_node1
|
||||
|
||||
if(network_node1)
|
||||
network_node1.update = 1
|
||||
network_node1.update = TRUE
|
||||
else if(network_node2)
|
||||
network_node2.update = 1
|
||||
network_node2.update = TRUE
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/valve/proc/close()
|
||||
if(!open)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
open = 0
|
||||
open = FALSE
|
||||
update_icon()
|
||||
|
||||
if(network_node1)
|
||||
@@ -119,7 +120,7 @@
|
||||
|
||||
build_network()
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/valve/proc/normalize_dir()
|
||||
if(dir==3)
|
||||
@@ -141,9 +142,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/valve/process()
|
||||
..()
|
||||
. = PROCESS_KILL
|
||||
|
||||
return
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/valve/atmos_init()
|
||||
normalize_dir()
|
||||
@@ -199,7 +198,7 @@
|
||||
if(network_node2 == old_network)
|
||||
network_node2 = new_network
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/valve/return_network_air(datum/pipe_network/reference)
|
||||
return null
|
||||
@@ -229,7 +228,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/Destroy()
|
||||
unregister_radio(src, frequency)
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -240,20 +239,20 @@
|
||||
if(!src.allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/open
|
||||
open = 1
|
||||
open = TRUE
|
||||
icon_state = "map_valve1"
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/power_change()
|
||||
var/old_stat = stat
|
||||
..()
|
||||
. = ..()
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/update_icon()
|
||||
..()
|
||||
. = ..()
|
||||
if(!powered())
|
||||
icon_state = "valve[open]nopower"
|
||||
|
||||
@@ -270,7 +269,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
switch(signal.data["command"])
|
||||
if("valve_open")
|
||||
@@ -286,25 +285,16 @@
|
||||
close()
|
||||
else
|
||||
open()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(user, W)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/valve/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -114,26 +114,17 @@
|
||||
return ..()
|
||||
|
||||
if(istype(W,/obj/item/device/pipe_painter))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (!W.is_wrench())
|
||||
if (!W.get_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && !T.is_plating())
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 10 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
return default_deconstruction_wrench(W, user)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/change_color(var/new_color)
|
||||
//only pass valid pipe colors please ~otherwise your pipe will turn invisible
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/proc/burst()
|
||||
src.visible_message("<span class='danger'>\The [src] bursts!</span>");
|
||||
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)
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
+19
-3
@@ -12,10 +12,26 @@
|
||||
#define TOOL_RETRACTOR "retractor"
|
||||
#define TOOL_HEMOSTAT "hemostat"
|
||||
#define TOOL_CAUTERY "cautery"
|
||||
#define TOOL_DRILL "drill"
|
||||
#define TOOL_SDRILL "surgical_drill"
|
||||
#define TOOL_SCALPEL "scalpel"
|
||||
#define TOOL_SAW "saw"
|
||||
#define TOOL_CSAW "circ_saw"
|
||||
#define TOOL_BONESET "bonesetter"
|
||||
#define TOOL_KNIFE "knife"
|
||||
#define TOOL_BLOODFILTER "bloodfilter"
|
||||
#define TOOL_ROLLINGPIN "rollingpin"
|
||||
#define TOOL_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
|
||||
@@ -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)
|
||||
|
||||
@@ -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!
|
||||
|
||||
+15
-8
@@ -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)
|
||||
|
||||
+12
-62
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -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
|
||||
return TRUE
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
/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
|
||||
@@ -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)
|
||||
|
||||
@@ -167,8 +167,8 @@
|
||||
switch(action)
|
||||
// Toggles the cut/mend status.
|
||||
if("cut")
|
||||
// if(!I.is_wirecutter() && !user.can_admin_interact())
|
||||
if(!istype(I) || !I.is_wirecutter())
|
||||
// if(!I.get_tool_quality(TOOL_WIRECUTTER) && !user.can_admin_interact())
|
||||
if(!istype(I) || !I.get_tool_quality(TOOL_WIRECUTTER))
|
||||
to_chat(user, "<span class='error'>You need wirecutters!</span>")
|
||||
return
|
||||
|
||||
@@ -178,8 +178,8 @@
|
||||
|
||||
// Pulse a wire.
|
||||
if("pulse")
|
||||
// if(!I.is_multitool() && !user.can_admin_interact())
|
||||
if(!istype(I) || !I.is_multitool())
|
||||
// if(!I.get_tool_quality(TOOL_MULTITOOL) && !user.can_admin_interact())
|
||||
if(!istype(I) || !I.get_tool_quality(TOOL_MULTITOOL))
|
||||
to_chat(user, "<span class='error'>You need a multitool!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 @@
|
||||
"<span class='warning'>We store a charge of electricity in our hand.</span>",
|
||||
"<span class='italics'>You hear crackling electricity!</span>")
|
||||
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)
|
||||
|
||||
@@ -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("<span class='warning'>With a sickening squish, [src] reforms their whole body, casting their old parts on the floor!</span>",
|
||||
"<span class='notice'>We reform our body. We are whole once more.</span>",
|
||||
"<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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, "<span class='danger'>You are teleported towards \the [user].</span>")
|
||||
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()
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
AM.forceMove(destination)
|
||||
AM.visible_message("<span class='notice'>\The [AM] vanishes!</span>")
|
||||
to_chat(AM, "<span class='notice'>You suddenly appear somewhere else!</span>")
|
||||
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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
visible_message("<span class='info'>[user] rests a hand on \the [hit_atom].</span>")
|
||||
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)
|
||||
|
||||
@@ -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, "<span class='notice'>Your shield will expire in 5 seconds!</span>")
|
||||
QDEL_IN(src, 5 SECONDS)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -239,7 +239,7 @@ update_flag
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(!W.is_wrench() && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
|
||||
if(!W.get_tool_quality(TOOL_WRENCH) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
|
||||
visible_message("<span class='warning'>\The [user] hits \the [src] with \a [W]!</span>")
|
||||
src.health -= W.force
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -103,10 +103,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/meter/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed))
|
||||
if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if (W.is_wrench())
|
||||
else if (W.get_tool_quality(TOOL_WRENCH))
|
||||
if(connected_port)
|
||||
disconnect()
|
||||
to_chat(user, "<span class='notice'>You disconnect \the [src] from the port.</span>")
|
||||
@@ -165,7 +165,7 @@
|
||||
power_change()
|
||||
return
|
||||
|
||||
if(I.is_screwdriver() && removeable_cell)
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER) && removeable_cell)
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>There is no power cell installed.</span>")
|
||||
return
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
update_connected_network()
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/huge/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
if(I.is_wrench())
|
||||
if(I.get_tool_quality(TOOL_WRENCH))
|
||||
if(on)
|
||||
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
|
||||
return
|
||||
@@ -230,7 +230,7 @@
|
||||
//doesn't use power cells
|
||||
if(istype(I, /obj/item/weapon/cell))
|
||||
return
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
return
|
||||
|
||||
//doesn't hold tanks
|
||||
@@ -248,7 +248,7 @@
|
||||
desc += "This one seems to be tightly secured with large bolts."
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/huge/stationary/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
if(I.is_wrench())
|
||||
if(I.get_tool_quality(TOOL_WRENCH))
|
||||
to_chat(user, "<span class='warning'>The bolts are too tight for you to unscrew!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
/obj/machinery/camera/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
update_coverage()
|
||||
// DECONSTRUCTION
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
//to_chat(user, "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>")
|
||||
//if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown
|
||||
panel_open = !panel_open
|
||||
@@ -162,7 +162,7 @@
|
||||
"<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open)
|
||||
else if((W.get_tool_quality(TOOL_WIRECUTTER) || istype(W, /obj/item/device/multitool)) && panel_open)
|
||||
interact(user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && (wires.CanDeconstruct() || (stat & BROKEN)))
|
||||
@@ -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, "<span class='notice'>You start to weld [src]..</span>")
|
||||
to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
WT.eyecheck(user)
|
||||
busy = 1
|
||||
if(do_after(user, 100 * WT.toolspeed))
|
||||
busy = 0
|
||||
if(!WT.isOn())
|
||||
return 0
|
||||
return 1
|
||||
busy = 0
|
||||
return 0
|
||||
busy = TRUE
|
||||
if(do_after(user, 100 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
busy = FALSE
|
||||
if(WT.isOn())
|
||||
return TRUE
|
||||
busy = FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/camera/interact(mob/living/user as mob)
|
||||
if(!panel_open || istype(user, /mob/living/silicon/ai))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
if(0)
|
||||
// State 0
|
||||
if(W.is_wrench() && isturf(src.loc))
|
||||
if(W.get_tool_quality(TOOL_WRENCH) && isturf(src.loc))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "You wrench the assembly into place.")
|
||||
anchored = 1
|
||||
@@ -47,7 +47,7 @@
|
||||
state = 2
|
||||
return
|
||||
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "You unattach the assembly from its place.")
|
||||
anchored = 0
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
if(3)
|
||||
// State 3
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
|
||||
@@ -115,7 +115,7 @@
|
||||
break
|
||||
return
|
||||
|
||||
else if(W.is_wirecutter())
|
||||
else if(W.get_tool_quality(TOOL_WIRECUTTER))
|
||||
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 2)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
@@ -132,7 +132,7 @@
|
||||
return
|
||||
|
||||
// Taking out upgrades
|
||||
else if(W.is_crowbar() && upgrades.len)
|
||||
else if(W.get_tool_quality(TOOL_CROWBAR) && upgrades.len)
|
||||
var/obj/U = locate(/obj) in upgrades
|
||||
if(U)
|
||||
to_chat(user, "You unattach an upgrade from the assembly.")
|
||||
@@ -154,20 +154,17 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
|
||||
if(busy || !WT.isOn())
|
||||
return FALSE
|
||||
|
||||
if(busy)
|
||||
return 0
|
||||
if(!WT.isOn())
|
||||
return 0
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to weld the [src]..</span>")
|
||||
// Do after stuff here
|
||||
to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
WT.eyecheck(user)
|
||||
busy = 1
|
||||
if(do_after(user, 20 * WT.toolspeed))
|
||||
busy = 0
|
||||
if(!WT.isOn())
|
||||
return 0
|
||||
return 1
|
||||
busy = 0
|
||||
return 0
|
||||
busy = TRUE
|
||||
if(do_after(user, 100 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
busy = FALSE
|
||||
if(WT.isOn())
|
||||
return TRUE
|
||||
busy = FALSE
|
||||
return FALSE
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].")
|
||||
chargelevel = -1
|
||||
update_icon()
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(charging)
|
||||
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
|
||||
return
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(locked && (anchored || occupant))
|
||||
to_chat(user, "<span class='warning'>Can not do that while [src] is in use.</span>")
|
||||
else
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -14,27 +14,27 @@
|
||||
|
||||
switch(state)
|
||||
if(0)
|
||||
if(P.is_wrench())
|
||||
if(P.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
anchored = 1
|
||||
state = 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
if(P.get_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "The welder must be on for this task.")
|
||||
return
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user, 20 * WT.toolspeed))
|
||||
if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.remove_fuel(0, user)) return
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
new /obj/item/stack/material/plasteel( loc, 4)
|
||||
qdel(src)
|
||||
if(1)
|
||||
if(P.is_wrench())
|
||||
if(P.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
anchored = 0
|
||||
state = 0
|
||||
@@ -45,12 +45,12 @@
|
||||
circuit = P
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
if(P.is_screwdriver() && circuit)
|
||||
if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
if(P.is_crowbar() && circuit)
|
||||
if(P.get_tool_quality(TOOL_CROWBAR) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
state = 1
|
||||
@@ -58,7 +58,7 @@
|
||||
circuit.loc = loc
|
||||
circuit = null
|
||||
if(2)
|
||||
if(P.is_screwdriver() && circuit)
|
||||
if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = 1
|
||||
@@ -77,7 +77,7 @@
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
return
|
||||
if(3)
|
||||
if(P.is_wirecutter())
|
||||
if(P.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if (brain)
|
||||
to_chat(user, "Get that brain out of there first")
|
||||
else
|
||||
@@ -145,7 +145,7 @@
|
||||
to_chat(usr, "Added [P].")
|
||||
icon_state = "3b"
|
||||
|
||||
if(P.is_crowbar() && brain)
|
||||
if(P.get_tool_quality(TOOL_CROWBAR) && brain)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.loc = loc
|
||||
@@ -153,7 +153,7 @@
|
||||
icon_state = "3"
|
||||
|
||||
if(4)
|
||||
if(P.is_crowbar())
|
||||
if(P.get_tool_quality(TOOL_CROWBAR))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = 3
|
||||
@@ -164,7 +164,7 @@
|
||||
new /obj/item/stack/material/glass/reinforced( loc, 2 )
|
||||
return
|
||||
|
||||
if(P.is_screwdriver())
|
||||
if(P.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(!brain)
|
||||
@@ -232,11 +232,11 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
|
||||
else
|
||||
to_chat(user, "<span class='danger'>ERROR:</span> Unable to locate artificial intelligence.")
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(anchored)
|
||||
user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(!do_after(user,40 * W.toolspeed))
|
||||
if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>")
|
||||
@@ -245,7 +245,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating...</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(!do_after(user,40 * W.toolspeed))
|
||||
if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message("<span class='notice'>\The [user] decides not to bolt \the [src].</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] finishes fastening down \the [src]!</span>")
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/restoring = FALSE
|
||||
|
||||
/obj/machinery/computer/aifixer/attackby(obj/item/I, mob/living/user)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(occupier)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge.</span>")
|
||||
|
||||
@@ -13,27 +13,27 @@
|
||||
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(P.is_wrench())
|
||||
if(P.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
src.anchored = 1
|
||||
src.state = 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
if(get_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "The welding tool must be on to complete this task.")
|
||||
return
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user, 20 * WT.toolspeed))
|
||||
if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
new /obj/item/stack/material/steel( src.loc, 5 )
|
||||
qdel(src)
|
||||
if(1)
|
||||
if(P.is_wrench())
|
||||
if(P.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
src.anchored = 0
|
||||
src.state = 0
|
||||
@@ -48,12 +48,12 @@
|
||||
P.loc = src
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
if(P.is_screwdriver() && circuit)
|
||||
if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
if(P.is_crowbar()) && circuit)
|
||||
if(P.get_tool_quality(TOOL_CROWBAR)) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
src.state = 1
|
||||
@@ -61,7 +61,7 @@
|
||||
circuit.loc = src.loc
|
||||
src.circuit = null
|
||||
if(2)
|
||||
if(P.is_screwdriver() && circuit)
|
||||
if(P.get_tool_quality(TOOL_SCREWDRIVER) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
src.state = 1
|
||||
@@ -79,7 +79,7 @@
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
if(3)
|
||||
if(P.is_wirecutter())
|
||||
if(P.get_tool_quality(TOOL_WIRECUTTER))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
src.state = 2
|
||||
@@ -100,13 +100,13 @@
|
||||
src.state = 4
|
||||
src.icon_state = "4"
|
||||
if(4)
|
||||
if(P.is_crowbar())
|
||||
if(P.get_tool_quality(TOOL_CROWBAR))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
src.state = 3
|
||||
src.icon_state = "3"
|
||||
new /obj/item/stack/material/glass( src.loc, 2 )
|
||||
if(P.is_screwdriver())
|
||||
if(P.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/B = new src.circuit.build_path ( src.loc )
|
||||
|
||||
@@ -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, "<span class='warning'>It is too hot to mess with!</span>")
|
||||
return
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
else
|
||||
if(P.is_wrench())
|
||||
if(P.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You dismantle the frame</span>")
|
||||
new /obj/item/stack/material/steel(src.loc, 5)
|
||||
@@ -71,7 +71,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
else
|
||||
if(P.is_wirecutter())
|
||||
if(P.get_tool_quality(TOOL_WIRECUTTER))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 1
|
||||
@@ -80,7 +80,7 @@
|
||||
A.amount = 5
|
||||
|
||||
if(3)
|
||||
if(P.is_crowbar())
|
||||
if(P.get_tool_quality(TOOL_CROWBAR))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
state = 2
|
||||
circuit.loc = src.loc
|
||||
@@ -96,7 +96,7 @@
|
||||
components = null
|
||||
icon_state = "box_1"
|
||||
else
|
||||
if(P.is_screwdriver())
|
||||
if(P.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
|
||||
@@ -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("<span class='warning'>BZZzZZzZZzZT</span>")
|
||||
return
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(health < maxhealth)
|
||||
health = maxhealth
|
||||
emagged = 0
|
||||
@@ -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("<span class='warning'>BZZzZZzZZzZT</span>")
|
||||
@@ -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("<span class='warning'>BZZzZZzZZzZT</span>")
|
||||
|
||||
@@ -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, "<span class='warning'>The panel is broken and cannot be closed.</span>")
|
||||
@@ -1070,7 +1070,7 @@ About the new airlock wires panel:
|
||||
src.p_open = 1
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
src.update_icon()
|
||||
else if(C.is_wirecutter())
|
||||
else if(C.get_tool_quality(TOOL_WIRECUTTER))
|
||||
return src.attack_hand(user)
|
||||
else if(istype(C, /obj/item/device/multitool))
|
||||
return src.attack_hand(user)
|
||||
@@ -1079,11 +1079,11 @@ About the new airlock wires panel:
|
||||
else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE
|
||||
var/obj/item/weapon/pai_cable/cable = C
|
||||
cable.plugin(src, user)
|
||||
else if(!repairing && C.is_crowbar())
|
||||
else if(!repairing && C.get_tool_quality(TOOL_CROWBAR))
|
||||
if(can_remove_electronics())
|
||||
playsound(src, C.usesound, 75, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
|
||||
if(do_after(user,40 * C.toolspeed))
|
||||
if(do_after(user,40 * C.get_tool_speed(TOOL_CROWBAR)))
|
||||
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
|
||||
|
||||
var/obj/structure/door_assembly/da = new assembly_type(src.loc)
|
||||
@@ -1124,7 +1124,7 @@ About the new airlock wires panel:
|
||||
// Check if we're using a crowbar or armblade, and if the airlock's unpowered for whatever reason (off, broken, etc).
|
||||
else if(istype(C, /obj/item/weapon))
|
||||
var/obj/item/weapon/W = C
|
||||
if((W.pry == 1) && !arePowerSystemsOn())
|
||||
if(W.get_tool_quality(TOOL_CROWBAR) && !arePowerSystemsOn())
|
||||
if(locked)
|
||||
to_chat(user, "<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
|
||||
else if( !welded && !operating )
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
return
|
||||
|
||||
if(repairing && istype(I, /obj/item/weapon/weldingtool))
|
||||
if(repairing && I.get_tool_quality(TOOL_WELDER))
|
||||
if(!density)
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>")
|
||||
return
|
||||
@@ -255,14 +255,14 @@
|
||||
if(welder.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You start to fix dents and weld \the [get_material_name()] into place.</span>")
|
||||
playsound(src, welder.usesound, 50, 1)
|
||||
if(do_after(user, (5 * repairing) * welder.toolspeed) && welder && welder.isOn())
|
||||
if(do_after(user, (5 * repairing) * welder.get_tool_speed(TOOL_WELDER)) && welder && welder.isOn())
|
||||
to_chat(user, "<span class='notice'>You finish repairing the damage to \the [src].</span>")
|
||||
health = between(health, health + repairing*DOOR_REPAIR_AMOUNT, maxhealth)
|
||||
update_icon()
|
||||
repairing = 0
|
||||
return
|
||||
|
||||
if(repairing && I.is_crowbar())
|
||||
if(repairing && I.get_tool_quality(TOOL_CROWBAR))
|
||||
var/datum/material/mat = get_material()
|
||||
var/obj/item/stack/material/repairing_sheet = mat.place_sheet(loc)
|
||||
repairing_sheet.amount += repairing-1
|
||||
@@ -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
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
return //Don't open the door if we're putting tape on it to tell people 'don't open the door'.
|
||||
if(operating)
|
||||
return//Already doing something.
|
||||
if(istype(C, /obj/item/weapon/weldingtool) && !repairing)
|
||||
if(!repairing && C.get_tool_quality(TOOL_WELDER))
|
||||
if(prying)
|
||||
to_chat(user, "<span class='notice'>Someone's busy prying that [density ? "open" : "closed"]!</span>")
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
@@ -262,7 +262,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(density && C.is_screwdriver())
|
||||
if(density && C.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
hatch_open = !hatch_open
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
user.visible_message("<span class='danger'>[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch.</span>",
|
||||
@@ -270,7 +270,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(blocked && C.is_crowbar() && !repairing)
|
||||
if(blocked && C.get_tool_quality(TOOL_CROWBAR) && !repairing)
|
||||
if(!hatch_open)
|
||||
to_chat(user, "<span class='danger'>You must open the maintenance hatch first!</span>")
|
||||
else
|
||||
@@ -300,21 +300,16 @@
|
||||
to_chat(user, "<span class='danger'>\The [src] is welded shut!</span>")
|
||||
return
|
||||
|
||||
if(C.pry == 1)
|
||||
if(C.get_tool_quality(TOOL_CROWBAR))
|
||||
if(operating)
|
||||
return
|
||||
|
||||
if(blocked && C.is_crowbar())
|
||||
if(blocked)
|
||||
user.visible_message("<span class='danger'>\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!</span>",\
|
||||
"You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\
|
||||
"You hear someone struggle and metal straining.")
|
||||
return
|
||||
|
||||
if(istype(C,/obj/item/weapon/material/twohanded/fireaxe))
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/F = C
|
||||
if(!F.wielded)
|
||||
return
|
||||
|
||||
if(prying)
|
||||
to_chat(user, "<span class='notice'>Someone's already prying that [density ? "open" : "closed"].</span>")
|
||||
return
|
||||
@@ -325,8 +320,8 @@
|
||||
prying = 1
|
||||
update_icon()
|
||||
playsound(src, C.usesound, 100, 1)
|
||||
if(do_after(user,30 * C.toolspeed))
|
||||
if(C.is_crowbar())
|
||||
if(do_after(user,30 * C.get_tool_speed(TOOL_CROWBAR)))
|
||||
if(C.get_tool_quality(TOOL_CROWBAR))
|
||||
if(stat & (BROKEN|NOPOWER) || !density)
|
||||
user.visible_message("<span class='danger'>\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!</span>",\
|
||||
"You force \the [src] [density ? "open" : "closed"] with \the [C]!",\
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
wired = 1
|
||||
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
|
||||
|
||||
else if(C.is_wirecutter() && wired )
|
||||
else if(C.get_tool_quality(TOOL_WIRECUTTER) && wired )
|
||||
playsound(src, C.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].")
|
||||
|
||||
@@ -54,20 +54,20 @@
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You must secure \the [src] first!</span>")
|
||||
else if(C.is_wrench())
|
||||
else if(C.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>",
|
||||
"You have [anchored ? "" : "un" ]secured \the [src]!")
|
||||
update_icon()
|
||||
else if((glass || !anchored) && istype(C, /obj/item/weapon/weldingtool))
|
||||
else if((glass || !anchored) && C.get_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(glass)
|
||||
user.visible_message("<span class='warning'>[user] welds the glass panel out of \the [src].</span>",
|
||||
"<span class='notice'>You start to weld the glass panel out of \the [src].</span>")
|
||||
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
|
||||
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER), src) && WT.isOn())
|
||||
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
|
||||
new /obj/item/stack/material/glass/reinforced(drop_location())
|
||||
glass = FALSE
|
||||
@@ -75,7 +75,7 @@
|
||||
return
|
||||
if(!anchored)
|
||||
user.visible_message("<span class='warning'>[user] dissassembles \the [src].</span>", "You start to dissassemble \the [src].")
|
||||
if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
|
||||
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER), src) && WT.isOn())
|
||||
user.visible_message("<span class='warning'>[user] has dissassembled \the [src].</span>",
|
||||
"You have dissassembled \the [src].")
|
||||
new /obj/item/stack/material/steel(drop_location(), 2)
|
||||
|
||||
@@ -190,13 +190,13 @@
|
||||
|
||||
if(istype(I))
|
||||
// Fixing.
|
||||
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
|
||||
if(I.get_tool_quality(TOOL_WELDER) && user.a_intent == I_HELP)
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(health < maxhealth)
|
||||
if(WT.remove_fuel(1 ,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER), target = src))
|
||||
health = maxhealth
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
@@ -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,"<span class='notice'>You pried the windoor out of the frame!</span>")
|
||||
|
||||
var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc)
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -23,16 +23,16 @@ var/list/floor_light_cache = list()
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/floor_light/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
anchored = !anchored
|
||||
visible_message("<span class='notice'>\The [user] has [anchored ? "attached" : "detached"] \the [src].</span>")
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && (damaged || (stat & BROKEN)))
|
||||
else if(W.get_tool_quality(TOOL_WELDER) && (damaged || (stat & BROKEN)))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "<span class='warning'>\The [src] must be on to complete this task.</span>")
|
||||
return
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(!do_after(user, 20 * WT.toolspeed))
|
||||
if(!do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
return
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
var/m = input("Choose work mode", "Mode") as null|anything in mode
|
||||
mode[m] = !mode[m]
|
||||
var/O = mode[m]
|
||||
@@ -47,7 +47,7 @@
|
||||
TakeTile(T)
|
||||
return
|
||||
|
||||
if(W.is_crowbar())
|
||||
if(W.get_tool_quality(TOOL_CROWBAR))
|
||||
if(!length(contents))
|
||||
to_chat(user, "<span class='notice'>\The [src] is empty.</span>")
|
||||
else
|
||||
@@ -58,7 +58,7 @@
|
||||
T = null
|
||||
return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
T = input("Choose tile type.", "Tiles") as null|anything in contents
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -132,6 +132,16 @@
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
frame_size = 4
|
||||
|
||||
/datum/frame/frame_types/teleporter_hub
|
||||
name = "Teleporter Hub"
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
frame_size = 4
|
||||
|
||||
/datum/frame/frame_types/teleporter_station
|
||||
name = "Teleporter Hub"
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
frame_size = 4
|
||||
|
||||
/datum/frame/frame_types/display
|
||||
name = "Display"
|
||||
frame_class = FRAME_CLASS_DISPLAY
|
||||
@@ -304,11 +314,11 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(P.is_wrench())
|
||||
if(P.get_tool_quality(TOOL_WRENCH))
|
||||
if(state == FRAME_PLACED && !anchored)
|
||||
to_chat(user, "<span class='notice'>You start to wrench the frame into place.</span>")
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
|
||||
anchored = TRUE
|
||||
if(!need_circuit && circuit)
|
||||
state = FRAME_FASTENED
|
||||
@@ -320,16 +330,16 @@
|
||||
|
||||
else if(state == FRAME_PLACED && anchored)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
if(do_after(user, 20 * P.get_tool_speed(TOOL_WRENCH)))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
anchored = FALSE
|
||||
|
||||
else if(istype(P, /obj/item/weapon/weldingtool))
|
||||
else if(P.get_tool_quality(TOOL_WELDER))
|
||||
if(state == FRAME_PLACED)
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
if(do_after(user, 20 * P.get_tool_speed(TOOL_WELDER)))
|
||||
if(src && WT.isOn())
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
new /obj/item/stack/material/steel(src.loc, frame_type.frame_size)
|
||||
@@ -357,7 +367,7 @@
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
|
||||
else if(P.is_screwdriver())
|
||||
else if(P.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(state == FRAME_UNFASTENED)
|
||||
if(need_circuit && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
@@ -452,7 +462,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if(P.is_crowbar())
|
||||
else if(P.get_tool_quality(TOOL_CROWBAR))
|
||||
if(state == FRAME_UNFASTENED)
|
||||
if(need_circuit && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
@@ -530,7 +540,7 @@
|
||||
break
|
||||
to_chat(user, desc)
|
||||
|
||||
else if(P.is_wirecutter())
|
||||
else if(P.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if(state == FRAME_WIRED)
|
||||
if( \
|
||||
frame_type.frame_class == FRAME_CLASS_COMPUTER || \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to dismantle the IV drip.</span>")
|
||||
if(do_after(user, 15))
|
||||
|
||||
@@ -78,11 +78,11 @@
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(W.is_wirecutter())
|
||||
if(W.get_tool_quality(TOOL_WIRECUTTER))
|
||||
return wires.Interact(user)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
return wires.Interact(user)
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(playing)
|
||||
StopPlaying()
|
||||
user.visible_message("<span class='warning'>[user] has [anchored ? "un" : ""]secured \the [src].</span>", "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>")
|
||||
@@ -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("<span class='warning'>[user] has [anchored ? "un" : ""]secured \the [src].</span>", "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>")
|
||||
|
||||
@@ -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, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.getBrainLoss() >= 55)
|
||||
visible_message("<span class='warning'>[H] stares cluelessly at [src].</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else if(prob(H.getBrainLoss()))
|
||||
to_chat(user, "<span class='warning'>You momentarily forget how to use [src].</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(clicksound && istype(user, /mob/living/carbon))
|
||||
playsound(src, clicksound, clickvol)
|
||||
@@ -278,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, "<span class='notice'>Following parts detected in [src]:</span>")
|
||||
for(var/obj/item/C in component_parts)
|
||||
to_chat(user, "<span class='notice'> [C.name]</span>")
|
||||
@@ -339,20 +334,22 @@ Class Procs:
|
||||
break
|
||||
update_icon()
|
||||
RefreshParts()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
// Default behavior for wrenching down machines. Supports both delay and instant modes.
|
||||
/obj/machinery/proc/default_unfasten_wrench(var/mob/user, var/obj/item/W, var/time = 0)
|
||||
if(!W.is_wrench())
|
||||
if(!W.get_tool_quality(TOOL_WRENCH))
|
||||
return FALSE
|
||||
if(panel_open)
|
||||
return FALSE // Close panel first!
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
var/actual_time = W.toolspeed * time
|
||||
var/actual_time = W.get_tool_speed(TOOL_WRENCH) * time
|
||||
if(actual_time != 0)
|
||||
user.visible_message( \
|
||||
"<span class='warning'>\The [user] begins [anchored ? "un" : ""]securing \the [src].</span>", \
|
||||
"<span class='notice'>You start [anchored ? "un" : ""]securing \the [src].</span>")
|
||||
|
||||
if(actual_time == 0 || do_after(user, actual_time, target = src))
|
||||
user.visible_message( \
|
||||
"<span class='warning'>\The [user] has [anchored ? "un" : ""]secured \the [src].</span>", \
|
||||
@@ -363,29 +360,33 @@ Class Procs:
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/C)
|
||||
if(!C.is_crowbar())
|
||||
return 0
|
||||
if(!C.get_tool_quality(TOOL_CROWBAR))
|
||||
return FALSE
|
||||
if(!panel_open)
|
||||
return 0
|
||||
return FALSE
|
||||
. = dismantle()
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
|
||||
if(!S.is_screwdriver())
|
||||
return 0
|
||||
if(!S.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
return FALSE
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>")
|
||||
update_icon()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
// Unimplemented on base type, but other machinery types may yet have use
|
||||
/obj/machinery/proc/default_deconstruction_wrench(var/mob/user, var/obj/item/S)
|
||||
return
|
||||
|
||||
/obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
|
||||
if(!S.is_screwdriver())
|
||||
return 0
|
||||
if(!S.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
return FALSE
|
||||
if(!circuit)
|
||||
return 0
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You start disconnecting the monitor.</span>")
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
if(do_after(user, 20 * S.toolspeed))
|
||||
if(do_after(user, 20 * S.get_tool_speed(TOOL_SCREWDRIVER)))
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
|
||||
new /obj/item/weapon/material/shard(src.loc)
|
||||
@@ -394,19 +395,19 @@ Class Procs:
|
||||
. = dismantle()
|
||||
|
||||
/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
|
||||
if(!S.is_screwdriver())
|
||||
return 0
|
||||
if(!S.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
return FALSE
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]")
|
||||
update_icon()
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/W)
|
||||
if(!W.is_wirecutter())
|
||||
return 0
|
||||
if(!W.get_tool_quality(TOOL_WIRECUTTER))
|
||||
return FALSE
|
||||
if(!panel_open)
|
||||
return 0
|
||||
return FALSE
|
||||
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||
@@ -418,19 +419,19 @@ Class Procs:
|
||||
if(istype(I,/obj/item/weapon/card/id))
|
||||
I.forceMove(src.loc)
|
||||
if(!circuit)
|
||||
return 0
|
||||
return FALSE
|
||||
var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
|
||||
var/obj/item/weapon/circuitboard/M = circuit
|
||||
A.circuit = M
|
||||
A.anchored = 1
|
||||
A.anchored = TRUE
|
||||
A.frame_type = M.board_type
|
||||
if(A.frame_type.circuit)
|
||||
A.need_circuit = 0
|
||||
A.need_circuit = FALSE
|
||||
|
||||
if(A.frame_type.frame_class == FRAME_CLASS_ALARM || A.frame_type.frame_class == FRAME_CLASS_DISPLAY)
|
||||
A.density = 0
|
||||
A.density = FALSE
|
||||
else
|
||||
A.density = 1
|
||||
A.density = TRUE
|
||||
|
||||
if(A.frame_type.frame_class == FRAME_CLASS_MACHINE)
|
||||
for(var/obj/D in component_parts)
|
||||
@@ -460,11 +461,10 @@ Class Procs:
|
||||
M.loc = null
|
||||
M.deconstruct(src)
|
||||
qdel(src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/proc/apply_visual(mob/M)
|
||||
M.sight = 0 //Just reset their mesons and stuff so they can't use them, by default.
|
||||
return
|
||||
M.sight = FALSE //Just reset their mesons and stuff so they can't use them, by default.
|
||||
|
||||
/datum/proc/remove_visual(mob/M)
|
||||
return
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -55,7 +55,7 @@ var/bomb_set
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
if(O.is_screwdriver())
|
||||
if(O.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
add_fingerprint(user)
|
||||
if(auth)
|
||||
@@ -78,7 +78,7 @@ var/bomb_set
|
||||
flick("nuclearbombc", src)
|
||||
|
||||
return
|
||||
if(O.is_wirecutter() || istype(O, /obj/item/device/multitool))
|
||||
if(O.get_tool_quality(TOOL_WIRECUTTER) || istype(O, /obj/item/device/multitool))
|
||||
if(opened == 1)
|
||||
nukehack_win(user)
|
||||
return
|
||||
@@ -94,35 +94,38 @@ var/bomb_set
|
||||
if(anchored)
|
||||
switch(removal_stage)
|
||||
if(0)
|
||||
if(istype(O,/obj/item/weapon/weldingtool))
|
||||
if(O.get_tool_quality(TOOL_WELDER))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
if(!WT.isOn()) return
|
||||
if(!WT.isOn())
|
||||
return
|
||||
if(WT.get_fuel() < 5) // uses up 5 fuel.
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...")
|
||||
|
||||
if(do_after(user,40 * WT.toolspeed))
|
||||
if(!src || !user || !WT.remove_fuel(5, user)) return
|
||||
if(do_after(user,40 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !user || !WT.remove_fuel(5, user))
|
||||
return
|
||||
user.visible_message("[user] cuts through the bolt covers on [src].", "You cut through the bolt cover.")
|
||||
removal_stage = 1
|
||||
return
|
||||
|
||||
if(1)
|
||||
if(O.is_crowbar())
|
||||
if(O.get_tool_quality(TOOL_CROWBAR))
|
||||
user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...")
|
||||
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
if(do_after(user,15 * O.toolspeed))
|
||||
if(!src || !user) return
|
||||
if(do_after(user,15 * O.get_tool_speed(TOOL_CROWBAR)))
|
||||
if(!src || !user)
|
||||
return
|
||||
user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.")
|
||||
removal_stage = 2
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(istype(O,/obj/item/weapon/weldingtool))
|
||||
if(O.get_tool_quality(TOOL_WELDER))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
if(!WT.isOn()) return
|
||||
@@ -132,29 +135,30 @@ var/bomb_set
|
||||
|
||||
user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...")
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user,40 * WT.toolspeed))
|
||||
if(!src || !user || !WT.remove_fuel(5, user)) return
|
||||
if(do_after(user,40 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !user || !WT.remove_fuel(5, user))
|
||||
return
|
||||
user.visible_message("[user] cuts apart the anchoring system sealant on [src].", "You cut apart the anchoring system's sealant.")
|
||||
removal_stage = 3
|
||||
return
|
||||
|
||||
if(3)
|
||||
if(O.is_wrench())
|
||||
if(O.get_tool_quality(TOOL_WRENCH))
|
||||
|
||||
user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...")
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
if(do_after(user,50 * O.toolspeed))
|
||||
if(do_after(user,50 * O.get_tool_speed(TOOL_WRENCH)))
|
||||
if(!src || !user) return
|
||||
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
|
||||
removal_stage = 4
|
||||
return
|
||||
|
||||
if(4)
|
||||
if(O.is_crowbar())
|
||||
if(O.get_tool_quality(TOOL_CROWBAR))
|
||||
|
||||
user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...")
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
if(do_after(user,80 * O.toolspeed))
|
||||
if(do_after(user,80 * O.get_tool_speed(TOOL_WRENCH)))
|
||||
if(!src || !user) return
|
||||
user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!")
|
||||
anchored = 0
|
||||
@@ -262,7 +266,7 @@ var/bomb_set
|
||||
visible_message("<span class='notice'>The [src] emits a quiet whirling noise!</span>")
|
||||
if(href_list["act"] == "wire")
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(!I.is_wirecutter())
|
||||
if(!I.get_tool_quality(TOOL_WIRECUTTER))
|
||||
to_chat(usr, "You need wirecutters!")
|
||||
else
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/oxygen_pump/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
stat ^= MAINT
|
||||
user.visible_message("<span class='notice'>\The [user] [(stat & MAINT) ? "opens" : "closes"] \the [src].</span>", "<span class='notice'>You [(stat & MAINT) ? "open" : "close"] \the [src].</span>")
|
||||
icon_state = (stat & MAINT) ? icon_state_open : icon_state_closed
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
@@ -115,11 +115,11 @@
|
||||
user.drop_item()
|
||||
qdel(W)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if (unwrenched==0)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src] from the floor...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
if (do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
@@ -132,7 +132,7 @@
|
||||
else /*if (unwrenched==1)*/
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to fasten \the [src] to the floor...</span>")
|
||||
if (do_after(user, 20 * W.toolspeed))
|
||||
if (do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] fastens \the [src].</span>", \
|
||||
"<span class='notice'>You have fastened \the [src]. Now it can dispense pipes.</span>", \
|
||||
|
||||
@@ -81,12 +81,12 @@
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
if (!panel_open && W.is_wrench())
|
||||
if (!panel_open && W.get_tool_quality(TOOL_WRENCH))
|
||||
P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes
|
||||
P_type = Pipes[P_type_t]
|
||||
user.visible_message("<span class='notice'>[user] has set \the [src] to manufacture [P_type_t].</span>", "<span class='notice'>You set \the [src] to manufacture [P_type_t].</span>")
|
||||
return
|
||||
if(!panel_open && W.is_crowbar())
|
||||
if(!panel_open && W.get_tool_quality(TOOL_CROWBAR))
|
||||
a_dis = !a_dis
|
||||
user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>")
|
||||
return
|
||||
|
||||
@@ -101,7 +101,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
|
||||
return data
|
||||
|
||||
/obj/machinery/pointdefense_control/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W?.is_multitool())
|
||||
if(W?.get_tool_quality(TOOL_MULTITOOL))
|
||||
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
|
||||
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, physical_state))
|
||||
// Check for duplicate controllers with this ID
|
||||
@@ -180,7 +180,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
|
||||
return PDC
|
||||
|
||||
/obj/machinery/pointdefense/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W?.is_multitool())
|
||||
if(W?.get_tool_quality(TOOL_MULTITOOL))
|
||||
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
|
||||
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, physical_state))
|
||||
to_chat(user, "<span class='notice'>You register [src] with the [new_ident] network.</span>")
|
||||
|
||||
@@ -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, "<span class='notice'>You begin prying the metal coverings off.</span>")
|
||||
@@ -529,7 +529,7 @@
|
||||
to_chat(user, "<span class='notice'>You remove the turret but did not manage to salvage anything.</span>")
|
||||
qdel(src) // qdel
|
||||
|
||||
else if(I.is_wrench())
|
||||
else if(I.get_tool_quality(TOOL_WRENCH))
|
||||
if(enabled || raised)
|
||||
to_chat(user, "<span class='warning'>You cannot unsecure an active turret!</span>")
|
||||
return
|
||||
@@ -546,18 +546,12 @@
|
||||
)
|
||||
|
||||
wrenching = TRUE
|
||||
if(do_after(user, 50 * I.toolspeed))
|
||||
if(do_after(user, 50 * I.get_tool_speed(TOOL_WRENCH)))
|
||||
//This code handles moving the turret around. After all, it's a portable turret!
|
||||
if(!anchored)
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
anchored = TRUE
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
|
||||
else if(anchored)
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
|
||||
update_icon()
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
update_icon()
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "" : "un"]secure the exterior bolts on the turret.</span>")
|
||||
wrenching = FALSE
|
||||
|
||||
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
|
||||
@@ -968,14 +962,14 @@
|
||||
//this is a bit unwieldy but self-explanatory
|
||||
switch(build_step)
|
||||
if(0) //first step
|
||||
if(I.is_wrench() && !anchored)
|
||||
if(I.get_tool_quality(TOOL_WRENCH) && !anchored)
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
|
||||
anchored = TRUE
|
||||
build_step = 1
|
||||
return
|
||||
|
||||
else if(I.is_crowbar() && !anchored)
|
||||
else if(I.get_tool_quality(TOOL_CROWBAR) && !anchored)
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
|
||||
new /obj/item/stack/material/steel(loc, 5)
|
||||
@@ -993,7 +987,7 @@
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction.</span>")
|
||||
return
|
||||
|
||||
else if(I.is_wrench())
|
||||
else if(I.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
|
||||
anchored = FALSE
|
||||
@@ -1001,13 +995,13 @@
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(I.is_wrench())
|
||||
if(I.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
|
||||
build_step = 3
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weapon/weldingtool))
|
||||
else if(I.get_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
return
|
||||
@@ -1016,7 +1010,7 @@
|
||||
return
|
||||
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(do_after(user, 20 * I.toolspeed))
|
||||
if(do_after(user, 20 * I.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.remove_fuel(5, user)) return
|
||||
build_step = 1
|
||||
to_chat(user, "You remove the turret's interior metal armor.")
|
||||
@@ -1041,7 +1035,7 @@
|
||||
qdel(I) //delete the gun :(
|
||||
return
|
||||
|
||||
else if(I.is_wrench())
|
||||
else if(I.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
|
||||
build_step = 2
|
||||
@@ -1060,7 +1054,7 @@
|
||||
//attack_hand() removes the gun
|
||||
|
||||
if(5)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
build_step = 6
|
||||
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
|
||||
@@ -1078,21 +1072,21 @@
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction.</span>")
|
||||
return
|
||||
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
build_step = 5
|
||||
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
|
||||
return
|
||||
|
||||
if(7)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
if(I.get_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(!WT.isOn()) return
|
||||
if(WT.get_fuel() < 5)
|
||||
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
|
||||
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user, 30 * WT.toolspeed))
|
||||
if(do_after(user, 30 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.remove_fuel(5, user))
|
||||
return
|
||||
build_step = 8
|
||||
@@ -1108,7 +1102,7 @@
|
||||
|
||||
qdel(src) // qdel
|
||||
|
||||
else if(I.is_crowbar())
|
||||
else if(I.get_tool_quality(TOOL_CROWBAR))
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
|
||||
new /obj/item/stack/material/steel(loc, 2)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
update_icon()
|
||||
user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].")
|
||||
|
||||
else if(portable && G.is_wrench())
|
||||
else if(portable && G.get_tool_quality(TOOL_WRENCH))
|
||||
if(charging)
|
||||
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
else
|
||||
to_chat(user, "The hatch must be open to insert a power cell.")
|
||||
return
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
panel_open = !panel_open
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] [panel_open ? "opens" : "closes"] the hatch on the [src].</span>", "<span class='notice'>You [panel_open ? "open" : "close"] the hatch on the [src].</span>")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//////////////////////////////////////
|
||||
// SUIT STORAGE UNIT /////////////////
|
||||
// suit STORAGE UNIT /////////////////
|
||||
//////////////////////////////////////
|
||||
|
||||
/obj/machinery/suit_storage_unit
|
||||
@@ -9,13 +9,13 @@
|
||||
icon_state = "suitstorage000000100" //order is: [has helmet][has suit][has human][is open][is locked][is UV cycling][is powered][is dirty/broken] [is superUVcycling]
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/mob/living/carbon/human/OCCUPANT = null
|
||||
var/obj/item/clothing/suit/space/SUIT = null
|
||||
var/SUIT_TYPE = null
|
||||
var/obj/item/clothing/head/helmet/space/HELMET = null
|
||||
var/HELMET_TYPE = null
|
||||
var/obj/item/clothing/mask/MASK = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n
|
||||
var/MASK_TYPE = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself.
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/obj/item/clothing/suit/space/suit = null
|
||||
var/suit_type = null
|
||||
var/obj/item/clothing/head/helmet/space/helmet = null
|
||||
var/helmet_type = null
|
||||
var/obj/item/clothing/mask/mask = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n
|
||||
var/mask_type = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself.
|
||||
var/isopen = 0
|
||||
var/islocked = 0
|
||||
var/isUV = 0
|
||||
@@ -29,29 +29,29 @@
|
||||
//The units themselves/////////////////
|
||||
|
||||
/obj/machinery/suit_storage_unit/standard_unit
|
||||
SUIT_TYPE = /obj/item/clothing/suit/space
|
||||
HELMET_TYPE = /obj/item/clothing/head/helmet/space
|
||||
MASK_TYPE = /obj/item/clothing/mask/breath
|
||||
suit_type = /obj/item/clothing/suit/space
|
||||
helmet_type = /obj/item/clothing/head/helmet/space
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
|
||||
/obj/machinery/suit_storage_unit/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
if(SUIT_TYPE)
|
||||
SUIT = new SUIT_TYPE(src)
|
||||
if(HELMET_TYPE)
|
||||
HELMET = new HELMET_TYPE(src)
|
||||
if(MASK_TYPE)
|
||||
MASK = new MASK_TYPE(src)
|
||||
if(suit_type)
|
||||
suit = new suit_type(src)
|
||||
if(helmet_type)
|
||||
helmet = new helmet_type(src)
|
||||
if(mask_type)
|
||||
mask = new mask_type(src)
|
||||
|
||||
/obj/machinery/suit_storage_unit/update_icon()
|
||||
var/hashelmet = 0
|
||||
var/hassuit = 0
|
||||
var/hashuman = 0
|
||||
if(HELMET)
|
||||
if(helmet)
|
||||
hashelmet = 1
|
||||
if(SUIT)
|
||||
if(suit)
|
||||
hassuit = 1
|
||||
if(OCCUPANT)
|
||||
if(occupant)
|
||||
hashuman = 1
|
||||
icon_state = text("suitstorage[][][][][][][][][]", hashelmet, hassuit, hashuman, isopen, islocked, isUV, ispowered, isbroken, issuperUV)
|
||||
|
||||
@@ -108,20 +108,20 @@
|
||||
data["safeties"] = safetieson
|
||||
data["uv_active"] = isUV
|
||||
data["uv_super"] = issuperUV
|
||||
if(HELMET)
|
||||
data["helmet"] = HELMET.name
|
||||
if(helmet)
|
||||
data["helmet"] = helmet.name
|
||||
else
|
||||
data["helmet"] = null
|
||||
if(SUIT)
|
||||
data["suit"] = SUIT.name
|
||||
if(suit)
|
||||
data["suit"] = suit.name
|
||||
else
|
||||
data["suit"] = null
|
||||
if(MASK)
|
||||
data["mask"] = MASK.name
|
||||
if(mask)
|
||||
data["mask"] = mask.name
|
||||
else
|
||||
data["mask"] = null
|
||||
data["storage"] = null
|
||||
if(OCCUPANT)
|
||||
if(occupant)
|
||||
data["occupied"] = TRUE
|
||||
else
|
||||
data["occupied"] = FALSE
|
||||
@@ -169,92 +169,58 @@
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob)
|
||||
// var/protected = 0
|
||||
// var/mob/living/carbon/human/H = user
|
||||
if(!panelopen)
|
||||
return
|
||||
|
||||
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(istype(G,/obj/item/clothing/gloves/yellow))
|
||||
protected = 1
|
||||
|
||||
if(!protected)
|
||||
playsound(src, "sparks", 75, 1, -1)
|
||||
to_chat(user, "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>")
|
||||
return*/
|
||||
else //welp, the guy is protected, we can continue
|
||||
if(panelopen)
|
||||
if(issuperUV)
|
||||
to_chat(user, "You slide the dial back towards \"185nm\".")
|
||||
issuperUV = 0
|
||||
else
|
||||
to_chat(user, "You crank the dial all the way up to \"15nm\".")
|
||||
issuperUV = 1
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob)
|
||||
// var/protected = 0
|
||||
// var/mob/living/carbon/human/H = user
|
||||
if(!panelopen) //Needed check due to bugs
|
||||
return
|
||||
|
||||
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(istype(G,/obj/item/clothing/gloves/yellow))
|
||||
protected = 1
|
||||
|
||||
if(!protected)
|
||||
playsound(src, "sparks", 75, 1, -1)
|
||||
to_chat(user, "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>")
|
||||
return*/
|
||||
else
|
||||
if(panelopen)
|
||||
to_chat(user, "You push the button. The coloured LED next to it changes.")
|
||||
safetieson = !safetieson
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/dispense_helmet(mob/user as mob)
|
||||
if(!HELMET)
|
||||
return //Do I even need this sanity check? Nyoro~n
|
||||
else
|
||||
HELMET.loc = src.loc
|
||||
HELMET = null
|
||||
return
|
||||
if(helmet)
|
||||
helmet.loc = src.loc
|
||||
helmet = null
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/dispense_suit(mob/user as mob)
|
||||
if(!SUIT)
|
||||
if(!suit)
|
||||
return
|
||||
else
|
||||
SUIT.loc = src.loc
|
||||
SUIT = null
|
||||
suit.loc = src.loc
|
||||
suit = null
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/dispense_mask(mob/user as mob)
|
||||
if(!MASK)
|
||||
if(!mask)
|
||||
return
|
||||
else
|
||||
MASK.loc = src.loc
|
||||
MASK = null
|
||||
mask.loc = src.loc
|
||||
mask = null
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/dump_everything()
|
||||
islocked = 0 //locks go free
|
||||
if(SUIT)
|
||||
SUIT.loc = src.loc
|
||||
SUIT = null
|
||||
if(HELMET)
|
||||
HELMET.loc = src.loc
|
||||
HELMET = null
|
||||
if(MASK)
|
||||
MASK.loc = src.loc
|
||||
MASK = null
|
||||
if(OCCUPANT)
|
||||
eject_occupant(OCCUPANT)
|
||||
if(suit)
|
||||
suit.loc = src.loc
|
||||
suit = null
|
||||
if(helmet)
|
||||
helmet.loc = src.loc
|
||||
helmet = null
|
||||
if(mask)
|
||||
mask.loc = src.loc
|
||||
mask = null
|
||||
if(occupant)
|
||||
eject_occupant(occupant)
|
||||
return
|
||||
|
||||
|
||||
@@ -262,7 +228,7 @@
|
||||
if(islocked || isUV)
|
||||
to_chat(user, "<font color='red'>Unable to open unit.</font>")
|
||||
return
|
||||
if(OCCUPANT)
|
||||
if(occupant)
|
||||
eject_occupant(user)
|
||||
return // eject_occupant opens the door, so we need to return
|
||||
isopen = !isopen
|
||||
@@ -270,7 +236,7 @@
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob)
|
||||
if(OCCUPANT && safetieson)
|
||||
if(occupant && safetieson)
|
||||
to_chat(user, "<font color='red'>The Unit's safety protocols disallow locking when a biological form is detected inside its compartments.</font>")
|
||||
return
|
||||
if(isopen)
|
||||
@@ -282,16 +248,16 @@
|
||||
/obj/machinery/suit_storage_unit/proc/start_UV(mob/user as mob)
|
||||
if(isUV || isopen) //I'm bored of all these sanity checks
|
||||
return
|
||||
if(OCCUPANT && safetieson)
|
||||
if(occupant && safetieson)
|
||||
to_chat(user, "<font color='red'><B>WARNING:</B> Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle.</font>")
|
||||
return
|
||||
if(!HELMET && !MASK && !SUIT && !OCCUPANT) //shit's empty yo
|
||||
if(!helmet && !mask && !suit && !occupant) //shit's empty yo
|
||||
to_chat(user, "<font color='red'>Unit storage bays empty. Nothing to disinfect -- Aborting.</font>")
|
||||
return
|
||||
to_chat(user, "You start the Unit's cauterisation cycle.")
|
||||
cycletime_left = 20
|
||||
isUV = 1
|
||||
if(OCCUPANT && !islocked)
|
||||
if(occupant && !islocked)
|
||||
islocked = 1 //Let's lock it for good measure
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
@@ -299,50 +265,50 @@
|
||||
var/i //our counter
|
||||
for(i=0,i<4,i++)
|
||||
sleep(50)
|
||||
if(OCCUPANT)
|
||||
OCCUPANT.apply_effect(50, IRRADIATE)
|
||||
var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs
|
||||
if(occupant)
|
||||
occupant.apply_effect(50, IRRADIATE)
|
||||
var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in occupant.internal_organs
|
||||
if(!rad_organ)
|
||||
if(OCCUPANT.can_feel_pain())
|
||||
OCCUPANT.emote("scream")
|
||||
if(occupant.can_feel_pain())
|
||||
occupant.emote("scream")
|
||||
if(issuperUV)
|
||||
var/burndamage = rand(28,35)
|
||||
OCCUPANT.take_organ_damage(0,burndamage)
|
||||
occupant.take_organ_damage(0,burndamage)
|
||||
else
|
||||
var/burndamage = rand(6,10)
|
||||
OCCUPANT.take_organ_damage(0,burndamage)
|
||||
occupant.take_organ_damage(0,burndamage)
|
||||
if(i==3) //End of the cycle
|
||||
if(!issuperUV)
|
||||
if(HELMET)
|
||||
HELMET.clean_blood()
|
||||
if(SUIT)
|
||||
SUIT.clean_blood()
|
||||
if(MASK)
|
||||
MASK.clean_blood()
|
||||
if(helmet)
|
||||
helmet.clean_blood()
|
||||
if(suit)
|
||||
suit.clean_blood()
|
||||
if(mask)
|
||||
mask.clean_blood()
|
||||
else //It was supercycling, destroy everything
|
||||
if(HELMET)
|
||||
HELMET = null
|
||||
if(SUIT)
|
||||
SUIT = null
|
||||
if(MASK)
|
||||
MASK = null
|
||||
if(helmet)
|
||||
helmet = null
|
||||
if(suit)
|
||||
suit = null
|
||||
if(mask)
|
||||
mask = null
|
||||
visible_message("<font color='red'>With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.</font>", 3)
|
||||
isbroken = 1
|
||||
isopen = 1
|
||||
islocked = 0
|
||||
eject_occupant(OCCUPANT) //Mixing up these two lines causes bug. DO NOT DO IT.
|
||||
eject_occupant(occupant) //Mixing up these two lines causes bug. DO NOT DO IT.
|
||||
isUV = 0 //Cycle ends
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work
|
||||
if(HELMET)
|
||||
HELMET.clean_blood()
|
||||
if(SUIT)
|
||||
SUIT.clean_blood()
|
||||
if(MASK)
|
||||
MASK.clean_blood()
|
||||
if(helmet)
|
||||
helmet.clean_blood()
|
||||
if(suit)
|
||||
suit.clean_blood()
|
||||
if(mask)
|
||||
mask.clean_blood()
|
||||
isUV = 0 //Cycle ends
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
@@ -350,12 +316,12 @@
|
||||
var/i
|
||||
for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity
|
||||
spawn(50)
|
||||
if(OCCUPANT)
|
||||
if(occupant)
|
||||
if(issuperUV)
|
||||
OCCUPANT.take_organ_damage(0,40)
|
||||
occupant.take_organ_damage(0,40)
|
||||
to_chat(user, "Test. You gave him 40 damage")
|
||||
else
|
||||
OCCUPANT.take_organ_damage(0,8)
|
||||
occupant.take_organ_damage(0,8)
|
||||
to_chat(user, "Test. You gave him 8 damage")
|
||||
return*/
|
||||
|
||||
@@ -370,21 +336,21 @@
|
||||
if(islocked)
|
||||
return
|
||||
|
||||
if(!OCCUPANT)
|
||||
if(!occupant)
|
||||
return
|
||||
// for(var/obj/O in src)
|
||||
// O.loc = src.loc
|
||||
|
||||
if(OCCUPANT.client)
|
||||
if(user != OCCUPANT)
|
||||
to_chat(OCCUPANT, "<font color='blue'>The machine kicks you out!</font>")
|
||||
if(occupant.client)
|
||||
if(user != occupant)
|
||||
to_chat(occupant, "<font color='blue'>The machine kicks you out!</font>")
|
||||
if(user.loc != src.loc)
|
||||
to_chat(OCCUPANT, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>")
|
||||
to_chat(occupant, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>")
|
||||
|
||||
OCCUPANT.client.eye = OCCUPANT.client.mob
|
||||
OCCUPANT.client.perspective = MOB_PERSPECTIVE
|
||||
OCCUPANT.loc = src.loc
|
||||
OCCUPANT = null
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.loc = src.loc
|
||||
occupant = null
|
||||
if(!isopen)
|
||||
isopen = 1
|
||||
update_icon()
|
||||
@@ -418,7 +384,7 @@
|
||||
if(!ispowered || isbroken)
|
||||
to_chat(usr, "<font color='red'>The unit is not operational.</font>")
|
||||
return
|
||||
if((OCCUPANT) || (HELMET) || (SUIT))
|
||||
if((occupant) || (helmet) || (suit))
|
||||
to_chat(usr, "<font color='red'>It's too cluttered inside for you to fit in!</font>")
|
||||
return
|
||||
visible_message("[usr] starts squeezing into the suit storage unit!", 3)
|
||||
@@ -428,7 +394,7 @@
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
// usr.metabslow = 1
|
||||
OCCUPANT = usr
|
||||
occupant = usr
|
||||
isopen = 0 //Close the thing after the guy gets inside
|
||||
update_icon()
|
||||
|
||||
@@ -439,14 +405,14 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
OCCUPANT = null //Testing this as a backup sanity test
|
||||
occupant = null //Testing this as a backup sanity test
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(!ispowered)
|
||||
return
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
panelopen = !panelopen
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
to_chat(user, "<font color='blue'>You [panelopen ? "open up" : "close"] the unit's maintenance panel.</font>")
|
||||
@@ -462,7 +428,7 @@
|
||||
if(!ispowered || isbroken)
|
||||
to_chat(user, "<font color='red'>The unit is not operational.</font>")
|
||||
return
|
||||
if((OCCUPANT) || (HELMET) || (SUIT)) //Unit needs to be absolutely empty
|
||||
if((occupant) || (helmet) || (suit)) //Unit needs to be absolutely empty
|
||||
to_chat(user, "<font color='red'>The unit's storage area is too cluttered.</font>")
|
||||
return
|
||||
visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
|
||||
@@ -473,7 +439,7 @@
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
OCCUPANT = M
|
||||
occupant = M
|
||||
isopen = 0 //close ittt
|
||||
|
||||
//for(var/obj/O in src)
|
||||
@@ -488,13 +454,13 @@
|
||||
if(!isopen)
|
||||
return
|
||||
var/obj/item/clothing/suit/space/S = I
|
||||
if(SUIT)
|
||||
if(suit)
|
||||
to_chat(user, "<font color='blue'>The unit already contains a suit.</font>")
|
||||
return
|
||||
to_chat(user, "You load the [S.name] into the storage compartment.")
|
||||
user.drop_item()
|
||||
S.loc = src
|
||||
SUIT = S
|
||||
suit = S
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -502,13 +468,13 @@
|
||||
if(!isopen)
|
||||
return
|
||||
var/obj/item/clothing/head/helmet/H = I
|
||||
if(HELMET)
|
||||
if(helmet)
|
||||
to_chat(user, "<font color='blue'>The unit already contains a helmet.</font>")
|
||||
return
|
||||
to_chat(user, "You load the [H.name] into the storage compartment.")
|
||||
user.drop_item()
|
||||
H.loc = src
|
||||
HELMET = H
|
||||
helmet = H
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -516,13 +482,13 @@
|
||||
if(!isopen)
|
||||
return
|
||||
var/obj/item/clothing/mask/M = I
|
||||
if(MASK)
|
||||
if(mask)
|
||||
to_chat(user, "<font color='blue'>The unit already contains a mask.</font>")
|
||||
return
|
||||
to_chat(user, "You load the [M.name] into the storage compartment.")
|
||||
user.drop_item()
|
||||
M.loc = src
|
||||
MASK = M
|
||||
mask = M
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -675,7 +641,7 @@
|
||||
return
|
||||
|
||||
//Hacking init.
|
||||
if(istype(I, /obj/item/device/multitool) || I.is_wirecutter())
|
||||
if(I.get_tool_quality(TOOL_MULTITOOL) || I.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
@@ -711,7 +677,7 @@
|
||||
updateUsrDialog()
|
||||
|
||||
return
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
|
||||
panel_open = !panel_open
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
drop_type = "supermatter"
|
||||
|
||||
/obj/machinery/power/supply_beacon/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(!use_power && W.is_wrench())
|
||||
if(!use_power && W.get_tool_quality(TOOL_WRENCH))
|
||||
if(!anchored && !connect_to_network())
|
||||
to_chat(user, "<span class='warning'>This device must be placed over an exposed cable.</span>")
|
||||
return
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(active)
|
||||
to_chat(user, "<span class='danger'>You need to deactivate the beacon first!</span>")
|
||||
return
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>")*/
|
||||
if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp))
|
||||
if(state in list( 1, 3, 6))
|
||||
if(!crayon)
|
||||
user.drop_item()
|
||||
crayon = W
|
||||
crayon.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, "<span class='warning'>You can't fit \the [W] inside.</span>")
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user