diff --git a/code/__DEFINES/tools.dm b/code/__DEFINES/tools.dm index 9f6b8783e00..1c8db160225 100644 --- a/code/__DEFINES/tools.dm +++ b/code/__DEFINES/tools.dm @@ -22,6 +22,14 @@ /// Can be used to scrape rust off an any atom; which will result in the Rust Component being qdel'd #define TOOL_RUSTSCRAPER "rustscraper" +// Used by the tool_blocker element, to block the primary or secondary tool action (or both) +/// e.g. crowbar_act() +#define TOOL_ACT_PRIMARY (1<<0) +/// e.g. crowbar_act_secondary() +#define TOOL_ACT_SECONDARY (1<<1) +/// e.g. both crowbar_act() and crowbar_act_secondary() +#define TOOL_ACT_ALL TOOL_ACT_PRIMARY | TOOL_ACT_SECONDARY + // If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY, // tool sound is only played when op is started. If not, it's played twice. #define MIN_TOOL_SOUND_DELAY 20 diff --git a/code/datums/elements/tool_blocker.dm b/code/datums/elements/tool_blocker.dm index e7fdefd6c87..f1ce1f4fa4a 100644 --- a/code/datums/elements/tool_blocker.dm +++ b/code/datums/elements/tool_blocker.dm @@ -2,23 +2,47 @@ /datum/element/tool_blocker element_flags = ELEMENT_BESPOKE argument_hash_start_idx = 2 + /// e.g. TOOL_SCREWDRIVER, TOOL_CROWBAR var/tool_type + /// Bitflag representing which tool_acts to block + var/action_type -/datum/element/tool_blocker/Attach(datum/target, tool_type) +/datum/element/tool_blocker/Attach(datum/target, tool_type, action_type = TOOL_ACT_ALL) . = ..() + if(isnull(tool_type) || !(action_type & TOOL_ACT_ALL)) + return ELEMENT_INCOMPATIBLE + src.tool_type = tool_type - RegisterSignals(target, list( - COMSIG_ATOM_TOOL_ACT(tool_type), - COMSIG_ATOM_SECONDARY_TOOL_ACT(tool_type), - ), PROC_REF(block_tool)) + src.action_type = action_type + + var/list/signals_to_register = list() + + if(action_type & TOOL_ACT_PRIMARY) + signals_to_register += COMSIG_ATOM_TOOL_ACT(tool_type) + if(action_type & TOOL_ACT_SECONDARY) + signals_to_register += COMSIG_ATOM_SECONDARY_TOOL_ACT(tool_type) + if(isturf(target)) + RegisterSignal(target, COMSIG_QDELETING, PROC_REF(on_turf_deleted), override = TRUE) + + RegisterSignals(target, signals_to_register, PROC_REF(block_tool)) /datum/element/tool_blocker/Detach(datum/source, ...) - UnregisterSignal(source, list( - COMSIG_ATOM_TOOL_ACT(tool_type), - COMSIG_ATOM_SECONDARY_TOOL_ACT(tool_type), - )) + var/list/signals_to_unregister = list() + + if(action_type & TOOL_ACT_PRIMARY) + signals_to_unregister += COMSIG_ATOM_TOOL_ACT(tool_type) + if(action_type & TOOL_ACT_SECONDARY) + signals_to_unregister += COMSIG_ATOM_SECONDARY_TOOL_ACT(tool_type) + if(isturf(source)) + signals_to_unregister += COMSIG_QDELETING + UnregisterSignal(source, signals_to_unregister) + return ..() /datum/element/tool_blocker/proc/block_tool(...) SIGNAL_HANDLER return ITEM_INTERACT_SKIP_TO_ATTACK + +/datum/element/tool_blocker/proc/on_turf_deleted(datum/source) + SIGNAL_HANDLER + Detach(source) diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index d9806ba6f2b..a0756ca11db 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -190,17 +190,17 @@ meat.set_custom_materials(list(SSmaterials.get_material(/datum/material/meat/mob_meat, C) = round(SHEET_MATERIAL_AMOUNT * (4/3)))) nutrients = 0 -/obj/machinery/fat_sucker/screwdriver_act(mob/living/user, obj/item/I) +/obj/machinery/fat_sucker/screwdriver_act(mob/living/user, obj/item/tool) if(occupant) to_chat(user, span_warning("[src] is currently occupied!")) return ITEM_INTERACT_BLOCKING if(state_open) to_chat(user, span_warning("[src] must be closed to [panel_open ? "close" : "open"] its maintenance hatch!")) return ITEM_INTERACT_BLOCKING - return default_deconstruction_screwdriver(user, I) + return default_deconstruction_screwdriver(user, tool) -/obj/machinery/fat_sucker/crowbar_act(mob/living/user, obj/item/I) - return default_deconstruction_crowbar(user, I) +/obj/machinery/fat_sucker/crowbar_act(mob/living/user, obj/item/tool) + return default_deconstruction_crowbar(user, tool) /obj/machinery/fat_sucker/emag_act(mob/user, obj/item/card/emag/emag_card) if(obj_flags & EMAGGED) diff --git a/code/game/machinery/medipen_refiller.dm b/code/game/machinery/medipen_refiller.dm index bdeb8227cac..8192cf3c93c 100644 --- a/code/game/machinery/medipen_refiller.dm +++ b/code/game/machinery/medipen_refiller.dm @@ -119,12 +119,10 @@ return TRUE /obj/machinery/medipen_refiller/wrench_act(mob/living/user, obj/item/tool) - default_unfasten_wrench(user, tool) - return ITEM_INTERACT_SUCCESS + return default_unfasten_wrench(user, tool) /obj/machinery/medipen_refiller/crowbar_act(mob/living/user, obj/item/tool) - default_deconstruction_crowbar(tool) - return ITEM_INTERACT_SUCCESS + return default_deconstruction_crowbar(user, tool) /obj/machinery/medipen_refiller/screwdriver_act(mob/living/user, obj/item/tool) return default_deconstruction_screwdriver(user, tool) diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index 539d3cc0e8d..89f8c527e18 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -172,10 +172,10 @@ else if(HAS_TRAIT(L_occupant, TRAIT_STASIS)) thaw_them(L_occupant) -/obj/machinery/stasis/screwdriver_act(mob/living/user, obj/item/I) - return default_deconstruction_screwdriver(user, I) +/obj/machinery/stasis/screwdriver_act(mob/living/user, obj/item/tool) + return default_deconstruction_screwdriver(user, tool) -/obj/machinery/stasis/crowbar_act(mob/living/user, obj/item/I) - return default_deconstruction_crowbar(user, I) +/obj/machinery/stasis/crowbar_act(mob/living/user, obj/item/tool) + return default_deconstruction_crowbar(user, tool) #undef STASIS_TOGGLE_COOLDOWN diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 5b78deb2bc0..838e902f0bc 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -732,8 +732,7 @@ wires.interact(user) return ITEM_INTERACT_SUCCESS else if(tool.tool_behaviour == TOOL_CROWBAR) - default_deconstruction_crowbar(tool) - return ITEM_INTERACT_SUCCESS + return default_deconstruction_crowbar(user, tool) if(default_pry_open(user, tool) & ITEM_INTERACT_SUCCESS) dump_inventory_contents() diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index 3f8387469c6..9c667f89a0a 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -623,8 +623,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) fishing_modifier = -21 //it only lives for 25 seconds, so we make them worth it. custom_materials = null -/obj/structure/chair/mime/wrench_act_secondary(mob/living/user, obj/item/weapon) - return NONE +/obj/structure/chair/mime/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_WRENCH, TOOL_ACT_SECONDARY) /obj/structure/chair/mime/post_buckle_mob(mob/living/M) M.add_offsets(type, z_add = 5) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index ecd71e18ee2..cd54bd380f2 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -849,17 +849,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw flags_1 = PREVENT_CLICK_UNDER_1 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF -/obj/structure/window/reinforced/shuttle/indestructible/welder_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/window/reinforced/shuttle/indestructible/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/window/reinforced/shuttle/indestructible/wrench_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/window/reinforced/shuttle/indestructible/crowbar_act(mob/living/user, obj/item/tool) - return NONE +/obj/structure/window/reinforced/shuttle/indestructible/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_WELDER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_WRENCH, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_CROWBAR, TOOL_ACT_PRIMARY) /obj/structure/window/reinforced/plasma/plastitanium name = "plastitanium window" diff --git a/code/game/turfs/open/floor/plating.dm b/code/game/turfs/open/floor/plating.dm index 2a440db7c74..7718f4b143e 100644 --- a/code/game/turfs/open/floor/plating.dm +++ b/code/game/turfs/open/floor/plating.dm @@ -150,6 +150,10 @@ upgradable = FALSE attachment_holes = FALSE +/turf/open/floor/plating/foam/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_WELDER, TOOL_ACT_PRIMARY) + /turf/open/floor/plating/foam/burn_tile() return //jetfuel can't melt steel foam @@ -197,9 +201,6 @@ ScrapeAway(flags = CHANGETURF_INHERIT_AIR) return TRUE -/turf/open/floor/plating/foam/welder_act(mob/living/user, obj/item/I) - return NONE // Fuck you - //reinforced plating deconstruction states #define PLATE_INTACT 0 #define PLATE_BOLTS_LOOSENED 1 diff --git a/code/modules/antagonists/heretic/items/heretic_grenade.dm b/code/modules/antagonists/heretic/items/heretic_grenade.dm index 3a5e0e2a129..4cae667299d 100644 --- a/code/modules/antagonists/heretic/items/heretic_grenade.dm +++ b/code/modules/antagonists/heretic/items/heretic_grenade.dm @@ -22,6 +22,9 @@ /obj/item/grenade/chem_grenade/rust_sower/Initialize(mapload) . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_WRENCH, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_MULTITOOL, TOOL_ACT_PRIMARY) RegisterSignal(src, COMSIG_ITEM_ON_GRIND, PROC_REF(on_try_grind)) var/obj/item/reagent_containers/cup/beaker/large/beaker_one = new(src) var/obj/item/reagent_containers/cup/beaker/large/beaker_two = new(src) @@ -39,15 +42,6 @@ playsound(src, 'sound/items/weapons/rust_sower_explode.ogg', 70, FALSE) qdel(src) -/obj/item/grenade/chem_grenade/rust_sower/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/item/grenade/chem_grenade/rust_sower/wrench_act(mob/living/user, obj/item/tool) - return NONE - -/obj/item/grenade/chem_grenade/rust_sower/multitool_act(mob/living/user, obj/item/tool) - return NONE - /// Returns -1 so that you cant extract the chems /obj/item/grenade/chem_grenade/rust_sower/proc/on_try_grind() SIGNAL_HANDLER diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 23babb68c96..71eb4e1fb8d 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -268,8 +268,7 @@ internal_pressure = internal_pressure > airs[i].return_pressure() ? internal_pressure : airs[i].return_pressure() if(!filled_pipe) - default_deconstruction_crowbar(tool) - return ITEM_INTERACT_SUCCESS + return default_deconstruction_crowbar(user, tool) to_chat(user, span_notice("You begin to unfasten \the [src]...")) diff --git a/code/modules/awaymissions/mission_code/murderdome.dm b/code/modules/awaymissions/mission_code/murderdome.dm index 0253ad69f93..87bb666fedb 100644 --- a/code/modules/awaymissions/mission_code/murderdome.dm +++ b/code/modules/awaymissions/mission_code/murderdome.dm @@ -12,11 +12,10 @@ obj_flags = CONDUCTS_ELECTRICITY resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF -/obj/structure/grille/indestructible/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/grille/indestructible/wirecutter_act(mob/living/user, obj/item/tool) - return NONE +/obj/structure/grille/indestructible/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_WIRECUTTER, TOOL_ACT_PRIMARY) /obj/effect/spawner/structure/window/reinforced/indestructible spawn_list = list(/obj/structure/grille/indestructible, /obj/structure/window/reinforced/fulltile/indestructible) diff --git a/code/modules/capture_the_flag/ctf_game.dm b/code/modules/capture_the_flag/ctf_game.dm index b10513eca27..2b164277aba 100644 --- a/code/modules/capture_the_flag/ctf_game.dm +++ b/code/modules/capture_the_flag/ctf_game.dm @@ -461,11 +461,10 @@ /obj/structure/table/reinforced/ctf resistance_flags = INDESTRUCTIBLE -/obj/structure/table/reinforced/ctf/wrench_act_secondary(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/table/reinforced/ctf/screwdriver_act_secondary(mob/living/user, obj/item/tool) - return NONE +/obj/structure/table/reinforced/ctf/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_SECONDARY) + AddElement(/datum/element/tool_blocker, TOOL_WRENCH, TOOL_ACT_SECONDARY) #define CTF_LOADING_UNLOADED 0 #define CTF_LOADING_LOADING 1 diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 7ef38b1a778..afc68ef468b 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -11,8 +11,9 @@ /turf/open/floor/holofloor/item_interaction(mob/living/user, obj/item/tool, list/modifiers) return ITEM_INTERACT_BLOCKING // Fuck you -/turf/open/floor/holofloor/crowbar_act(mob/living/user, obj/item/I) - return NONE // Fuck you +/turf/open/floor/holofloor/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_CROWBAR, TOOL_ACT_PRIMARY) /turf/open/floor/holofloor/burn_tile() return //you can't burn a hologram! diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 78538b3e8b9..6e2db6c05ba 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -214,14 +214,14 @@ return . /obj/machinery/biogenerator/crowbar_act(mob/living/user, obj/item/tool) - if(!default_deconstruction_crowbar(tool)) - return ITEM_INTERACT_BLOCKING + . = default_deconstruction_crowbar(user, tool) + if(!(. & ITEM_INTERACT_SUCCESS)) + return var/turf/drop_location = drop_location() if(biomass > 0) drop_location.visible_message(span_warning("Biomass spills from \the [src]'s biomass tank!")) playsound(drop_location, 'sound/effects/slosh.ogg', 25, vary = TRUE) new /obj/effect/decal/cleanable/greenglow(drop_location) - return ITEM_INTERACT_SUCCESS /obj/machinery/biogenerator/item_interaction(mob/living/user, obj/item/tool, list/modifiers) if(user.combat_mode) diff --git a/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm b/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm index 2917c8b88e7..13963576232 100644 --- a/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm +++ b/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm @@ -161,11 +161,10 @@ /obj/machinery/vending/hotdog/museum all_products_free = TRUE -/obj/machinery/vending/hotdog/museum/screwdriver_act(mob/living/user, obj/item/attack_item) - return NONE - -/obj/machinery/vending/hotdog/museum/crowbar_act(mob/living/user, obj/item/attack_item) - return NONE +/obj/machinery/vending/hotdog/museum/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_CROWBAR, TOOL_ACT_PRIMARY) #define CAFE_KEYCARD_TOILETS "museum_cafe_key_toilets" diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index 7ba37130ebc..1f31fbb6053 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -267,20 +267,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/door/window/survival_pod/left, 0) max_n_of_items = 10 pixel_y = -4 -/obj/machinery/smartfridge/survival_pod/welder_act(mob/living/user, obj/item/tool) - return NONE - -/obj/machinery/smartfridge/survival_pod/wrench_act(mob/living/user, obj/item/tool) - return NONE - -/obj/machinery/smartfridge/survival_pod/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/machinery/smartfridge/survival_pod/crowbar_act(mob/living/user, obj/item/tool) - return NONE - /obj/machinery/smartfridge/survival_pod/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + AddElement(/datum/element/tool_blocker, TOOL_WELDER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_WRENCH, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_CROWBAR, TOOL_ACT_PRIMARY) return ..() /obj/machinery/smartfridge/survival_pod/preloaded/Initialize(mapload) diff --git a/code/modules/power/thermoelectric_generator.dm b/code/modules/power/thermoelectric_generator.dm index 9d5fd1d3850..2717cdafa56 100644 --- a/code/modules/power/thermoelectric_generator.dm +++ b/code/modules/power/thermoelectric_generator.dm @@ -87,8 +87,7 @@ return TRUE /obj/machinery/power/thermoelectric_generator/crowbar_act(mob/living/user, obj/item/tool) - default_deconstruction_crowbar(tool) - return TRUE + return default_deconstruction_crowbar(user, tool) /obj/machinery/power/thermoelectric_generator/process() //Setting this number higher just makes the change in power output slower, it doesnt actualy reduce power output cause **math** diff --git a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm index ddff805f45f..6b9950ebd4b 100644 --- a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm +++ b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm @@ -13,16 +13,15 @@ ///The purity of the created reagent in % (purity uses 0-1 values) var/purity = 100 -/obj/machinery/chem_dispenser/chem_synthesizer/Destroy() +/obj/machinery/chem_dispenser/chem_synthesizer/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_CROWBAR, TOOL_ACT_PRIMARY) + +/obj/machinery/chem_dispenser/chem_synthesizer/Destroy(force) QDEL_NULL(beaker) return ..() -/obj/machinery/chem_dispenser/chem_synthesizer/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/machinery/chem_dispenser/chem_synthesizer/crowbar_act(mob/living/user, obj/item/tool) - return NONE - /obj/machinery/chem_dispenser/chem_synthesizer/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 0c958e557be..4c08911af2e 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -14,6 +14,10 @@ base_icon_state = "d_analyzer" circuit = /obj/item/circuitboard/machine/destructive_analyzer +/obj/machinery/rnd/destructive_analyzer/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) //This allows people to put syndicate screwdrivers in the machine. Secondary act still passes. + /obj/machinery/rnd/destructive_analyzer/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) . = ..() @@ -127,10 +131,6 @@ return ITEM_INTERACT_SKIP_TO_ATTACK return NONE -//This allows people to put syndicate screwdrivers in the machine. Secondary act still passes. -/obj/machinery/rnd/destructive_analyzer/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - //We need to call default_deconstruction_screwdriver here since its parent will call screwdriver_act on this level which will stop us from ever deconstructing. /obj/machinery/rnd/destructive_analyzer/screwdriver_act_secondary(mob/living/user, obj/item/tool) return default_deconstruction_screwdriver(user, tool) diff --git a/code/modules/shuttle/misc/special.dm b/code/modules/shuttle/misc/special.dm index f8cb0efd116..e1bd0f77b77 100644 --- a/code/modules/shuttle/misc/special.dm +++ b/code/modules/shuttle/misc/special.dm @@ -80,18 +80,14 @@ /obj/structure/table/abductor/wabbajack/Initialize(mapload, obj/structure/table_frame/frame_used, obj/item/stack/stack_used) . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) + AddElement(/datum/element/tool_blocker, TOOL_WRENCH, TOOL_ACT_PRIMARY) START_PROCESSING(SSobj, src) /obj/structure/table/abductor/wabbajack/Destroy() STOP_PROCESSING(SSobj, src) . = ..() -/obj/structure/table/abductor/wabbajack/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/table/abductor/wabbajack/wrench_act(mob/living/user, obj/item/tool) - return NONE - /obj/structure/table/abductor/wabbajack/process() if(isnull(our_statue)) our_statue = locate() in orange(4, src) @@ -186,12 +182,8 @@ COMSIG_ATOM_ENTERED = PROC_REF(on_climbed), ) AddElement(/datum/element/connect_loc, loc_connections) - -/obj/structure/table/wood/shuttle_bar/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/table/wood/shuttle_bar/wrench_act(mob/living/user, obj/item/tool) - return NONE + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER) + AddElement(/datum/element/tool_blocker, TOOL_WRENCH) /obj/structure/table/wood/shuttle_bar/proc/on_climbed(datum/source, atom/movable/AM) SIGNAL_HANDLER diff --git a/code/modules/shuttle/shuttle_consoles/syndicate.dm b/code/modules/shuttle/shuttle_consoles/syndicate.dm index dc1500437a3..07115b52636 100644 --- a/code/modules/shuttle/shuttle_consoles/syndicate.dm +++ b/code/modules/shuttle/shuttle_consoles/syndicate.dm @@ -12,8 +12,9 @@ possible_destinations = "syndicate_away;syndicate_z5;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s;syndicate_custom" resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF -/obj/machinery/computer/shuttle/syndicate/screwdriver_act(mob/living/user, obj/item/I) - return NONE +/obj/machinery/computer/shuttle/syndicate/Initialize(mapload) + . = ..() + AddElement(/datum/element/tool_blocker, TOOL_SCREWDRIVER, TOOL_ACT_PRIMARY) /obj/machinery/computer/shuttle/syndicate/launch_check(mob/user) . = ..() diff --git a/code/modules/transport/tram/tram_controller.dm b/code/modules/transport/tram/tram_controller.dm index 4194493f27d..fef1bbdcbf3 100644 --- a/code/modules/transport/tram/tram_controller.dm +++ b/code/modules/transport/tram/tram_controller.dm @@ -788,14 +788,12 @@ /obj/machinery/transport/tram_controller/hilbert configured_transport_id = HILBERT_LINE_1 -/obj/machinery/transport/tram_controller/wrench_act_secondary(mob/living/user, obj/item/tool) - return NONE - /obj/machinery/transport/tram_controller/Initialize(mapload) . = ..() register_context() if(!id_tag) id_tag = assign_random_name() + AddElement(/datum/element/tool_blocker, TOOL_WRENCH, TOOL_ACT_SECONDARY) /** * Mapped or built tram cabinet isn't located on a transport module.