KF2-ZedSpawner/ZedSpawner/Classes/KFGI_Access.uc

107 lines
2.1 KiB
Ucode
Raw Normal View History

2022-05-13 07:02:34 +00:00
class KFGI_Access extends Object
2022-05-20 20:45:26 +00:00
within KFGameInfo;
2022-05-13 07:02:34 +00:00
2022-07-19 10:28:43 +00:00
public function Array<class<KFPawn_Monster> > GetAIClassList(E_LogLevel LogLevel)
2022-05-20 20:45:26 +00:00
{
local Array<class<KFPawn_Monster> > RV;
local class<KFPawn_Monster> KFPMC;
2022-07-19 10:28:43 +00:00
`Log_Trace();
2022-05-20 20:45:26 +00:00
foreach AIClassList(KFPMC)
RV.AddItem(KFPMC);
return RV;
}
2022-07-19 10:28:43 +00:00
public function Array<class<KFPawn_Monster> > GetNonSpawnAIClassList(E_LogLevel LogLevel)
2022-05-20 20:45:26 +00:00
{
local Array<class<KFPawn_Monster> > RV;
local class<KFPawn_Monster> KFPMC;
2022-07-19 10:28:43 +00:00
`Log_Trace();
2022-05-20 20:45:26 +00:00
foreach NonSpawnAIClassList(KFPMC)
RV.AddItem(KFPMC);
return RV;
}
2022-05-13 07:02:34 +00:00
2022-07-19 10:28:43 +00:00
public function Array<class<KFPawn_Monster> > GetAIBossClassList(E_LogLevel LogLevel)
2022-05-20 20:45:26 +00:00
{
local Array<class<KFPawn_Monster> > RV;
local class<KFPawn_Monster> KFPMC;
2022-07-19 10:28:43 +00:00
`Log_Trace();
2022-05-20 20:45:26 +00:00
foreach AIBossClassList(KFPMC)
RV.AddItem(KFPMC);
return RV;
}
2022-07-19 10:28:43 +00:00
public function bool IsCustomZed(class<KFPawn_Monster> KFPM, E_LogLevel LogLevel)
2022-05-13 07:02:34 +00:00
{
if (AIClassList.Find(KFPM) != INDEX_NONE) return false;
if (NonSpawnAIClassList.Find(KFPM) != INDEX_NONE) return false;
if (AIBossClassList.Find(KFPM) != INDEX_NONE) return false;
return true;
}
2022-07-19 10:28:43 +00:00
public function bool IsOriginalAI(class<KFPawn_Monster> KFPM, optional out EAIType AIType, optional E_LogLevel LogLevel = LL_None)
2022-05-20 20:45:26 +00:00
{
local int Type;
2022-07-19 10:28:43 +00:00
`Log_Trace();
2022-05-20 20:45:26 +00:00
Type = AIClassList.Find(KFPM);
if (Type != INDEX_NONE)
{
AIType = EAIType(Type);
return true;
}
return false;
}
2022-07-19 10:28:43 +00:00
public function bool IsOriginalAIBoss(class<KFPawn_Monster> KFPM, optional out EBossAIType AIType, optional E_LogLevel LogLevel = LL_None)
2022-05-20 20:45:26 +00:00
{
local int Type;
2022-07-19 10:28:43 +00:00
`Log_Trace();
2022-05-20 20:45:26 +00:00
Type = AIBossClassList.Find(KFPM);
if (Type != INDEX_NONE)
{
AIType = EBossAIType(Type);
return true;
}
return false;
}
2022-07-19 10:28:43 +00:00
public function class<KFPawn_Monster> AITypePawn(EAIType AIType, E_LogLevel LogLevel)
2022-05-20 20:45:26 +00:00
{
2022-07-19 10:28:43 +00:00
`Log_Trace();
2022-05-20 20:45:26 +00:00
if (AIType < AIClassList.Length)
return AIClassList[AIType];
else
return None;
}
2022-07-19 10:28:43 +00:00
public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType, E_LogLevel LogLevel)
2022-05-20 20:45:26 +00:00
{
2022-07-19 10:28:43 +00:00
`Log_Trace();
2022-05-20 20:45:26 +00:00
if (AIType < AIBossClassList.Length)
return AIBossClassList[AIType];
else
return None;
}
2022-05-13 07:02:34 +00:00
defaultproperties
{
}