Skip to content

Commit

Permalink
[MIRROR] [no gbp] Adds silicon interaction flags (#2181)
Browse files Browse the repository at this point in the history
* [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 <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Apr 25, 2024
1 parent 0cfd747 commit c9efdf1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
13 changes: 9 additions & 4 deletions code/_onclick/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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))
Expand All @@ -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)
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/hologram.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/porta_turret/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/modules/power/apc/apc_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9efdf1

Please sign in to comment.