upload files

This commit is contained in:
SandPoot
2021-02-18 14:47:10 -03:00
parent 4e18044450
commit cf2e70671a
182 changed files with 552 additions and 528 deletions

View File

@@ -43,14 +43,13 @@
// This exists so Hardened/Silver Stake can't have a welding torch used on them.
/obj/item/stake/basic/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
//if (amWelded)
// to_chat(user, "<span class='warning'>This stake has already been treated with fire.</span>")
// return
//amWelded = TRUE
// Weld it
var/obj/item/weldingtool/WT = W
if(WT.use(0))//remove_fuel(0,user))
if(W.use(0))//remove_fuel(0,user))
user.visible_message("[user.name] scorched the pointy end of [src] with the welding tool.", \
"<span class='notice'>You scorch the pointy end of [src] with the welding tool.</span>", \
"<span class='italics'>You hear welding.</span>")

View File

@@ -164,11 +164,11 @@
if(istype(W, cutting_tool))
to_chat(user, "<span class='notice'>This is a much more complex mechanical structure than you thought. You don't know where to begin cutting [src].</span>")
return
else if(anchored && istype(W, /obj/item/wrench)) // Can't unanchor unless owner.
else if(anchored && W.tool_behaviour == TOOL_WRENCH) // Can't unanchor unless owner.
to_chat(user, "<span class='danger'>The coffin won't come unanchored from the floor.</span>")
return
if(locked && istype(W, /obj/item/crowbar))
if(locked && W.tool_behaviour == TOOL_CROWBAR)
var/pry_time = pryLidTimer * W.toolspeed // Pry speed must be affected by the speed of the tool.
user.visible_message("<span class='notice'>[user] tries to pry the lid off of [src] with [W].</span>", \
"<span class='notice'>You begin prying the lid off of [src] with [W]. This should take about [DisplayTimeText(pry_time)].</span>")

View File

@@ -95,7 +95,7 @@
return ..()
/obj/structure/destructible/clockwork/attackby(obj/item/I, mob/user, params)
if(is_servant_of_ratvar(user) && istype(I, /obj/item/wrench) && unanchored_icon)
if(is_servant_of_ratvar(user) && I.tool_behaviour == TOOL_WRENCH && unanchored_icon)
if(default_unfasten_wrench(user, I, 50) == SUCCESSFUL_UNFASTEN)
update_anchored(user)
return 1

View File

@@ -23,10 +23,10 @@
return
/obj/structure/destructible/clockwork/wall_gear/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
default_unfasten_wrench(user, I, 10)
return 1
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(anchored)
to_chat(user, "<span class='warning'>[src] needs to be unsecured to disassemble it!</span>")
else

View File

@@ -104,7 +104,7 @@
switch(deconstruction_state)
if(NUKESTATE_INTACT)
if(istype(I, /obj/item/screwdriver/nuke))
if(istype(I, /obj/item/screwdriver/nuke)) //Special case, cannot replace with tool_behavior
to_chat(user, "<span class='notice'>You start removing [src]'s front panel's screws...</span>")
if(I.use_tool(src, user, 60, volume=100))
deconstruction_state = NUKESTATE_UNSCREWED

View File

@@ -43,7 +43,7 @@
to_chat(user, "<span class='notice'>Picking up the swarmer may cause it to activate. You should be careful about this.</span>")
/obj/effect/mob_spawn/swarmer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver) && user.a_intent != INTENT_HARM)
if(W.tool_behaviour == TOOL_SCREWDRIVER && user.a_intent != INTENT_HARM)
user.visible_message("<span class='warning'>[usr.name] deactivates [src].</span>",
"<span class='notice'>After some fiddling, you find a way to disable [src]'s power source.</span>",
"<span class='italics'>You hear clicking.</span>")

View File

@@ -762,14 +762,14 @@
/obj/machinery/airalarm/attackby(obj/item/W, mob/user, params)
switch(buildstage)
if(2)
if(istype(W, /obj/item/wirecutters) && panel_open && wires.is_all_cut())
if(W.tool_behaviour == TOOL_WIRECUTTER && panel_open && wires.is_all_cut())
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You cut the final wires.</span>")
new /obj/item/stack/cable_coil(loc, 5)
buildstage = 1
update_icon()
return
else if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up.
else if(W.tool_behaviour == TOOL_SCREWDRIVER) // Opening that Air Alarm up.
W.play_tool_sound(src)
panel_open = !panel_open
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
@@ -781,7 +781,7 @@
wires.interact(user)
return
if(1)
if(istype(W, /obj/item/crowbar))
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>")
W.play_tool_sound(src)
@@ -832,7 +832,7 @@
update_icon()
return
if(istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
W.play_tool_sound(src)
new /obj/item/wallframe/airalarm( user.loc )

View File

@@ -326,7 +326,7 @@
|| default_deconstruction_crowbar(I))
update_icon()
return
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "<span class='notice'>You can't access the maintenance panel while the pod is " \
+ (on ? "active" : (occupant ? "full" : "open")) + ".</span>")
return
@@ -454,8 +454,10 @@
return G.return_temperature()
return ..()
/obj/machinery/atmospherics/components/unary/cryo_cell/default_change_direction_wrench(mob/user, obj/item/wrench/W)
/obj/machinery/atmospherics/components/unary/cryo_cell/default_change_direction_wrench(mob/user, obj/item/W)
. = ..()
if(!W.tool_behaviour == TOOL_WRENCH)
return
if(.)
SetInitDirections()
var/obj/machinery/atmospherics/node = nodes[1]

View File

@@ -115,7 +115,7 @@
to_chat(user, "<span class='notice'>[holding ? "In one smooth motion you pop [holding] out of [src]'s connector and replace it with [T]" : "You insert [T] into [src]"].</span>")
replace_tank(user, FALSE, T)
update_icon()
else if(istype(W, /obj/item/wrench))
else if(W.tool_behaviour == TOOL_WRENCH)
if(!(stat & BROKEN))
if(connected_port)
disconnect()

View File

@@ -311,7 +311,7 @@
to_chat(user, "<span class = 'danger'>Install a new flash in [src]!</span>")
/obj/item/clothing/glasses/sunglasses/stunglasses/attackby(obj/item/W,mob/user)
if (istype(W,/obj/item/screwdriver))
if (W.tool_behaviour == TOOL_SCREWDRIVER)
if (installed)
installed.forceMove(get_turf(src))
to_chat(user, "<span class = 'notice'>You remove [installed] from [src].</span>")

View File

@@ -99,7 +99,7 @@
name = "fingerless insulated gloves"
/obj/item/clothing/gloves/color/yellow/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters))
if(I.tool_behaviour == TOOL_WIRECUTTER)
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
I.play_tool_sound(src)
@@ -108,7 +108,7 @@
..()
/obj/item/clothing/gloves/color/fyellow/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters))
if(I.tool_behaviour == TOOL_WIRECUTTER)
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
I.play_tool_sound(src)
@@ -130,7 +130,7 @@
strip_mod = 1.2
/obj/item/clothing/gloves/color/black/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters))
if(I.tool_behaviour == TOOL_WIRECUTTER)
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
I.play_tool_sound(src)

View File

@@ -313,7 +313,7 @@
A.Grant(user)
return
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(F)
for(var/obj/item/flashlight/seclite/S in src)
to_chat(user, "<span class='notice'>You unscrew the seclite from [src].</span>")

View File

@@ -122,7 +122,7 @@
jetpack = I
to_chat(user, "<span class='notice'>You successfully install the jetpack into [src].</span>")
return
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(!jetpack)
to_chat(user, "<span class='warning'>[src] has no jetpack installed.</span>")
return

View File

@@ -267,8 +267,8 @@
var/sending_state = "lpad-beam"
var/cargo_hold_id
/obj/machinery/piratepad/multitool_act(mob/living/user, obj/item/multitool/I)
if (istype(I))
/obj/machinery/piratepad/multitool_act(mob/living/user, obj/item/I)
if(I.tool_behaviour == TOOL_MULTITOOL)
to_chat(user, "<span class='notice'>You register [src] in [I]s buffer.</span>")
I.buffer = src
return TRUE
@@ -291,8 +291,8 @@
..()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/computer/piratepad_control/multitool_act(mob/living/user, obj/item/multitool/I)
if (istype(I) && istype(I.buffer,/obj/machinery/piratepad))
/obj/machinery/computer/piratepad_control/multitool_act(mob/living/user, obj/item/I)
if(I.tool_behaviour == TOOL_MULTITOOL && istype(I.buffer,/obj/machinery/piratepad))
to_chat(user, "<span class='notice'>You link [src] with [I.buffer] in [I] buffer.</span>")
pad = I.buffer
return TRUE

View File

@@ -259,7 +259,9 @@
/obj/machinery/smartfridge/drying_rack/exchange_parts()
/obj/machinery/smartfridge/drying_rack/spawn_frame()
/obj/machinery/smartfridge/drying_rack/default_deconstruction_crowbar(obj/item/crowbar/C, ignore_panel = 1)
/obj/machinery/smartfridge/drying_rack/default_deconstruction_crowbar(obj/item/C, ignore_panel = 1)
if(!C.tool_behaviour == TOOL_CROWBAR)
return
..()
/obj/machinery/smartfridge/drying_rack/ui_data(mob/user)

View File

@@ -155,7 +155,7 @@
to_chat(user, "<span class='warning'>There's no room for any more frames in the apiary!</span>")
return
if(istype(I, /obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
if(default_unfasten_wrench(user, I, time = 20))
return

View File

@@ -452,7 +452,7 @@
for(var/obj/item/integrated_circuit/input/S in assembly_components)
S.attackby_react(I,user,user.a_intent)
return ..()
else if(istype(I, /obj/item/multitool) || istype(I, /obj/item/integrated_electronics/wirer) || istype(I, /obj/item/integrated_electronics/debugger))
else if(I.tool_behaviour == TOOL_MULTITOOL || istype(I, /obj/item/integrated_electronics/wirer) || istype(I, /obj/item/integrated_electronics/debugger))
if(opened)
interact(user)
return TRUE

View File

@@ -252,7 +252,7 @@ a creative player the means to solve many problems. Circuits are held inside an
var/update = TRUE
var/update_to_assembly = FALSE
var/obj/held_item = usr.get_active_held_item()
var/obj/item/held_item = usr.get_active_held_item()
if(href_list["rename"])
rename_component(usr)
@@ -267,7 +267,7 @@ a creative player the means to solve many problems. Circuits are held inside an
if(href_list["link"])
linked = locate(href_list["link"]) in pin.linked
if(istype(held_item, /obj/item/integrated_electronics) || istype(held_item, /obj/item/multitool))
if(istype(held_item, /obj/item/integrated_electronics) || held_item.tool_behaviour == TOOL_MULTITOOL)
pin.handle_wire(linked, held_item, href_list["act"], usr)
else
to_chat(usr, "<span class='warning'>You can't do a whole lot without the proper tools.</span>")

View File

@@ -105,15 +105,14 @@ D [1]/ ||
push_data()
/datum/integrated_io/proc/handle_wire(datum/integrated_io/linked_pin, obj/item/tool, action, mob/living/user)
if(istype(tool, /obj/item/multitool))
var/obj/item/multitool/multitool = tool
if(tool.tool_behaviour == TOOL_MULTITOOL)
switch(action)
if("wire")
multitool.wire(src, user)
tool.wire(src, user)
return TRUE
if("unwire")
if(linked_pin)
multitool.unwire(src, linked_pin, user)
tool.unwire(src, linked_pin, user)
return TRUE
if("data")
ask_for_pin_data(user)

View File

@@ -12,13 +12,12 @@
icon_state = "wirer-wire"
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_SMALL
var/datum/integrated_io/selected_io = null
var/mode = WIRE
/obj/item/integrated_electronics/wirer/update_icon_state()
icon_state = "wirer-[mode]"
/obj/item/integrated_electronics/wirer/proc/wire(var/datum/integrated_io/io, mob/user)
/obj/item/integrated_electronics/wirer/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

View File

@@ -53,12 +53,12 @@
/obj/structure/bookcase/attackby(obj/item/I, mob/user, params)
switch(state)
if(0)
if(istype(I, /obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
if(I.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = TRUE
state = 1
if(istype(I, /obj/item/crowbar))
if(I.tool_behaviour == TOOL_CROWBAR)
if(I.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You pry the frame apart.</span>")
deconstruct(TRUE)
@@ -71,7 +71,7 @@
to_chat(user, "<span class='notice'>You add a shelf.</span>")
state = 2
icon_state = "book-0"
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 unwrench the frame.</span>")
anchored = FALSE
@@ -100,7 +100,7 @@
return
else
name = "bookcase ([sanitize(newname)])"
else if(istype(I, /obj/item/crowbar))
else if(I.tool_behaviour == TOOL_CROWBAR)
if(contents.len)
to_chat(user, "<span class='warning'>You need to remove the books first!</span>")
else
@@ -302,7 +302,7 @@
scanner.computer.inventory.Add(src)
to_chat(user, "[I]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
else if(istype(I, /obj/item/kitchen/knife) || istype(I, /obj/item/wirecutters))
else if(istype(I, /obj/item/kitchen/knife) || I.tool_behaviour == TOOL_WIRECUTTER)
to_chat(user, "<span class='notice'>You begin to carve out [title]...</span>")
if(do_after(user, 30, target = src))
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")

View File

@@ -190,7 +190,7 @@
/obj/structure/closet/crate/secure/loot/attackby(obj/item/W, mob/user)
if(locked)
if(istype(W, /obj/item/multitool))
if(W.tool_behaviour == TOOL_MULTITOOL)
to_chat(user, "<span class='notice'>DECA-CODE LOCK REPORT:</span>")
if(attempts == 1)
to_chat(user, "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>")

View File

@@ -65,7 +65,7 @@
. += "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>"
/obj/item/kinetic_crusher/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/crowbar))
if(I.tool_behaviour == TOOL_CROWBAR)
if(LAZYLEN(trophies))
to_chat(user, "<span class='notice'>You remove [src]'s trophies.</span>")
I.play_tool_sound(src)

View File

@@ -188,8 +188,10 @@
return ..()
/obj/machinery/mineral/ore_redemption/multitool_act(mob/living/user, obj/item/multitool/I)
if (panel_open)
/obj/machinery/mineral/ore_redemption/multitool_act(mob/living/user, obj/item/I)
if(!I.tool_behaviour == TOOL_MULTITOOL)
return
if(panel_open)
input_dir = turn(input_dir, -90)
output_dir = turn(output_dir, -90)
to_chat(user, "<span class='notice'>You change [src]'s I/O settings, setting the input to [dir2text(input_dir)] and the output to [dir2text(output_dir)].</span>")

View File

@@ -170,8 +170,8 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
updateUsrDialog()
return TRUE
/obj/machinery/ore_silo/multitool_act(mob/living/user, obj/item/multitool/I)
if (istype(I))
/obj/machinery/ore_silo/multitool_act(mob/living/user, obj/item/I)
if(I.tool_behaviour == TOOL_MULTITOOL)
to_chat(user, "<span class='notice'>You log [src] in the multitool's buffer.</span>")
I.buffer = src
return TRUE

View File

@@ -38,9 +38,8 @@
user << browse(dat, "window=console_stacking_machine")
/obj/machinery/mineral/stacking_unit_console/multitool_act(mob/living/user, obj/item/I)
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 store linkage information in [I]'s buffer.</span>")
return TRUE
@@ -97,8 +96,8 @@
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
process_sheet(AM)
/obj/machinery/mineral/stacking_machine/multitool_act(mob/living/user, obj/item/multitool/M)
if(istype(M))
/obj/machinery/mineral/stacking_machine/multitool_act(mob/living/user, obj/item/M)
if(M.tool_behaviour == TOOL_MULTITOOL)
if(istype(M.buffer, /obj/machinery/mineral/stacking_unit_console))
CONSOLE = M.buffer
CONSOLE.machine = src

View File

@@ -105,7 +105,7 @@
to_chat(user, "<span class='info'>You instruct [src] to drop any collected ore.</span>")
DropOre()
return
if(istype(I, /obj/item/crowbar) || istype(I, /obj/item/borg/upgrade/modkit))
if(I.tool_behaviour == TOOL_CROWBAR || istype(I, /obj/item/borg/upgrade/modkit))
I.melee_attack_chain(user, stored_gun, params)
return
..()

View File

@@ -251,7 +251,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
GibtoniteReaction(user)
return
if(primed)
if(istype(I, /obj/item/mining_scanner) || istype(I, /obj/item/t_scanner/adv_mining_scanner) || istype(I, /obj/item/multitool))
if(istype(I, /obj/item/mining_scanner) || istype(I, /obj/item/t_scanner/adv_mining_scanner) || I.tool_behaviour == TOOL_MULTITOOL)
primed = FALSE
if(det_timer)
deltimer(det_timer)

View File

@@ -286,11 +286,13 @@
return FALSE
return ISINRANGE(T1.x, T0.x - interaction_range, T0.x + interaction_range) && ISINRANGE(T1.y, T0.y - interaction_range, T0.y + interaction_range)
/mob/living/silicon/robot/proc/attempt_welder_repair(obj/item/weldingtool/W, mob/user)
if (!getBruteLoss())
/mob/living/silicon/robot/proc/attempt_welder_repair(obj/item/W, mob/user)
if(!W.tool_behaviour == TOOL_WELDER)
return
if(!getBruteLoss())
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
if (!W.tool_start_check(user, amount=0)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
if(!W.tool_start_check(user, amount=0)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
return
user.DelayNextAction(CLICK_CD_MELEE)
if(src == user)
@@ -330,7 +332,7 @@
to_chat(user, "The wires seem fine, there's no need to fix them.")
/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool) && (user.a_intent != INTENT_HARM || user == src))
if(W.tool_behaviour == TOOL_WELDER && (user.a_intent != INTENT_HARM || user == src))
INVOKE_ASYNC(src, .proc/attempt_welder_repair, W, user)
return
@@ -338,7 +340,7 @@
INVOKE_ASYNC(src, .proc/attempt_cable_repair, W, user)
return
else if(istype(W, /obj/item/crowbar)) // crowbar means open or close the cover
else if(W.tool_behaviour == TOOL_CROWBAR) // crowbar means open or close the cover
if(opened)
to_chat(user, "<span class='notice'>You close the cover.</span>")
opened = 0
@@ -370,12 +372,12 @@
else
to_chat(user, "<span class='warning'>You can't reach the wiring!</span>")
else if(istype(W, /obj/item/screwdriver) && opened && !cell) // haxing
else if(W.tool_behaviour == TOOL_SCREWDRIVER && opened && !cell) // haxing
wiresexposed = !wiresexposed
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
update_icons()
else if(istype(W, /obj/item/screwdriver) && opened && cell) // radio
else if((W.tool_behaviour == TOOL_SCREWDRIVER) && opened && cell) // radio
if(shell)
to_chat(user, "You cannot seem to open the radio compartment") //Prevent AI radio key theft
else if(radio)
@@ -384,7 +386,7 @@
to_chat(user, "<span class='warning'>Unable to locate a radio!</span>")
update_icons()
else if(istype(W, /obj/item/wrench) && opened && !cell) //Deconstruction. The flashes break from the fall, to prevent this from being a ghetto reset module.
else if(W.tool_behaviour == TOOL_WRENCH && opened && !cell) //Deconstruction. The flashes break from the fall, to prevent this from being a ghetto reset module.
if(!locked_down)
to_chat(user, "<span class='boldannounce'>[src]'s bolts spark! Maybe you should lock them down first!</span>")
spark_system.start()

View File

@@ -306,7 +306,7 @@
show_controls(user)
/mob/living/simple_animal/bot/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(!locked)
open = !open
to_chat(user, "<span class='notice'>The maintenance panel is now [open ? "opened" : "closed"].</span>")
@@ -335,7 +335,7 @@
user.visible_message("<span class='notice'>[user] uses [W] to pull [paicard] out of [bot_name]!</span>","<span class='notice'>You pull [paicard] out of [bot_name] with [W].</span>")
ejectpai(user)
else
if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
if(health >= maxHealth)
to_chat(user, "<span class='warning'>[src] does not need a repair!</span>")
return

View File

@@ -100,7 +100,7 @@
build_step++
if(ASSEMBLY_FOURTH_STEP)
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
if(W.use_tool(src, user, 0, volume=40) && build_step == ASSEMBLY_FOURTH_STEP)
name = "shielded frame assembly"
to_chat(user, "<span class='notice'>You weld the vest to [src].</span>")
@@ -180,7 +180,7 @@
build_step++
if(8)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "<span class='notice'>You start attaching the gun to the frame...</span>")
if(W.use_tool(src, user, 40, volume=100) && build_step == 8)
name = "armed [name]"
@@ -386,13 +386,13 @@
var/atom/Tsec = drop_location()
switch(build_step)
if(ASSEMBLY_FIRST_STEP)
if(istype(I, /obj/item/weldingtool))
if(I.tool_behaviour == TOOL_WELDER)
if(I.use_tool(src, user, 0, volume=40))
add_overlay("hs_hole")
to_chat(user, "<span class='notice'>You weld a hole in [src]!</span>")
build_step++
else if(istype(I, /obj/item/screwdriver)) //deconstruct
else if(I.tool_behaviour == TOOL_SCREWDRIVER) //deconstruct
new /obj/item/assembly/signaler(Tsec)
new /obj/item/clothing/head/helmet/sec(Tsec)
to_chat(user, "<span class='notice'>You disconnect the signaler from the helmet.</span>")
@@ -408,7 +408,7 @@
qdel(I)
build_step++
else if(istype(I, /obj/item/weldingtool)) //deconstruct
else if(I.tool_behaviour == TOOL_WELDER) //deconstruct
if(I.use_tool(src, user, 0, volume=40))
cut_overlay("hs_hole")
to_chat(user, "<span class='notice'>You weld the hole in [src] shut!</span>")
@@ -425,7 +425,7 @@
qdel(I)
build_step++
else if(istype(I, /obj/item/screwdriver)) //deconstruct
else if(I.tool_behaviour == TOOL_SCREWDRIVER) //deconstruct
cut_overlay("hs_eye")
new /obj/item/assembly/prox_sensor(Tsec)
to_chat(user, "<span class='notice'>You detach the proximity sensor from [src].</span>")
@@ -442,7 +442,7 @@
S.robot_arm = robot_arm
qdel(I)
qdel(src)
if(istype(I, /obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
to_chat(user, "You adjust [src]'s arm slots to mount extra weapons")
build_step ++
return
@@ -466,7 +466,7 @@
qdel(I)
qdel(src)
else if(istype(I, /obj/item/screwdriver)) //deconstruct
else if(I.tool_behaviour == TOOL_SCREWDRIVER) //deconstruct
cut_overlay("hs_arm")
var/obj/item/bodypart/dropped_arm = new robot_arm(Tsec)
robot_arm = null
@@ -499,7 +499,7 @@
S.robot_arm = robot_arm
qdel(I)
qdel(src)
else if(istype(I, /obj/item/screwdriver)) //deconstruct
else if(I.tool_behaviour == TOOL_SCREWDRIVER) //deconstruct
build_step--
icon_state = initial(icon_state)
to_chat(user, "<span class='notice'>You unbolt [src]'s energy swords</span>")

View File

@@ -184,9 +184,9 @@ Auto Patrol[]"},
/mob/living/simple_animal/bot/ed209/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
return
if(!istype(W, /obj/item/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
if(!W.tool_behaviour == TOOL_SCREWDRIVER && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina.
retaliate(user)
if(lasercolor)//To make up for the fact that lasertag bots don't hunt

View File

@@ -120,9 +120,9 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
/mob/living/simple_animal/bot/honkbot/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
return
if(!istype(W, /obj/item/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Check for welding tool to fix #2432.
if(!W.tool_behaviour == TOOL_SCREWDRIVER && (W.force) && (!target) && (W.damtype != STAMINA) ) // Check for welding tool to fix #2432.
retaliate(user)
addtimer(CALLBACK(src, .proc/react_buzz), 5)
..()

View File

@@ -299,12 +299,12 @@ Auto Patrol: []"},
/mob/living/simple_animal/bot/secbot/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
return
if(istype(W, /obj/item/clothing/head))
attempt_place_on_head(user, W)
return
if(!istype(W, /obj/item/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
if(!W.tool_behaviour == TOOL_SCREWDRIVER && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
retaliate(user)
if(special_retaliate_after_attack(user))
return

View File

@@ -160,7 +160,7 @@
..()
/mob/living/simple_animal/drone/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/screwdriver) && stat == DEAD)
if(I.tool_behaviour == TOOL_SCREWDRIVER && stat == DEAD)
try_reactivate(user)
else
..()

View File

@@ -55,7 +55,7 @@
/mob/living/simple_animal/drone/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/screwdriver) && stat != DEAD)
if(I.tool_behaviour == TOOL_SCREWDRIVER && stat != DEAD)
if(health < maxHealth)
to_chat(user, "<span class='notice'>You start to tighten loose screws on [src]...</span>")
if(I.use_tool(src, user, 80))
@@ -66,7 +66,7 @@
else
to_chat(user, "<span class='warning'>[src]'s screws can't get any tighter!</span>")
return //This used to not exist and drones who repaired themselves also stabbed the shit out of themselves.
else if(istype(I, /obj/item/wrench) && user != src) //They aren't required to be hacked, because laws can change in other ways (i.e. admins)
else if(I.tool_behaviour == TOOL_WRENCH && user != src) //They aren't required to be hacked, because laws can change in other ways (i.e. admins)
user.visible_message("<span class='notice'>[user] starts resetting [src]...</span>", \
"<span class='notice'>You press down on [src]'s factory reset control...</span>")
if(I.use_tool(src, user, 50, volume=50))

View File

@@ -552,7 +552,7 @@ GLOBAL_LIST_EMPTY(allCasters)
updateUsrDialog()
/obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
I.play_tool_sound(src)
if(I.use_tool(src, user, 60))
@@ -566,7 +566,7 @@ GLOBAL_LIST_EMPTY(allCasters)
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
new /obj/item/wallframe/newscaster(loc)
qdel(src)
else if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
else if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
if(stat & BROKEN)
if(!I.tool_start_check(user, amount=0))
return

View File

@@ -22,10 +22,11 @@
var/list/obj/item/ticket_machine_ticket/tickets = list()
/obj/machinery/ticket_machine/multitool_act(mob/living/user, obj/item/I)
if(!I.tool_behaviour == TOOL_MULTITOOL)
return
if(!multitool_check_buffer(user, I)) //make sure it has a data buffer
return
var/obj/item/multitool/M = I
M.buffer = src
I.buffer = src
to_chat(user, "<span class='notice'>You store linkage information in [I]'s buffer.</span>")
return TRUE
@@ -77,11 +78,10 @@
/obj/machinery/button/ticket_machine/multitool_act(mob/living/user, obj/item/I)
. = ..()
if(I.tool_behaviour == TOOL_MULTITOOL)
var/obj/item/multitool/M = I
if(M.buffer && !istype(M.buffer, /obj/machinery/ticket_machine))
if(I.buffer && !istype(I.buffer, /obj/machinery/ticket_machine))
return
var/obj/item/assembly/control/ticket_machine/controller = device
controller.linked = M.buffer
controller.linked = I.buffer
id = null
controller.id = null
to_chat(user, "<span class='warning'>You've linked [src] to [controller.linked].</span>")

View File

@@ -115,14 +115,14 @@
return ..()
/obj/structure/sign/picture_frame/attackby(obj/item/I, mob/user, params)
if(can_decon && (istype(I, /obj/item/screwdriver) || istype(I, /obj/item/wrench)))
if(can_decon && (I.tool_behaviour == TOOL_SCREWDRIVER || I.tool_behaviour == TOOL_WRENCH))
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
if(I.use_tool(src, user, 30, volume=50))
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You unsecure [name].</span>")
deconstruct()
else if(istype(I, /obj/item/wirecutters) && framed)
else if(I.tool_behaviour == TOOL_WIRECUTTER && framed)
framed.forceMove(drop_location())
framed = null
user.visible_message("<span class='warning'>[user] cuts away [framed] from [src]!</span>")

View File

@@ -146,7 +146,7 @@
//No other icons for it atm
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
if(!anchored)
W.play_tool_sound(src, 75)
user.visible_message("[user.name] secures the [src.name] to the floor.", \

View File

@@ -247,7 +247,7 @@
custom_materials = list(/datum/material/iron=100)
/obj/item/am_shielding_container/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/multitool) && istype(src.loc, /turf))
if(I.tool_behaviour == TOOL_MULTITOOL && istype(src.loc, /turf))
new/obj/machinery/am_shielding(src.loc)
qdel(src)
else

View File

@@ -155,7 +155,7 @@ By design, d1 is the smallest direction and d2 is the highest
var/turf/T = get_turf(src)
if(T.intact)
return
if(istype(W, /obj/item/wirecutters))
if(W.tool_behaviour == TOOL_WIRECUTTER)
if (shock(user, 50))
return
user.visible_message("[user] cuts the cable.", "<span class='notice'>You cut the cable.</span>")
@@ -177,7 +177,7 @@ By design, d1 is the smallest direction and d2 is the highest
R.loaded.cable_join(src, user)
R.is_empty(user)
else if(istype(W, /obj/item/multitool))
else if(W.tool_behaviour == TOOL_MULTITOOL)
if(powernet && (powernet.avail > 0)) // is it powered?
to_chat(user, "<span class='danger'>[DisplayPower(powernet.avail)] in power network.</span>")
else

View File

@@ -9,7 +9,7 @@
var/state = FLOODLIGHT_NEEDS_WRENCHING
/obj/structure/floodlight_frame/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/wrench) && (state == FLOODLIGHT_NEEDS_WRENCHING))
if(O.tool_behaviour == TOOL_WRENCH && (state == FLOODLIGHT_NEEDS_WRENCHING))
to_chat(user, "<span class='notice'>You secure [src].</span>")
anchored = TRUE
state = FLOODLIGHT_NEEDS_WIRES
@@ -26,7 +26,7 @@
to_chat(user, "<span class='notice'>You put lights in [src].</span>")
new /obj/machinery/power/floodlight(src.loc)
qdel(src)
else if(istype(O, /obj/item/screwdriver) && (state == FLOODLIGHT_NEEDS_SECURING))
else if(O.tool_behaviour == TOOL_SCREWDRIVER && (state == FLOODLIGHT_NEEDS_SECURING))
to_chat(user, "<span class='notice'>You fasten the wiring and electronics in [src].</span>")
name = "secured [name]"
desc = "A bare metal frame that looks like a floodlight. Requires light tubes."
@@ -82,7 +82,7 @@
to_chat(user, "You set [src] to [setting_text].")
/obj/machinery/power/floodlight/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/wrench))
if(O.tool_behaviour == TOOL_WRENCH)
default_unfasten_wrench(user, O, time = 20)
change_setting(1)
if(anchored)

View File

@@ -107,7 +107,7 @@
return
switch(stage)
if(1)
if(istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
to_chat(usr, "<span class='notice'>You begin deconstructing [src]...</span>")
if (W.use_tool(src, user, 30, volume=50))
new /obj/item/stack/sheet/metal(drop_location(), sheets_refunded)
@@ -127,11 +127,11 @@
to_chat(user, "<span class='warning'>You need one length of cable to wire [src]!</span>")
return
if(2)
if(istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
to_chat(usr, "<span class='warning'>You have to remove the wires first!</span>")
return
if(istype(W, /obj/item/wirecutters))
if(W.tool_behaviour == TOOL_WIRECUTTER)
stage = 1
icon_state = "[fixture_type]-construct-stage1"
new /obj/item/stack/cable_coil(drop_location(), 1, "red")
@@ -140,7 +140,7 @@
W.play_tool_sound(src, 100)
return
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
user.visible_message("[user.name] closes [src]'s casing.", \
"<span class='notice'>You close [src]'s casing.</span>", "<span class='italics'>You hear screwing.</span>")
W.play_tool_sound(src, 75)
@@ -462,7 +462,7 @@
// attempt to stick weapon into light socket
else if(status == LIGHT_EMPTY)
if(istype(W, /obj/item/screwdriver)) //If it's a screwdriver open it.
if(W.tool_behaviour == TOOL_SCREWDRIVER) //If it acts like a screwdriver, open it.
W.play_tool_sound(src, 75)
user.visible_message("[user.name] opens [src]'s casing.", \
"<span class='notice'>You open [src]'s casing.</span>", "<span class='italics'>You hear a noise.</span>")
@@ -621,7 +621,7 @@
else
to_chat(H, "<span class='warning'>You can't receive charge from the [fitting]!</span>")
return
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.max_heat_protection_temperature)

View File

@@ -18,7 +18,7 @@
var/creation_type = /obj/singularity
/obj/machinery/the_singularitygen/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
return ..()

View File

@@ -63,7 +63,7 @@
switch(construction_state)
if(PA_CONSTRUCTION_UNSECURED)
if(istype(W, /obj/item/wrench) && !isinspace())
if(W.tool_behaviour == TOOL_WRENCH && !isinspace())
W.play_tool_sound(src, 75)
anchored = TRUE
user.visible_message("[user.name] secures the [name] to the floor.", \
@@ -71,7 +71,7 @@
construction_state = PA_CONSTRUCTION_UNWIRED
did_something = TRUE
if(PA_CONSTRUCTION_UNWIRED)
if(istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
W.play_tool_sound(src, 75)
anchored = FALSE
user.visible_message("[user.name] detaches the [name] from the floor.", \
@@ -85,18 +85,18 @@
construction_state = PA_CONSTRUCTION_PANEL_OPEN
did_something = TRUE
if(PA_CONSTRUCTION_PANEL_OPEN)
if(istype(W, /obj/item/wirecutters))//TODO:Shock user if its on?
if(W.tool_behaviour == TOOL_WIRECUTTER)//TODO:Shock user if its on?
user.visible_message("[user.name] removes some wires from the [name].", \
"You remove some wires.")
construction_state = PA_CONSTRUCTION_UNWIRED
did_something = TRUE
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
user.visible_message("[user.name] closes the [name]'s access panel.", \
"You close the access panel.")
construction_state = PA_CONSTRUCTION_COMPLETE
did_something = TRUE
if(PA_CONSTRUCTION_COMPLETE)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
user.visible_message("[user.name] opens the [name]'s access panel.", \
"You open the access panel.")
construction_state = PA_CONSTRUCTION_PANEL_OPEN

View File

@@ -162,8 +162,8 @@
return TRUE
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/crowbar/C)
if(istype(C) && terminal)
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/C)
if(C.tool_behaviour == TOOL_CROWBAR && terminal)
to_chat(usr, "<span class='warning'>You must first remove the power terminal!</span>")
return FALSE

View File

@@ -227,7 +227,7 @@
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench) && isturf(loc))
if(W.tool_behaviour == TOOL_WRENCH && isturf(loc))
if(isinspace())
to_chat(user, "<span class='warning'>You can't secure [src] here.</span>")
return
@@ -269,7 +269,7 @@
user.visible_message("[user] inserts the electronics into the solar assembly.", "<span class='notice'>You insert the electronics into the solar assembly.</span>")
return 1
else
if(istype(W, /obj/item/crowbar))
if(W.tool_behaviour == TOOL_CROWBAR)
new /obj/item/electronics/tracker(src.loc)
tracker = 0
user.visible_message("[user] takes out the electronics from the solar assembly.", "<span class='notice'>You take out the electronics from the solar assembly.</span>")

View File

@@ -131,8 +131,10 @@
else
. = ..()
/obj/machinery/power/tesla_coil/research/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
/obj/machinery/power/tesla_coil/research/default_unfasten_wrench(mob/user, obj/item/W, time = 20)
. = ..()
if(!W.tool_behaviour == TOOL_WRENCH)
return
if(. == SUCCESSFUL_UNFASTEN)
if(panel_open)
icon_state = "rpcoil_open[anchored]"

View File

@@ -24,13 +24,13 @@
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if (istype(A, /obj/item/screwdriver) && !modified)
if(A.tool_behaviour == TOOL_SCREWDRIVER && !modified)
modified = TRUE
FD.modified = TRUE
FD.damage_type = BRUTE
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
update_icon()
else if (istype(A, /obj/item/pen))
else if(istype(A, /obj/item/pen))
if(modified)
if(!FD.pen)
harmful = TRUE

View File

@@ -434,7 +434,7 @@
to_chat(user, "<span class='notice'>You attach \the [K] to the front of \the [src].</span>")
bayonet = K
update_icon()
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(gun_light)
var/obj/item/flashlight/seclite/S = gun_light
to_chat(user, "<span class='notice'>You unscrew the seclite from \the [src].</span>")

View File

@@ -173,7 +173,7 @@
boom()
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/weldingtool))
if(I.tool_behaviour == TOOL_WELDER)
if(!reagents.has_reagent(/datum/reagent/fuel))
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
return

View File

@@ -145,7 +145,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
// attack with item, place item on conveyor
/obj/machinery/conveyor/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/crowbar))
if(I.tool_behaviour == TOOL_CROWBAR)
user.visible_message("<span class='notice'>[user] struggles to pry up \the [src] with \the [I].</span>", \
"<span class='notice'>You struggle to pry up \the [src] with \the [I].</span>")
if(I.use_tool(src, user, 40, volume=40))
@@ -155,14 +155,14 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
to_chat(user, "<span class='notice'>You remove the conveyor belt.</span>")
qdel(src)
else if(istype(I, /obj/item/wrench))
else if(I.tool_behaviour == TOOL_WRENCH)
if(!(stat & BROKEN))
I.play_tool_sound(src)
setDir(turn(dir,-45))
update_move_direction()
to_chat(user, "<span class='notice'>You rotate [src].</span>")
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(!(stat & BROKEN))
verted = verted * -1
update_move_direction()
@@ -306,7 +306,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
CHECK_TICK
/obj/machinery/conveyor_switch/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/crowbar))
if(I.tool_behaviour == TOOL_CROWBAR)
var/obj/item/conveyor_switch_construct/C = new/obj/item/conveyor_switch_construct(src.loc)
C.id = id
transfer_fingerprints_to(C)

View File

@@ -194,7 +194,9 @@ Nothing else in the console has ID requirements.
locked = FALSE
return TRUE
/obj/machinery/computer/rdconsole/multitool_act(mob/user, obj/item/multitool/I)
/obj/machinery/computer/rdconsole/multitool_act(mob/user, obj/item/I)
if(!I.tool_behaviour == TOOL_MULTITOOL)
return
var/lathe = linked_lathe && linked_lathe.multitool_act(user, I)
var/print = linked_imprinter && linked_imprinter.multitool_act(user, I)
return lathe || print

View File

@@ -39,7 +39,9 @@
. = ..()
update_icon()
/obj/machinery/spaceship_navigation_beacon/multitool_act(mob/living/user, obj/item/multitool/I)
/obj/machinery/spaceship_navigation_beacon/multitool_act(mob/living/user, obj/item/I)
if(!I.tool_behaviour == TOOL_MULTITOOL)
return
if(panel_open)
var/new_name = "Beacon_[input("Enter the custom name for this beacon", "It be Beacon ..your input..") as text]"
if(new_name && Adjacent(user))

View File

@@ -41,9 +41,8 @@
icon_state = "power_box"
/obj/machinery/bsa/back/multitool_act(mob/living/user, obj/item/I)
if(istype(I, /obj/item/multitool)) // Only this multitool type has a data buffer.
var/obj/item/multitool/M = I
M.buffer = src
if(I.tool_behaviour == TOOL_MULTITOOL) // Lies and deception
I.buffer = src
to_chat(user, "<span class='notice'>You store linkage information in [I]'s buffer.</span>")
else
to_chat(user, "<span class='warning'>[I] has no data buffer!</span>")
@@ -55,9 +54,8 @@
icon_state = "emitter_center"
/obj/machinery/bsa/front/multitool_act(mob/living/user, obj/item/I)
if(istype(I, /obj/item/multitool)) // Only this multitool type has a data buffer.
var/obj/item/multitool/M = I
M.buffer = src
if(I.tool_behaviour == TOOL_MULTITOOL) // Lies and deception
I.buffer = src
to_chat(user, "<span class='notice'>You store linkage information in [I]'s buffer.</span>")
else
to_chat(user, "<span class='warning'>[I] has no data buffer!</span>")
@@ -71,16 +69,15 @@
var/obj/machinery/bsa/front/front
/obj/machinery/bsa/middle/multitool_act(mob/living/user, obj/item/I)
if(istype(I, /obj/item/multitool)) // Only this multitool type has a data buffer.
var/obj/item/multitool/M = I
if(M.buffer)
if(istype(M.buffer, /obj/machinery/bsa/back))
back = M.buffer
M.buffer = null
if(I.tool_behaviour == TOOL_MULTITOOL) // Lies and deception
if(I.buffer)
if(istype(I.buffer, /obj/machinery/bsa/back))
back = I.buffer
I.buffer = null
to_chat(user, "<span class='notice'>You link [src] with [back].</span>")
else if(istype(M.buffer, /obj/machinery/bsa/front))
front = M.buffer
M.buffer = null
else if(istype(I.buffer, /obj/machinery/bsa/front))
front = I.buffer
I.buffer = null
to_chat(user, "<span class='notice'>You link [src] with [front].</span>")
else
to_chat(user, "<span class='warning'>[I]'s data buffer is empty!</span>")

View File

@@ -122,7 +122,7 @@
icon_state = active ? "sat_active" : "sat_inactive"
/obj/machinery/satellite/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/multitool))
if(I.tool_behaviour == TOOL_MULTITOOL)
to_chat(user, "<span class='notice'>// NTSAT-[id] // Mode : [active ? "PRIMARY" : "STANDBY"] //[(obj_flags & EMAGGED) ? "DEBUG_MODE //" : ""]</span>")
else
return ..()

View File

@@ -209,7 +209,7 @@
else
src.flash1 = F
to_chat(user, "<span class='notice'>You insert the flash into the eye socket.</span>")
else if(istype(W, /obj/item/crowbar))
else if(W.tool_behaviour == TOOL_CROWBAR)
if(flash1 || flash2)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the flash from [src].</span>")