[MIRROR] Allows borgs to use ranged rightclicks (#27096)

* Allows borgs to use ranged rightclicks (#82265)

## About The Pull Request

No idea why this is all copypaste snowflake code but here we are. Borgs
can now use ranged rightlicks just like anyone else.

I honestly have barely any idea as to what I am doing, does anyone have
a diagram of the attack chain? But I can assure you, it does work.

## Why It's Good For The Game

Future borg parity with EVERYTHING ELSE. Will make crushers and other
weapons with rightclick functionality work if one decides to add them to
borgos. Even if not, it's good to keep the parity.

## Changelog
🆑
code: Borgo rightclick ranged code
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>

* Allows borgs to use ranged rightclicks

---------

Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-03-29 14:29:06 -04:00
committed by GitHub
co-authored by MrMelbert Waterpig
parent a17b3c1da9
commit e550d50a42
+9 -3
View File
@@ -79,12 +79,18 @@
if(!isturf(loc))
return
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
// cyborg rightclick code, allowing borgos to use weapons at range
if(CanReach(A,W))
W.melee_attack_chain(src, A, params)
return
if(isturf(A) || isturf(A.loc))
W.afterattack(A, src, 0, params)
else if(isturf(A) || isturf(A.loc))
if(LAZYACCESS(modifiers, RIGHT_CLICK))
var/after_attack_secondary_result = W.afterattack_secondary(A, src, FALSE, params)
if(after_attack_secondary_result == SECONDARY_ATTACK_CALL_NORMAL)
W.afterattack(A, src, FALSE, params)
else
W.afterattack(A, src, FALSE, params)
//Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks
// for non-doors/apcs