From 86f1566b5a108e413ea17aa7cf1437ede4eaa6c2 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Wed, 19 Jun 2024 02:28:23 +0300 Subject: [PATCH] Dir assist now prioritises non-xenos (#6461) # About the pull request This PR makes it so when using dir assist against a xeno and a non-xeno on the same tile the attack will prioritize the non-xeno over the xeno. # Explain why it's good for the game You are more likely to want to target the marine than shove\slash the xeno ontop of the marine. It is annoying when John runner stands ontop of the guy you are currently pulling and now you have to click the 3 remaining pixels visible. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: qol: Dir-assist will now prioritize non-xenos over xenos. /:cl: --- code/_onclick/xeno.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/_onclick/xeno.dm b/code/_onclick/xeno.dm index 453539ff1c3f..1ef89999eea6 100644 --- a/code/_onclick/xeno.dm +++ b/code/_onclick/xeno.dm @@ -13,6 +13,7 @@ if(isturf(target) && tile_attack) //Attacks on turfs must be done indirectly through directional attacks or clicking own sprite. var/turf/T = target + var/mob/living/non_xeno_target for(var/mob/living/L in T) if (!iscarbon(L)) if (!alt) @@ -21,13 +22,19 @@ if (!L.is_xeno_grabbable() || L == src) //Xenos never attack themselves. continue + var/isxeno = isxeno(L) + if(!isxeno) + non_xeno_target = L if (L.body_position == LYING_DOWN) alt = L continue + else if (!isxeno) + break target = L - break if (target == T && alt) target = alt + if(non_xeno_target) + target = non_xeno_target if (T && ignores_resin) // Will not target resin walls and doors if this is set to true. This is normally only set to true through a directional attack. if(istype(T, /obj/structure/mineral_door/resin)) var/obj/structure/mineral_door/resin/attacked_door = T