Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CampaignFactionManager.c
Go to the documentation of this file.
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")]
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))]
15
16 //------------------------------------------------------------------------------------------------
19 {
20 return m_iRequestCD * 1000;
21 }
22
23 //------------------------------------------------------------------------------------------------
29
30 //------------------------------------------------------------------------------------------------
36
37 //------------------------------------------------------------------------------------------------
40 {
41 return m_eRadioMsg;
42 }
43};
44
48
49class SCR_CampaignFactionManager : SCR_FactionManager
50{
51 //------------------------------------------------------------------------------------------------
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 //------------------------------------------------------------------------------------------------
74 {
75 Faction faction = GetFactionByKey(factionKey);
76 if (faction)
77 return SCR_CampaignFaction.Cast(faction);
78
79 return null;
80 }
81
82 //------------------------------------------------------------------------------------------------
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
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_CampaignFactionManagerClass SCR_FactionManagerClass GetEnemyFaction(notnull SCR_CampaignFaction alliedFaction)
SCR_CampaignFaction GetCampaignFactionByIndex(int index)
SCR_CampaignFaction GetCampaignFactionByKey(string factionKey)
int GetRankRadioRespawnCooldown(SCR_ECharacterRank rankID, int playerID)
int GetRankFastTravelCooldown(SCR_ECharacterRank rankID, int playerID)
int GetRankRequestCooldown(SCR_ECharacterRank rankID, int playerID)
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_RankContainer GetFactionRanks(int playerId)
void SCR_FactionManager(IEntitySource src, IEntity parent)
bool IsPlayable()
SCR_FieldOfViewSettings Attribute
proto external Faction GetFactionByIndex(int index)
FactionManagerClass GenericEntityClass GetFactionByKey(FactionKey factionKey)
proto external int GetFactionsList(out notnull array< Faction > outFactions)