Fixes for borg attack chain interactions (#87705)

## About The Pull Request
- Fixes #87612 by returning the correct define when
`COMSIG_ATOM_ATTACK_ROBOT_SECONDARY` blocks the attack
- Borg `UnarmedAttack()` now checks for modifiers (i.e. are we left or
right clicking) this allows `redirect_attack_hand_from_turf` (which
calls `UnarmedAttack()`) component to call either `attack_robot()` or
`attack_robot_secondary()` correctly so you can now turn the fire alarm
on & off by attacking its mounted wall as a borg
- Borg's `attack_robot_secondary()` now checks for `interaction_range`
just like `attack_robot()` so you can't do shinanigens like resetting a
fire alarm/turning on or off the conveyer switch from an infinite
distance like through camera's & such
- Removed Borgs `RangedAttack()` proc which called `attack_robot()`
because it violates `interaction_range` for the proc

## Changelog
🆑
fix: No runtime when clicking on a fire alarm's mounted wall as a borg
fix: You can turn the fire alarm on & off (And not just on) as a borg
via left & right click on its mounted wall
fix: certain secondary interactions of items & borgs now respect the
borgs interaction range
/🆑
This commit is contained in:
SyncIt21
2024-11-08 05:01:58 +05:30
committed by GitHub
parent d4a7d2a421
commit 0107198799
2 changed files with 27 additions and 16 deletions
@@ -240,6 +240,8 @@
. = ..()
if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN || panel_open)
return
if(!user.can_perform_action(src, ALLOW_SILICON_REACH | FORBID_TELEKINESIS_REACH))
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if(!anchored)
balloon_alert(user, "unanchored!")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN