Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SpawnPointRequestResultInfoConfig.c
Go to the documentation of this file.
1[BaseContainerProps(configRoot: true)]
3{
4 [Attribute(desc: "When a spawn point is disabled the system will go over each disable reason in order and will return the first valid disable reason")]
5 protected ref array<ref SCR_BaseSpawnPointRequestResultInfo> m_aSpawnPointRequestResultInfos;
6
7 //~ Holds a sorted list that orders the spawn point not allowed reason depending on the given order
8 protected ref SCR_SortedArray<SCR_BaseSpawnPointRequestResultInfo> m_aSortedSpawnPointRequestResultInfos = new SCR_SortedArray<SCR_BaseSpawnPointRequestResultInfo>();
9
10 //------------------------------------------------------------------------------------------------
11 // constructor
13 {
15 return;
16
17 int count = m_aSpawnPointRequestResultInfos.Count();
18
19 SCR_BaseSpawnPointRequestResultInfo foundRequestResult;
20
21 //~ Init ordered list
22 for (int i = count - 1; i >= 0; i--)
23 {
24 foundRequestResult = m_aSpawnPointRequestResultInfos[i];
25
26 if (!foundRequestResult || !foundRequestResult.m_bEnabled)
27 {
28 m_aSpawnPointRequestResultInfos.RemoveOrdered(i);
29 continue;
30 }
31
32 if (!foundRequestResult.GetUIInfo())
33 {
34 m_aSpawnPointRequestResultInfos.RemoveOrdered(i);
35 Print("'SCR_SpawnPointDisabledReasonConfig' init, entry: '" + i + "' has no UIInfo assigned and thus is removed.", LogLevel.ERROR);
36 continue;
37 }
38
39 m_aSortedSpawnPointRequestResultInfos.Insert(foundRequestResult.m_iOrder, foundRequestResult);
40 }
41 }
42
43 //------------------------------------------------------------------------------------------------
49 {
51
52 int count = m_aSortedSpawnPointRequestResultInfos.Count();
53 for(int i = 0; i < count; ++i)
54 {
55 requestResultInfo = m_aSortedSpawnPointRequestResultInfos.Get(i);
56 if (!requestResultInfo || !requestResultInfo.IsValidRequestResultInfo(requestComponent, response, data))
57 continue;
58
59 //~ Is the first valid not allowed reason
60 return requestResultInfo;
61 }
62
63 return null;
64 }
65}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_ESpawnResult
Get all prefabs that have the spawner data
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
bool IsValidRequestResultInfo(SCR_SpawnRequestComponent requestComponent, SCR_ESpawnResult response, SCR_SpawnData data)
static bool IsEditMode()
Definition Functions.c:1566
ref SCR_SortedArray< SCR_BaseSpawnPointRequestResultInfo > m_aSortedSpawnPointRequestResultInfos
SCR_BaseSpawnPointRequestResultInfo GetFirstValidRequestResultInfo(SCR_SpawnRequestComponent requestComponent, SCR_ESpawnResult response, SCR_SpawnData data)
ref array< ref SCR_BaseSpawnPointRequestResultInfo > m_aSpawnPointRequestResultInfos
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute