From 51aa599a4efc718c757457cb55ab368a4fc9081f Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 3 Oct 2024 10:29:33 +0100 Subject: [PATCH] Cleaned up of `AiHelpers` logic to improve consistency --- project/SPT.Custom/CustomAI/AiHelpers.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/project/SPT.Custom/CustomAI/AiHelpers.cs b/project/SPT.Custom/CustomAI/AiHelpers.cs index 9a21a6a..5226e09 100644 --- a/project/SPT.Custom/CustomAI/AiHelpers.cs +++ b/project/SPT.Custom/CustomAI/AiHelpers.cs @@ -1,5 +1,4 @@ using EFT; -using EFT.UI; namespace SPT.Custom.CustomAI { @@ -19,18 +18,13 @@ namespace SPT.Custom.CustomAI return true; } - return botRoleToCheck == WildSpawnType.pmcBEAR || botRoleToCheck == WildSpawnType.pmcUSEC; + return botRoleToCheck is WildSpawnType.pmcBEAR or WildSpawnType.pmcUSEC; } public static bool BotIsPlayerScav(WildSpawnType role, string nickname) { - if (role == WildSpawnType.assault && nickname.Contains("(")) - { - // Check bot is pscav by looking for the opening parentheses of their nickname e.g. scavname (pmc name) - return true; - } - - return false; + // Check bot is pscav by looking for the opening parentheses of their nickname e.g. scavname (pmc name) + return role == WildSpawnType.assault && nickname.Contains("("); } public static bool BotIsSimulatedPlayerScav(WildSpawnType role, BotOwner botOwner)