mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Replaces istypes with the proper tool_behaviour checks. (#40414)
This commit is contained in:
committed by
yogstation13-bot
parent
81a1280956
commit
5a29dc43e3
@@ -74,7 +74,9 @@ handles linking back and forth.
|
||||
_MakeLocal()
|
||||
|
||||
/datum/component/remote_materials/proc/OnAttackBy(datum/source, obj/item/I, mob/user)
|
||||
if (istype(I, /obj/item/multitool))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!I.multitool_check_buffer(user, I))
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
var/obj/item/multitool/M = I
|
||||
if (!QDELETED(M.buffer) && istype(M.buffer, /obj/machinery/ore_silo))
|
||||
if (silo == M.buffer)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
/datum/component/simple_rotation/proc/WrenchRot(datum/source, obj/item/I, mob/living/user)
|
||||
if(!can_be_rotated.Invoke(user,default_rotation_direction) || !can_user_rotate.Invoke(user,default_rotation_direction))
|
||||
return
|
||||
if(istype(I,/obj/item/wrench))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
BaseRot(user,default_rotation_direction)
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
|
||||
|
||||
@@ -575,6 +575,14 @@
|
||||
/atom/proc/multitool_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/multitool_check_buffer(user, obj/item/I, silent = FALSE)
|
||||
if(!istype(I, /obj/item/multitool))
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='warning'>[I] has no data buffer!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/atom/proc/screwdriver_act(mob/living/user, obj/item/I)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_SCREWDRIVER_ACT, user, I)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
O.add_fingerprint(user)
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
|
||||
if(stat & BROKEN)
|
||||
if(!O.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -59,14 +59,14 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/announcement_system/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>")
|
||||
update_icon()
|
||||
else if(default_deconstruction_crowbar(P))
|
||||
return
|
||||
else if(istype(P, /obj/item/multitool) && panel_open && (stat & BROKEN))
|
||||
else if(P.tool_behaviour == TOOL_MULTITOOL && panel_open && (stat & BROKEN))
|
||||
to_chat(user, "<span class='notice'>You reset [src]'s firmware.</span>")
|
||||
stat &= ~BROKEN
|
||||
update_icon()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
O.add_fingerprint(user)
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!O.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
icon_state = skin
|
||||
|
||||
/obj/machinery/button/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(panel_open || allowed(user))
|
||||
default_deconstruction_screwdriver(user, "button-open", "[skin]",W)
|
||||
update_icon()
|
||||
@@ -83,7 +83,7 @@
|
||||
req_access = board.accesses
|
||||
to_chat(user, "<span class='notice'>You add [W] to the button.</span>")
|
||||
|
||||
if(!device && !board && istype(W, /obj/item/wrench))
|
||||
if(!device && !board && W.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring the button frame...</span>")
|
||||
W.play_tool_sound(src)
|
||||
if(W.use_tool(src, user, 40))
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
/obj/machinery/camera/attackby(obj/item/I, mob/living/user, params)
|
||||
// UPGRADES
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/analyzer))
|
||||
if(I.tool_behaviour == TOOL_ANALYZER)
|
||||
if(!isXRay())
|
||||
if(!user.temporarilyRemoveItemFromInventory(I))
|
||||
return
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
switch(state)
|
||||
if(1)
|
||||
// State 1
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(weld(W, user))
|
||||
to_chat(user, "<span class='notice'>You weld the assembly securely into place.</span>")
|
||||
setAnchored(TRUE)
|
||||
@@ -57,7 +57,7 @@
|
||||
return
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
else if(W.tool_behaviour == TOOL_WELDER)
|
||||
|
||||
if(weld(W, user))
|
||||
to_chat(user, "<span class='notice'>You unweld the assembly from its place.</span>")
|
||||
|
||||
@@ -304,7 +304,9 @@
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/P = W
|
||||
|
||||
if(istype(P.buffer, /obj/machinery/computer/cloning))
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
icon_screen = "ai-fixer"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/machinery/computer/aifixer/attackby(obj/I, mob/user, params)
|
||||
if(occupier && istype(I, /obj/item/screwdriver))
|
||||
/obj/machinery/computer/aifixer/attackby(obj/item/I, mob/user, params)
|
||||
if(occupier && I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge.</span>")
|
||||
else
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
setAnchored(TRUE)
|
||||
state = 1
|
||||
return
|
||||
if(istype(P, /obj/item/weldingtool))
|
||||
if(P.tool_behaviour == TOOL_WELDER)
|
||||
if(!P.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(1)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
@@ -46,13 +46,13 @@
|
||||
else if(istype(P, /obj/item/circuitboard) && !circuit)
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw [circuit] into place.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
return
|
||||
if(istype(P, /obj/item/crowbar) && circuit)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove [circuit].</span>")
|
||||
state = 1
|
||||
@@ -62,7 +62,7 @@
|
||||
circuit = null
|
||||
return
|
||||
if(2)
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = 1
|
||||
@@ -80,7 +80,7 @@
|
||||
icon_state = "3"
|
||||
return
|
||||
if(3)
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 2
|
||||
@@ -102,7 +102,7 @@
|
||||
src.icon_state = "4"
|
||||
return
|
||||
if(4)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = 3
|
||||
@@ -110,7 +110,7 @@
|
||||
var/obj/item/stack/sheet/glass/G = new(drop_location(), 2)
|
||||
G.add_fingerprint(user)
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/obj/B = new circuit.build_path (loc, circuit)
|
||||
|
||||
@@ -129,7 +129,9 @@
|
||||
to_chat(user, "<span class='notice'>You insert [W].</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
src.updateUsrDialog()
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
else if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/P = W
|
||||
|
||||
if(istype(P.buffer, /obj/machinery/clonepod))
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/launchpad/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/M = W
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/launchpad))
|
||||
if(LAZYLEN(launchpads) < maximum_pads)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
icon_state = "box_1"
|
||||
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver) && !anchored)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && !anchored)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the frame.</span>", \
|
||||
"<span class='notice'>You start to disassemble the frame...</span>", "You hear banging and clanking.")
|
||||
if(P.use_tool(src, user, 40, volume=50))
|
||||
@@ -101,7 +101,7 @@
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
if(state == 1)
|
||||
@@ -110,7 +110,7 @@
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
@@ -138,7 +138,7 @@
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 1
|
||||
@@ -147,7 +147,7 @@
|
||||
return
|
||||
|
||||
if(3)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
state = 2
|
||||
circuit.forceMove(drop_location())
|
||||
@@ -165,14 +165,14 @@
|
||||
icon_state = "box_1"
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/wrench) && !circuit.needs_anchored)
|
||||
if(P.tool_behaviour == TOOL_WRENCH && !circuit.needs_anchored)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
setAnchored(!anchored)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
/obj/machinery/jukebox/attackby(obj/item/O, mob/user, params)
|
||||
if(!active && !(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(O, /obj/item/wrench))
|
||||
if(O.tool_behaviour == TOOL_WRENCH)
|
||||
if(!anchored && !isinspace())
|
||||
to_chat(user,"<span class='notice'>You secure [src] to the floor.</span>")
|
||||
setAnchored(TRUE)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && material == METAL)
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM && material == METAL)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -849,7 +849,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(AIRLOCK_SECURITY_METAL)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
if(C.tool_behaviour == TOOL_WELDER)
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the panel's shielding...</span>")
|
||||
@@ -864,7 +864,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_I_S)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
if(C.tool_behaviour == TOOL_CROWBAR)
|
||||
var/obj/item/crowbar/W = C
|
||||
to_chat(user, "<span class='notice'>You start removing the inner layer of shielding...</span>")
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
@@ -881,7 +881,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_I)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
if(C.tool_behaviour == TOOL_WELDER)
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the inner layer of shielding...</span>")
|
||||
@@ -894,7 +894,7 @@
|
||||
security_level = AIRLOCK_SECURITY_PLASTEEL_I_S
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O_S)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
if(C.tool_behaviour == TOOL_CROWBAR)
|
||||
to_chat(user, "<span class='notice'>You start removing outer layer of shielding...</span>")
|
||||
if(C.use_tool(src, user, 40, volume=100))
|
||||
if(!panel_open)
|
||||
@@ -907,7 +907,7 @@
|
||||
spawn_atom_to_turf(/obj/item/stack/sheet/plasteel, user.loc, 1)
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
if(C.tool_behaviour == TOOL_WELDER)
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the outer layer of shielding...</span>")
|
||||
@@ -920,7 +920,7 @@
|
||||
security_level = AIRLOCK_SECURITY_PLASTEEL_O_S
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL)
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
if(C.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(src.hasPower() && src.shock(user, 60)) // Protective grille of wiring is electrified
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start cutting through the outer grille.</span>")
|
||||
@@ -931,7 +931,7 @@
|
||||
"<span class='notice'>You cut through \the [src]'s outer grille.</span>")
|
||||
security_level = AIRLOCK_SECURITY_PLASTEEL_O
|
||||
return
|
||||
if(istype(C, /obj/item/screwdriver))
|
||||
if(C.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(panel_open && detonated)
|
||||
to_chat(user, "<span class='warning'>[src] has no maintenance panel!</span>")
|
||||
return
|
||||
@@ -939,7 +939,7 @@
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the airlock.</span>")
|
||||
C.play_tool_sound(src)
|
||||
src.update_icon()
|
||||
else if(istype(C, /obj/item/wirecutters) && note)
|
||||
else if((C.tool_behaviour == TOOL_WIRECUTTER) && note)
|
||||
user.visible_message("<span class='notice'>[user] cuts down [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
|
||||
C.play_tool_sound(src)
|
||||
note.forceMove(get_turf(user))
|
||||
@@ -1020,7 +1020,7 @@
|
||||
|
||||
/obj/machinery/door/airlock/try_to_crowbar(obj/item/I, mob/living/user)
|
||||
var/beingcrowbarred = null
|
||||
if(istype(I, /obj/item/crowbar) )
|
||||
if(I.tool_behaviour == TOOL_CROWBAR )
|
||||
beingcrowbarred = 1
|
||||
else
|
||||
beingcrowbarred = 0
|
||||
|
||||
@@ -639,7 +639,7 @@
|
||||
/obj/machinery/door/airlock/clockwork/proc/attempt_construction(obj/item/I, mob/living/user)
|
||||
if(!I || !user || !user.canUseTopic(src))
|
||||
return 0
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
if(construction_state == GEAR_SECURE)
|
||||
user.visible_message("<span class='notice'>[user] begins loosening [src]'s cogwheel...</span>", "<span class='notice'>You begin loosening [src]'s cogwheel...</span>")
|
||||
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_SECURE)
|
||||
@@ -655,7 +655,7 @@
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
construction_state = GEAR_SECURE
|
||||
return 1
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(construction_state == GEAR_SECURE)
|
||||
to_chat(user, "<span class='warning'>[src]'s cogwheel is too tightly secured! Your [I.name] can't reach under it!</span>")
|
||||
return 1
|
||||
|
||||
@@ -184,10 +184,10 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
|
||||
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/twohanded/fireaxe)))
|
||||
if(user.a_intent != INTENT_HARM && (I.tool_behaviour == TOOL_CROWBAR || istype(I, /obj/item/twohanded/fireaxe)))
|
||||
try_to_crowbar(I, user)
|
||||
return 1
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
else if(I.tool_behaviour == TOOL_WELDER)
|
||||
try_to_weld(I, user)
|
||||
return 1
|
||||
else if(!(I.item_flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
return
|
||||
|
||||
if(welded)
|
||||
if(istype(C, /obj/item/wrench))
|
||||
if(C.tool_behaviour == TOOL_WRENCH)
|
||||
if(boltslocked)
|
||||
to_chat(user, "<span class='notice'>There are screws locking the bolts in place!</span>")
|
||||
return
|
||||
@@ -114,7 +114,7 @@
|
||||
"<span class='notice'>You undo [src]'s floor bolts.</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(istype(C, /obj/item/screwdriver))
|
||||
if(C.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
user.visible_message("<span class='notice'>[user] [boltslocked ? "unlocks" : "locks"] [src]'s bolts.</span>", \
|
||||
"<span class='notice'>You [boltslocked ? "unlock" : "lock"] [src]'s floor bolts.</span>")
|
||||
C.play_tool_sound(src)
|
||||
@@ -290,7 +290,7 @@
|
||||
/obj/structure/firelock_frame/attackby(obj/item/C, mob/user)
|
||||
switch(constructionStep)
|
||||
if(CONSTRUCTION_PANEL_OPEN)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
if(C.tool_behaviour == TOOL_CROWBAR)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts prying something out from [src]...</span>", \
|
||||
"<span class='notice'>You begin prying out the wire cover...</span>")
|
||||
@@ -304,7 +304,7 @@
|
||||
constructionStep = CONSTRUCTION_WIRES_EXPOSED
|
||||
update_icon()
|
||||
return
|
||||
if(istype(C, /obj/item/wrench))
|
||||
if(C.tool_behaviour == TOOL_WRENCH)
|
||||
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
|
||||
to_chat(user, "<span class='warning'>There's already a firelock there.</span>")
|
||||
return
|
||||
@@ -346,7 +346,7 @@
|
||||
return
|
||||
|
||||
if(CONSTRUCTION_WIRES_EXPOSED)
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
if(C.tool_behaviour == TOOL_WIRECUTTER)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts cutting the wires from [src]...</span>", \
|
||||
"<span class='notice'>You begin removing [src]'s wires...</span>")
|
||||
@@ -360,7 +360,7 @@
|
||||
constructionStep = CONSTRUCTION_GUTTED
|
||||
update_icon()
|
||||
return
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
if(C.tool_behaviour == TOOL_CROWBAR)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts prying a metal plate into [src]...</span>", \
|
||||
"<span class='notice'>You begin prying the cover plate back onto [src]...</span>")
|
||||
@@ -375,7 +375,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(CONSTRUCTION_GUTTED)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
if(C.tool_behaviour == TOOL_CROWBAR)
|
||||
user.visible_message("<span class='notice'>[user] begins removing the circuit board from [src]...</span>", \
|
||||
"<span class='notice'>You begin prying out the circuit board from [src]...</span>")
|
||||
if(!C.use_tool(src, user, 50, volume=50))
|
||||
@@ -407,7 +407,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(CONSTRUCTION_NOCIRCUIT)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
if(C.tool_behaviour == TOOL_WELDER)
|
||||
if(!C.tool_start_check(user, amount=1))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] begins cutting apart [src]'s frame...</span>", \
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
add_fingerprint(user)
|
||||
if(!(flags_1&NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(density || operating)
|
||||
to_chat(user, "<span class='warning'>You need to open the door to access the maintenance panel!</span>")
|
||||
return
|
||||
@@ -232,7 +232,7 @@
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the [src.name].</span>")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(panel_open && !density && !operating)
|
||||
user.visible_message("[user] removes the electronics from the [src.name].", \
|
||||
"<span class='notice'>You start to remove electronics from the [src.name]...</span>")
|
||||
|
||||
@@ -29,7 +29,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/doppler_array/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
if(!anchored && !isinspace())
|
||||
anchored = TRUE
|
||||
power_change()
|
||||
|
||||
@@ -210,13 +210,13 @@
|
||||
icon_state = icon_on
|
||||
|
||||
/obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>")
|
||||
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
else if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(!(stat & BROKEN))
|
||||
to_chat(user, "<span class='warning'>[src] doesn't need repairs.</span>")
|
||||
return
|
||||
|
||||
@@ -141,7 +141,9 @@
|
||||
LAZYREMOVE(pods, pod)
|
||||
|
||||
/obj/machinery/computer/prototype_cloning/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/P = W
|
||||
|
||||
if(istype(P.buffer, /obj/machinery/clonepod/experimental))
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
/obj/machinery/firealarm/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver) && buildstage == 2)
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER && buildstage == 2)
|
||||
W.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
if(panel_open)
|
||||
|
||||
if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP)
|
||||
if(W.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
switch(buildstage)
|
||||
if(2)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
detecting = !detecting
|
||||
if (src.detecting)
|
||||
user.visible_message("[user] has reconnected [src]'s detecting unit!", "<span class='notice'>You reconnect [src]'s detecting unit.</span>")
|
||||
@@ -188,7 +188,7 @@
|
||||
user.visible_message("[user] has disconnected [src]'s detecting unit!", "<span class='notice'>You disconnect [src]'s detecting unit.</span>")
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/wirecutters))
|
||||
else if (W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
buildstage = 1
|
||||
W.play_tool_sound(src)
|
||||
new /obj/item/stack/cable_coil(user.loc, 5)
|
||||
@@ -207,7 +207,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
else if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
user.visible_message("[user.name] removes the electronics from [src.name].", \
|
||||
"<span class='notice'>You start prying out the circuit...</span>")
|
||||
if(W.use_tool(src, user, 20, volume=50))
|
||||
@@ -239,7 +239,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
user.visible_message("[user] removes the fire alarm assembly from the wall.", \
|
||||
"<span class='notice'>You remove the fire alarm assembly from the wall.</span>")
|
||||
var/obj/item/wallframe/firealarm/frame = new /obj/item/wallframe/firealarm()
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
//Don't want to render prison breaks impossible
|
||||
/obj/machinery/flasher/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if (istype(W, /obj/item/wirecutters))
|
||||
if (W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if (bulb)
|
||||
user.visible_message("[user] begins to disconnect [src]'s flashbulb.", "<span class='notice'>You begin to disconnect [src]'s flashbulb...</span>")
|
||||
if(W.use_tool(src, user, 30, volume=50) && bulb)
|
||||
@@ -71,7 +71,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>A flashbulb is already installed in [src]!</span>")
|
||||
|
||||
else if (istype(W, /obj/item/wrench))
|
||||
else if (W.tool_behaviour == TOOL_WRENCH)
|
||||
if(!bulb)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring the flasher frame...</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
@@ -168,7 +168,7 @@
|
||||
flash()
|
||||
|
||||
/obj/machinery/flasher/portable/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench))
|
||||
if (W.tool_behaviour == TOOL_WRENCH)
|
||||
W.play_tool_sound(src, 100)
|
||||
|
||||
if (!anchored && !isinspace())
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
// src.sd_SetLuminosity(0)
|
||||
|
||||
/obj/machinery/sparker/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
add_fingerprint(user)
|
||||
src.disable = !src.disable
|
||||
if (src.disable)
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/multitool))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = src
|
||||
to_chat(user, "<span class='notice'>You save the data in the [I.name]'s buffer.</span>")
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if(T.intact)
|
||||
return // prevent intraction when T-scanner revealed
|
||||
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
open = !open
|
||||
|
||||
user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "<span class='notice'>You [open ? "open" : "close"] the beacon's cover.</span>")
|
||||
|
||||
@@ -718,7 +718,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
@@ -732,7 +732,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
new /obj/item/wallframe/newscaster(loc)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
else if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
|
||||
if(stat & BROKEN)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params)
|
||||
if(stat & BROKEN)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(I.tool_behaviour == 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>")
|
||||
@@ -255,7 +255,7 @@
|
||||
to_chat(user, "<span class='notice'>You remove the turret but did not manage to salvage anything.</span>")
|
||||
qdel(src)
|
||||
|
||||
else if((istype(I, /obj/item/wrench)) && (!on))
|
||||
else if((I.tool_behaviour == TOOL_WRENCH) && (!on))
|
||||
if(raised)
|
||||
return
|
||||
|
||||
@@ -282,7 +282,9 @@
|
||||
to_chat(user, "<span class='notice'>Controls are now [locked ? "locked" : "unlocked"].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access denied.</span>")
|
||||
else if(istype(I, /obj/item/multitool) && !locked)
|
||||
else if(I.tool_behaviour == TOOL_MULTITOOL && !locked)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = src
|
||||
to_chat(user, "<span class='notice'>You add [src] to multitool buffer.</span>")
|
||||
@@ -800,7 +802,9 @@
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
if (istype(I, /obj/item/multitool))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/porta_turret))
|
||||
turrets |= M.buffer
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
//this is a bit unwieldy but self-explanatory
|
||||
switch(build_step)
|
||||
if(PTURRET_UNSECURED) //first step
|
||||
if(istype(I, /obj/item/wrench) && !anchored)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && !anchored)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
|
||||
setAnchored(TRUE)
|
||||
build_step = PTURRET_BOLTED
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/crowbar) && !anchored)
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR && !anchored)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
|
||||
new /obj/item/stack/sheet/metal( loc, 5)
|
||||
@@ -48,7 +48,7 @@
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction!</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
|
||||
setAnchored(FALSE)
|
||||
@@ -57,13 +57,13 @@
|
||||
|
||||
|
||||
if(PTURRET_START_INTERNAL_ARMOUR)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
|
||||
build_step = PTURRET_INTERNAL_ARMOUR_ON
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
else if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(!I.tool_start_check(user, amount=5)) //uses up 5 fuel
|
||||
return
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
build_step = PTURRET_GUN_EQUIPPED
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
|
||||
build_step = PTURRET_START_INTERNAL_ARMOUR
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
|
||||
if(PTURRET_SENSORS_ON)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
I.play_tool_sound(src, 100)
|
||||
build_step = PTURRET_CLOSED
|
||||
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
|
||||
@@ -120,14 +120,14 @@
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction!</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
I.play_tool_sound(src, 100)
|
||||
build_step = PTURRET_SENSORS_ON
|
||||
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
|
||||
return
|
||||
|
||||
if(PTURRET_START_EXTERNAL_ARMOUR)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(!I.tool_start_check(user, amount=5))
|
||||
return
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
turret.setup(installed_gun)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
/obj/machinery/porta_turret_cover/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench) && !parent_turret.on)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && !parent_turret.on)
|
||||
if(parent_turret.raised)
|
||||
return
|
||||
|
||||
@@ -63,7 +63,9 @@
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access denied.</span>")
|
||||
else if(istype(I, /obj/item/multitool) && !parent_turret.locked)
|
||||
else if(I.tool_behaviour == TOOL_MULTITOOL && !parent_turret.locked)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = parent_turret
|
||||
to_chat(user, "<span class='notice'>You add [parent_turret] to multitool buffer.</span>")
|
||||
|
||||
@@ -55,12 +55,16 @@
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/multitool))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = src
|
||||
to_chat(user, "<span class='notice'>You save the data in [I]'s buffer. It can now be saved to pads with closed panels.</span>")
|
||||
return TRUE
|
||||
else if(istype(I, /obj/item/multitool))
|
||||
else if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
if(istype(M.buffer, /obj/machinery/quantumpad))
|
||||
if(M.buffer == src)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
|
||||
if(istype(G, /obj/item/wrench))
|
||||
if(G.tool_behaviour == TOOL_WRENCH)
|
||||
if(charging)
|
||||
to_chat(user, "<span class='notice'>Remove the charging item first!</span>")
|
||||
return
|
||||
@@ -73,7 +73,7 @@
|
||||
if(default_deconstruction_screwdriver(user, "rechargeropen", "recharger0", G))
|
||||
return
|
||||
|
||||
if(panel_open && istype(G, /obj/item/crowbar))
|
||||
if(panel_open && G.tool_behaviour == TOOL_CROWBAR)
|
||||
default_deconstruction_crowbar(G)
|
||||
return
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
messages += "<b>From:</b> [linkedsender]<BR>[message]"
|
||||
|
||||
/obj/machinery/requests_console/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/crowbar))
|
||||
if(O.tool_behaviour == TOOL_CROWBAR)
|
||||
if(open)
|
||||
to_chat(user, "<span class='notice'>You close the maintenance panel.</span>")
|
||||
open = FALSE
|
||||
@@ -495,7 +495,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return
|
||||
if(istype(O, /obj/item/screwdriver))
|
||||
if(O.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(open)
|
||||
hackState = !hackState
|
||||
if(hackState)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/shieldgen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
W.play_tool_sound(src, 100)
|
||||
panel_open = !panel_open
|
||||
if(panel_open)
|
||||
@@ -169,7 +169,7 @@
|
||||
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>The bolts are covered! Unlocking this would retract the covers.</span>")
|
||||
return
|
||||
@@ -345,7 +345,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
default_unfasten_wrench(user, W, 0)
|
||||
|
||||
else if(W.GetID())
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The hatch must be open to insert a power cell!</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
panel_open = !panel_open
|
||||
user.visible_message("\The [user] [panel_open ? "opens" : "closes"] the hatch on \the [src].", "<span class='notice'>You [panel_open ? "open" : "close"] the hatch on \the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
to_chat(user, "<span class='warning'>You need to screw the beacon to the floor first!</span>")
|
||||
|
||||
/obj/machinery/power/singularity_beacon/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(active)
|
||||
to_chat(user, "<span class='warning'>You need to deactivate the beacon first!</span>")
|
||||
return
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
. = timer_set
|
||||
|
||||
/obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench) && can_unanchor)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && can_unanchor)
|
||||
if(!anchored)
|
||||
if(!isturf(loc) || isspaceturf(loc))
|
||||
to_chat(user, "<span class='notice'>The bomb must be placed on solid ground to attach it.</span>")
|
||||
@@ -130,7 +130,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The bolts are locked down!</span>")
|
||||
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
open_panel = !open_panel
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
@@ -138,7 +138,7 @@
|
||||
else if(is_wire_tool(I) && open_panel)
|
||||
wires.interact(user)
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(open_panel && wires.is_all_cut())
|
||||
if(payload)
|
||||
to_chat(user, "<span class='notice'>You carefully pry out [payload].</span>")
|
||||
@@ -158,7 +158,7 @@
|
||||
to_chat(user, "<span class='notice'>You place [payload] into [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[payload] is already loaded into [src]! You'll have to remove it first.</span>")
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
else if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(payload || !wires.is_all_cut() || !open_panel)
|
||||
return
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/bombcore/chemical/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/crowbar) && beakers.len > 0)
|
||||
if(I.tool_behaviour == TOOL_CROWBAR && beakers.len > 0)
|
||||
I.play_tool_sound(src)
|
||||
for (var/obj/item/B in beakers)
|
||||
B.forceMove(drop_location())
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/living/user, params)
|
||||
if(istype(O, /obj/item/screwdriver) && (obj_flags & EMAGGED))
|
||||
if(O.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
|
||||
//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>")
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(default_deconstruction_screwdriver(user, icon_open, icon_closed, P))
|
||||
return
|
||||
// Using a multitool lets you access the receiver's interface
|
||||
else if(istype(P, /obj/item/multitool))
|
||||
else if(P.tool_behaviour == TOOL_MULTITOOL)
|
||||
attack_hand(user)
|
||||
|
||||
else if(default_deconstruction_crowbar(P))
|
||||
|
||||
@@ -40,5 +40,5 @@
|
||||
signal.broadcast()
|
||||
|
||||
/obj/machinery/telecomms/allinone/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/multitool))
|
||||
if(P.tool_behaviour == TOOL_MULTITOOL)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -150,7 +150,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/teleport/station/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/M = W
|
||||
if(panel_open)
|
||||
M.buffer = src
|
||||
@@ -171,7 +173,7 @@
|
||||
else if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/wirecutters))
|
||||
else if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(panel_open)
|
||||
link_console_and_hub()
|
||||
to_chat(user, "<span class='caution'>You reconnect the station to nearby machinery.</span>")
|
||||
|
||||
@@ -191,7 +191,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(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(state==1)
|
||||
state = 2
|
||||
to_chat(user, "<span class='notice'>You undo the securing bolts.</span>")
|
||||
@@ -199,7 +199,7 @@
|
||||
state = 1
|
||||
to_chat(user, "<span class='notice'>You tighten the securing bolts.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
else if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
if(state==2)
|
||||
state = 3
|
||||
to_chat(user, "<span class='notice'>You open the hatch to the power unit.</span>")
|
||||
@@ -216,7 +216,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need two lengths of cable to fix this mech!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/screwdriver) && user.a_intent != INTENT_HARM)
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER && user.a_intent != INTENT_HARM)
|
||||
if(internal_damage & MECHA_INT_TEMP_CONTROL)
|
||||
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
|
||||
to_chat(user, "<span class='notice'>You repair the damaged temperature controller.</span>")
|
||||
@@ -244,7 +244,7 @@
|
||||
to_chat(user, "<span class='notice'>There's already a powercell installed.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
else if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(W.use_tool(src, user, 0, volume=50, amount=1))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
to_chat(user, "<span class='notice'>The AI recovery beacon is active.</span>")
|
||||
|
||||
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(salvage_num <= 0 || !length(welder_salvage))
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
@@ -55,7 +55,7 @@
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wirecutters))
|
||||
else if(I.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(salvage_num <= 0)
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
@@ -68,7 +68,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(crowbar_salvage && crowbar_salvage.len)
|
||||
var/obj/S = pick(crowbar_salvage)
|
||||
if(S)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
|
||||
/obj/effect/anomaly/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/analyzer))
|
||||
if(I.tool_behaviour == TOOL_ANALYZER)
|
||||
to_chat(user, "<span class='notice'>Analyzing... [src]'s unstable field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code].</span>")
|
||||
|
||||
///////////////////////
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
if(I.tool_behaviour == TOOL_WIRECUTTER)
|
||||
I.play_tool_sound(src, 100)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
return
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You add the cables to [src]. It now contains [loaded.amount].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!loaded)
|
||||
return
|
||||
if(ghetto && prob(10)) //Is it a ghetto RCL? If so, give it a 10% chance to fall apart
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
/obj/item/wallframe/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
// For camera-building borgs
|
||||
var/turf/T = get_step(get_turf(user), user.dir)
|
||||
if(iswallturf(T))
|
||||
@@ -69,7 +69,7 @@
|
||||
var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT)
|
||||
var/glass_amt = round(materials[MAT_GLASS]/MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
if(istype(W, /obj/item/wrench) && (metal_amt || glass_amt))
|
||||
if(W.tool_behaviour == TOOL_WRENCH && (metal_amt || glass_amt))
|
||||
to_chat(user, "<span class='notice'>You dismantle [src].</span>")
|
||||
if(metal_amt)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), metal_amt)
|
||||
|
||||
@@ -740,7 +740,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] can't hold anymore reagents!</span>")
|
||||
|
||||
if(istype(O, /obj/item/screwdriver))
|
||||
if(O.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!screw)
|
||||
screw = 1
|
||||
to_chat(user, "<span class='notice'>You open the cap on [src].</span>")
|
||||
@@ -753,7 +753,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
to_chat(user, "<span class='notice'>You close the cap on [src].</span>")
|
||||
cut_overlays()
|
||||
|
||||
if(istype(O, /obj/item/multitool))
|
||||
if(O.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(screw && !(obj_flags & EMAGGED))//also kinky
|
||||
if(!super)
|
||||
cut_overlays()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
var/list/dept_list = list("General","Security","Medical","Science","Engineering")
|
||||
|
||||
/obj/item/circuitboard/computer/card/minor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
target_dept = (target_dept == dept_list.len) ? 1 : (target_dept + 1)
|
||||
to_chat(user, "<span class='notice'>You set the board to \"[dept_list[target_dept]]\".</span>")
|
||||
else
|
||||
@@ -167,7 +167,7 @@
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
|
||||
/obj/item/circuitboard/computer/rdconsole/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(build_path == /obj/machinery/computer/rdconsole/core)
|
||||
name = "R&D Console - Robotics (Computer Board)"
|
||||
build_path = /obj/machinery/computer/rdconsole/robotics
|
||||
@@ -309,7 +309,7 @@
|
||||
build_path = /obj/machinery/computer/libraryconsole
|
||||
|
||||
/obj/item/circuitboard/computer/libraryconsole/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(build_path == /obj/machinery/computer/libraryconsole/bookmanagement)
|
||||
name = "Library Visitor Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/libraryconsole
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
/obj/machinery/vending/wallmed = "NanoMed")
|
||||
|
||||
/obj/item/circuitboard/machine/vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/position = vending_names_paths.Find(build_path)
|
||||
position = (position == vending_names_paths.len) ? 1 : (position + 1)
|
||||
var/typepath = vending_names_paths[position]
|
||||
@@ -316,7 +316,7 @@
|
||||
build_path = PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/obj/item/circuitboard/new_type
|
||||
var/new_setting
|
||||
switch(build_path)
|
||||
@@ -375,7 +375,7 @@
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/processor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(build_path == /obj/machinery/processor)
|
||||
name = "Slime Processor (Machine Board)"
|
||||
build_path = /obj/machinery/processor/slime
|
||||
@@ -410,7 +410,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/smartfridge/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/position = fridges_name_paths.Find(build_path, fridges_name_paths)
|
||||
position = (position == fridges_name_paths.len) ? 1 : (position + 1)
|
||||
build_path = fridges_name_paths[position]
|
||||
@@ -587,7 +587,7 @@
|
||||
build_path = PATH_POWERCOIL
|
||||
|
||||
/obj/item/circuitboard/machine/tesla_coil/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/obj/item/circuitboard/new_type
|
||||
var/new_setting
|
||||
switch(build_path)
|
||||
@@ -684,7 +684,7 @@
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/chem_master/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/new_name = "ChemMaster"
|
||||
var/new_path = /obj/machinery/chem_master
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src))
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Target is free of radioactive contamination.</span>")
|
||||
|
||||
/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) && (obj_flags & EMAGGED))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a diode installed.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(diode)
|
||||
to_chat(user, "<span class='notice'>You remove the [diode.name] from \the [src].</span>")
|
||||
diode.forceMove(drop_location())
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
toolspeed = 1
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
usesound = 'sound/weapons/empty.ogg'
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/item/powersink/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(mode == DISCONNECTED)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
/obj/item/radio/headset/attackby(obj/item/W, mob/user, params)
|
||||
user.set_machine(src)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(keyslot || keyslot2)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
freerange = TRUE
|
||||
|
||||
/obj/item/radio/intercom/ratvar/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
to_chat(user, "<span class='danger'>[src] is fastened to the wall with [is_servant_of_ratvar(user) ? "replicant alloy" : "some material you've never seen"], and can't be removed.</span>")
|
||||
return //no unfastening!
|
||||
. = ..()
|
||||
@@ -56,7 +56,7 @@
|
||||
to_chat(user, "<span class='notice'>It's <i>unscrewed</i> from the wall, and can be <b>detached</b>.</span>")
|
||||
|
||||
/obj/item/radio/intercom/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(unfastened)
|
||||
user.visible_message("<span class='notice'>[user] starts tightening [src]'s screws...</span>", "<span class='notice'>You start screwing in [src]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
@@ -68,7 +68,7 @@
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
|
||||
unfastened = TRUE
|
||||
return
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
if(!unfastened)
|
||||
to_chat(user, "<span class='warning'>You need to unscrew [src] from the wall first!</span>")
|
||||
return
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
|
||||
/obj/item/radio/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
unscrewed = !unscrewed
|
||||
if(unscrewed)
|
||||
to_chat(user, "<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
@@ -378,7 +378,7 @@
|
||||
|
||||
/obj/item/radio/borg/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(keyslot)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
|
||||
|
||||
/obj/item/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined && istype(I, /obj/item/screwdriver) || istype(I, /obj/item/pen))
|
||||
if(ruined && I.tool_behaviour == TOOL_SCREWDRIVER || istype(I, /obj/item/pen))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(I.use_tool(src, user, 120))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
flame_turf(turflist)
|
||||
|
||||
/obj/item/flamethrower/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !status)//Taking this apart
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !status)//Taking this apart
|
||||
var/turf/T = get_turf(src)
|
||||
if(weldtool)
|
||||
weldtool.forceMove(T)
|
||||
@@ -95,7 +95,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver) && igniter && !lit)
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER && igniter && !lit)
|
||||
status = !status
|
||||
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
update_icon()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(stage == WIRED)
|
||||
if(beakers.len)
|
||||
stage_change(READY)
|
||||
@@ -108,11 +108,11 @@
|
||||
to_chat(user, "<span class='warning'>You need one length of coil to wire the assembly!</span>")
|
||||
return
|
||||
|
||||
else if(stage == READY && istype(I, /obj/item/wirecutters) && !active)
|
||||
else if(stage == READY && I.tool_behaviour == TOOL_WIRECUTTER && !active)
|
||||
stage_change(WIRED)
|
||||
to_chat(user, "<span class='notice'>You unlock the [initial(name)] assembly.</span>")
|
||||
|
||||
else if(stage == WIRED && istype(I, /obj/item/wrench))
|
||||
else if(stage == WIRED && I.tool_behaviour == TOOL_WRENCH)
|
||||
if(beakers.len)
|
||||
for(var/obj/O in beakers)
|
||||
O.forceMove(drop_location())
|
||||
@@ -276,7 +276,7 @@
|
||||
var/unit_spread = 10 // Amount of units per repeat. Can be altered with a multitool.
|
||||
|
||||
/obj/item/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/multitool))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
switch(unit_spread)
|
||||
if(0 to 24)
|
||||
unit_spread += 5
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
|
||||
/obj/item/grenade/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
|
||||
update_icon()
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/wirecutters))
|
||||
if(nadeassembly && I.tool_behaviour == TOOL_WIRECUTTER)
|
||||
I.play_tool_sound(src, 20)
|
||||
nadeassembly.forceMove(get_turf(src))
|
||||
nadeassembly.master = null
|
||||
@@ -196,7 +196,7 @@
|
||||
user.gib(1, 1)
|
||||
|
||||
/obj/item/grenade/plastic/c4/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
open_panel = !open_panel
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
else if(is_wire_tool(I))
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
|
||||
/obj/item/inducer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
W.play_tool_sound(src)
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='notice'>You unscrew the battery compartment.</span>")
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
possible_colors = list("purple" = LIGHT_COLOR_LAVENDER)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
item_color = "rainbow"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
updateTank(W, 0, user)
|
||||
else if(W.type == type)
|
||||
to_chat(user, "<span class='warning'>You're fairly certain that putting a pneumatic cannon inside another pneumatic cannon would cause a spacetime disruption.</span>")
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
switch(pressureSetting)
|
||||
if(1)
|
||||
pressureSetting = 2
|
||||
@@ -88,7 +88,7 @@
|
||||
if(3)
|
||||
pressureSetting = 1
|
||||
to_chat(user, "<span class='notice'>You tweak \the [src]'s pressure output to [pressureSetting].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(tank)
|
||||
updateTank(tank, 1, user)
|
||||
else if(loadedWeightClass >= maxWeightClass)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
to_chat(user, "<span class='warning'>\The [IT] is too small for \the [src].</span>")
|
||||
return
|
||||
updateTank(W, 0, user)
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
switch(fisto_setting)
|
||||
if(1)
|
||||
fisto_setting = 2
|
||||
@@ -46,7 +46,7 @@
|
||||
fisto_setting = 1
|
||||
W.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You tweak \the [src]'s piston valve to [fisto_setting].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(tank)
|
||||
updateTank(tank, 1, user)
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
|
||||
else if (istype(W, /obj/item/multitool))
|
||||
else if (W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(check_completion())
|
||||
Interact(user)
|
||||
else
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
var/mob/living/living_user = usr
|
||||
var/obj/item/item_in_hand = living_user.get_active_held_item()
|
||||
if(!istype(item_in_hand, /obj/item/multitool))
|
||||
if(!item_in_hand || !item_in_hand.tool_behaviour == TOOL_MULTITOOL)
|
||||
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
|
||||
/obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters) || I.is_sharp())
|
||||
if(I.tool_behaviour == TOOL_WIRECUTTER || I.is_sharp())
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two gauzes to do this!</span>")
|
||||
return
|
||||
|
||||
@@ -40,7 +40,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
state = 0 //fine
|
||||
|
||||
/obj/item/stack/tile/light/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/crowbar))
|
||||
if(O.tool_behaviour == TOOL_CROWBAR)
|
||||
new/obj/item/stack/sheet/metal(user.loc)
|
||||
amount--
|
||||
new/obj/item/stack/light_w(user.loc)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if (istype(W, /obj/item/weldingtool))
|
||||
if (W.tool_behaviour == TOOL_WELDER)
|
||||
if(get_amount() < 4)
|
||||
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
|
||||
return
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if (W.use_tool(src, user, 20))
|
||||
open =! open
|
||||
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the service panel.</span>")
|
||||
return
|
||||
if (istype(W, /obj/item/wirecutters))
|
||||
if (W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
to_chat(user, "<span class='danger'>[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be <b>pulsed</b>.</span>")
|
||||
if ((istype(W, /obj/item/multitool)) && (!l_hacking))
|
||||
if ((W.tool_behaviour == TOOL_MULTITOOL) && (!l_hacking))
|
||||
if(open == 1)
|
||||
to_chat(user, "<span class='danger'>Now attempting to reset internal memory, please hold.</span>")
|
||||
l_hacking = 1
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src))
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
newSaber.item_color = "rainbow"
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
else if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
item_color = "rainbow"
|
||||
|
||||
@@ -439,7 +439,7 @@
|
||||
possible_colors = list("purple")
|
||||
|
||||
/obj/item/twohanded/dualsaber/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/multitool))
|
||||
if(P.tool_behaviour == TOOL_MULTITOOL)
|
||||
active = !active
|
||||
to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.")
|
||||
return
|
||||
@@ -76,10 +76,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
return default_unfasten_wrench(user, P, 20)
|
||||
if(!anchored)
|
||||
if(istype(P, /obj/item/weldingtool) && can_deconstruct)
|
||||
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
|
||||
if(state != EMPTY_CORE)
|
||||
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
|
||||
return
|
||||
@@ -105,13 +105,13 @@
|
||||
circuit = P
|
||||
return
|
||||
if(CIRCUIT_CORE)
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
return
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
state = EMPTY_CORE
|
||||
@@ -120,7 +120,7 @@
|
||||
circuit = null
|
||||
return
|
||||
if(SCREWED_CORE)
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = CIRCUIT_CORE
|
||||
@@ -139,7 +139,7 @@
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
|
||||
return
|
||||
if(CABLED_CORE)
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(brain)
|
||||
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
|
||||
else
|
||||
@@ -201,7 +201,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/crowbar) && brain)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && brain)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.forceMove(loc)
|
||||
@@ -210,7 +210,7 @@
|
||||
return
|
||||
|
||||
if(GLASS_CORE)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = CABLED_CORE
|
||||
@@ -218,7 +218,7 @@
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(brain)
|
||||
@@ -247,7 +247,7 @@
|
||||
P.transfer_ai("INACTIVE", "AICARD", src, user)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
state = GLASS_CORE
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
pick_sign(user)
|
||||
|
||||
/obj/structure/sign/barsign/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='info'>Access denied.</span>")
|
||||
return
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
|
||||
W.play_tool_sound(src)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
|
||||
W.play_tool_sound(src)
|
||||
deconstruct()
|
||||
else if(istype(W, /obj/item/assembly/shock_kit))
|
||||
|
||||
@@ -41,7 +41,7 @@ LINEN BINS
|
||||
return
|
||||
|
||||
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters) || I.is_sharp())
|
||||
if(I.tool_behaviour == TOOL_WIRECUTTER || I.is_sharp())
|
||||
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
|
||||
transfer_fingerprints_to(C)
|
||||
C.add_fingerprint(user)
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
. = TRUE
|
||||
if(opened)
|
||||
if(istype(W, cutting_tool))
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
return
|
||||
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
|
||||
return
|
||||
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
|
||||
else if(W.tool_behaviour == TOOL_WELDER && can_weld_shut)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/wrench) && anchorable)
|
||||
else if(W.tool_behaviour == TOOL_WRENCH && anchorable)
|
||||
if(isinspace() && !anchored)
|
||||
return
|
||||
setAnchored(!anchored)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
else
|
||||
name = "body bag"
|
||||
return
|
||||
else if(istype(I, /obj/item/wirecutters))
|
||||
else if(I.tool_behaviour == TOOL_WIRECUTTER)
|
||||
to_chat(user, "<span class='notice'>You cut the tag off [src].</span>")
|
||||
name = "body bag"
|
||||
tagged = 0
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
to_chat(user, "<span class='warning'>You need a crowbar to pry this open!</span>")
|
||||
|
||||
/obj/structure/closet/crate/large/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
toggle_lock(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
else if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP && !broken)
|
||||
else if(W.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!W.tool_start_check(user, amount=5))
|
||||
return
|
||||
@@ -119,7 +119,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
else if(!alert && istype(W, /obj/item/crowbar) && openable) //Only applies to the lab cage and player made display cases
|
||||
else if(!alert && W.tool_behaviour == TOOL_CROWBAR && openable) //Only applies to the lab cage and player made display cases
|
||||
if(broken)
|
||||
if(showpiece)
|
||||
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench)) //The player can only deconstruct the wooden frame
|
||||
if(I.tool_behaviour == TOOL_WRENCH) //The player can only deconstruct the wooden frame
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 30))
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
return
|
||||
created_name = t
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) && (mineral || glass || !anchored ))
|
||||
else if((W.tool_behaviour == TOOL_WELDER) && (mineral || glass || !anchored ))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(!anchored )
|
||||
var/door_check = 1
|
||||
for(var/obj/machinery/door/D in loc)
|
||||
@@ -134,7 +134,7 @@
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
name = "wired airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/wirecutters) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
|
||||
else if((W.tool_behaviour == TOOL_WIRECUTTER) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", \
|
||||
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
electronics = W
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/crowbar) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
else if((W.tool_behaviour == TOOL_CROWBAR) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", \
|
||||
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot add [G] to [src]!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
else if((W.tool_behaviour == TOOL_SCREWDRIVER) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
user.visible_message("[user] finishes the airlock.", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/dresser/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
add_overlay(mutable_appearance('icons/obj/chairs.dmi', "echair_over", MOB_LAYER + 1))
|
||||
|
||||
/obj/structure/chair/e_chair/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
var/obj/structure/chair/C = new /obj/structure/chair(loc)
|
||||
W.play_tool_sound(src)
|
||||
C.setDir(dir)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench) && !stored_extinguisher)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && !stored_extinguisher)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving!</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(density)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.density)
|
||||
@@ -108,7 +108,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
else if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(W.use_tool(src, user, 0, volume=50))
|
||||
dismantle(user, TRUE)
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
/obj/structure/falsewall/reinforced/attackby(obj/item/tool, mob/user)
|
||||
..()
|
||||
if(istype(tool, /obj/item/wirecutters))
|
||||
if(tool.tool_behaviour == TOOL_WIRECUTTER)
|
||||
dismantle(user, TRUE, tool)
|
||||
|
||||
/*
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
hole_size = LARGE_HOLE
|
||||
|
||||
/obj/structure/fence/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(!cuttable)
|
||||
to_chat(user, "<span class='notice'>This section of the fence can't be cut.</span>")
|
||||
return
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(iscyborg(user) || istype(I, /obj/item/multitool))
|
||||
if(iscyborg(user) || I.tool_behaviour == TOOL_MULTITOOL)
|
||||
toggle_lock(user)
|
||||
else if(istype(I, /obj/item/weldingtool) && user.a_intent == INTENT_HELP && !broken)
|
||||
else if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=2))
|
||||
return
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/deconstructible = TRUE
|
||||
|
||||
/obj/structure/fluff/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/wrench) && deconstructible)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && deconstructible)
|
||||
user.visible_message("<span class='notice'>[user] starts disassembling [src]...</span>", "<span class='notice'>You start disassembling [src]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 50))
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
else if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
|
||||
/obj/structure/girder/bronze/attackby(obj/item/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(!W.tool_start_check(user, amount = 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start slicing apart [src]...</span>")
|
||||
|
||||
@@ -139,11 +139,11 @@
|
||||
/obj/structure/grille/attackby(obj/item/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(!shock(user, 100))
|
||||
W.play_tool_sound(src, 100)
|
||||
deconstruct()
|
||||
else if((istype(W, /obj/item/screwdriver)) && (isturf(loc) || anchored))
|
||||
else if((W.tool_behaviour == TOOL_SCREWDRIVER) && (isturf(loc) || anchored))
|
||||
if(!shock(user, 90))
|
||||
W.play_tool_sound(src, 100)
|
||||
setAnchored(!anchored)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user