Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CampaignSourceBaseComponent.c
Go to the documentation of this file.
2{
3}
4
5class SCR_CampaignSourceBaseComponent : SCR_CampaignMilitaryBaseComponent
6{
7 //------------------------------------------------------------------------------------------------
8 override protected void HandleSpawnPointFaction()
9 {
10 if (!m_SpawnPoint)
11 return;
12
13 SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
14 if (!campaign)
15 return;
16
17 super.HandleSpawnPointFaction();
18 SCR_CampaignFaction spawnFaction = SCR_CampaignFaction.Cast(m_FactionComponent.GetAffiliatedFaction());
19 if (spawnFaction && spawnFaction.CanSpawnOnSourceBases() && spawnFaction.IsPlayable())
20 {
21 m_SpawnPoint.SetSpawnPointEnabled_S(true);
22 }
23 else
24 {
27 }
28 }
29
30 //------------------------------------------------------------------------------------------------
31 override protected int GetSuppliesIncomeAmount()
32 {
33 SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
34 if (!campaign)
35 return 0;
36
39
40 return campaign.GetRegularSuppliesIncomeSource();
41 }
42
43 //------------------------------------------------------------------------------------------------
44 override protected int GetSuppliesArrivalTimer()
45 {
46 SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
47 if (!campaign)
48 return int.MAX;
49
50 if (m_iSuppliesArrivalInterval > -1)
51 return m_iSuppliesArrivalInterval;
52
53 return campaign.GetSuppliesArrivalIntervalSource();
54 }
55}
string FactionKey
Faction unique identifier type.
Definition FactionKey.c:2
FactionAffiliationComponent m_FactionComponent
SCR_SpawnPoint m_SpawnPoint
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
void HandleSpawnPointFaction()
Changes the faction which can spawn on spawn point groups owned by this base.
void SetFactionKey(string factionKey)
void SetSpawnPointEnabled_S(bool enabled)