mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
Merge pull request #15428 from Heroman3003/big-tool-refactor
Refactors tool typechecks, refactors transforming tools, makes Altevian wrench into one
This commit is contained in:
@@ -92,7 +92,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.has_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,7 +279,7 @@
|
||||
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.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (unlocked)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
add_overlay(image('icons/obj/pipeturbine.dmi', "hi-turb"))
|
||||
|
||||
/obj/machinery/atmospherics/pipeturbine/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_wrench())
|
||||
if(W.has_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.</span>")
|
||||
@@ -256,7 +256,7 @@
|
||||
add_avail(power_generated)
|
||||
|
||||
/obj/machinery/power/turbinemotor/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_wrench())
|
||||
if(W.has_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
turbine = null
|
||||
|
||||
@@ -239,7 +239,7 @@ 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.has_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>")
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
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.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
|
||||
if(!can_unwrench())
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if (connected_device)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], dettach \the [connected_device] first.</span>")
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
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.has_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>")
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
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.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warnng'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
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.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && !T.is_plating())
|
||||
|
||||
@@ -164,7 +164,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.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
@@ -390,8 +390,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(W.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
if (WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>Now welding the vent.</span>")
|
||||
if(do_after(user, 20 * WT.toolspeed))
|
||||
@@ -429,7 +429,7 @@
|
||||
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.has_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>")
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
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.has_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>")
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
open()
|
||||
|
||||
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
if (!W.has_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>")
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
if(istype(W,/obj/item/device/pipe_painter))
|
||||
return 0
|
||||
|
||||
if (!W.is_wrench())
|
||||
if (!W.has_tool_quality(TOOL_WRENCH))
|
||||
return ..()
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && !T.is_plating())
|
||||
|
||||
@@ -278,6 +278,7 @@ var/global/list/##LIST_NAME = list();\
|
||||
#define IS_CROWBAR "crowbar"
|
||||
#define IS_WIRECUTTER "wirecutter"
|
||||
#define IS_WRENCH "wrench"
|
||||
#define IS_WELDER "welder"
|
||||
|
||||
|
||||
// Diagonal movement
|
||||
|
||||
@@ -1044,7 +1044,7 @@ var/global/list/common_tools = list(
|
||||
|
||||
|
||||
/proc/is_wire_tool(obj/item/I)
|
||||
if(istype(I, /obj/item/device/multitool) || I.is_wirecutter())
|
||||
if(istype(I, /obj/item/device/multitool) || I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/device/assembly/signaler))
|
||||
return TRUE
|
||||
@@ -1058,6 +1058,12 @@ var/global/list/common_tools = list(
|
||||
return 3800
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/tool/transforming)
|
||||
var/obj/item/weapon/tool/transforming/TT = W
|
||||
if(TT.possible_tooltypes[TT.current_tooltype] == TOOL_WELDER)
|
||||
return 3800
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/flame/lighter)
|
||||
if(W:lit)
|
||||
return 1500
|
||||
@@ -1105,7 +1111,7 @@ var/global/list/common_tools = list(
|
||||
if(W.sharp)
|
||||
return TRUE
|
||||
return ( \
|
||||
W.is_screwdriver() || \
|
||||
W.has_tool_quality(TOOL_SCREWDRIVER) || \
|
||||
istype(W, /obj/item/weapon/pen) || \
|
||||
istype(W, /obj/item/weapon/weldingtool) || \
|
||||
istype(W, /obj/item/weapon/flame/lighter/zippo) || \
|
||||
|
||||
@@ -27,3 +27,7 @@
|
||||
/// DEPRECATED PROC: DO NOT USE IN NEW CODE
|
||||
/obj/item/proc/is_multitool()
|
||||
return has_tool_quality(TOOL_MULTITOOL)
|
||||
|
||||
/// DEPRECATED PROC: DO NOT USE IN NEW CODE
|
||||
/obj/item/proc/is_welder()
|
||||
return has_tool_quality(TOOL_WELDER)
|
||||
|
||||
@@ -41,16 +41,19 @@
|
||||
var/list/L = steps[steps.len]
|
||||
switch(L["key"])
|
||||
if(IS_SCREWDRIVER)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return steps.len
|
||||
if(IS_CROWBAR)
|
||||
if(I.is_crowbar())
|
||||
if(I.has_tool_quality(TOOL_CROWBAR))
|
||||
return steps.len
|
||||
if(IS_WIRECUTTER)
|
||||
if(I.is_wirecutter())
|
||||
if(I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
return steps.len
|
||||
if(IS_WRENCH)
|
||||
if(I.is_wrench())
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
return steps.len
|
||||
if(IS_WELDER)
|
||||
if(I.has_tool_quality(IS_WELDER))
|
||||
return steps.len
|
||||
|
||||
if(istype(I, L["key"]))
|
||||
@@ -108,30 +111,36 @@
|
||||
|
||||
switch(L["key"])
|
||||
if(IS_SCREWDRIVER)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return FORWARD
|
||||
if(IS_CROWBAR)
|
||||
if(I.is_crowbar())
|
||||
if(I.has_tool_quality(TOOL_CROWBAR))
|
||||
return FORWARD
|
||||
if(IS_WIRECUTTER)
|
||||
if(I.is_wirecutter())
|
||||
if(I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
return FORWARD
|
||||
if(IS_WRENCH)
|
||||
if(I.is_wrench())
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
return FORWARD
|
||||
if(IS_WELDER)
|
||||
if(I.has_tool_quality(IS_WELDER))
|
||||
return FORWARD
|
||||
|
||||
switch(L["backkey"])
|
||||
if(IS_SCREWDRIVER)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return BACKWARD
|
||||
if(IS_CROWBAR)
|
||||
if(I.is_crowbar())
|
||||
if(I.has_tool_quality(TOOL_CROWBAR))
|
||||
return BACKWARD
|
||||
if(IS_WIRECUTTER)
|
||||
if(I.is_wirecutter())
|
||||
if(I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
return BACKWARD
|
||||
if(IS_WRENCH)
|
||||
if(I.is_wrench())
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
return BACKWARD
|
||||
if(IS_WELDER)
|
||||
if(I.has_tool_quality(IS_WELDER))
|
||||
return BACKWARD
|
||||
|
||||
if(istype(I, L["key"]))
|
||||
|
||||
@@ -168,8 +168,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.has_tool_quality(TOOL_WIRECUTTER) && !user.can_admin_interact())
|
||||
if(!istype(I) || !I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
to_chat(user, "<span class='error'>You need wirecutters!</span>")
|
||||
return
|
||||
|
||||
@@ -179,8 +179,8 @@
|
||||
|
||||
// Pulse a wire.
|
||||
if("pulse")
|
||||
// if(!I.is_multitool() && !user.can_admin_interact())
|
||||
if(!istype(I) || !I.is_multitool())
|
||||
// if(!I.has_tool_quality(TOOL_MULTITOOL) && !user.can_admin_interact())
|
||||
if(!istype(I) || !I.has_tool_quality(TOOL_MULTITOOL))
|
||||
to_chat(user, "<span class='error'>You need a multitool!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
to_chat(user, "You load [result] lengths of cable into [src].")
|
||||
return
|
||||
|
||||
if(O.is_wirecutter())
|
||||
if(O.has_tool_quality(TOOL_WIRECUTTER))
|
||||
if(cable && cable.get_amount())
|
||||
var/m = round(input(usr, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) as num, 1)
|
||||
m = min(m, cable.get_amount())
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
. += "There is a small display that reads \"[convert_k2c(target_temp)]C\"."
|
||||
|
||||
/obj/machinery/power/thermoregulator/attackby(obj/item/I, mob/user)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(default_deconstruction_screwdriver(user,I))
|
||||
return
|
||||
if(I.is_crowbar())
|
||||
if(I.has_tool_quality(TOOL_CROWBAR))
|
||||
if(default_deconstruction_crowbar(user,I))
|
||||
return
|
||||
if(I.is_wrench())
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
visible_message("<span class='notice'>\The [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].</span>")
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
field_type = /obj/structure/atmospheric_retention_field/impassable
|
||||
|
||||
/obj/machinery/atmospheric_field_generator/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_crowbar() && isactive)
|
||||
if(W.has_tool_quality(TOOL_CROWBAR) && isactive)
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='warning'>You can't open the ARF-G whilst it's running!</span>")
|
||||
return
|
||||
if(W.is_crowbar() && !isactive)
|
||||
if(W.has_tool_quality(TOOL_CROWBAR) && !isactive)
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You [hatch_open? "close" : "open"] \the [src]'s access hatch.</span>")
|
||||
hatch_open = !hatch_open
|
||||
@@ -53,21 +53,21 @@
|
||||
if(alwaysactive && wires_intact)
|
||||
generate_field()
|
||||
return
|
||||
if(hatch_open && W.is_multitool())
|
||||
if(hatch_open && W.has_tool_quality(TOOL_MULTITOOL))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You toggle \the [src]'s activation behavior to [alwaysactive? "emergency" : "always-on"].</span>")
|
||||
alwaysactive = !alwaysactive
|
||||
update_icon()
|
||||
return
|
||||
if(hatch_open && W.is_wirecutter())
|
||||
if(hatch_open && W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='warning'>You [wires_intact? "cut" : "mend"] \the [src]'s wires!</span>")
|
||||
wires_intact = !wires_intact
|
||||
update_icon()
|
||||
return
|
||||
if(hatch_open && istype(W,/obj/item/weapon/weldingtool))
|
||||
if(hatch_open && W.has_tool_quality(TOOL_WELDER))
|
||||
if(!src) return
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
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>")
|
||||
|
||||
@@ -239,8 +239,8 @@ update_flag
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/weldingtool)) //Vorestart: Deconstructable Canisters
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(W.has_tool_quality(TOOL_WELDER)) //Vorestart: Deconstructable Canisters
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "The welding tool must be on to complete this task.")
|
||||
return
|
||||
@@ -255,7 +255,7 @@ update_flag
|
||||
qdel(src)
|
||||
return
|
||||
//Voreend
|
||||
if(!W.is_wrench() && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
|
||||
if(!W.has_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)
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/meter/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.is_wrench())
|
||||
if(W.has_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))
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if (W.is_wrench())
|
||||
else if (W.has_tool_quality(TOOL_WRENCH))
|
||||
if(connected_port)
|
||||
disconnect()
|
||||
to_chat(user, "<span class='notice'>You disconnect \the [src] from the port.</span>")
|
||||
@@ -173,7 +173,7 @@
|
||||
power_change()
|
||||
return
|
||||
|
||||
if(I.is_screwdriver() && removeable_cell)
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER) && removeable_cell)
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>There is no power cell installed.</span>")
|
||||
return
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
update_connected_network()
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/huge/attackby(var/obj/item/I, var/mob/user)
|
||||
if(I.is_wrench())
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
if(on)
|
||||
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
|
||||
return
|
||||
@@ -97,7 +97,7 @@
|
||||
//doesn't use power cells
|
||||
if(istype(I, /obj/item/weapon/cell))
|
||||
return
|
||||
if (I.is_screwdriver())
|
||||
if (I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return
|
||||
|
||||
//doesn't hold tanks
|
||||
@@ -111,7 +111,7 @@
|
||||
name = "Stationary Air Pump"
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/huge/stationary/attackby(var/obj/item/I, var/mob/user)
|
||||
if(I.is_wrench())
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
to_chat(user, "<span class='warning'>The bolts are too tight for you to unscrew!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
data["on"] = on ? 1 : 0
|
||||
data["connected"] = connected_port ? 1 : 0
|
||||
data["pressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0)
|
||||
|
||||
|
||||
data["rate"] = round(volume_rate)
|
||||
data["minrate"] = round(minrate)
|
||||
data["maxrate"] = round(maxrate)
|
||||
@@ -201,7 +201,7 @@
|
||||
update_use_power(new_use_power)
|
||||
if(!on)
|
||||
return
|
||||
|
||||
|
||||
var/power_draw = -1
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
@@ -218,7 +218,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.has_tool_quality(TOOL_WRENCH))
|
||||
if(on)
|
||||
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
|
||||
return
|
||||
@@ -232,7 +232,7 @@
|
||||
//doesn't use power cells
|
||||
if(istype(I, /obj/item/weapon/cell))
|
||||
return
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return
|
||||
|
||||
//doesn't hold tanks
|
||||
@@ -250,7 +250,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.has_tool_quality(TOOL_WRENCH))
|
||||
to_chat(user, "<span class='warning'>The bolts are too tight for you to unscrew!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
if(panel_open)
|
||||
//Don't eat multitools or wirecutters used on an open lathe.
|
||||
if(O.is_multitool() || O.is_wirecutter())
|
||||
if(O.has_tool_quality(TOOL_MULTITOOL) || O.has_tool_quality(TOOL_WIRECUTTER))
|
||||
wires.Interact(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
/obj/machinery/camera/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
update_coverage()
|
||||
// DECONSTRUCTION
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_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
|
||||
@@ -167,10 +167,10 @@
|
||||
"<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.has_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)))
|
||||
else if(W.has_tool_quality(TOOL_WELDER) && (wires.CanDeconstruct() || (stat & BROKEN)))
|
||||
if(weld(W, user))
|
||||
if(assembly)
|
||||
assembly.loc = src.loc
|
||||
@@ -372,6 +372,7 @@
|
||||
return null
|
||||
|
||||
/obj/machinery/camera/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
|
||||
WT = WT.get_welder()
|
||||
|
||||
if(busy)
|
||||
return 0
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
if(0)
|
||||
// State 0
|
||||
if(W.is_wrench() && isturf(src.loc))
|
||||
if(W.has_tool_quality(TOOL_WRENCH) && isturf(src.loc))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "You wrench the assembly into place.")
|
||||
anchored = TRUE
|
||||
@@ -40,14 +40,14 @@
|
||||
|
||||
if(1)
|
||||
// State 1
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(W.has_tool_quality(TOOL_WELDER))
|
||||
if(weld(W, user))
|
||||
to_chat(user, "You weld the assembly securely into place.")
|
||||
anchored = TRUE
|
||||
state = 2
|
||||
return
|
||||
|
||||
else if(W.is_wrench())
|
||||
else if(W.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "You unattach the assembly from its place.")
|
||||
anchored = FALSE
|
||||
@@ -66,7 +66,7 @@
|
||||
to_chat(user, "<span class='warning'>You need 2 coils of wire to wire the assembly.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
else if(W.has_tool_quality(TOOL_WELDER))
|
||||
|
||||
if(weld(W, user))
|
||||
to_chat(user, "You unweld the assembly from its place.")
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
if(3)
|
||||
// State 3
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
var/input = sanitize(tgui_input_text(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.has_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.has_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,6 +154,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
|
||||
WT = WT.get_welder()
|
||||
|
||||
if(busy)
|
||||
return 0
|
||||
|
||||
@@ -74,7 +74,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.has_tool_quality(TOOL_WRENCH))
|
||||
if(charging)
|
||||
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
|
||||
return
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
if(busy)
|
||||
to_chat(user,"<span class='notice'>The claw machine is currently running.</span> ")
|
||||
return
|
||||
if(W.is_wrench())
|
||||
if(W.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.has_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
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
|
||||
switch(state)
|
||||
if(0)
|
||||
if(P.is_wrench())
|
||||
if(P.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(P.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = P.get_welder()
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "The welder must be on for this task.")
|
||||
return
|
||||
@@ -33,7 +33,7 @@
|
||||
new /obj/item/stack/material/plasteel( loc, 4)
|
||||
qdel(src)
|
||||
if(1)
|
||||
if(P.is_wrench())
|
||||
if(P.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
@@ -46,12 +46,12 @@
|
||||
circuit = P
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
if(P.is_screwdriver() && circuit)
|
||||
if(P.has_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.has_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
|
||||
@@ -59,7 +59,7 @@
|
||||
circuit.loc = loc
|
||||
circuit = null
|
||||
if(2)
|
||||
if(P.is_screwdriver() && circuit)
|
||||
if(P.has_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
|
||||
@@ -78,7 +78,7 @@
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
return
|
||||
if(3)
|
||||
if(P.is_wirecutter())
|
||||
if(P.has_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.has_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.has_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.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(!brain)
|
||||
@@ -232,7 +232,7 @@ 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.has_tool_quality(TOOL_WRENCH))
|
||||
if(anchored)
|
||||
user.visible_message("<b>\The [user]</b> starts to unbolt \the [src] from the plating...")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_keyboard = "tech_key"
|
||||
icon_screen = "ai-fixer"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
|
||||
active_power_usage = 1000
|
||||
|
||||
/// Variable containing transferred AI
|
||||
@@ -15,7 +15,7 @@
|
||||
var/restoring = FALSE
|
||||
|
||||
/obj/machinery/computer/aifixer/attackby(obj/item/I, mob/living/user)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_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>")
|
||||
@@ -85,10 +85,10 @@
|
||||
return TRUE
|
||||
if(!occupier)
|
||||
restoring = FALSE
|
||||
|
||||
|
||||
if(action)
|
||||
playsound(src, "terminal_type", 50, 1)
|
||||
|
||||
|
||||
switch(action)
|
||||
if("PRG_beginReconstruction")
|
||||
if(occupier?.health < 100)
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(P.is_wrench())
|
||||
if(P.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
src.anchored = TRUE
|
||||
src.state = 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(P.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = P.get_welder()
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "The welding tool must be on to complete this task.")
|
||||
return
|
||||
@@ -31,7 +31,7 @@
|
||||
new /obj/item/stack/material/steel( src.loc, 5 )
|
||||
qdel(src)
|
||||
if(1)
|
||||
if(P.is_wrench())
|
||||
if(P.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
@@ -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.has_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.has_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.has_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.has_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.has_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.has_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 )
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return
|
||||
if(!istype(user))
|
||||
return
|
||||
if(O.is_screwdriver() && emag)
|
||||
if(O.has_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
|
||||
@@ -101,7 +101,7 @@
|
||||
if(linkedServer && auth)
|
||||
data["linkedServer"]["active"] = linkedServer.active
|
||||
data["linkedServer"]["broke"] = linkedServer.stat & (NOPOWER|BROKEN)
|
||||
|
||||
|
||||
var/list/pda_msgs = list()
|
||||
for(var/datum/data_pda_msg/pda in linkedServer.pda_msgs)
|
||||
pda_msgs.Add(list(list(
|
||||
@@ -111,7 +111,7 @@
|
||||
"message" = pda.message,
|
||||
)))
|
||||
data["linkedServer"]["pda_msgs"] = pda_msgs
|
||||
|
||||
|
||||
var/list/rc_msgs = list()
|
||||
for(var/datum/data_rc_msg/rc in linkedServer.rc_msgs)
|
||||
rc_msgs.Add(list(list(
|
||||
@@ -182,7 +182,7 @@
|
||||
/obj/machinery/computer/message_monitor/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
|
||||
switch(action)
|
||||
if("cleartemp")
|
||||
temp = null
|
||||
@@ -218,14 +218,14 @@
|
||||
spawn(100*length(linkedServer.decryptkey))
|
||||
if(src && linkedServer && usr)
|
||||
BruteForce(usr)
|
||||
|
||||
|
||||
if(!auth)
|
||||
return
|
||||
|
||||
|
||||
if(!linkedServer || linkedServer.stat & (NOPOWER|BROKEN))
|
||||
temp = noserver
|
||||
return TRUE
|
||||
|
||||
|
||||
switch(action)
|
||||
//Turn the server on/off.
|
||||
if("active")
|
||||
@@ -277,7 +277,7 @@
|
||||
var/obj/item/device/pda/P = locate(ref)
|
||||
if(!istype(P) || !P.owner || P.hidden)
|
||||
return FALSE
|
||||
|
||||
|
||||
var/datum/data/pda/app/messenger/M = P.find_program(/datum/data/pda/app/messenger)
|
||||
if(!M || M.toff)
|
||||
return FALSE
|
||||
@@ -316,7 +316,7 @@
|
||||
//Sender is faking as someone who exists
|
||||
else
|
||||
linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
|
||||
|
||||
|
||||
var/datum/data/pda/app/messenger/M = customrecepient.find_program(/datum/data/pda/app/messenger)
|
||||
if(M)
|
||||
M.receive_message(list("sent" = 0, "owner" = "[PDARec.owner]", "job" = "[customjob]", "message" = "[custommessage]", "target" = "\ref[PDARec]"), "\ref[PDARec]")
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_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.has_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)
|
||||
@@ -76,7 +76,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.has_tool_quality(TOOL_WIRECUTTER))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 1
|
||||
@@ -85,7 +85,7 @@
|
||||
A.amount = 5
|
||||
|
||||
if(3)
|
||||
if(P.is_crowbar())
|
||||
if(P.has_tool_quality(TOOL_CROWBAR))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
state = 2
|
||||
circuit.loc = src.loc
|
||||
@@ -101,7 +101,7 @@
|
||||
components = null
|
||||
icon_state = "box_1"
|
||||
else
|
||||
if(P.is_screwdriver())
|
||||
if(P.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
|
||||
@@ -47,7 +47,7 @@ Deployable items
|
||||
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
|
||||
return
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.has_tool_quality(TOOL_WRENCH))
|
||||
if(health < maxhealth)
|
||||
health = maxhealth
|
||||
emagged = 0
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
var/obj/item/device/multitool/M = W
|
||||
M.connectable = src
|
||||
to_chat(user, "<span class='caution'>You save the data in \the [M]'s buffer.</span>")
|
||||
else if(W.is_wrench())
|
||||
else if(W.has_tool_quality(TOOL_WRENCH))
|
||||
to_chat(user, "<span class='notice'>You start to unwrench \the [src].</span>")
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 15) && !QDELETED(src))
|
||||
|
||||
@@ -1141,8 +1141,8 @@ About the new airlock wires panel:
|
||||
if(istype(C, /mob/living))
|
||||
..()
|
||||
return
|
||||
if(!repairing && istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
if(!repairing && C.has_tool_quality(TOOL_WELDER) && !( src.operating > 0 ) && src.density)
|
||||
var/obj/item/weapon/weldingtool/W = C.get_welder()
|
||||
if(W.remove_fuel(0,user))
|
||||
if(!src.welded)
|
||||
src.welded = 1
|
||||
@@ -1153,7 +1153,7 @@ About the new airlock wires panel:
|
||||
return
|
||||
else
|
||||
return
|
||||
else if(C.is_screwdriver())
|
||||
else if(C.has_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>")
|
||||
@@ -1167,7 +1167,7 @@ About the new airlock wires panel:
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
src.update_icon()
|
||||
return src.attack_hand(user)
|
||||
else if(C.is_wirecutter())
|
||||
else if(C.has_tool_quality(TOOL_WIRECUTTER))
|
||||
return src.attack_hand(user)
|
||||
else if(istype(C, /obj/item/device/multitool))
|
||||
return src.attack_hand(user)
|
||||
@@ -1176,7 +1176,7 @@ 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.has_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.")
|
||||
|
||||
@@ -259,12 +259,12 @@
|
||||
|
||||
return
|
||||
|
||||
if(repairing && istype(I, /obj/item/weapon/weldingtool))
|
||||
if(repairing && I.has_tool_quality(TOOL_WELDER))
|
||||
if(!density)
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/weapon/weldingtool/welder = I
|
||||
var/obj/item/weapon/weldingtool/welder = I.get_welder()
|
||||
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)
|
||||
@@ -275,7 +275,7 @@
|
||||
repairing = 0
|
||||
return
|
||||
|
||||
if(repairing && I.is_crowbar())
|
||||
if(repairing && I.has_tool_quality(TOOL_CROWBAR))
|
||||
var/datum/material/mat = get_material()
|
||||
var/obj/item/stack/material/repairing_sheet = mat.place_sheet(loc, repairing)
|
||||
repairing = 0
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
if(reinforcing && istype(I, /obj/item/weapon/weldingtool))
|
||||
if(reinforcing && I.has_tool_quality(TOOL_WELDER))
|
||||
if(!density)
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can reinforce it.</span>")
|
||||
return TRUE
|
||||
@@ -78,7 +78,7 @@
|
||||
to_chat(user, "<span class='warning'>You will need more plasteel to reinforce \the [src].</span>")
|
||||
return TRUE
|
||||
|
||||
var/obj/item/weapon/weldingtool/welder = I
|
||||
var/obj/item/weapon/weldingtool/welder = I.get_welder()
|
||||
if(welder.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You start weld \the plasteel into place.</span>")
|
||||
playsound(src, welder.usesound, 50, 1)
|
||||
@@ -89,7 +89,7 @@
|
||||
reinforcing = 0
|
||||
return TRUE
|
||||
|
||||
if(reinforcing && I.is_crowbar())
|
||||
if(reinforcing && I.has_tool_quality(TOOL_CROWBAR))
|
||||
var/obj/item/stack/material/plasteel/reinforcing_sheet = new /obj/item/stack/material/plasteel(src.loc, reinforcing)
|
||||
reinforcing = 0
|
||||
to_chat(user, "<span class='notice'>You remove \the [reinforcing_sheet].</span>")
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(F != src)
|
||||
log_debug("Duplicate firedoors at [x],[y],[z]")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
var/area/A = get_area(src)
|
||||
ASSERT(istype(A))
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/machinery/door/firedoor/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
|
||||
if(!Adjacent(user))
|
||||
return .
|
||||
|
||||
@@ -249,10 +249,10 @@
|
||||
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(C.has_tool_quality(TOOL_WELDER) && !repairing)
|
||||
if(prying)
|
||||
to_chat(user, "<span class='notice'>Someone's busy prying that [density ? "open" : "closed"]!</span>")
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
var/obj/item/weapon/weldingtool/W = C.get_welder()
|
||||
if(W.remove_fuel(0, user))
|
||||
blocked = !blocked
|
||||
user.visible_message("<span class='danger'>\The [user] [blocked ? "welds" : "unwelds"] \the [src] with \a [W].</span>",\
|
||||
@@ -262,7 +262,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(density && C.is_screwdriver())
|
||||
if(density && C.has_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.has_tool_quality(TOOL_CROWBAR) && !repairing)
|
||||
if(!hatch_open)
|
||||
to_chat(user, "<span class='danger'>You must open the maintenance hatch first!</span>")
|
||||
else
|
||||
@@ -304,7 +304,7 @@
|
||||
if(operating)
|
||||
return
|
||||
|
||||
if(blocked && C.is_crowbar())
|
||||
if(blocked && C.has_tool_quality(TOOL_CROWBAR))
|
||||
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.")
|
||||
@@ -326,7 +326,7 @@
|
||||
update_icon()
|
||||
playsound(src, C.usesound, 100, 1)
|
||||
if(do_after(user,30 * C.toolspeed))
|
||||
if(C.is_crowbar())
|
||||
if(C.has_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.has_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,14 +54,14 @@
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You must secure \the [src] first!</span>")
|
||||
else if(C.is_wrench())
|
||||
else if(C.has_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))
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
else if((glass || !anchored) && C.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = C.get_welder()
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(glass)
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
|
||||
if(istype(I))
|
||||
// Fixing.
|
||||
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(I.has_tool_quality(TOOL_WELDER) && user.a_intent == I_HELP)
|
||||
var/obj/item/weapon/weldingtool/WT = I.get_welder()
|
||||
if(health < maxhealth)
|
||||
if(WT.remove_fuel(1 ,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
@@ -215,7 +215,7 @@
|
||||
return 1
|
||||
|
||||
//If it's opened/emagged, crowbar can pry it out of its frame.
|
||||
if (!density && I.is_crowbar())
|
||||
if (!density && I.has_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))
|
||||
|
||||
@@ -78,9 +78,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.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
default_deconstruction_screwdriver(user, I)
|
||||
else if(I.is_crowbar())
|
||||
else if(I.has_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.has_tool_quality(TOOL_WIRECUTTER))
|
||||
add_fingerprint(user)
|
||||
disable = !disable
|
||||
if(disable)
|
||||
@@ -107,7 +107,7 @@
|
||||
flash()
|
||||
|
||||
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_wrench())
|
||||
if(W.has_tool_quality(TOOL_WRENCH))
|
||||
add_fingerprint(user)
|
||||
anchored = !anchored
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
user.show_message(text("<span class='warning'>[src] can now be moved.</span>"))
|
||||
cut_overlays()
|
||||
unsense_proximity(callback = /atom/proc/HasProximity)
|
||||
|
||||
|
||||
else if(anchored)
|
||||
user.show_message(text("<span class='warning'>[src] is now secured.</span>"))
|
||||
add_overlay("[base_state]-s")
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(!open)
|
||||
if(unlocked)
|
||||
unlocked = 0
|
||||
@@ -111,7 +111,7 @@
|
||||
unlocked = 1
|
||||
to_chat(user, "You unscrew the battery panel.")
|
||||
|
||||
if(W.is_crowbar())
|
||||
if(W.has_tool_quality(TOOL_CROWBAR))
|
||||
if(unlocked)
|
||||
if(open)
|
||||
open = 0
|
||||
|
||||
@@ -23,11 +23,11 @@ var/list/floor_light_cache = list()
|
||||
anchored = TRUE
|
||||
|
||||
/obj/machinery/floor_light/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_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)))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
else if(W.has_tool_quality(TOOL_WELDER) && (damaged || (stat & BROKEN)))
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "<span class='warning'>\The [src] must be on to complete this task.</span>")
|
||||
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.has_tool_quality(TOOL_WRENCH))
|
||||
var/m = tgui_input_list(usr, "Choose work mode", "Mode", mode)
|
||||
mode[m] = !mode[m]
|
||||
var/O = mode[m]
|
||||
@@ -47,7 +47,7 @@
|
||||
TakeTile(T)
|
||||
return
|
||||
|
||||
if(W.is_crowbar())
|
||||
if(W.has_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.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
T = tgui_input_list(usr, "Choose tile type.", "Tiles", contents)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(P.is_wrench())
|
||||
if(P.has_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)
|
||||
@@ -320,9 +320,9 @@
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
anchored = FALSE
|
||||
|
||||
else if(istype(P, /obj/item/weapon/weldingtool))
|
||||
else if(P.has_tool_quality(TOOL_WELDER))
|
||||
if(state == FRAME_PLACED)
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
var/obj/item/weapon/weldingtool/WT = P.get_welder()
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20 * P.toolspeed))
|
||||
@@ -353,7 +353,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.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(state == FRAME_UNFASTENED)
|
||||
if(need_circuit && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
@@ -448,7 +448,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if(P.is_crowbar())
|
||||
else if(P.has_tool_quality(TOOL_CROWBAR))
|
||||
if(state == FRAME_UNFASTENED)
|
||||
if(need_circuit && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
@@ -525,7 +525,7 @@
|
||||
break
|
||||
to_chat(user, desc)
|
||||
|
||||
else if(P.is_wirecutter())
|
||||
else if(P.has_tool_quality(TOOL_WIRECUTTER))
|
||||
if(state == FRAME_WIRED)
|
||||
if( \
|
||||
frame_type.frame_class == FRAME_CLASS_COMPUTER || \
|
||||
|
||||
@@ -83,7 +83,7 @@ GLOBAL_LIST_EMPTY(holoposters)
|
||||
src.add_fingerprint(user)
|
||||
if(stat & (NOPOWER))
|
||||
return
|
||||
if (W.is_multitool())
|
||||
if (W.has_tool_quality(TOOL_MULTITOOL))
|
||||
playsound(src, 'sound/items/penclick.ogg', 60, 1)
|
||||
icon_state = tgui_input_list(usr, "Available Posters", "Holographic Poster", postertypes + "random")
|
||||
if(!Adjacent(user))
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
// sd_SetLuminosity(0)
|
||||
|
||||
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
add_fingerprint(user)
|
||||
disable = !disable
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_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))
|
||||
|
||||
@@ -108,11 +108,11 @@
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(W.is_wirecutter())
|
||||
if(W.has_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.has_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>")
|
||||
@@ -270,7 +270,7 @@
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(W.is_wrench())
|
||||
if(W.has_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>")
|
||||
|
||||
@@ -365,7 +365,7 @@ Class Procs:
|
||||
|
||||
// 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.has_tool_quality(TOOL_WRENCH))
|
||||
return FALSE
|
||||
if(panel_open)
|
||||
return FALSE // Close panel first!
|
||||
@@ -385,14 +385,14 @@ Class Procs:
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/C)
|
||||
if(!C.is_crowbar())
|
||||
if(!C.has_tool_quality(TOOL_CROWBAR))
|
||||
return 0
|
||||
if(!panel_open)
|
||||
return 0
|
||||
. = dismantle()
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
|
||||
if(!S.is_screwdriver())
|
||||
if(!S.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return 0
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
panel_open = !panel_open
|
||||
@@ -401,7 +401,7 @@ Class Procs:
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
|
||||
if(!S.is_screwdriver())
|
||||
if(!S.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return 0
|
||||
if(!circuit)
|
||||
return 0
|
||||
@@ -416,7 +416,7 @@ Class Procs:
|
||||
. = dismantle()
|
||||
|
||||
/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/S)
|
||||
if(!S.is_screwdriver())
|
||||
if(!S.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return 0
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
panel_open = !panel_open
|
||||
@@ -425,7 +425,7 @@ Class Procs:
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/W)
|
||||
if(!W.is_wirecutter())
|
||||
if(!W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
return 0
|
||||
if(!panel_open)
|
||||
return 0
|
||||
|
||||
@@ -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.has_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.has_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.has_tool_quality(TOOL_WIRECUTTER) || istype(O, /obj/item/device/multitool))
|
||||
if(opened == 1)
|
||||
nukehack_win(user)
|
||||
return
|
||||
@@ -94,9 +94,9 @@ var/bomb_set
|
||||
if(anchored)
|
||||
switch(removal_stage)
|
||||
if(0)
|
||||
if(istype(O,/obj/item/weapon/weldingtool))
|
||||
if(O.has_tool_quality(TOOL_WELDER))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
var/obj/item/weapon/weldingtool/WT = O.get_welder()
|
||||
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>")
|
||||
@@ -111,7 +111,7 @@ var/bomb_set
|
||||
return
|
||||
|
||||
if(1)
|
||||
if(O.is_crowbar())
|
||||
if(O.has_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)
|
||||
@@ -122,9 +122,9 @@ var/bomb_set
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(istype(O,/obj/item/weapon/weldingtool))
|
||||
if(O.has_tool_quality(TOOL_WELDER))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
var/obj/item/weapon/weldingtool/WT = O.get_welder()
|
||||
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>")
|
||||
@@ -139,7 +139,7 @@ var/bomb_set
|
||||
return
|
||||
|
||||
if(3)
|
||||
if(O.is_wrench())
|
||||
if(O.has_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)
|
||||
@@ -150,7 +150,7 @@ var/bomb_set
|
||||
return
|
||||
|
||||
if(4)
|
||||
if(O.is_crowbar())
|
||||
if(O.has_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)
|
||||
@@ -262,7 +262,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.has_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.has_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
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
icon_state = "[initial(icon_state)]_off"
|
||||
|
||||
/obj/machinery/pda_multicaster/attackby(obj/item/I, mob/user)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
default_deconstruction_screwdriver(user, I)
|
||||
else if(I.is_crowbar())
|
||||
else if(I.has_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.has_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.has_tool_quality(TOOL_WRENCH))
|
||||
return wrench_act(user, W)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -78,11 +78,11 @@
|
||||
if("p_layer")
|
||||
p_layer = text2num(params["p_layer"])
|
||||
if("dispense_pipe")
|
||||
if(!wait)
|
||||
if(!wait)
|
||||
var/datum/pipe_recipe/recipe = locate(params["ref"])
|
||||
if(!istype(recipe))
|
||||
return
|
||||
|
||||
|
||||
var/target_dir = NORTH
|
||||
if(params["bent"])
|
||||
target_dir = NORTHEAST
|
||||
@@ -116,7 +116,7 @@
|
||||
user.drop_item()
|
||||
qdel(W)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.has_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>")
|
||||
|
||||
@@ -81,12 +81,12 @@
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
if (!panel_open && W.is_wrench())
|
||||
if (!panel_open && W.has_tool_quality(TOOL_WRENCH))
|
||||
P_type_t = tgui_input_list(usr, "Choose pipe type", "Pipe type", 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.has_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
|
||||
|
||||
@@ -93,7 +93,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
|
||||
return data
|
||||
|
||||
/obj/machinery/pointdefense_control/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W?.is_multitool())
|
||||
if(W?.has_tool_quality(TOOL_MULTITOOL))
|
||||
var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "[src]", id_tag, MAX_NAME_LEN)
|
||||
new_ident = sanitize(new_ident,MAX_NAME_LEN)
|
||||
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
@@ -211,7 +211,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
|
||||
return PDC
|
||||
|
||||
/obj/machinery/power/pointdefense/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W?.is_multitool())
|
||||
if(W?.has_tool_quality(TOOL_MULTITOOL))
|
||||
var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "[src]", id_tag, MAX_NAME_LEN)
|
||||
new_ident = sanitize(new_ident,MAX_NAME_LEN)
|
||||
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
|
||||
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user)
|
||||
if(stat & BROKEN)
|
||||
if(I.is_crowbar())
|
||||
if(I.has_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>")
|
||||
@@ -506,7 +506,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.has_tool_quality(TOOL_WRENCH))
|
||||
if(enabled || raised)
|
||||
to_chat(user, "<span class='warning'>You cannot unsecure an active turret!</span>")
|
||||
return
|
||||
@@ -948,14 +948,14 @@
|
||||
//this is a bit unwieldy but self-explanatory
|
||||
switch(build_step)
|
||||
if(0) //first step
|
||||
if(I.is_wrench() && !anchored)
|
||||
if(I.has_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.has_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)
|
||||
@@ -973,7 +973,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.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
|
||||
anchored = FALSE
|
||||
@@ -981,14 +981,14 @@
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(I.is_wrench())
|
||||
if(I.has_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))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
else if(I.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = I.get_welder()
|
||||
if(!WT.isOn())
|
||||
return
|
||||
if(WT.get_fuel() < 5) //uses up 5 fuel.
|
||||
@@ -1021,7 +1021,7 @@
|
||||
qdel(I) //delete the gun :(
|
||||
return
|
||||
|
||||
else if(I.is_wrench())
|
||||
else if(I.has_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
|
||||
@@ -1040,7 +1040,7 @@
|
||||
//attack_hand() removes the gun
|
||||
|
||||
if(5)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_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>")
|
||||
@@ -1058,15 +1058,15 @@
|
||||
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.has_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))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(I.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = I.get_welder()
|
||||
if(!WT.isOn()) return
|
||||
if(WT.get_fuel() < 5)
|
||||
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
|
||||
@@ -1088,7 +1088,7 @@
|
||||
|
||||
qdel(src) // qdel
|
||||
|
||||
else if(I.is_crowbar())
|
||||
else if(I.has_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)
|
||||
|
||||
@@ -91,7 +91,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.has_tool_quality(TOOL_WRENCH))
|
||||
if(charging)
|
||||
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
|
||||
return
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
icon_state = "sheater0"
|
||||
name = "space heater"
|
||||
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
|
||||
|
||||
|
||||
light_system = MOVABLE_LIGHT
|
||||
light_range = 3
|
||||
light_power = 1
|
||||
light_on = FALSE
|
||||
|
||||
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/cell_type = /obj/item/weapon/cell/high
|
||||
var/state = 0
|
||||
@@ -90,7 +90,7 @@
|
||||
else
|
||||
to_chat(user, "The hatch must be open to insert a power cell.")
|
||||
return
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.has_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>")
|
||||
|
||||
@@ -141,7 +141,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
|
||||
return
|
||||
|
||||
//Hacking init.
|
||||
if(istype(I, /obj/item/device/multitool) || I.is_wirecutter())
|
||||
if(istype(I, /obj/item/device/multitool) || I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
@@ -177,7 +177,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
|
||||
updateUsrDialog()
|
||||
|
||||
return
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
|
||||
panel_open = !panel_open
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(!ispowered)
|
||||
return
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_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>")
|
||||
|
||||
@@ -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.has_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
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(active)
|
||||
to_chat(user, "<span class='danger'>You need to deactivate the beacon first!</span>")
|
||||
return
|
||||
|
||||
@@ -18,7 +18,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.has_tool_quality(TOOL_WRENCH))
|
||||
new refund_type(get_turf(src.loc), refund_amt)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
return
|
||||
if(default_unfasten_wrench(user, W, 40))
|
||||
return
|
||||
/*if(W.is_screwdriver())
|
||||
/*if(W.has_tool_quality(TOOL_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))
|
||||
|
||||
@@ -1446,7 +1446,7 @@
|
||||
to_chat(user, "<span class='warning'>Invalid ID: Access denied.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>")
|
||||
else if(W.is_wrench())
|
||||
else if(W.has_tool_quality(TOOL_WRENCH))
|
||||
if(state==MECHA_BOLTS_SECURED)
|
||||
state = MECHA_PANEL_LOOSE
|
||||
to_chat(user, "You undo the securing bolts.")
|
||||
@@ -1454,7 +1454,7 @@
|
||||
state = MECHA_BOLTS_SECURED
|
||||
to_chat(user, "You tighten the securing bolts.")
|
||||
return
|
||||
else if(W.is_crowbar())
|
||||
else if(W.has_tool_quality(TOOL_CROWBAR))
|
||||
if(state==MECHA_PANEL_LOOSE)
|
||||
state = MECHA_CELL_OPEN
|
||||
to_chat(user, "You open the hatch to the power unit")
|
||||
@@ -1487,7 +1487,7 @@
|
||||
else
|
||||
to_chat(user, "There's not enough wire to finish the task.")
|
||||
return
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(hasInternalDamage(MECHA_INT_TEMP_CONTROL))
|
||||
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
|
||||
to_chat(user, "You repair the damaged temperature controller.")
|
||||
@@ -1526,8 +1526,8 @@
|
||||
to_chat(user, "There's already a powercell installed.")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != I_HURT)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
else if(W.has_tool_quality(TOOL_WELDER) && user.a_intent != I_HURT)
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
var/obj/item/mecha_parts/component/hull/HC = internal_components[MECH_HULL]
|
||||
var/obj/item/mecha_parts/component/armor/AC = internal_components[MECH_ARMOR]
|
||||
if (WT.remove_fuel(0,user))
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
////////////////////////////////
|
||||
|
||||
/datum/construction/mecha/custom_action(step, obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if (W.remove_fuel(0, user))
|
||||
if(I.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/W = I.get_welder()
|
||||
if(W.remove_fuel(0, user))
|
||||
playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
|
||||
else
|
||||
return 0
|
||||
else if(I.is_wrench())
|
||||
else if(I.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
else if(I.is_wirecutter())
|
||||
else if(I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
|
||||
else if(istype(I, /obj/item/stack/cable_coil))
|
||||
@@ -35,19 +35,19 @@
|
||||
return 1
|
||||
|
||||
/datum/construction/reversible/mecha/custom_action(index as num, diff as num, obj/item/I, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if (W.remove_fuel(0, user))
|
||||
if(I.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/W = I.get_welder()
|
||||
if(W.remove_fuel(0, user))
|
||||
playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
|
||||
else
|
||||
return 0
|
||||
else if(I.is_wrench())
|
||||
else if(I.has_tool_quality(TOOL_WRENCH))
|
||||
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
else if(I.is_wirecutter())
|
||||
else if(I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
|
||||
else if(istype(I, /obj/item/stack/cable_coil))
|
||||
@@ -102,7 +102,7 @@
|
||||
result = "/obj/mecha/working/ripley"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -111,10 +111,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/stack/material/plasteel,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -310,7 +310,7 @@
|
||||
result = "/obj/mecha/combat/gygax"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -319,10 +319,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/mecha_parts/part/gygax_armour,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -592,7 +592,7 @@
|
||||
result = "/obj/mecha/combat/gygax/serenity"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -601,10 +601,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/stack/material/plasteel,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -875,7 +875,7 @@
|
||||
result = "/obj/mecha/working/ripley/firefighter"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -888,10 +888,10 @@
|
||||
"desc"="External armor is being installed."),
|
||||
//4
|
||||
list("key"=/obj/item/stack/material/plasteel,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//5
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//6
|
||||
@@ -1095,7 +1095,7 @@
|
||||
result = "/obj/mecha/combat/durand"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -1104,10 +1104,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/mecha_parts/part/durand_armour,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -1377,7 +1377,7 @@
|
||||
result = "/obj/mecha/medical/odysseus"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -1386,10 +1386,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/stack/material/plasteel,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -1586,7 +1586,7 @@
|
||||
result = "/obj/mecha/combat/phazon"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -1595,10 +1595,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/stack/material/plasteel,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -1865,7 +1865,7 @@
|
||||
result = "/obj/mecha/combat/phazon/janus"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_CROWBAR,
|
||||
"desc"="External armor is installed."),
|
||||
//2
|
||||
@@ -1874,10 +1874,10 @@
|
||||
"desc"="External armor is attached."),
|
||||
//3
|
||||
list("key"=/obj/item/stack/material/morphium,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded"),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_CROWBAR,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(W.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
if(salvage_num <= 0)
|
||||
to_chat(user, "You don't see anything that can be cut with [W].")
|
||||
return
|
||||
@@ -49,7 +49,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
|
||||
return
|
||||
if(W.is_wirecutter())
|
||||
if(W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
if(salvage_num <= 0)
|
||||
to_chat(user, "You don't see anything that can be cut with [W].")
|
||||
return
|
||||
@@ -61,7 +61,7 @@
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "You failed to salvage anything valuable from [src].")
|
||||
if(W.is_crowbar())
|
||||
if(W.has_tool_quality(TOOL_CROWBAR))
|
||||
if(!isemptylist(crowbar_salvage))
|
||||
var/obj/S = pick(crowbar_salvage)
|
||||
if(S)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
result = "/obj/mecha/micro/sec/polecat"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -42,10 +42,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/mecha_parts/micro/part/polecat_armour,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -312,7 +312,7 @@
|
||||
result = "/obj/mecha/micro/utility/gopher"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -321,10 +321,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/stack/material/plasteel,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
@@ -518,7 +518,7 @@
|
||||
result = "/obj/mecha/micro/sec/weasel"
|
||||
steps = list(
|
||||
//1
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="External armor is wrenched."),
|
||||
//2
|
||||
@@ -527,10 +527,10 @@
|
||||
"desc"="External armor is installed."),
|
||||
//3
|
||||
list("key"=/obj/item/stack/material/plasteel,
|
||||
"backkey"=/obj/item/weapon/weldingtool,
|
||||
"backkey"=IS_WELDER,
|
||||
"desc"="Internal armor is welded."),
|
||||
//4
|
||||
list("key"=/obj/item/weapon/weldingtool,
|
||||
list("key"=IS_WELDER,
|
||||
"backkey"=IS_WRENCH,
|
||||
"desc"="Internal armor is wrenched"),
|
||||
//5
|
||||
|
||||
@@ -192,8 +192,8 @@
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(W.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
poster_set = TRUE
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_wirecutter())
|
||||
if(W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
flick("poster_being_set", src)
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_wirecutter())
|
||||
if(W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
explode(M)
|
||||
|
||||
/obj/effect/mine/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
panel_open = !panel_open
|
||||
user.visible_message("<span class='warning'>[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].</span>",
|
||||
"<span class='notice'>You very carefully screw the mine's panel [panel_open ? "open" : "closed"].</span>")
|
||||
@@ -110,7 +110,7 @@
|
||||
// Panel open, stay uncloaked, or uncloak if already cloaked. If you don't cloak on place, ignore it and just be normal alpha.
|
||||
alpha = camo_net ? (panel_open ? 255 : 50) : 255
|
||||
|
||||
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open)
|
||||
else if((W.has_tool_quality(TOOL_WIRECUTTER) || istype(W, /obj/item/device/multitool)) && panel_open)
|
||||
interact(user)
|
||||
else
|
||||
..()
|
||||
@@ -309,7 +309,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/mine/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
if(W.is_screwdriver() && trap)
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER) && trap)
|
||||
to_chat(user, "<span class='notice'>You begin removing \the [trap].</span>")
|
||||
if(do_after(user, 10 SECONDS))
|
||||
to_chat(user, "<span class='notice'>You finish disconnecting the mine's trigger.</span>")
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(W.has_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
|
||||
@@ -1018,3 +1018,6 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen
|
||||
|
||||
/obj/item/proc/on_holder_escape(var/obj/item/weapon/holder/H)
|
||||
return
|
||||
|
||||
/obj/item/proc/get_welder()
|
||||
return
|
||||
@@ -87,7 +87,7 @@
|
||||
/obj/item/weapon/deskbell/attackby(obj/item/W, mob/user, params)
|
||||
if(!istype(W))
|
||||
return
|
||||
if(W.is_wrench() && isturf(loc))
|
||||
if(W.has_tool_quality(TOOL_WRENCH) && isturf(loc))
|
||||
if(do_after(5))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You dissasemble the desk bell</span>")
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
src.name = "body bag"
|
||||
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
|
||||
return
|
||||
else if(W.is_wirecutter())
|
||||
else if(W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
to_chat(user, "You cut the tag off the bodybag")
|
||||
src.name = "body bag"
|
||||
cut_overlays()
|
||||
@@ -244,7 +244,7 @@
|
||||
inject_occupant(H)
|
||||
break
|
||||
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(syringe)
|
||||
if(used)
|
||||
to_chat(user,"<span class='warning'>The injector cannot be removed now that the stasis bag has been used!</span>")
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(bcell)
|
||||
bcell.update_icon()
|
||||
bcell.forceMove(get_turf(src.loc))
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
power_supply = new cell_type(src)
|
||||
|
||||
/obj/item/device/flash/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.is_screwdriver() && broken)
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER) && broken)
|
||||
if(repairing)
|
||||
to_chat(user, "<span class='notice'>\The [src] is already being repaired!</span>")
|
||||
return
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/list/known_targets
|
||||
var/list/supported_types
|
||||
var/datum/tgui_state/default/must_hack/hack_state
|
||||
|
||||
|
||||
/obj/item/device/multitool/hacktool/override
|
||||
hackspeed = 0.75
|
||||
max_level = 5
|
||||
@@ -31,7 +31,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
in_hack_mode = !in_hack_mode
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
else
|
||||
@@ -78,7 +78,7 @@
|
||||
if(D.security_level > max_level)
|
||||
to_chat(user, "\icon[src][bicon(src)] <span class='warning'>Target's electronic security is too complex.</span>")
|
||||
return 0
|
||||
|
||||
|
||||
var/found = known_targets.Find(D)
|
||||
if(found)
|
||||
known_targets.Swap(1, found) // Move the last hacked item first
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a diode.</span>")
|
||||
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(diode)
|
||||
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
|
||||
diode.loc = get_turf(src.loc)
|
||||
|
||||
@@ -66,9 +66,6 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/device/multitool/is_multitool()
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/multitool/cyborg
|
||||
name = "multitool"
|
||||
desc = "Optimised and stripped-down version of a regular multitool."
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(bcell)
|
||||
if(istype(bcell, /obj/item/weapon/cell/device/shield_generator)) //No stealing self charging batteries!
|
||||
var/choice = tgui_alert(user, "A popup appears on the device 'REMOVING THE INTERNAL CELL WILL DESTROY THE BATTERY. DO YOU WISH TO CONTINUE?'...Well, do you?", "Selection List", list("Cancel", "Remove"))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
|
||||
if(I.is_screwdriver())
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(mode == 0)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !!T.is_plating())
|
||||
|
||||
@@ -336,10 +336,10 @@
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if(!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
|
||||
if(!(W.has_tool_quality(TOOL_SCREWDRIVER) || istype(W, /obj/item/device/encryptionkey)))
|
||||
return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(keyslot1 || keyslot2)
|
||||
|
||||
|
||||
|
||||
@@ -131,12 +131,12 @@
|
||||
|
||||
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
if(W.is_screwdriver()) // Opening the intercom up.
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER)) // Opening the intercom up.
|
||||
wiresexposed = !wiresexposed
|
||||
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
update_icon()
|
||||
else if(wiresexposed && W.is_wirecutter())
|
||||
else if(wiresexposed && W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||
@@ -173,7 +173,7 @@
|
||||
/obj/item/device/radio/intercom/update_icon()
|
||||
var/area/A = get_area(src)
|
||||
on = A?.powered(EQUIP)
|
||||
|
||||
|
||||
cut_overlays()
|
||||
|
||||
if(!on)
|
||||
|
||||
@@ -614,7 +614,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
user.set_machine(src)
|
||||
if (!W.is_screwdriver())
|
||||
if (!W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return
|
||||
b_stat = !( b_stat )
|
||||
if(!istype(src, /obj/item/device/radio/beacon))
|
||||
@@ -666,10 +666,10 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if (!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
|
||||
if (!(W.has_tool_quality(TOOL_SCREWDRIVER) || istype(W, /obj/item/device/encryptionkey)))
|
||||
return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(keyslot)
|
||||
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
else
|
||||
to_chat(user, "Error: The device is linked to another monitor.")
|
||||
|
||||
else if(W.is_wrench() && user.a_intent != I_HURT)
|
||||
else if(W.has_tool_quality(TOOL_WRENCH) && user.a_intent != I_HURT)
|
||||
if(isturf(loc))
|
||||
anchored = !anchored
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
to_chat(user, "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>")
|
||||
|
||||
/obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (W.is_screwdriver())
|
||||
if (W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(cover_open)
|
||||
cover_open = 0
|
||||
to_chat(user, "You screw the panel into place.")
|
||||
@@ -237,7 +237,7 @@
|
||||
return cell
|
||||
|
||||
/obj/item/device/suit_cooling_unit/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (W.is_screwdriver())
|
||||
if (W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
to_chat(user, "<span class='warning'>This cooler's cell is permanently installed!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined && I.is_screwdriver())
|
||||
if(ruined && I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(do_after(user, 120 * I.toolspeed, target = src))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user