From c9efdf11a7309c09d21d8e60984de41fb73d7c0d Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Thu, 25 Apr 2024 19:08:41 -0400 Subject: [PATCH] [MIRROR] [no gbp] Adds silicon interaction flags (#2181) * [no gbp] Adds silicon interaction flags (#82822) ## About The Pull Request A few items with special silicon interactions did not have the proper flags to permit their use at distance (airlocks for instance) ## Why It's Good For The Game Fixes #82800 ## Changelog :cl: fix: Restored silicon alt-clicking capability /:cl: * [no gbp] Adds silicon interaction flags --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> --- code/_onclick/ai.dm | 13 +++++++++---- code/game/machinery/doors/airlock.dm | 1 + code/game/machinery/hologram.dm | 1 + code/game/machinery/porta_turret/portable_turret.dm | 1 + code/modules/power/apc/apc_main.dm | 1 + 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index a18f03a489a..ffd126bbb83 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -150,6 +150,7 @@ return /atom/proc/ai_click_alt(mob/living/silicon/ai/user) + SHOULD_CALL_PARENT(FALSE) return /atom/proc/AIShiftClick(mob/living/silicon/ai/user) @@ -167,12 +168,13 @@ /obj/machinery/door/airlock/ai_click_alt(mob/living/silicon/ai/user) if(obj_flags & EMAGGED) - return + return NONE if(!secondsElectrified) shock_perm(user) else shock_restore(user) + return CLICK_ACTION_SUCCESS /obj/machinery/door/airlock/AIShiftClick(mob/living/silicon/ai/user) // Opens and closes doors! if(obj_flags & EMAGGED) @@ -236,10 +238,10 @@ /// Toggle APC equipment settings /obj/machinery/power/apc/ai_click_alt(mob/living/silicon/ai/user) if(!can_use(user, loud = TRUE)) - return + return NONE if(!is_operational || failure_timer) - return + return CLICK_ACTION_BLOCKING equipment = equipment ? APC_CHANNEL_OFF : APC_CHANNEL_ON if (user) @@ -249,6 +251,7 @@ user.log_message("turned [enabled_or_disabled] the [src] equipment settings", LOG_GAME) update_appearance() update() + return CLICK_ACTION_SUCCESS /obj/machinery/power/apc/attack_ai_secondary(mob/living/silicon/user, list/modifiers) if(!can_use(user, loud = TRUE)) @@ -260,8 +263,9 @@ /* AI Turrets */ /obj/machinery/turretid/ai_click_alt(mob/living/silicon/ai/user) //toggles lethal on turrets if(ailock) - return + return CLICK_ACTION_BLOCKING toggle_lethal(user) + return CLICK_ACTION_SUCCESS /obj/machinery/turretid/AICtrlClick(mob/living/silicon/ai/user) //turns off/on Turrets if(ailock) @@ -274,6 +278,7 @@ balloon_alert(user, "disrupted all active calls") add_hiddenprint(user) hangup_all_calls() + return CLICK_ACTION_SUCCESS // // Override TurfAdjacent for AltClicking diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 351506fe4f7..9feb5f71f7c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -98,6 +98,7 @@ smoothing_groups = SMOOTH_GROUP_AIRLOCK interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_OPEN + interaction_flags_click = ALLOW_SILICON_REACH blocks_emissive = EMISSIVE_BLOCK_NONE // Custom emissive blocker. We don't want the normal behavior. ///The type of door frame to drop during deconstruction diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index c9c6244c9a1..7a199446507 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -47,6 +47,7 @@ Possible to do for anyone motivated enough: armor_type = /datum/armor/machinery_holopad circuit = /obj/item/circuitboard/machine/holopad interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY + interaction_flags_click = ALLOW_SILICON_REACH // Blue, dim light light_power = 0.8 light_color = LIGHT_COLOR_BLUE diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 06b1b977847..ffbecf91180 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -910,6 +910,7 @@ DEFINE_BITFIELD(turret_flags, list( density = FALSE req_access = list(ACCESS_AI_UPLOAD) resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + interaction_flags_click = ALLOW_SILICON_REACH /// Variable dictating if linked turrets are active and will shoot targets var/enabled = TRUE /// Variable dictating if linked turrets will shoot lethal projectiles diff --git a/code/modules/power/apc/apc_main.dm b/code/modules/power/apc/apc_main.dm index f9380f3af1f..1f3c0cbaaaf 100644 --- a/code/modules/power/apc/apc_main.dm +++ b/code/modules/power/apc/apc_main.dm @@ -17,6 +17,7 @@ damage_deflection = 10 resistance_flags = FIRE_PROOF interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON + interaction_flags_click = ALLOW_SILICON_REACH processing_flags = START_PROCESSING_MANUALLY ///Range of the light emitted when on