Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_SpawnPointRequestResultInfoConfig.c
Go to the documentation of this file.
1
[
BaseContainerProps
(configRoot:
true
)]
2
class
SCR_SpawnPointRequestResultInfoConfig
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
12
void
SCR_SpawnPointRequestResultInfoConfig
()
13
{
14
if
(
SCR_Global
.
IsEditMode
())
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
//------------------------------------------------------------------------------------------------
48
SCR_BaseSpawnPointRequestResultInfo
GetFirstValidRequestResultInfo
(SCR_SpawnRequestComponent requestComponent,
SCR_ESpawnResult
response,
SCR_SpawnData
data
)
49
{
50
SCR_BaseSpawnPointRequestResultInfo
requestResultInfo;
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
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_ESpawnResult
SCR_ESpawnResult
Definition
SCR_ESpawnResult.c:9
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
SCR_BaseSpawnPointRequestResultInfo
Definition
SCR_BaseSpawnPointRequestResultInfo.c:3
SCR_BaseSpawnPointRequestResultInfo::GetUIInfo
SCR_UIInfoSpawnRequestResult GetUIInfo()
Definition
SCR_BaseSpawnPointRequestResultInfo.c:18
SCR_BaseSpawnPointRequestResultInfo::IsValidRequestResultInfo
bool IsValidRequestResultInfo(SCR_SpawnRequestComponent requestComponent, SCR_ESpawnResult response, SCR_SpawnData data)
SCR_Global
Definition
Functions.c:7
SCR_Global::IsEditMode
static bool IsEditMode()
Definition
Functions.c:1566
SCR_SpawnData
Definition
SCR_SpawnData.c:10
SCR_SpawnPointRequestResultInfoConfig::m_aSortedSpawnPointRequestResultInfos
ref SCR_SortedArray< SCR_BaseSpawnPointRequestResultInfo > m_aSortedSpawnPointRequestResultInfos
Definition
SCR_SpawnPointRequestResultInfoConfig.c:8
SCR_SpawnPointRequestResultInfoConfig::GetFirstValidRequestResultInfo
SCR_BaseSpawnPointRequestResultInfo GetFirstValidRequestResultInfo(SCR_SpawnRequestComponent requestComponent, SCR_ESpawnResult response, SCR_SpawnData data)
Definition
SCR_SpawnPointRequestResultInfoConfig.c:48
SCR_SpawnPointRequestResultInfoConfig::m_aSpawnPointRequestResultInfos
ref array< ref SCR_BaseSpawnPointRequestResultInfo > m_aSpawnPointRequestResultInfos
Definition
SCR_SpawnPointRequestResultInfoConfig.c:5
SCR_SpawnPointRequestResultInfoConfig::SCR_SpawnPointRequestResultInfoConfig
void SCR_SpawnPointRequestResultInfoConfig()
Definition
SCR_SpawnPointRequestResultInfoConfig.c:12
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
GameMode
Respawn
SpawnPointRequestResult
SCR_SpawnPointRequestResultInfoConfig.c
Generated by
1.17.0