upload files
This commit is contained in:
@@ -82,7 +82,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
. += "button-board"
|
||||
|
||||
/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()
|
||||
@@ -93,7 +93,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))
|
||||
|
||||
@@ -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)
|
||||
@@ -56,7 +56,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>")
|
||||
@@ -133,7 +133,9 @@
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/proc/weld(obj/item/weldingtool/W, mob/living/user)
|
||||
/obj/structure/camera_assembly/proc/weld(obj/item/W, mob/living/user)
|
||||
if(!W.tool_behaviour == TOOL_WELDER)
|
||||
return
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You start to weld \the [src]...</span>")
|
||||
|
||||
@@ -297,22 +297,20 @@
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/multitool))
|
||||
var/obj/item/multitool/P = W
|
||||
|
||||
if(istype(P.buffer, /obj/machinery/computer/cloning))
|
||||
if(get_area(P.buffer) != get_area(src))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(istype(W.buffer, /obj/machinery/computer/cloning))
|
||||
if(get_area(W.buffer) != get_area(src))
|
||||
to_chat(user, "<font color = #666633>-% Cannot link machines across power zones. Buffer cleared %-</font color>")
|
||||
P.buffer = null
|
||||
W.buffer = null
|
||||
return
|
||||
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
|
||||
var/obj/machinery/computer/cloning/comp = P.buffer
|
||||
to_chat(user, "<font color = #666633>-% Successfully linked [W.buffer] with [src] %-</font color>")
|
||||
var/obj/machinery/computer/cloning/comp = W.buffer
|
||||
if(connected)
|
||||
connected.DetachCloner(src)
|
||||
comp.AttachCloner(src)
|
||||
else
|
||||
P.buffer = src
|
||||
to_chat(user, "<font color = #666633>-% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-</font color>")
|
||||
W.buffer = src
|
||||
to_chat(user, "<font color = #666633>-% Successfully stored [REF(W.buffer)] [W.buffer] in buffer %-</font color>")
|
||||
return
|
||||
|
||||
var/mob/living/mob_occupant = occupant
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
var/mob/living/silicon/ai/occupier = null
|
||||
var/active = FALSE
|
||||
|
||||
/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) && state == 1)
|
||||
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
|
||||
@@ -78,7 +78,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
|
||||
@@ -98,7 +98,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
|
||||
@@ -106,7 +106,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)
|
||||
|
||||
@@ -133,22 +133,20 @@
|
||||
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))
|
||||
var/obj/item/multitool/P = W
|
||||
|
||||
if(istype(P.buffer, clonepod_type))
|
||||
if(get_area(P.buffer) != get_area(src))
|
||||
else if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(istype(W.buffer, clonepod_type))
|
||||
if(get_area(W.buffer) != get_area(src))
|
||||
to_chat(user, "<font color = #666633>-% Cannot link machines across power zones. Buffer cleared %-</font color>")
|
||||
P.buffer = null
|
||||
W.buffer = null
|
||||
return
|
||||
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
|
||||
var/obj/machinery/clonepod/pod = P.buffer
|
||||
to_chat(user, "<font color = #666633>-% Successfully linked [W.buffer] with [src] %-</font color>")
|
||||
var/obj/machinery/clonepod/pod = W.buffer
|
||||
if(pod.connected)
|
||||
pod.connected.DetachCloner(pod)
|
||||
AttachCloner(pod)
|
||||
else
|
||||
P.buffer = src
|
||||
to_chat(user, "<font color = #666633>-% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-</font color>")
|
||||
W.buffer = src
|
||||
to_chat(user, "<font color = #666633>-% Successfully stored [REF(W.buffer)] [W.buffer] in buffer %-</font color>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
@@ -473,7 +471,7 @@
|
||||
scanner.locked = prev_locked
|
||||
src.updateUsrDialog()
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_occupant(occupant)
|
||||
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)
|
||||
|
||||
@@ -23,11 +23,10 @@
|
||||
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(W.buffer && istype(W.buffer, /obj/machinery/launchpad))
|
||||
if(LAZYLEN(launchpads) < maximum_pads)
|
||||
launchpads |= M.buffer
|
||||
M.buffer = null
|
||||
launchpads |= W.buffer
|
||||
W.buffer = null
|
||||
to_chat(user, "<span class='notice'>You upload the data from the [W.name]'s buffer.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot handle any more connections!</span>")
|
||||
|
||||
@@ -55,11 +55,12 @@
|
||||
return connected_mechpad
|
||||
|
||||
/obj/machinery/computer/mechpad/multitool_act(mob/living/user, obj/item/tool)
|
||||
if(!tool.tool_behaviour == TOOL_MULTITOOL)
|
||||
return
|
||||
if(!multitool_check_buffer(user, tool))
|
||||
return
|
||||
var/obj/item/multitool/multitool = tool
|
||||
if(istype(multitool.buffer, /obj/machinery/mechpad))
|
||||
var/obj/machinery/mechpad/buffered_console = multitool.buffer
|
||||
if(istype(tool.buffer, /obj/machinery/mechpad))
|
||||
var/obj/machinery/mechpad/buffered_console = tool.buffer
|
||||
if(!(mechpads.len < maximum_pads))
|
||||
to_chat(user, "<span class='warning'>[src] cannot handle any more connections!</span>")
|
||||
return
|
||||
@@ -69,13 +70,13 @@
|
||||
connected_mechpad = buffered_console
|
||||
connected_mechpad.connected_console = src
|
||||
connected_mechpad.id = id
|
||||
multitool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You connect the console to the pad with data from the [multitool.name]'s buffer.</span>")
|
||||
tool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You connect the console to the pad with data from the [tool.name]'s buffer.</span>")
|
||||
else
|
||||
mechpads += buffered_console
|
||||
LAZYADD(buffered_console.consoles, src)
|
||||
multitool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You upload the data from the [multitool.name]'s buffer.</span>")
|
||||
tool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You upload the data from the [tool.name]'s buffer.</span>")
|
||||
|
||||
/**
|
||||
* Tries to call the launch proc on the connected mechpad, returns if there is no connected mechpad or there is no mecha on the pad
|
||||
|
||||
@@ -90,7 +90,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))
|
||||
@@ -100,7 +100,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)
|
||||
@@ -109,7 +109,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>")
|
||||
@@ -140,7 +140,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
|
||||
@@ -149,7 +149,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())
|
||||
@@ -167,14 +167,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)
|
||||
|
||||
@@ -35,7 +35,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)
|
||||
|
||||
@@ -99,19 +99,21 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/defibrillator_mount/multitool_act(mob/living/user, obj/item/multitool)
|
||||
/obj/machinery/defibrillator_mount/multitool_act(mob/living/user, obj/item/W)
|
||||
if(!W.tool_behaviour == TOOL_MULTITOOL)
|
||||
return
|
||||
if(!defib)
|
||||
to_chat(user, "<span class='warning'>There isn't any defibrillator to clamp in!</span>")
|
||||
return TRUE
|
||||
if(!clamps_locked)
|
||||
to_chat(user, "<span class='warning'>[src]'s clamps are disengaged!</span>")
|
||||
return TRUE
|
||||
user.visible_message("<span class='notice'>[user] presses [multitool] into [src]'s ID slot...</span>", \
|
||||
user.visible_message("<span class='notice'>[user] presses [W] into [src]'s ID slot...</span>", \
|
||||
"<span class='notice'>You begin overriding the clamps on [src]...</span>")
|
||||
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
|
||||
if(!do_after(user, 100, target = src) || !clamps_locked)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] pulses [multitool], and [src]'s clamps slide up.</span>", \
|
||||
user.visible_message("<span class='notice'>[user] pulses [W], and [src]'s clamps slide up.</span>", \
|
||||
"<span class='notice'>You override the locking clamps on [src]!</span>")
|
||||
playsound(src, 'sound/machines/locktoggle.ogg', 50, TRUE)
|
||||
clamps_locked = FALSE
|
||||
|
||||
@@ -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 && bar_material == METAL)
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM && bar_material == METAL)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -864,7 +864,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>")
|
||||
@@ -879,10 +879,9 @@
|
||||
update_icon()
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_I_S)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
var/obj/item/crowbar/W = C
|
||||
if(C.tool_behaviour == TOOL_CROWBAR)
|
||||
to_chat(user, "<span class='notice'>You start removing the inner layer of shielding...</span>")
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(C.use_tool(src, user, 40, volume=100))
|
||||
if(!panel_open)
|
||||
return
|
||||
if(security_level != AIRLOCK_SECURITY_PLASTEEL_I_S)
|
||||
@@ -896,7 +895,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>")
|
||||
@@ -909,7 +908,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)
|
||||
@@ -922,7 +921,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>")
|
||||
@@ -935,7 +934,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>")
|
||||
@@ -946,7 +945,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
|
||||
@@ -954,7 +953,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))
|
||||
@@ -999,7 +998,9 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
/obj/machinery/door/airlock/try_to_weld(obj/item/W, mob/user)
|
||||
if(!W.tool_behaviour == TOOL_WELDER)
|
||||
return
|
||||
if(!operating && density)
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
@@ -1028,12 +1029,14 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The airlock doesn't need repairing.</span>")
|
||||
|
||||
/obj/machinery/door/airlock/proc/weld_checks(obj/item/weldingtool/W, mob/user)
|
||||
/obj/machinery/door/airlock/proc/weld_checks(obj/item/W, mob/user)
|
||||
if(!W.tool_behaviour == TOOL_WELDER)
|
||||
return
|
||||
return !operating && density
|
||||
|
||||
/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
|
||||
@@ -1069,7 +1072,7 @@
|
||||
else
|
||||
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
|
||||
|
||||
if(istype(I, /obj/item/crowbar/power))
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(hasPower() && isElectrified())
|
||||
shock(user,100)//it's like sticking a forck in a power socket
|
||||
return
|
||||
|
||||
@@ -658,7 +658,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)
|
||||
@@ -674,7 +674,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
|
||||
|
||||
@@ -173,7 +173,9 @@
|
||||
/obj/machinery/door/proc/unrestricted_side(mob/M) //Allows for specific side of airlocks to be unrestrected (IE, can exit maint freely, but need access to enter)
|
||||
return get_dir(src, M) & unres_sides
|
||||
|
||||
/obj/machinery/door/proc/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
/obj/machinery/door/proc/try_to_weld(obj/item/W, mob/user)
|
||||
if(!W.tool_behaviour == TOOL_WELDER)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
|
||||
|
||||
@@ -123,7 +123,9 @@
|
||||
/obj/machinery/door/firedoor/try_to_activate_door(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
/obj/machinery/door/firedoor/try_to_weld(obj/item/W, mob/user)
|
||||
if(!W.tool_behaviour == TOOL_WELDER)
|
||||
return
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] starts [welded ? "unwelding" : "welding"] [src].</span>", "<span class='notice'>You start welding [src].</span>")
|
||||
|
||||
@@ -243,7 +243,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
|
||||
@@ -252,7 +252,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>")
|
||||
|
||||
@@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
return
|
||||
|
||||
/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)
|
||||
var/datum/component/material_container/materials = GetComponent(/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
|
||||
|
||||
@@ -160,7 +160,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>")
|
||||
@@ -169,7 +169,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
|
||||
@@ -184,7 +184,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>")
|
||||
@@ -192,7 +192,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)
|
||||
@@ -215,7 +215,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))
|
||||
@@ -247,7 +247,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()
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
//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 (bulb)
|
||||
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)
|
||||
user.visible_message("[user] has disconnected [src]'s flashbulb!", "<span class='notice'>You disconnect [src]'s flashbulb.</span>")
|
||||
@@ -66,7 +66,7 @@
|
||||
bulb = null
|
||||
power_change()
|
||||
|
||||
else if (istype(W, /obj/item/assembly/flash/handheld))
|
||||
else if(istype(W, /obj/item/assembly/flash/handheld))
|
||||
if (!bulb)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
@@ -76,7 +76,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))
|
||||
@@ -173,10 +173,10 @@
|
||||
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())
|
||||
if(!anchored && !isinspace())
|
||||
to_chat(user, "<span class='notice'>[src] is now secured.</span>")
|
||||
add_overlay("[base_state]-s")
|
||||
setAnchored(TRUE)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -38,8 +38,7 @@
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = src
|
||||
I.buffer = src
|
||||
to_chat(user, "<span class='notice'>You save the data in the [I.name]'s buffer.</span>")
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -37,13 +37,14 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mechpad/multitool_act(mob/living/user, obj/item/tool)
|
||||
if(!tool.tool_behaviour == TOOL_MULTITOOL)
|
||||
return
|
||||
if(!panel_open)
|
||||
return
|
||||
if(!multitool_check_buffer(user, tool))
|
||||
return
|
||||
var/obj/item/multitool/multitool = tool
|
||||
multitool.buffer = src
|
||||
to_chat(user, "<span class='notice'>You save the data in the [multitool.name]'s buffer.</span>")
|
||||
tool.buffer = src
|
||||
to_chat(user, "<span class='notice'>You save the data in the [tool.name]'s buffer.</span>")
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -127,7 +127,9 @@ Buildable meters
|
||||
/obj/item/pipe/attack_self(mob/user)
|
||||
setDir(turn(dir,-90))
|
||||
|
||||
/obj/item/pipe/wrench_act(mob/living/user, obj/item/wrench/W)
|
||||
/obj/item/pipe/wrench_act(mob/living/user, obj/item/W)
|
||||
if(!W.tool_behaviour == TOOL_WRENCH)
|
||||
return
|
||||
if(!isturf(loc))
|
||||
return TRUE
|
||||
|
||||
@@ -196,8 +198,9 @@ Buildable meters
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/piping_layer = PIPING_LAYER_DEFAULT
|
||||
|
||||
/obj/item/pipe_meter/wrench_act(mob/living/user, obj/item/wrench/W)
|
||||
|
||||
/obj/item/pipe_meter/wrench_act(mob/living/user, obj/item/W)
|
||||
if(!W.tool_behaviour == TOOL_WRENCH)
|
||||
return
|
||||
var/obj/machinery/atmospherics/pipe/pipe
|
||||
for(var/obj/machinery/atmospherics/pipe/P in loc)
|
||||
if(P.piping_layer == piping_layer)
|
||||
|
||||
@@ -283,9 +283,9 @@
|
||||
|
||||
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params)
|
||||
if(stat & BROKEN)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
//If the turret is destroyed, you can remove it with a crowbar to
|
||||
//try and salvage its components
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
//If the turret is destroyed, you can remove it with something
|
||||
//that acts like a crowbar to try and salvage its components
|
||||
to_chat(user, "<span class='notice'>You begin prying the metal coverings off...</span>")
|
||||
if(I.use_tool(src, user, 20))
|
||||
if(prob(70))
|
||||
@@ -302,7 +302,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if((istype(I, /obj/item/wrench)) && (!on))
|
||||
else if((I.tool_behaviour == TOOL_WRENCH) && (!on))
|
||||
if(raised)
|
||||
return
|
||||
|
||||
@@ -329,12 +329,11 @@
|
||||
to_chat(user, "<span class='notice'>Controls are now [locked ? "locked" : "unlocked"].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>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>")
|
||||
I.buffer = src
|
||||
to_chat(user, "<span class='notice'>You add [src] to [I]'s buffer.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -948,20 +947,19 @@
|
||||
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
|
||||
to_chat(user, "<span class='notice'>You link \the [M.buffer] with \the [src].</span>")
|
||||
if(I.buffer && istype(I.buffer, /obj/machinery/porta_turret))
|
||||
turrets |= I.buffer
|
||||
to_chat(user, "<span class='notice'>You link \the [I.buffer] with \the [src].</span>")
|
||||
return
|
||||
|
||||
if (issilicon(user))
|
||||
if(issilicon(user))
|
||||
return attack_hand(user)
|
||||
|
||||
if ( get_dist(src, user) == 0 ) // trying to unlock the interface
|
||||
if (allowed(usr))
|
||||
if(get_dist(src, user) == 0 ) // trying to unlock the interface
|
||||
if(allowed(usr))
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<span class='warning'>The turret control is unresponsive!</span>")
|
||||
return
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -89,7 +89,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
|
||||
@@ -106,7 +106,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>")
|
||||
@@ -123,14 +123,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
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
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)
|
||||
|
||||
@@ -37,7 +37,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
|
||||
|
||||
@@ -60,10 +60,9 @@
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access denied.</span>")
|
||||
else if(istype(I, /obj/item/multitool) && !parent_turret.locked)
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = parent_turret
|
||||
to_chat(user, "<span class='notice'>You add [parent_turret] to multitool buffer.</span>")
|
||||
else if(I.tool_behaviour == TOOL_MULTITOOL && !parent_turret.locked)
|
||||
I.buffer = parent_turret
|
||||
to_chat(user, "<span class='notice'>You add [parent_turret] to [I]'s buffer.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
switch(stat)
|
||||
if(1)
|
||||
// Stat 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 fan assembly securely into place.</span>")
|
||||
setAnchored(TRUE)
|
||||
@@ -46,7 +46,7 @@
|
||||
forceMove(F)
|
||||
F.setDir(src.dir)
|
||||
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 fan assembly from its place.</span>")
|
||||
stat = 1
|
||||
@@ -64,7 +64,9 @@
|
||||
deconstruct()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/fan_assembly/proc/weld(obj/item/weldingtool/W, mob/living/user)
|
||||
/obj/machinery/fan_assembly/proc/weld(obj/item/W, mob/living/user)
|
||||
if(!W.tool_behaviour == TOOL_WELDER)
|
||||
return
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
switch(stat)
|
||||
|
||||
@@ -55,19 +55,17 @@
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/multitool))
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = src
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
I.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))
|
||||
var/obj/item/multitool/M = I
|
||||
if(istype(M.buffer, /obj/machinery/quantumpad))
|
||||
if(M.buffer == src)
|
||||
else if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(istype(I.buffer, /obj/machinery/quantumpad))
|
||||
if(I.buffer == src)
|
||||
to_chat(user, "<span class='warning'>You cannot link a pad to itself!</span>")
|
||||
return TRUE
|
||||
else
|
||||
linked_pad = M.buffer
|
||||
linked_pad = I.buffer
|
||||
to_chat(user, "<span class='notice'>You link [src] to the one in [I]'s buffer.</span>")
|
||||
return TRUE
|
||||
else
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
setCharging()
|
||||
|
||||
/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
|
||||
@@ -102,7 +102,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
|
||||
|
||||
|
||||
@@ -502,7 +502,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
|
||||
@@ -511,7 +511,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)
|
||||
|
||||
@@ -146,7 +146,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)
|
||||
@@ -165,7 +165,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
|
||||
@@ -343,7 +343,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())
|
||||
|
||||
@@ -164,7 +164,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()
|
||||
|
||||
@@ -75,7 +75,7 @@ GLOBAL_VAR_INIT(singularity_counter, 0)
|
||||
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())
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
ref = REF(pda)
|
||||
)
|
||||
data_out["message_logs"] += list(data)
|
||||
|
||||
|
||||
return data_out
|
||||
|
||||
/obj/machinery/computer/message_monitor/ui_data(mob/user)
|
||||
@@ -119,7 +119,7 @@
|
||||
if(!linkedServer)
|
||||
data_out["selected"] = null
|
||||
return data_out
|
||||
|
||||
|
||||
data_out["selected"] = list(
|
||||
name = linkedServer.name,
|
||||
id = linkedServer.id,
|
||||
@@ -156,7 +156,7 @@
|
||||
if(LAZYLEN(machinelist) > 0)
|
||||
message = "FAILED: Cannot probe when buffer full"
|
||||
return
|
||||
|
||||
|
||||
for(var/obj/machinery/telecomms/message_server/T in GLOB.telecomms_list)
|
||||
if(T.network == network)
|
||||
LAZYADD(machinelist, T)
|
||||
@@ -206,7 +206,7 @@
|
||||
message = "NOTICE: Decryption key set."
|
||||
return
|
||||
message = incorrectkey
|
||||
|
||||
|
||||
if("hack")
|
||||
if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
|
||||
message = noserver
|
||||
@@ -225,7 +225,7 @@
|
||||
else if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
|
||||
message = noserver
|
||||
return
|
||||
|
||||
|
||||
var/datum/data_ref = locate(params["ref"])
|
||||
if(istype(data_ref, /datum/data_rc_msg))
|
||||
LAZYREMOVE(linkedServer.rc_msgs, data_ref)
|
||||
@@ -258,7 +258,7 @@
|
||||
else if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
|
||||
message = noserver
|
||||
return
|
||||
|
||||
|
||||
if("reset" in params)
|
||||
ResetMessage()
|
||||
return
|
||||
@@ -311,7 +311,7 @@
|
||||
return
|
||||
custommessage = M
|
||||
return
|
||||
|
||||
|
||||
if("recepient" in params)
|
||||
// Get out list of viable PDAs
|
||||
var/list/obj/item/pda/sendPDAs = get_viewable_pdas()
|
||||
@@ -324,8 +324,8 @@
|
||||
update_static_data(usr)
|
||||
|
||||
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/living/user, params)
|
||||
if(istype(O, /obj/item/screwdriver) && CHECK_BITFIELD(obj_flags, EMAGGED))
|
||||
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
|
||||
if(O.tool_behaviour == TOOL_SCREWDRIVER && CHECK_BITFIELD(obj_flags, EMAGGED))
|
||||
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
|
||||
//Why this though, you should make it emag to a board level. (i wont do it)
|
||||
to_chat(user, "<span class='warning'>It is too hot to mess with!</span>")
|
||||
else
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/machinery/telecomms/attackby(obj/item/P, mob/user, params)
|
||||
var/icon_closed = initial(icon_state)
|
||||
var/icon_open = "[initial(icon_state)]_o"
|
||||
|
||||
|
||||
if(!on)
|
||||
icon_closed = "[initial(icon_state)]_off"
|
||||
icon_open = "[initial(icon_state)]_o_off"
|
||||
@@ -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))
|
||||
@@ -42,7 +42,7 @@
|
||||
. = list() //cpypaste from the vending bus
|
||||
.["notice"] = temp
|
||||
.["multitool"] = FALSE
|
||||
var/obj/item/multitool/P = get_multitool(user)
|
||||
var/obj/item/P = get_multitool(user)
|
||||
if(P)
|
||||
.["multitool"] = TRUE
|
||||
.["multitool_buf"] = null //to clean the list!
|
||||
@@ -113,7 +113,7 @@
|
||||
if("network" in params)
|
||||
if(!canAccess(usr))
|
||||
return
|
||||
var/newnet = sanitize(sanitize_text(params["network"], network))
|
||||
var/newnet = sanitize(sanitize_text(params["network"], network))
|
||||
if(length(newnet) > 15)
|
||||
temp = "-% Too many characters in new network tag. %-"
|
||||
return
|
||||
@@ -122,19 +122,19 @@
|
||||
temp = "-% New network tag assigned: \"[network]\" %-"
|
||||
return
|
||||
if("multitool")
|
||||
var/obj/item/multitool/P = get_multitool(usr)
|
||||
var/obj/item/P = get_multitool(usr)
|
||||
if("Link" in params)
|
||||
if(!canAccess(usr))
|
||||
return
|
||||
if(!istype(P))
|
||||
if(!P.tool_behaviour == TOOL_MULTITOOL)
|
||||
temp = "-% Unable to acquire buffer %-"
|
||||
return
|
||||
|
||||
|
||||
var/obj/machinery/telecomms/T = P.buffer
|
||||
if(!istype(T) || T == src)
|
||||
temp = "-% Unable to acquire buffer %-"
|
||||
return
|
||||
|
||||
|
||||
if(!(src in T.links))
|
||||
LAZYADD(T.links, src)
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
return
|
||||
|
||||
P.buffer = src
|
||||
temp = "% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-"
|
||||
temp = "% Successfully stored [REF(P.buffer)] [P.buffer] in buffer %-"
|
||||
|
||||
if("unlink")
|
||||
var/obj/machinery/telecomms/T = locate(params["value"])
|
||||
@@ -167,7 +167,7 @@
|
||||
if(!istype(T))
|
||||
temp = "-% Unable to locate machine to unlink from, try again. %-"
|
||||
return
|
||||
|
||||
|
||||
temp = "-% Removed [REF(T)] [T.name] from linked entities. %-"
|
||||
if(T.links) //lazyrem makes blank list null, which is good but some might cause runtime ee's
|
||||
T.links.Remove(src)
|
||||
@@ -198,7 +198,7 @@
|
||||
var/x = text2num(params["remove"])
|
||||
temp = "-% Removed frequency filter [x] %-"
|
||||
freq_listening.Remove(x)
|
||||
|
||||
|
||||
/obj/machinery/telecomms/relay/ui_act(action, params)
|
||||
..()
|
||||
switch(action)
|
||||
@@ -243,7 +243,11 @@
|
||||
|
||||
// Check if the user can use it.
|
||||
/obj/machinery/telecomms/proc/canInteract(mob/user)
|
||||
if(hasSiliconAccessInArea(user) || istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
var/get = user.get_active_held_item()
|
||||
var/obj/item/I = get
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
return TRUE
|
||||
if(hasSiliconAccessInArea(user))
|
||||
return TRUE
|
||||
return FALSE
|
||||
// Check if the user is nearby and has a multitool.
|
||||
@@ -256,14 +260,16 @@
|
||||
/obj/machinery/telecomms/proc/get_multitool(mob/user)
|
||||
if(!canInteract(user))
|
||||
return null
|
||||
var/obj/item/multitool/P = user.get_active_held_item()
|
||||
var/obj/item/P = user.get_active_held_item()
|
||||
// Is the ref not a null? and is it the actual type?
|
||||
if(istype(P))
|
||||
if(P.tool_behaviour == TOOL_MULTITOOL)
|
||||
return P
|
||||
else if(isAI(user))
|
||||
var/mob/living/silicon/ai/U = user
|
||||
P = U.aiMulti
|
||||
else if(iscyborg(user) && in_range(user, src))
|
||||
if(istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
P = user.get_active_held_item()
|
||||
var/get = user.get_active_held_item()
|
||||
var/obj/item/I = get
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
I = user.get_active_held_item()
|
||||
return P
|
||||
|
||||
@@ -38,5 +38,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)
|
||||
|
||||
@@ -164,16 +164,15 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/teleport/station/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
var/obj/item/multitool/M = W
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(panel_open)
|
||||
M.buffer = src
|
||||
W.buffer = src
|
||||
to_chat(user, "<span class='caution'>You download the data to the [W.name]'s buffer.</span>")
|
||||
else
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/teleport/station) && M.buffer != src)
|
||||
if(W.buffer && istype(W.buffer, /obj/machinery/teleport/station) && W.buffer != src)
|
||||
if(linked_stations.len < efficiency)
|
||||
linked_stations.Add(M.buffer)
|
||||
M.buffer = null
|
||||
linked_stations.Add(W.buffer)
|
||||
W.buffer = null
|
||||
to_chat(user, "<span class='caution'>You upload the data from the [W.name]'s buffer.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>This station can't hold more information, try to use better parts.</span>")
|
||||
@@ -185,7 +184,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>")
|
||||
|
||||
Reference in New Issue
Block a user