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_CampaignFactionManager.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_RankInfoCampaign
:
SCR_RankInfo
3
{
4
[
Attribute
(
"10"
,
UIWidgets
.EditBox,
"How long does this rank has to wait between requests (sec)."
,
params
:
"0 inf 1"
)]
5
protected
int
m_iRequestCD
;
6
7
[
Attribute
(
"30"
,
UIWidgets
.EditBox,
"Respawn timer when deploying on this unit while it's carrying a radio."
,
params
:
"0 inf 1"
)]
8
protected
int
m_iRadioRespawnCooldown
;
9
10
[
Attribute
(
"300"
,
params
:
"0 inf 1"
)]
11
protected
int
m_iFastTravelCooldown
;
12
13
[
Attribute
(
"0"
,
UIWidgets
.ComboBox,
"ID of this reward."
, enums: ParamEnumArray.FromEnum(
SCR_ERadioMsg
))]
14
protected
SCR_ERadioMsg
m_eRadioMsg
;
15
16
//------------------------------------------------------------------------------------------------
18
int
GetRankRequestCooldown
()
19
{
20
return
m_iRequestCD
* 1000;
21
}
22
23
//------------------------------------------------------------------------------------------------
25
int
GetRankRadioRespawnCooldown
()
26
{
27
return
m_iRadioRespawnCooldown
;
28
}
29
30
//------------------------------------------------------------------------------------------------
32
int
GetRankFastTravelCooldown
()
33
{
34
return
m_iFastTravelCooldown
;
35
}
36
37
//------------------------------------------------------------------------------------------------
39
SCR_ERadioMsg
GetRadioMsg
()
40
{
41
return
m_eRadioMsg
;
42
}
43
};
44
45
class
SCR_CampaignFactionManagerClass
:
SCR_FactionManagerClass
46
{
47
}
48
49
class
SCR_CampaignFactionManager :
SCR_FactionManager
50
{
51
//------------------------------------------------------------------------------------------------
54
SCR_CampaignFaction
GetEnemyFaction
(notnull
SCR_CampaignFaction
alliedFaction)
55
{
56
array<Faction> factions = {};
57
GetFactionsList
(factions);
58
59
for
(
int
i = factions.Count() - 1; i >= 0; i--)
60
{
61
SCR_Faction factionCast = SCR_Faction.Cast(factions[i]);
62
63
if
(factionCast && factionCast.
IsPlayable
() && factionCast != alliedFaction)
64
return
SCR_CampaignFaction.Cast(factionCast);
65
}
66
67
return
null;
68
}
69
70
//------------------------------------------------------------------------------------------------
73
SCR_CampaignFaction
GetCampaignFactionByKey
(
string
factionKey)
74
{
75
Faction
faction =
GetFactionByKey
(factionKey);
76
if
(faction)
77
return
SCR_CampaignFaction
.Cast(faction);
78
79
return
null;
80
}
81
82
//------------------------------------------------------------------------------------------------
85
SCR_CampaignFaction
GetCampaignFactionByIndex
(
int
index
)
86
{
87
return
SCR_CampaignFaction
.Cast(
GetFactionByIndex
(
index
));
88
}
89
90
//------------------------------------------------------------------------------------------------
94
int
GetRankRequestCooldown
(SCR_ECharacterRank rankID,
int
playerID)
95
{
96
SCR_RankInfoCampaign
rank =
SCR_RankInfoCampaign
.Cast(
GetFactionRanks
(playerID).GetRankByID(rankID,
false
));
97
98
if
(!rank)
99
return
int
.MAX;
100
101
return
rank.
GetRankRequestCooldown
();
102
}
103
104
//------------------------------------------------------------------------------------------------
108
int
GetRankRadioRespawnCooldown
(SCR_ECharacterRank rankID,
int
playerID)
109
{
110
SCR_RankInfoCampaign
rank =
SCR_RankInfoCampaign
.Cast(
GetFactionRanks
(playerID).GetRankByID(rankID,
false
));
111
112
if
(!rank)
113
return
int
.MAX;
114
115
return
rank.
GetRankRadioRespawnCooldown
();
116
}
117
118
//------------------------------------------------------------------------------------------------
122
int
GetRankFastTravelCooldown
(SCR_ECharacterRank rankID,
int
playerID)
123
{
124
SCR_RankInfoCampaign
rank =
SCR_RankInfoCampaign
.Cast(
GetFactionRanks
(playerID).GetRankByID(rankID,
false
));
125
126
if
(!rank)
127
return
int
.MAX;
128
129
return
rank.
GetRankFastTravelCooldown
();
130
}
131
}
132
133
enum
SCR_ECampaignFaction
134
{
135
INDFOR
,
136
BLUFOR
,
137
OPFOR
,
138
RNGD
139
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
GetEnemyFaction
SCR_CampaignFactionManagerClass SCR_FactionManagerClass GetEnemyFaction(notnull SCR_CampaignFaction alliedFaction)
Definition
SCR_CampaignFactionManager.c:54
GetCampaignFactionByIndex
SCR_CampaignFaction GetCampaignFactionByIndex(int index)
Definition
SCR_CampaignFactionManager.c:85
SCR_ECampaignFaction
SCR_ECampaignFaction
Definition
SCR_CampaignFactionManager.c:134
BLUFOR
@ BLUFOR
Definition
SCR_CampaignFactionManager.c:136
RNGD
@ RNGD
Definition
SCR_CampaignFactionManager.c:138
OPFOR
@ OPFOR
Definition
SCR_CampaignFactionManager.c:137
INDFOR
@ INDFOR
Definition
SCR_CampaignFactionManager.c:135
GetCampaignFactionByKey
SCR_CampaignFaction GetCampaignFactionByKey(string factionKey)
Definition
SCR_CampaignFactionManager.c:73
GetRankRadioRespawnCooldown
int GetRankRadioRespawnCooldown(SCR_ECharacterRank rankID, int playerID)
Definition
SCR_CampaignFactionManager.c:108
GetRankFastTravelCooldown
int GetRankFastTravelCooldown(SCR_ECharacterRank rankID, int playerID)
Definition
SCR_CampaignFactionManager.c:122
GetRankRequestCooldown
int GetRankRequestCooldown(SCR_ECharacterRank rankID, int playerID)
Definition
SCR_CampaignFactionManager.c:94
SCR_ERadioMsg
SCR_ERadioMsg
Definition
SCR_CampaignRadioMsg.c:157
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition
SCR_DestructionSynchronizationComponent.c:17
GetFactionRanks
SCR_RankContainer GetFactionRanks(int playerId)
Definition
SCR_FactionManager.c:224
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition
SCR_FactionManager.c:498
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
Faction
Definition
Faction.c:13
SCR_CampaignFaction
Definition
SCR_CampaignFaction.c:2
SCR_CampaignFactionManagerClass
Definition
SCR_CampaignFactionManager.c:46
SCR_Faction::IsPlayable
bool IsPlayable()
Definition
SCR_Faction.c:335
SCR_FactionManagerClass
Definition
SCR_FactionManager.c:6
SCR_RankInfoCampaign
Definition
SCR_CampaignFactionManager.c:3
SCR_RankInfoCampaign::GetRankRequestCooldown
int GetRankRequestCooldown()
Definition
SCR_CampaignFactionManager.c:18
SCR_RankInfoCampaign::GetRankRadioRespawnCooldown
int GetRankRadioRespawnCooldown()
Definition
SCR_CampaignFactionManager.c:25
SCR_RankInfoCampaign::m_iFastTravelCooldown
int m_iFastTravelCooldown
Definition
SCR_CampaignFactionManager.c:11
SCR_RankInfoCampaign::m_iRadioRespawnCooldown
int m_iRadioRespawnCooldown
Definition
SCR_CampaignFactionManager.c:8
SCR_RankInfoCampaign::GetRadioMsg
SCR_ERadioMsg GetRadioMsg()
Definition
SCR_CampaignFactionManager.c:39
SCR_RankInfoCampaign::GetRankFastTravelCooldown
int GetRankFastTravelCooldown()
Definition
SCR_CampaignFactionManager.c:32
SCR_RankInfoCampaign::m_eRadioMsg
SCR_ERadioMsg m_eRadioMsg
Definition
SCR_CampaignFactionManager.c:14
SCR_RankInfoCampaign::m_iRequestCD
int m_iRequestCD
Definition
SCR_CampaignFactionManager.c:5
SCR_RankInfo
Definition
SCR_RankInfo.c:3
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
GetFactionByIndex
proto external Faction GetFactionByIndex(int index)
GetFactionByKey
FactionManagerClass GenericEntityClass GetFactionByKey(FactionKey factionKey)
GetFactionsList
proto external int GetFactionsList(out notnull array< Faction > outFactions)
scripts
Game
GameMode
FactionManager
SCR_CampaignFactionManager.c
Generated by
1.17.0