standardizes default unfasten wrench (#65425)

I'll do more in the future but I'll limit myself to this because I'm tired, bored, and don't want to make so many PRs touching the same things that I have to deal with conflicts each time one is merged.
Just as an example, screwdriver's gotta be done as well, does the exact same thing wrenches do, I believe.
Standardizes (and touches) each time default_unfasten_wrench is used.

Fixes tool logs, since it relies on tool acts to exist, I'm trying to move as many tool acts to its proper proc. Like a spiritual successor to the tool superpack PRs.

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
John Willard
2022-04-04 15:44:14 -04:00
committed by GitHub
parent e7fdea5325
commit 2db00c7dc5
62 changed files with 361 additions and 258 deletions
+6 -4
View File
@@ -103,6 +103,12 @@
stored_id_card = null
update_appearance(UPDATE_ICON)
/obj/machinery/pdapainter/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(default_unfasten_wrench(user, tool))
power_change()
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/pdapainter/attackby(obj/item/O, mob/living/user, params)
if(machine_stat & BROKEN)
if(O.tool_behaviour == TOOL_WELDER && !user.combat_mode)
@@ -121,10 +127,6 @@
return
return ..()
if(default_unfasten_wrench(user, O))
power_change()
return
// Chameleon checks first so they can exit the logic early if they're detected.
if(istype(O, /obj/item/card/id/advanced/chameleon))
to_chat(user, span_warning("The machine rejects your [O]. This ID card does not appear to be compatible with the PDA Painter."))
+8 -3
View File
@@ -13,6 +13,14 @@
remove_card()
return ..()
/obj/machinery/accounting/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(inserted_id)
return FALSE
if(default_unfasten_wrench(user, tool))
update_appearance()
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/accounting/attackby(obj/item/I, mob/living/user, params)
if(isidcard(I))
var/obj/item/card/id/new_id = I
@@ -42,9 +50,6 @@
if(!inserted_id && default_deconstruction_screwdriver(user, icon_state, icon_state, I))
update_appearance()
return
if(!inserted_id && default_unfasten_wrench(user, I))
update_appearance()
return
if(default_deconstruction_crowbar(I))
return
+8 -2
View File
@@ -36,6 +36,14 @@
if(in_range(user, src) || isobserver(user))
. += span_notice("The status display reads: Charging power: <b>[charge_rate]W</b>.")
/obj/machinery/cell_charger/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(charging)
return FALSE
if(default_unfasten_wrench(user, tool))
update_appearance()
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell) && !panel_open)
if(machine_stat & BROKEN)
@@ -65,8 +73,6 @@
return
if(default_deconstruction_crowbar(W))
return
if(!charging && default_unfasten_wrench(user, W))
return
return ..()
/obj/machinery/cell_charger/deconstruct()
+5 -2
View File
@@ -47,6 +47,11 @@
playsound(src, 'sound/items/pshoom.ogg', 50, TRUE)
flick("synthesizer_beam", src)
/obj/machinery/dish_drive/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/dish_drive/attackby(obj/item/I, mob/living/user, params)
if(is_type_in_list(I, collectable_items) && !user.combat_mode)
if(!user.transferItemToLoc(I, src))
@@ -58,8 +63,6 @@
return
else if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I))
return
else if(default_unfasten_wrench(user, I))
return
else if(default_deconstruction_crowbar(I, FALSE))
return
..()
+5 -3
View File
@@ -208,6 +208,11 @@ Possible to do for anyone motivated enough:
else if(in_range(user, src) || isobserver(user))
. += span_notice("The status display reads: Current projection range: <b>[holo_range]</b> units.")
/obj/machinery/holopad/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/holopad/attackby(obj/item/P, mob/user, params)
if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P))
return
@@ -215,9 +220,6 @@ Possible to do for anyone motivated enough:
if(default_pry_open(P))
return
if(default_unfasten_wrench(user, P))
return
if(default_deconstruction_crowbar(P))
return
+4 -4
View File
@@ -343,10 +343,10 @@
AddComponent(/datum/component/plumbing/iv_drip, anchored)
AddComponent(/datum/component/simple_rotation)
/obj/machinery/iv_drip/plumbing/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I)
return TRUE
/obj/machinery/iv_drip/plumbing/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
#undef IV_TAKING
#undef IV_INJECTING
+3 -3
View File
@@ -85,10 +85,10 @@
icon_state = "[base_icon_state][scan_active ? "_active" : null]"
return ..()
/obj/machinery/medical_kiosk/wrench_act(mob/living/user, obj/item/I) //Allows for wrenching/unwrenching the machine.
/obj/machinery/medical_kiosk/wrench_act(mob/living/user, obj/item/tool) //Allows for wrenching/unwrenching the machine.
..()
default_unfasten_wrench(user, I, time = 10)
return TRUE
default_unfasten_wrench(user, tool, time = 0.1 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/medical_kiosk/RefreshParts()
var/obj/item/circuitboard/machine/medical_kiosk/board = circuit
+4 -4
View File
@@ -72,10 +72,10 @@
reagents.expose(get_turf(src), TOUCH)
reagents.clear_reagents()
/obj/machinery/medipen_refiller/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I)
return TRUE
/obj/machinery/medipen_refiller/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/medipen_refiller/crowbar_act(mob/user, obj/item/I)
..()
+15 -15
View File
@@ -66,7 +66,7 @@
switch(action)
if("color")
paint_color = params["paint_color"]
if("pipe_type")
switch(category)
if(ATMOS_PIPEDISPENSER)
@@ -74,17 +74,17 @@
var/datum/pipe_info/info = GLOB.atmos_pipe_recipes[params["category"]][params["pipe_type"]]
var/recipe_type = info.type
var/p_type = info.id
// No spawning arbitrary paths (literally 1984)
if(!verify_recipe(GLOB.atmos_pipe_recipes, p_type))
return
// If this is a meter, make that.
if(recipe_type == /datum/pipe_info/meter)
new /obj/item/pipe_meter(loc)
wait = world.time + 1 SECONDS
return
// Otherwise, make a pipe/device
var/p_dir = params["pipe_dir"]
var/obj/item/pipe/pipe_out = new (loc, p_type, p_dir)
@@ -98,17 +98,17 @@
if(wait < world.time)
var/datum/pipe_info/info = GLOB.disposal_pipe_recipes[params["category"]][params["pipe_type"]]
var/p_type = info.id
// No spawning arbitrary paths (literally 1984)
if(!verify_recipe(GLOB.disposal_pipe_recipes, p_type))
return
var/obj/structure/disposalconstruct/disposal_out = new (loc, p_type)
if(!disposal_out.can_place())
to_chat(usr, span_warning("There's not enough room to build that here!"))
qdel(disposal_out)
return
disposal_out.add_fingerprint(usr)
disposal_out.update_appearance()
disposal_out.setDir(params["pipe_dir"])
@@ -117,11 +117,11 @@
if(wait < world.time)
var/datum/pipe_info/info = GLOB.transit_tube_recipes[params["category"]][params["pipe_type"]]
var/p_type = info.id
// No spawning arbitrary paths (literally 1984)
if(!verify_recipe(GLOB.transit_tube_recipes, p_type))
return
var/obj/structure/c_transit_tube/tube_out = new p_type(loc)
tube_out.add_fingerprint(usr)
tube_out.update_appearance()
@@ -129,7 +129,7 @@
wait = world.time + 1 SECONDS
if("piping_layer")
piping_layer = text2num(params["piping_layer"])
if("init_dir_setting")
var/target_dir = p_init_dir ^ text2dir(params["dir_flag"])
// Refuse to create a smart pipe that can only connect in one direction (it would act weirdly and lack an icon)
@@ -137,10 +137,10 @@
p_init_dir = target_dir
else
to_chat(usr, span_warning("\The [src]'s screen flashes a warning: Can't configure a pipe to only connect in one direction."))
if("init_reset")
p_init_dir = ALL_CARDINALS
return TRUE
/obj/machinery/pipedispenser/ui_interact(mob/user, datum/tgui/ui)
@@ -167,9 +167,9 @@
return TRUE
return FALSE
/obj/machinery/pipedispenser/wrench_act(mob/living/user, obj/item/I)
..()
if(default_unfasten_wrench(user, I, 40))
/obj/machinery/pipedispenser/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(default_unfasten_wrench(user, tool, time = 4 SECONDS))
user << browse(null, "window=pipedispenser")
return TRUE
+4 -3
View File
@@ -68,6 +68,10 @@
The safety-mode light is [safety_mode ? "on" : "off"].
The safety-sensors status light is [obj_flags & EMAGGED ? "off" : "on"]."}
/obj/machinery/recycler/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/recycler/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
@@ -76,9 +80,6 @@
if(default_pry_open(I))
return
if(default_unfasten_wrench(user, I))
return
if(default_deconstruction_crowbar(I))
return
return ..()
+5 -2
View File
@@ -45,9 +45,12 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_all() //Returns all as sheets
/obj/machinery/sheetifier/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/sheetifier/attackby(obj/item/I, mob/user, params)
if(default_unfasten_wrench(user, I))
return
if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), I))
update_appearance()
return
+2 -2
View File
@@ -393,9 +393,9 @@
return ..()
/obj/machinery/power/shieldwallgen/wrench_act(mob/living/user, obj/item/I)
/obj/machinery/power/shieldwallgen/wrench_act(mob/living/user, obj/item/tool)
. = ..()
. |= default_unfasten_wrench(user, I, 0)
. |= default_unfasten_wrench(user, tool, time = 0)
var/turf/T = get_turf(src)
update_cable_icons_on_turf(T)
if(. == SUCCESSFUL_UNFASTEN && anchored)
+5 -5
View File
@@ -152,6 +152,11 @@
if(cell)
cell.emp_act(severity)
/obj/machinery/space_heater/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/space_heater/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
@@ -160,9 +165,6 @@
update_appearance()
return TRUE
if(default_unfasten_wrench(user, I))
return TRUE
if(default_deconstruction_crowbar(I))
return TRUE
@@ -337,8 +339,6 @@
///Slightly modified to ignore the open_hatch - it's always open, we hacked it.
/obj/machinery/space_heater/improvised_chem_heater/attackby(obj/item/item, mob/user, params)
add_fingerprint(user)
if(default_unfasten_wrench(user, item))
return
if(default_deconstruction_crowbar(item))
return
if(istype(item, /obj/item/stock_parts/cell))
+7 -3
View File
@@ -329,10 +329,14 @@ GLOBAL_LIST_INIT(dye_registry, list(
if(panel_open)
. += "wm_panel"
/obj/machinery/washing_machine/attackby(obj/item/W, mob/living/user, params)
if(panel_open && !busy && default_unfasten_wrench(user, W))
return
/obj/machinery/washing_machine/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(!panel_open || busy)
return FALSE
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/washing_machine/attackby(obj/item/W, mob/living/user, params)
if(default_deconstruction_screwdriver(user, null, null, W))
update_appearance()
return
+5 -2
View File
@@ -95,9 +95,12 @@
return
return ..()
/obj/structure/ai_core/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/ai_core/attackby(obj/item/P, mob/user, params)
if(P.tool_behaviour == TOOL_WRENCH)
return default_unfasten_wrench(user, P, 20)
if(!anchored)
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
if(state != EMPTY_CORE)
+3 -1
View File
@@ -552,7 +552,9 @@ LINEN BINS
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/bedsheetbin/wrench_act(mob/living/user, obj/item/tool)
return default_unfasten_wrench(user, tool, 5)
. = ..()
default_unfasten_wrench(user, tool, time = 0.5 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/bedsheet))
@@ -46,6 +46,13 @@
reagents.remove_all()
charge_ignited = FALSE
/obj/structure/cannon/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(!anchorable_cannon)
return FALSE
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/cannon/attackby(obj/item/used_item, mob/user, params)
if(charge_ignited)
balloon_alert(user, "it's gonna fire!")
@@ -100,9 +107,6 @@
powder_keg.reagents.trans_id_to(src, /datum/reagent/fuel, amount = charge_size)
balloon_alert(user, "[src] loaded with welding fuel")
return
if(anchorable_cannon && used_item.tool_behaviour == TOOL_WRENCH)
if(default_unfasten_wrench(user, used_item, time = 2 SECONDS))
return
..()
/obj/structure/cannon/trash
+35 -31
View File
@@ -1,16 +1,24 @@
#define GUILLOTINE_BLADE_MAX_SHARP 10 // This is maxiumum sharpness and will decapitate without failure
#define GUILLOTINE_DECAP_MIN_SHARP 7 // Minimum amount of sharpness for decapitation. Any less and it will just do severe brute damage
#define GUILLOTINE_ANIMATION_LENGTH 9 // How many deciseconds the animation is
#define GUILLOTINE_BLADE_RAISED 1
#define GUILLOTINE_BLADE_MOVING 2
#define GUILLOTINE_BLADE_DROPPED 3
#define GUILLOTINE_BLADE_IDLE 0
#define GUILLOTINE_BLADE_RAISED 1
#define GUILLOTINE_BLADE_MOVING 2
#define GUILLOTINE_BLADE_DROPPED 3
#define GUILLOTINE_BLADE_SHARPENING 4
#define GUILLOTINE_HEAD_OFFSET 16 // How much we need to move the player to center their head
#define GUILLOTINE_LAYER_DIFF 1.2 // How much to increase/decrease a head when it's buckled/unbuckled
#define GUILLOTINE_ACTIVATE_DELAY 30 // Delay for executing someone
#define GUILLOTINE_WRENCH_DELAY 10
#define GUILLOTINE_ACTION_INUSE 5
#define GUILLOTINE_ACTION_WRENCH 6
#define GUILLOTINE_ACTION_INUSE 5
#define GUILLOTINE_ACTION_WRENCH 6
/// This is maxiumum sharpness and will decapitate without failure
#define GUILLOTINE_BLADE_MAX_SHARP 10
/// Minimum amount of sharpness for decapitation. Any less and it will just do severe brute damage
#define GUILLOTINE_DECAP_MIN_SHARP 7
/// How long the guillotine animation lasts
#define GUILLOTINE_ANIMATION_LENGTH (0.9 SECONDS)
/// How much we need to move the player to center their head
#define GUILLOTINE_HEAD_OFFSET 16
/// How much to increase/decrease a head when it's buckled/unbuckled
#define GUILLOTINE_LAYER_DIFF 1.2
/// Delay for executing someone
#define GUILLOTINE_ACTIVATE_DELAY (3 SECONDS)
#define GUILLOTINE_WRENCH_DELAY (1 SECONDS)
/obj/structure/guillotine
name = "guillotine"
@@ -28,7 +36,7 @@
var/blade_status = GUILLOTINE_BLADE_RAISED
var/blade_sharpness = GUILLOTINE_BLADE_MAX_SHARP // How sharp the blade is
var/kill_count = 0
var/current_action = 0 // What's currently happening to the guillotine
var/current_action = GUILLOTINE_BLADE_IDLE // What's currently happening to the guillotine
/obj/structure/guillotine/Initialize(mapload)
LAZYINITLIST(buckled_mobs)
@@ -90,12 +98,12 @@
current_action = GUILLOTINE_ACTION_INUSE
if (do_after(user, GUILLOTINE_ACTIVATE_DELAY, target = src) && blade_status == GUILLOTINE_BLADE_RAISED)
current_action = 0
current_action = GUILLOTINE_BLADE_IDLE
blade_status = GUILLOTINE_BLADE_MOVING
icon_state = "guillotine_drop"
addtimer(CALLBACK(src, .proc/drop_blade, user), GUILLOTINE_ANIMATION_LENGTH - 2) // Minus two so we play the sound and decap faster
else
current_action = 0
current_action = GUILLOTINE_BLADE_IDLE
else
var/mob/living/carbon/human/H = buckled_mobs[1]
@@ -246,33 +254,29 @@
if (current_action)
return FAILED_UNFASTEN
current_action = GUILLOTINE_ACTION_WRENCH
return ..()
/obj/structure/guillotine/wrench_act(mob/living/user, obj/item/I)
/obj/structure/guillotine/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if (current_action)
return
current_action = GUILLOTINE_ACTION_WRENCH
if (do_after(user, GUILLOTINE_WRENCH_DELAY, target = src))
current_action = 0
default_unfasten_wrench(user, I, 0)
if(default_unfasten_wrench(user, tool, time = GUILLOTINE_WRENCH_DELAY))
setDir(SOUTH)
return TRUE
else
current_action = 0
current_action = GUILLOTINE_BLADE_IDLE
return TOOL_ACT_TOOLTYPE_SUCCESS
current_action = GUILLOTINE_BLADE_IDLE
return FALSE
#undef GUILLOTINE_BLADE_MAX_SHARP
#undef GUILLOTINE_DECAP_MIN_SHARP
#undef GUILLOTINE_ANIMATION_LENGTH
#undef GUILLOTINE_HEAD_OFFSET
#undef GUILLOTINE_LAYER_DIFF
#undef GUILLOTINE_ACTIVATE_DELAY
#undef GUILLOTINE_BLADE_IDLE
#undef GUILLOTINE_BLADE_RAISED
#undef GUILLOTINE_BLADE_MOVING
#undef GUILLOTINE_BLADE_DROPPED
#undef GUILLOTINE_BLADE_SHARPENING
#undef GUILLOTINE_HEAD_OFFSET
#undef GUILLOTINE_LAYER_DIFF
#undef GUILLOTINE_ACTIVATE_DELAY
#undef GUILLOTINE_WRENCH_DELAY
#undef GUILLOTINE_ACTION_INUSE
#undef GUILLOTINE_ACTION_WRENCH
+4 -4
View File
@@ -26,10 +26,10 @@
return
return ..()
/obj/structure/loom/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 5)
return TRUE
/obj/structure/loom/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 0.5 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
///Handles the weaving.
/obj/structure/loom/proc/weave(obj/item/stack/sheet/cotton/W, mob/user)
@@ -146,10 +146,10 @@
set_opacity(anchored ? !door_opened : FALSE)
air_update_turf(TRUE, anchorvalue)
/obj/structure/mineral_door/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 40)
return TRUE
/obj/structure/mineral_door/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 4 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/////////////////////// TOOL OVERRIDES ///////////////////////
+4 -2
View File
@@ -130,8 +130,10 @@
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/showcase/wrench_act(mob/living/user, obj/item/tool)
if(deconstruction_state == SHOWCASE_CONSTRUCTED && default_unfasten_wrench(user, tool))
return TOOL_ACT_TOOLTYPE_SUCCESS
if(deconstruction_state != SHOWCASE_CONSTRUCTED)
return FALSE
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
//Feedback is given in examine because showcases can basically have any sprite assigned to them
@@ -38,6 +38,11 @@
if(5 to TANK_DISPENSER_CAPACITY)
. += "plasma-5"
/obj/structure/tank_dispenser/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/living/user, params)
var/full
if(istype(I, /obj/item/tank/internals/plasma))
@@ -50,9 +55,6 @@
oxygentanks++
else
full = TRUE
else if(I.tool_behaviour == TOOL_WRENCH)
default_unfasten_wrench(user, I, time = 20)
return
else if(!user.combat_mode)
to_chat(user, span_notice("[I] does not fit into [src]."))
return
+3 -3
View File
@@ -126,10 +126,10 @@
qdel(P)
to_chat(user,span_notice("You shred the current votes."))
/obj/structure/votebox/wrench_act(mob/living/user, obj/item/I)
/obj/structure/votebox/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, I, 40)
return TRUE
default_unfasten_wrench(user, tool, time = 4 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/votebox/crowbar_act(mob/living/user, obj/item/I)
. = ..()
+3 -3
View File
@@ -677,9 +677,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/urinal, 32)
else
return ..()
/obj/structure/curtain/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 50)
/obj/structure/curtain/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 5 SECONDS)
return TRUE
/obj/structure/curtain/wirecutter_act(mob/living/user, obj/item/I)
+4 -4
View File
@@ -36,10 +36,10 @@
else
state = ENGINE_UNWRENCHED
/obj/structure/shuttle/engine/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I)
return TRUE
/obj/structure/shuttle/engine/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/shuttle/engine/welder_act(mob/living/user, obj/item/I)
. = ..()
+4 -3
View File
@@ -106,9 +106,10 @@
panel_open = !panel_open
update_appearance()
/obj/structure/aquarium/wrench_act(mob/living/user, obj/item/I)
if(default_unfasten_wrench(user,I))
return TRUE
/obj/structure/aquarium/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/aquarium/attackby(obj/item/I, mob/living/user, params)
if(broken)
+7 -2
View File
@@ -23,11 +23,16 @@
AddElement(/datum/element/beauty, impressiveness * 75)
AddComponent(/datum/component/simple_rotation)
/obj/structure/cannon/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(flags_1 & NODECONSTRUCT_1)
return FALSE
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/statue/attackby(obj/item/W, mob/living/user, params)
add_fingerprint(user)
if(!(flags_1 & NODECONSTRUCT_1))
if(default_unfasten_wrench(user, W))
return
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
return FALSE
@@ -136,6 +136,11 @@
update_appearance()
return TRUE
/obj/machinery/electrolyzer/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/electrolyzer/crowbar_act(mob/living/user, obj/item/tool)
return default_deconstruction_crowbar(tool)
@@ -148,8 +153,6 @@
/obj/machinery/electrolyzer/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(default_unfasten_wrench(user, I))
return
if(istype(I, /obj/item/stock_parts/cell))
if(!panel_open)
to_chat(user, span_warning("The hatch must be open to insert a power cell!"))
@@ -480,7 +480,8 @@
/obj/structure/tank_frame/wrench_act(mob/living/user, obj/item/tool)
. = ..()
return default_unfasten_wrench(user, tool, 0.5 SECONDS)
default_unfasten_wrench(user, tool, time = 0.5 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/tank_frame/screwdriver_act_secondary(mob/living/user, obj/item/tool)
. = ..()
@@ -214,9 +214,11 @@
return ..()
/obj/machinery/portable_atmospherics/scrubber/huge/attackby(obj/item/W, mob/user)
if(default_unfasten_wrench(user, W))
/obj/machinery/portable_atmospherics/scrubber/huge/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(default_unfasten_wrench(user, tool))
if(!movable)
on = FALSE
else
return ..()
return TOOL_ACT_TOOLTYPE_SUCCESS
return FALSE
+4 -4
View File
@@ -235,10 +235,10 @@ GLOBAL_LIST_INIT(scan_conditions,init_scan_conditions())
else
icon_state = "scanner_off"
/obj/machinery/exoscanner/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 10)
return TRUE
/obj/machinery/exoscanner/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 1 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/exoscanner/set_anchored(anchorvalue)
. = ..()
@@ -60,33 +60,36 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
if(in_range(user, src) || isobserver(user))
. += span_notice("The status display reads: Frying at <b>[fry_speed*100]%</b> speed.<br>Using <b>[oil_use]</b> units of oil per second.")
/obj/machinery/deepfryer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/reagent_containers/pill))
/obj/machinery/deepfryer/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/deepfryer/attackby(obj/item/weapon, mob/user, params)
if(istype(weapon, /obj/item/reagent_containers/pill))
if(!reagents.total_volume)
to_chat(user, span_warning("There's nothing to dissolve [I] in!"))
to_chat(user, span_warning("There's nothing to dissolve [weapon] in!"))
return
user.visible_message(span_notice("[user] drops [I] into [src]."), span_notice("You dissolve [I] in [src]."))
I.reagents.trans_to(src, I.reagents.total_volume, transfered_by = user)
qdel(I)
user.visible_message(span_notice("[user] drops [weapon] into [src]."), span_notice("You dissolve [weapon] in [src]."))
weapon.reagents.trans_to(src, weapon.reagents.total_volume, transfered_by = user)
qdel(weapon)
return
if(!reagents.has_reagent(/datum/reagent/consumable/cooking_oil))
to_chat(user, span_warning("[src] has no cooking oil to fry with!"))
return
if(I.resistance_flags & INDESTRUCTIBLE)
to_chat(user, span_warning("You don't feel it would be wise to fry [I]..."))
if(weapon.resistance_flags & INDESTRUCTIBLE)
to_chat(user, span_warning("You don't feel it would be wise to fry [weapon]..."))
return
if(istype(I, /obj/item/food/deepfryholder))
if(istype(weapon, /obj/item/food/deepfryholder))
to_chat(user, span_userdanger("Your cooking skills are not up to the legendary Doublefry technique."))
return
if(default_unfasten_wrench(user, I))
return
else if(default_deconstruction_screwdriver(user, "fryer_off", "fryer_off" ,I)) //where's the open maint panel icon?!
if(default_deconstruction_screwdriver(user, "fryer_off", "fryer_off", weapon)) //where's the open maint panel icon?!
return
else
if(is_type_in_typecache(I, deepfry_blacklisted_items) || is_type_in_typecache(I, GLOB.oilfry_blacklisted_items) || SEND_SIGNAL(I, COMSIG_CONTAINS_STORAGE) || HAS_TRAIT(I, TRAIT_NODROP) || (I.item_flags & (ABSTRACT | DROPDEL)))
if(is_type_in_typecache(weapon, deepfry_blacklisted_items) || is_type_in_typecache(weapon, GLOB.oilfry_blacklisted_items) || SEND_SIGNAL(weapon, COMSIG_CONTAINS_STORAGE) || HAS_TRAIT(weapon, TRAIT_NODROP) || (weapon.item_flags & (ABSTRACT | DROPDEL)))
return ..()
else if(!frying && user.transferItemToLoc(I, src))
fry(I, user)
else if(!frying && user.transferItemToLoc(weapon, src))
fry(weapon, user)
/obj/machinery/deepfryer/process(delta_time)
..()
@@ -104,6 +104,11 @@
else
startgibbing(user)
/obj/machinery/gibber/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/gibber/attackby(obj/item/P, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", P))
return
@@ -111,9 +116,6 @@
else if(default_pry_open(P))
return
else if(default_unfasten_wrench(user, P))
return
else if(default_deconstruction_crowbar(P))
return
else
@@ -123,10 +123,10 @@
else
grill_loop.stop()
/obj/machinery/griddle/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 2 SECONDS)
return TRUE
/obj/machinery/griddle/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 2 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
///Override to prevent storage dumping onto the griddle until I figure out how to navigate the mess that is storage code to allow me to nicely move the dumped objects onto the griddle.
/obj/machinery/griddle/get_dumping_location()
@@ -107,6 +107,14 @@
icon_state = "mw"
return ..()
/obj/machinery/microwave/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(dirty >= 100)
return FALSE
if(default_unfasten_wrench(user, tool))
update_appearance()
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/microwave/attackby(obj/item/O, mob/living/user, params)
if(operating)
return
@@ -114,7 +122,7 @@
return
if(dirty < 100)
if(default_deconstruction_screwdriver(user, icon_state, icon_state, O) || default_unfasten_wrench(user, O))
if(default_deconstruction_screwdriver(user, icon_state, icon_state, O))
update_appearance()
return
@@ -40,6 +40,12 @@ GLOBAL_LIST_EMPTY(monkey_recyclers)
if(in_range(user, src) || isobserver(user))
. += span_notice("The status display reads: Producing <b>[cube_production]</b> cubes for every monkey inserted.")
/obj/machinery/monkey_recycler/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(default_unfasten_wrench(user, tool))
power_change()
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/monkey_recycler/attackby(obj/item/O, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O))
return
@@ -47,10 +53,6 @@ GLOBAL_LIST_EMPTY(monkey_recyclers)
if(default_pry_open(O))
return
if(default_unfasten_wrench(user, O))
power_change()
return
if(default_deconstruction_crowbar(O))
return
@@ -172,11 +172,10 @@
if(default_deconstruction_crowbar(I, ignore_panel = TRUE))
return
/obj/machinery/oven/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 2 SECONDS)
return TRUE
/obj/machinery/oven/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 2 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/item/plate/oven_tray
name = "oven tray"
@@ -68,6 +68,11 @@
qdel(what)
LAZYREMOVE(processor_contents, what)
/obj/machinery/processor/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/processor/attackby(obj/item/O, mob/living/user, params)
if(processing)
to_chat(user, span_warning("[src] is in the process of processing!"))
@@ -78,9 +83,6 @@
if(default_pry_open(O))
return
if(default_unfasten_wrench(user, O))
return
if(default_deconstruction_crowbar(O))
return
@@ -70,6 +70,12 @@
if(!machine_stat)
. += emissive_appearance(icon, "[initial(icon_state)]-light-mask", alpha = src.alpha)
/obj/machinery/smartfridge/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(default_unfasten_wrench(user, tool))
power_change()
return TOOL_ACT_TOOLTYPE_SUCCESS
/*******************
* Item Adding
********************/
@@ -85,10 +91,6 @@
if(default_pry_open(O))
return
if(default_unfasten_wrench(user, O))
power_change()
return
if(default_deconstruction_crowbar(O))
SStgui.update_uis(src)
return
@@ -143,6 +143,10 @@
if(honeycombs.len >= get_max_honeycomb())
. += span_warning("There's no room for more honeycomb!")
/obj/structure/beebox/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/beebox/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/honey_frame))
@@ -156,10 +160,6 @@
to_chat(user, span_warning("There's no room for any more frames in the apiary!"))
return
if(I.tool_behaviour == TOOL_WRENCH)
if(default_unfasten_wrench(user, I, time = 20))
return
if(istype(I, /obj/item/queen_bee))
if(queen_bee)
to_chat(user, span_warning("This hive already has a queen!"))
+5 -3
View File
@@ -719,6 +719,11 @@
else if(myseed)
visible_message(span_warning("The pests seem to behave oddly in [myseed.name] tray, but quickly settle down..."))
/obj/machinery/hydroponics/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params)
//Called when mob user "attacks" it with object O
if(IS_EDIBLE(O) || istype(O, /obj/item/reagent_containers)) // Syringe stuff (and other reagent containers now too)
@@ -873,9 +878,6 @@
SEND_SIGNAL(O, COMSIG_TRY_STORAGE_INSERT, G, user, TRUE)
return
else if(default_unfasten_wrench(user, O))
return
else if(istype(O, /obj/item/shovel/spade))
if(!myseed && !weedlevel)
to_chat(user, span_warning("[src] doesn't have any plants or weeds!"))
+5 -3
View File
@@ -99,6 +99,11 @@
if(in_range(user, src) || isobserver(user))
. += span_notice("The status display reads: Extracting <b>[seed_multiplier] to [seed_multiplier * 4]</b> seed(s) per piece of produce.<br>Machine can store up to <b>[max_seeds]</b> seeds.")
/obj/machinery/seed_extractor/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/seed_extractor/attackby(obj/item/O, mob/living/user, params)
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
@@ -107,9 +112,6 @@
if(default_pry_open(O))
return
if(default_unfasten_wrench(user, O))
return
if(default_deconstruction_crowbar(O))
return
+4 -3
View File
@@ -26,9 +26,10 @@
. = ..()
song.ui_interact(user)
/obj/structure/musician/wrench_act(mob/living/user, obj/item/I)
default_unfasten_wrench(user, I, 40)
return TRUE
/obj/structure/musician/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 4 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/musician/piano
name = "space minimoog"
+5 -2
View File
@@ -769,12 +769,15 @@
density = TRUE
var/busy = FALSE
/obj/machinery/bookbinder/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/bookbinder/attackby(obj/hitby, mob/user, params)
if(istype(hitby, /obj/item/paper))
prebind_book(user, hitby)
return
if(default_unfasten_wrench(user, hitby))
return TRUE
return ..()
/obj/machinery/bookbinder/proc/prebind_book(mob/user, obj/item/paper/draw_from)
+5 -2
View File
@@ -160,9 +160,12 @@
else
unregister_input_turf() // someone just un-wrenched us, unregister the turf
/obj/machinery/mineral/ore_redemption/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/mineral/ore_redemption/attackby(obj/item/W, mob/user, params)
if(default_unfasten_wrench(user, W))
return
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
updateUsrDialog()
return
+6 -4
View File
@@ -359,11 +359,13 @@
object.forceMove(drop_location())
to_chat(user, span_notice("You take [object] out of [src]. [busy ? "The [src] comes to a halt." : ""]"))
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
if(default_unfasten_wrench(user, O))
return
/obj/machinery/photocopier/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
else if(istype(O, /obj/item/paper))
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/paper))
if(copier_empty())
if(!user.temporarilyRemoveItemFromInventory(O))
return
@@ -30,10 +30,10 @@
/obj/machinery/plumbing/AltClick(mob/user)
return ..() // This hotkey is BLACKLISTED since it's used by /datum/component/simple_rotation
/obj/machinery/plumbing/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I)
return TRUE
/obj/machinery/plumbing/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/plumbing/plunger_act(obj/item/plunger/P, mob/living/user, reinforced)
to_chat(user, span_notice("You start furiously plunging [name]."))
+8 -9
View File
@@ -107,16 +107,15 @@
if(user)
to_chat(user, span_notice("You set [src] to [setting_text]."))
/obj/machinery/power/floodlight/attackby(obj/item/O, mob/user, params)
if(O.tool_behaviour == TOOL_WRENCH)
default_unfasten_wrench(user, O, time = 20)
change_setting(1)
if(anchored)
connect_to_network()
else
disconnect_from_network()
/obj/machinery/power/floodlight/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
change_setting(1)
if(anchored)
connect_to_network()
else
. = ..()
disconnect_from_network()
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/power/floodlight/attack_hand(mob/user, list/modifiers)
. = ..()
+3 -3
View File
@@ -254,10 +254,10 @@
return ..()
/obj/machinery/power/emitter/wrench_act(mob/living/user, obj/item/item)
/obj/machinery/power/emitter/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, item)
return TRUE
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/power/emitter/welder_act(mob/living/user, obj/item/item)
..()
@@ -120,10 +120,10 @@ no power level overlay is currently in the overlays list.
return ..()
/obj/machinery/field/generator/wrench_act(mob/living/user, obj/item/wrench)
..()
default_unfasten_wrench(user, wrench)
return TRUE
/obj/machinery/field/generator/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/field/generator/welder_act(mob/living/user, obj/item/welder)
. = ..()
@@ -226,10 +226,10 @@
dust_mob(user, vis_msg, mob_msg)
/obj/machinery/power/supermatter_crystal/wrench_act(mob/user, obj/item/tool)
..()
. = ..()
if (moveable)
default_unfasten_wrench(user, tool, time = 20)
return TRUE
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/power/supermatter_crystal/Bumped(atom/movable/hit_object)
if(isliving(hit_object))
+10 -6
View File
@@ -64,13 +64,15 @@
icon_state = "coil[anchored]"
update_cable_icons_on_turf(get_turf(src))
/obj/machinery/power/energy_accumulator/tesla_coil/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/power/energy_accumulator/tesla_coil/attackby(obj/item/W, mob/user, params)
if(default_deconstruction_screwdriver(user, "coil_open[anchored]", "coil[anchored]", W))
return
if(default_unfasten_wrench(user, W))
return
if(default_deconstruction_crowbar(W))
return
@@ -142,13 +144,15 @@
else
icon_state = "grounding_rod[anchored]"
/obj/machinery/power/energy_accumulator/grounding_rod/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/power/energy_accumulator/grounding_rod/attackby(obj/item/W, mob/user, params)
if(default_deconstruction_screwdriver(user, "grounding_rod_open[anchored]", "grounding_rod[anchored]", W))
return
if(default_unfasten_wrench(user, W))
return
if(default_deconstruction_crowbar(W))
return
@@ -355,9 +355,12 @@
if(beaker)
beaker.reagents.ui_interact(usr)
/obj/machinery/chem_dispenser/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/living/user, params)
if(default_unfasten_wrench(user, I))
return
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
update_appearance()
return
@@ -66,8 +66,12 @@ This will not clean any inverted reagents. Inverted reagents will still be corre
if(panel_open)
. += mutable_appearance(icon, "[base_icon_state]_panel-o")
/* beaker swapping/attack code */
/obj/machinery/chem_mass_spec/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/* beaker swapping/attack code */
/obj/machinery/chem_mass_spec/attackby(obj/item/item, mob/user, params)
if(processing_reagents)
to_chat(user, "<span class='notice'> The [src] is currently processing a batch!")
@@ -77,9 +81,6 @@ This will not clean any inverted reagents. Inverted reagents will still be corre
update_appearance()
return
if(default_unfasten_wrench(user, item))
return
if(istype(item, /obj/item/reagent_containers) && !(item.item_flags & ABSTRACT) && item.is_open_container())
var/obj/item/reagent_containers/beaker = item
. = TRUE //no afterattack
@@ -123,6 +123,11 @@
if (prob(50))
qdel(src)
/obj/machinery/chem_master/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I))
return
@@ -130,8 +135,6 @@
else if(default_deconstruction_crowbar(I))
return
if(default_unfasten_wrench(user, I))
return
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
. = TRUE // no afterattack
if(panel_open)
@@ -134,6 +134,11 @@
update_appearance()
return TRUE
/obj/machinery/reagentgrinder/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/reagentgrinder/attackby(obj/item/I, mob/living/user, params)
//You can only screw open empty grinder
if(!beaker && !length(holdingitems) && default_deconstruction_screwdriver(user, icon_state, icon_state, I))
@@ -142,9 +147,6 @@
if(default_deconstruction_crowbar(I))
return
if(default_unfasten_wrench(user, I))
return
if(panel_open) //Can't insert objects when its screwed open
return TRUE
@@ -88,6 +88,13 @@
smoke.set_up(reagents, setting*3, efficiency, T)
smoke.start()
/obj/machinery/smoke_machine/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(default_unfasten_wrench(user, tool, time = 4 SECONDS))
on = FALSE
return TOOL_ACT_TOOLTYPE_SUCCESS
return FALSE
/obj/machinery/smoke_machine/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
@@ -96,9 +103,6 @@
if(units)
to_chat(user, span_notice("You transfer [units] units of the solution to [src]."))
return
if(default_unfasten_wrench(user, I, 40))
on = FALSE
return
if(default_deconstruction_screwdriver(user, "smoke0-o", "smoke0", I))
return
if(default_deconstruction_crowbar(I))
+4 -4
View File
@@ -248,10 +248,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/reagent_dispensers/wall/virusfood, 30
. = ..()
AddComponent(/datum/component/plumbing/simple_supply)
/obj/structure/reagent_dispensers/plumbed/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I)
return TRUE
/obj/structure/reagent_dispensers/plumbed/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/reagent_dispensers/plumbed/storage
name = "stationary storage tank"
@@ -31,7 +31,7 @@
var/test_status = null
/// Determines which tank will be the merge_gases target (destroyed upon testing).
var/obj/item/tank/tank_to_target
// These vars are used for the explosion simulation and doesn't affect the core detonation.
/// Combined result of the first two tanks. Exists only in our machine.
var/datum/gas_mixture/combined_gasmix
@@ -101,9 +101,9 @@
return ..()
/obj/machinery/research/anomaly_refinery/wrench_act(mob/living/user, obj/item/tool)
if(!default_unfasten_wrench(user, tool))
return FALSE
return TRUE
. = ..()
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/research/anomaly_refinery/screwdriver_act(mob/living/user, obj/item/tool)
if(!default_deconstruction_screwdriver(user, "[base_icon_state]-off", "[base_icon_state]", tool))
@@ -212,7 +212,7 @@
combined_gasmix.merge(second_gasmix.copy())
else
combined_gasmix.react()
reaction_increment += 1
/// We dont allow incomplete valves to go in but do code in checks for incomplete valves. Just in case.
@@ -289,7 +289,7 @@
var/list/data = list()
var/list/parsed_gasmixes = list()
var/obj/item/tank/other_tank
if(inserted_bomb?.tank_one && inserted_bomb?.tank_two)
other_tank = inserted_bomb.tank_one == tank_to_target ? inserted_bomb.tank_two : inserted_bomb.tank_one
@@ -61,9 +61,8 @@
return ..()
/obj/machinery/doppler_array/wrench_act(mob/living/user, obj/item/tool)
if(!default_unfasten_wrench(user, tool))
return FALSE
return TRUE
default_unfasten_wrench(user, tool)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/doppler_array/screwdriver_act(mob/living/user, obj/item/tool)
if(!default_deconstruction_screwdriver(user, "[base_icon_state]", "[base_icon_state]", tool))
@@ -92,8 +91,8 @@
else
playsound(src, 'sound/machines/terminal_error.ogg', 25)
/**
* Checks a specified tachyon record for fitting reactions, then returns a list with
/**
* Checks a specified tachyon record for fitting reactions, then returns a list with
* the experiment typepath as key and score as value.
* The score is the same for all explosive experiments (light radius).
*/
+4 -4
View File
@@ -34,10 +34,10 @@ GLOBAL_VAR_INIT(bsa_unlock, FALSE)
density = TRUE
anchored = TRUE
/obj/machinery/bsa/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 10)
return TRUE
/obj/machinery/bsa/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 1 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/bsa/back
name = "Bluespace Artillery Generator"
+7 -5
View File
@@ -430,12 +430,14 @@ GLOBAL_LIST_EMPTY(vending_products)
default_deconstruction_crowbar(I)
return TRUE
/obj/machinery/vending/wrench_act(mob/living/user, obj/item/I)
..()
if(panel_open)
default_unfasten_wrench(user, I, time = 60)
/obj/machinery/vending/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(!panel_open)
return FALSE
if(default_unfasten_wrench(user, tool, time = 6 SECONDS))
unbuckle_all_mobs(TRUE)
return TRUE
return TOOL_ACT_TOOLTYPE_SUCCESS
return FALSE
/obj/machinery/vending/screwdriver_act(mob/living/user, obj/item/I)
if(..())