0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 04:30:45 -05:00

Cleaned up of AiHelpers logic to improve consistency

This commit is contained in:
Dev 2024-10-03 10:29:33 +01:00
parent d37c38b2b9
commit 51aa599a4e

View File

@ -1,5 +1,4 @@
using EFT; using EFT;
using EFT.UI;
namespace SPT.Custom.CustomAI namespace SPT.Custom.CustomAI
{ {
@ -19,18 +18,13 @@ namespace SPT.Custom.CustomAI
return true; 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) 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 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;
} }
public static bool BotIsSimulatedPlayerScav(WildSpawnType role, BotOwner botOwner) public static bool BotIsSimulatedPlayerScav(WildSpawnType role, BotOwner botOwner)