This commit is contained in:
Putnam
2021-03-02 01:44:58 -08:00
477 changed files with 6805 additions and 1201 deletions
+4 -1
View File
@@ -99,6 +99,9 @@
///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy()
var/list/targeted_by
///Reference to atom being orbited
var/atom/orbit_target
/**
* Called when an atom is created in byond (built in engine proc)
*
@@ -982,7 +985,7 @@
return
/atom/proc/multitool_check_buffer(user, obj/item/I, silent = FALSE)
if(!istype(I, /obj/item/multitool))
if(!I.tool_behaviour == TOOL_MULTITOOL)
if(user && !silent)
to_chat(user, "<span class='warning'>[I] has no data buffer!</span>")
return FALSE
@@ -33,6 +33,7 @@
/datum/sabotage_objective/processing/check_conditions()
return won
/*
/datum/sabotage_objective/processing/power_sink
name = "Drain at least 100 megajoules of power using a power sink."
sabotage_type = "powersink"
@@ -44,6 +45,7 @@
for(var/s in GLOB.power_sinks)
var/obj/item/powersink/sink = s
won = max(won,sink.power_drained/1e8)
*/
/obj/item/paper/guides/antag/supermatter_sabotage
info = "Ways to sabotage a supermatter:<br>\
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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>")
+11 -9
View File
@@ -10,7 +10,7 @@
circuit = /obj/item/circuitboard/machine/cell_charger
pass_flags = PASSTABLE
var/obj/item/stock_parts/cell/charging = null
var/charge_rate = 500
var/recharge_coeff = 1
/obj/machinery/cell_charger/update_overlays()
. += ..()
@@ -28,9 +28,10 @@
. = ..()
. += "There's [charging ? "a" : "no"] cell in the charger."
if(charging)
. += "Current charge: [round(charging.percent(), 1)]%."
var/obj/item/stock_parts/cell/C = charging.get_cell()
. += "Current charge: [C.percent()]%."
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Charge rate at <b>[charge_rate]J</b> per cycle.</span>"
. += "<span class='notice'>The status display reads: Charge rate at <b>[recharge_coeff*10]J</b> per cycle.</span>"
/obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell) && !panel_open)
@@ -122,17 +123,18 @@
charging.emp_act(severity)
/obj/machinery/cell_charger/RefreshParts()
charge_rate = 500
for(var/obj/item/stock_parts/capacitor/C in component_parts)
charge_rate *= C.rating
recharge_coeff = C.rating
/obj/machinery/cell_charger/process()
if(!charging || !anchored || (stat & (BROKEN|NOPOWER)))
return
if(charging.percent() >= 100)
return
use_power(charge_rate)
charging.give(charge_rate) //this is 2558, efficient batteries exist
if(charging)
var/obj/item/stock_parts/cell/C = charging.get_cell()
if(C)
if(C.charge < C.maxcharge)
C.give(C.chargerate * recharge_coeff)
use_power(250 * recharge_coeff)
update_icon()
+8 -10
View File
@@ -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
+2 -1
View File
@@ -44,7 +44,8 @@
icon_state = "colormate"
/obj/machinery/gear_painter/Destroy()
inserted.forceMove(drop_location())
if(inserted) //please i beg you do not drop nulls
inserted.forceMove(drop_location())
return ..()
/obj/machinery/gear_painter/attackby(obj/item/I, mob/living/user)
+2 -2
View File
@@ -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
+8 -1
View File
@@ -151,7 +151,14 @@
var/obj/machinery/power/apc/target = locate(ref) in GLOB.apcs_list
if(!target)
return
target.vars[type] = target.setsubsystem(text2num(value))
value = target.setsubsystem(text2num(value))
switch(type) // Sanity check
if("equipment", "lighting", "environ")
target.vars[type] = value
else
message_admins("Warning: possible href exploit by [key_name(usr)] - attempted to set [type] on [target] to [value]")
log_game("Warning: possible href exploit by [key_name(usr)] - attempted to set [type] on [target] to [value]")
return
target.update_icon()
target.update()
var/setTo = ""
+9 -15
View File
@@ -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)
@@ -117,12 +117,6 @@
if(user.a_intent == INTENT_HARM)
return ..()
//callback proc used on stacks use_tool to stop unnecessary amounts being wasted from spam clicking.
/obj/structure/frame/computer/proc/check_state(target_state)
if(state == target_state)
return TRUE
return FALSE
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(state == 4)
+9 -11
View File
@@ -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
+2
View File
@@ -264,6 +264,8 @@ What a mess.*/
active1 = null
if(!( GLOB.data_core.security.Find(active2) ))
active2 = null
if(!authenticated && href_list["choice"] != "Log In") // logging in is the only action you can do if not logged in
return
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))
usr.set_machine(src)
switch(href_list["choice"])
+23 -20
View File
@@ -21,6 +21,11 @@
circuit = null
qdel(src)
//callback proc used on stacks use_tool to stop unnecessary amounts being wasted from spam clicking.
/obj/structure/frame/proc/check_state(target_state)
if(state == target_state)
return TRUE
return FALSE
/obj/structure/frame/machine
name = "machine frame"
@@ -84,34 +89,32 @@
if(!P.tool_start_check(user, amount=5))
return
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
if(P.use_tool(src, user, 20, volume=50, amount=5))
if(P.use_tool(src, user, 20, volume=50, amount=5, extra_checks = CALLBACK(src, .proc/check_state, 1)))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
state = 2
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))
if(state == 1)
to_chat(user, "<span class='notice'>You disassemble the frame.</span>")
var/obj/item/stack/sheet/metal/M = new (loc, 5)
M.add_fingerprint(user)
qdel(src)
if(P.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, .proc/check_state, 1)))
to_chat(user, "<span class='notice'>You disassemble the frame.</span>")
var/obj/item/stack/sheet/metal/M = new (loc, 5)
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)
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
setAnchored(!anchored)
if(P.use_tool(src, user, 40, volume=75, extra_checks = CALLBACK(src, .proc/check_state, 1)))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
setAnchored(!anchored)
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))
if(P.use_tool(src, user, 40, volume=75, extra_checks = CALLBACK(src, .proc/check_state, 2)))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
setAnchored(!anchored)
return
@@ -140,7 +143,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 +152,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 +170,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))
if(P.use_tool(src, user, 40, volume=75, extra_checks = CALLBACK(src, .proc/check_state, 3)))
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)
+6
View File
@@ -296,6 +296,12 @@
AM.forceMove(src)
R.module.remove_module(I, TRUE)
else
if(ishuman(mob_occupant))
var/mob/living/carbon/human/H = mob_occupant
if(H.mind && H.client && H.client.prefs && H == H.mind.original_character)
H.SaveTCGCards()
var/list/gear = list()
if(iscarbon(mob_occupant)) // sorry simp-le-mobs deserve no mercy
var/mob/living/carbon/C = mob_occupant
+1 -1
View File
@@ -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)
+5 -3
View File
@@ -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
+1 -1
View File
@@ -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
+20 -15
View File
@@ -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
@@ -1059,7 +1062,7 @@
to_chat(user, "<span class='warning'>The airlock's motors resist your efforts to force it!</span>")
else if(locked)
to_chat(user, "<span class='warning'>The airlock's bolts prevent it from being forced!</span>")
else if( !welded && !operating)
else if(!welded && !operating)
if(!beingcrowbarred) //being fireaxe'd
var/obj/item/fireaxe/axe = I
if(!axe.wielded)
@@ -1069,7 +1072,9 @@
else
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
if(istype(I, /obj/item/crowbar/power))
if(I.tool_behaviour == TOOL_CROWBAR)
if(!I.can_force_powered)
return
if(hasPower() && isElectrified())
shock(user,100)//it's like sticking a forck in a power socket
return
+2 -2
View File
@@ -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
+3 -1
View File
@@ -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)
+3 -1
View File
@@ -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>")
+2 -2
View File
@@ -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>")
+1 -1
View File
@@ -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()
+2 -2
View File
@@ -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
+6 -6
View File
@@ -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()
+6 -6
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -2
View File
@@ -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
+4 -3
View File
@@ -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
/**
+1 -1
View File
@@ -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>")
+6 -3
View File
@@ -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 ..()
@@ -393,6 +392,27 @@
spark_system.start() //creates some sparks because they look cool
qdel(cover) //deletes the cover - no need on keeping it there!
//turret healing
/obj/machinery/porta_turret/examine(mob/user)
. = ..()
if(obj_integrity < max_integrity)
. += "<span class='notice'>[src] is damaged, use a lit welder to fix it.</span>"
/obj/machinery/porta_turret/welder_act(mob/living/user, obj/item/I)
. = TRUE
if(cover && obj_integrity < max_integrity)
if(!I.tool_start_check(user, amount=0))
return
user.visible_message("[user] is welding the turret.", \
"<span class='notice'>You begin repairing the turret...</span>", \
"<span class='italics'>You hear welding.</span>")
if(I.use_tool(src, user, 40, volume=50))
obj_integrity = max_integrity
user.visible_message("[user.name] has repaired [src].", \
"<span class='notice'>You finish repairing the turret.</span>")
else
to_chat(user, "<span class='notice'>The turret doesn't need repairing.</span>")
/obj/machinery/porta_turret/process()
//the main machinery process
if(cover == null && anchored) //if it has no cover and is anchored
@@ -927,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)
+6 -8
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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)
+3 -3
View File
@@ -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())
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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)
+6 -7
View File
@@ -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>")
+6 -4
View File
@@ -97,7 +97,7 @@
icon_state = "mecha_ion"
energy_drain = 120
projectile = /obj/item/projectile/ion
fire_sound = 'sound/weapons/laser.ogg'
fire_sound = 'sound/weapons/IonRifle.ogg'
/obj/item/mecha_parts/mecha_equipment/weapon/energy/tesla
equip_cooldown = 35
@@ -195,7 +195,7 @@
//Base ballistic weapon type
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
name = "general ballistic weapon"
fire_sound = 'sound/weapons/gunshot.ogg'
fire_sound = 'sound/weapons/lmgshot.ogg'
var/projectiles
var/projectiles_cache //ammo to be loaded in, if possible.
var/projectiles_cache_max
@@ -285,6 +285,7 @@
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
name = "\improper LBX AC 10 \"Scattershot\""
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
fire_sound = 'sound/weapons/gunshotshotgunshot.ogg'
icon_state = "mecha_scatter"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/scattershot
@@ -299,6 +300,7 @@
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/seedscatter
name = "\improper Melon Seed \"Scattershot\""
desc = "A weapon for combat exosuits. Shoots a spread of pellets, shaped as seed."
fire_sound = 'sound/weapons/gunshotshotgunshot.ogg'
icon_state = "mecha_scatter"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/seed
@@ -331,7 +333,7 @@
desc = "A weapon for combat exosuits. Launches light explosive missiles."
icon_state = "mecha_missilerack"
projectile = /obj/item/projectile/bullet/a84mm_he
fire_sound = 'sound/weapons/grenadelaunch.ogg'
fire_sound = 'sound/weapons/rocketlaunch.ogg'
projectiles = 8
projectiles_cache = 0
projectiles_cache_max = 0
@@ -345,7 +347,7 @@
desc = "A weapon for combat exosuits. Launches low-explosive breaching missiles designed to explode only when striking a sturdy target."
icon_state = "mecha_missilerack_six"
projectile = /obj/item/projectile/bullet/a84mm_br
fire_sound = 'sound/weapons/grenadelaunch.ogg'
fire_sound = 'sound/weapons/rocketlaunch.ogg'
projectiles = 6
projectiles_cache = 0
projectiles_cache_max = 0
+4 -4
View File
@@ -196,7 +196,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>")
@@ -204,7 +204,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>")
@@ -220,7 +220,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>")
@@ -248,7 +248,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.DelayNextAction(CLICK_CD_MELEE)
if(obj_integrity < max_integrity)
if(W.use_tool(src, user, 0, volume=50, amount=1))
+3 -3
View File
@@ -35,7 +35,7 @@
. += "<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
@@ -54,7 +54,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
@@ -67,7 +67,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)
+1 -1
View File
@@ -92,7 +92,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>")
@@ -81,6 +81,7 @@
/obj/effect/decal/cleanable/trail_holder //not a child of blood on purpose
name = "blood"
icon = 'icons/effects/blood.dmi'
icon_state = "ltrails_1"
desc = "Your instincts say you shouldn't be following these."
random_icon_states = null
+6
View File
@@ -112,6 +112,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/tool_behaviour = NONE
var/toolspeed = 1
//Special multitools
var/buffer = null
var/show_wires = FALSE
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
//Special crowbar
var/can_force_powered = FALSE
var/reach = 1 //In tiles, how far this weapon can reach; 1 for adjacent, which is default
+1 -1
View File
@@ -63,7 +63,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
+21 -15
View File
@@ -10,35 +10,41 @@
/obj/item/armorkit/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
// yeah have fun making subtypes and modifying the afterattack if you want to make variants
// idiot
// - hatter
var/used = FALSE
if(isobj(target) && istype(target, /obj/item/clothing/under))
var/obj/item/clothing/under/C = target
if(C.armor.melee < 10)
C.armor.melee = 10
if(C.damaged_clothes)
to_chat(user,"<span class='warning'>You should repair the damage done to [C] first.</span>")
return
if(C.attached_accessory)
to_chat(user,"<span class='warning'>Kind of hard to sew around [C.attached_accessory].</span>")
return
if(C.armor.getRating("melee") < 10)
C.armor = C.armor.setRating("melee" = 10)
used = TRUE
if(C.armor.laser < 10)
C.armor.laser = 10
if(C.armor.getRating("laser") < 10)
C.armor = C.armor.setRating("laser" = 10)
used = TRUE
if(C.armor.fire < 40)
C.armor.fire = 40
if(C.armor.getRating("fire") < 40)
C.armor = C.armor.setRating("fire" = 40)
used = TRUE
if(C.armor.acid < 10)
C.armor.acid = 10
if(C.armor.getRating("acid") < 10)
C.armor = C.armor.setRating("acid" = 10)
used = TRUE
if(C.armor.bomb < 5)
C.armor.bomb = 5
if(C.armor.getRating("bomb") < 5)
C.armor = C.armor.setRating("bomb" = 5)
used = TRUE
if(used)
user.visible_message("<span class = 'notice'>[user] uses [src] on [C], reinforcing it and tossing the empty case away afterwards.</span>", \
"<span class = 'notice'>You reinforce [C] with [src], making it a little more protective! You toss the empty casing away afterwards.</span>")
C.name = "durathread [C.name]" // this disappears if it gets repaired, which is annoying
user.visible_message("<span class = 'notice'>[user] reinforces [C] with [src].</span>", \
"<span class = 'notice'>You reinforce [C] with [src], making it as protective as a durathread jumpsuit.</span>")
C.name = "durathread [C.name]"
C.upgrade_prefix = "durathread" // god i hope this works
qdel(src)
return
else
to_chat(user, "<span class = 'notice'>You stare at [src] and [C], coming to the conclusion that you probably don't need to reinforce it any further.")
to_chat(user, "<span class = 'notice'>You don't need to reinforce [C] any further.")
return
else
return
+1 -1
View File
@@ -63,7 +63,7 @@
to_chat(user, "Your name has been sent to your employers for approval.")
// Autoapproves after a certain time
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [html_encode(new_name)] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
/obj/item/station_charter/proc/reject_proposed(user)
if(!user)
@@ -66,7 +66,7 @@
var/list/dept_list = list("Civilian","Security","Medical","Science","Engineering","Cargo")
/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
@@ -181,7 +181,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
@@ -338,7 +338,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
@@ -296,7 +296,7 @@
/obj/machinery/vending/custom = "Custom Vendor")
/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]
@@ -372,7 +372,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)
@@ -441,7 +441,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
@@ -477,7 +477,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]
@@ -658,7 +658,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)
@@ -777,7 +777,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
+1 -1
View File
@@ -120,7 +120,7 @@
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_power()
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))
+2 -1
View File
@@ -665,7 +665,8 @@ GLOBAL_LIST_EMPTY(PDAs)
create_message(U, locate(href_list["target"]))
if("MessageAll")
send_to_all(U)
if(cartridge?.spam_enabled)
send_to_all(U)
if("toggle_block")
toggle_blocking(usr, href_list["target"])
@@ -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
+2 -1
View File
@@ -8,11 +8,12 @@
slot_flags = ITEM_SLOT_BELT
obj_flags = UNIQUE_RENAME
var/gpstag = "COM0"
var/emp_proof = FALSE
var/starton = TRUE
/obj/item/gps/Initialize()
. = ..()
AddComponent(/datum/component/gps/item, gpstag, starton)
AddComponent(/datum/component/gps/item, gpstag, emp_proof, starton)
/obj/item/gps/science
icon_state = "gps-s"
@@ -50,7 +50,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())
+5 -4
View File
@@ -26,10 +26,9 @@
throw_range = 7
throw_speed = 3
custom_materials = list(/datum/material/iron=50, /datum/material/glass=20)
var/obj/machinery/buffer // simple machine buffer for device linkage
buffer = null // simple machine buffer for device linkage
toolspeed = 1
usesound = 'sound/weapons/empty.ogg'
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
var/mode = 0
/obj/item/multitool/chaplain
@@ -72,7 +71,7 @@
if(selected_io)
icon_state += "_red"
/obj/item/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
/obj/item/proc/wire(var/datum/integrated_io/io, mob/user)
if(!io.holder.assembly)
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
return
@@ -101,7 +100,7 @@
update_icon()
/obj/item/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
/obj/item/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
if(!io1.linked.len || !io2.linked.len)
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
return
@@ -256,6 +255,7 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
show_wires = TRUE
/obj/item/multitool/advanced
name = "advanced multitool"
@@ -263,6 +263,7 @@
icon = 'icons/obj/advancedtools.dmi'
icon_state = "multitool"
toolspeed = 0.2
show_wires = TRUE
/obj/item/multitool/advanced/brass
name = "clockwork multitool"
+4 -1
View File
@@ -122,7 +122,10 @@
/obj/item/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
src.pai = personality
src.add_overlay("pai-null")
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
var/policy = policies[POLICYCONFIG_PAI]
if(policy)
to_chat(personality, policy)
playsound(loc, 'sound/effects/pai_boot.ogg', 50, 1, -1)
audible_message("\The [src] plays a cheerful startup noise!")
+1 -1
View File
@@ -67,7 +67,7 @@ GLOBAL_LIST_EMPTY(power_sinks)
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)
@@ -69,7 +69,8 @@ GLOBAL_LIST_INIT(channel_tokens, list(
/obj/item/radio/headset/talk_into(mob/living/M, message, channel, list/spans,datum/language/language)
if (!listening)
return ITALICS | REDUCE_RANGE
return ..()
if (language != /datum/language/signlanguage)
return ..()
/obj/item/radio/headset/can_receive(freq, level, AIuser)
if(ishuman(src.loc))
@@ -277,7 +278,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
to_chat(user,"<span class='notice'>You upgrade [src].</span>")
bowmanize()
qdel(W)
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])
@@ -23,7 +23,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!
. = ..()
@@ -57,7 +57,7 @@
. += "<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))
@@ -69,7 +69,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
@@ -208,6 +208,8 @@
return
if(!M.IsVocal())
return
if(language == /datum/language/signlanguage)
return
if(use_command)
spans |= commandspan
@@ -331,7 +333,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>")
@@ -382,7 +384,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])
+1 -1
View File
@@ -893,7 +893,7 @@ GENETICS SCANNER
throw_range = 7
custom_materials = list(/datum/material/iron=200)
var/list/discovered = list() //hit a dna console to update the scanners database
var/list/buffer
buffer = list()
var/ready = TRUE
var/cooldown = 200
@@ -314,7 +314,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>")
+1 -1
View File
@@ -253,7 +253,7 @@
possible_colors = list("purple")
/obj/item/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>")
+2 -2
View File
@@ -79,7 +79,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)
@@ -94,7 +94,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()
@@ -51,7 +51,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)
@@ -105,11 +105,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())
@@ -275,7 +275,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
+2 -2
View File
@@ -47,7 +47,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
@@ -206,7 +206,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))
+8 -1
View File
@@ -245,6 +245,9 @@
slowdown = 7
breakouttime = 300 //Deciseconds = 30s = 0.5 minute
/obj/item/restraints/legcuffs/proc/on_removed()
return
/obj/item/restraints/legcuffs/beartrap
name = "bear trap"
throw_speed = 1
@@ -376,4 +379,8 @@
icon_state = "ebola"
hitsound = 'sound/weapons/taserhit.ogg'
w_class = WEIGHT_CLASS_SMALL
breakouttime = 60
breakouttime = 25
/obj/item/restraints/legcuffs/bola/energy/on_removed()
do_sparks(1, TRUE, src)
qdel(src)
+4 -1
View File
@@ -771,7 +771,10 @@
/obj/item/nullrod/tribal_knife/process()
slowdown = rand(-2, 2)
if(iscarbon(loc))
var/mob/living/carbon/wielder = loc
if(wielder.is_holding(src))
wielder.update_equipment_speed_mods()
/obj/item/nullrod/pitchfork
icon_state = "pitchfork0"
@@ -44,7 +44,7 @@
icon_state = "warp"
uses = -1
var/total_delay = 10 SECONDS
var/cooldown = 10 SECONDS
var/cooldown = 30 SECONDS
var/last_use = 0
var/list/positions = list()
var/next_prune = 0
+1 -1
View File
@@ -62,7 +62,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>")
+4 -2
View File
@@ -279,7 +279,7 @@
to_chat(user, "<span class='notice'>[src] is now [choice].</span>")
/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(user.a_intent == INTENT_DISARM)
if(!active)
to_chat(user, "<span class='warning'>COLOR_SET</span>")
@@ -439,7 +439,9 @@
force_on = 15 //As strong a survival knife/bone dagger
/obj/item/melee/transforming/energy/sword/cx/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/melee/transforming/energy/sword/cx))
if(istype(W, /obj/item/melee/transforming/energy/sword/cx/traitor))
return
else if(istype(W, /obj/item/melee/transforming/energy/sword/cx))
if(HAS_TRAIT(W, TRAIT_NODROP) || HAS_TRAIT(src, TRAIT_NODROP))
to_chat(user, "<span class='warning'>\the [HAS_TRAIT(src, TRAIT_NODROP) ? src : W] is stuck to your hand, you can't attach it to \the [HAS_TRAIT(src, TRAIT_NODROP) ? W : src]!</span>")
return
+2 -2
View File
@@ -84,7 +84,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
@@ -93,7 +93,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)
+2 -2
View File
@@ -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)
+2 -2
View File
@@ -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.tool_behaviour == TOOL_MULTITOOL)
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
return
+2 -2
View File
@@ -20,7 +20,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
custom_materials = list(/datum/material/iron=1000)
max_amount = 50
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
hitsound = 'sound/items/trayhit1.ogg'
embedding = list()
novariants = TRUE
@@ -44,7 +44,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
@@ -466,6 +466,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
new/datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
new/datum/stack_recipe("folder", /obj/item/folder), \
new/datum/stack_recipe("cardboard card", /obj/item/cardboard_card, 1), \
// holy fuck why are there so many boxes
new/datum/stack_recipe_list("fancy boxes", list ( \
new /datum/stack_recipe("donut box", /obj/item/storage/fancy/donut_box), \
@@ -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)
@@ -40,7 +40,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
+3 -3
View File
@@ -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
@@ -526,3 +526,8 @@
new /obj/item/book/granter/martial/carp(src)
new /obj/item/clothing/suit/hooded/carp_costume(src)
new /obj/item/staff/bostaff(src)
/obj/item/storage/box/syndie_kit/sleepytime/cardpack/PopulateContents()
. = ..()
new /obj/item/cardpack/syndicate(src)
new /obj/item/cardpack/syndicate(src)
+1 -1
View File
@@ -119,7 +119,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))
+1
View File
@@ -88,6 +88,7 @@
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
can_force_powered = TRUE
/obj/item/crowbar/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src], it looks like [user.p_theyre()] trying to commit suicide!</span>")
+1 -1
View File
@@ -103,7 +103,7 @@
return (FIRELOSS)
/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)
+1 -1
View File
@@ -277,7 +277,7 @@
newSaber.hacked = TRUE
qdel(W)
qdel(src)
else if(istype(W, /obj/item/multitool))
else if(W.tool_behaviour == TOOL_MULTITOOL)
if(!hacked)
hacked = TRUE
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")
+1 -1
View File
@@ -302,7 +302,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
damtype = STAMINA
attack_verb = list("whacked", "smacked", "struck")
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
hitsound = 'sound/weapons/grenadelaunch.ogg' // no good wood thunk sounds
hitsound = 'sound/weapons/woodbonk.ogg'
var/harm = FALSE // TRUE = brute, FALSE = stam
var/reinforced = FALSE
var/burnt = FALSE
+11 -11
View File
@@ -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
+1 -1
View File
@@ -62,7 +62,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 if(istype(W, /obj/item/bedsheet))

Some files were not shown because too many files have changed in this diff Show More