Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignBuildingBudgetEditorComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Editor", description: "", icon: "WBData/ComponentEditorProps/componentEditor.png")]
3 {
4 }
5 
6 class SCR_CampaignBuildingBudgetEditorComponent : SCR_BudgetEditorComponent
7 {
8  protected SCR_ResourceComponent m_ResourceComponent;
9  protected SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent;
12 
13  protected static const int UNLIMITED_PROP_BUDGET = -1;
14 
15  //------------------------------------------------------------------------------------------------
16  protected override void EOnEditorActivateServer()
17  {
19  m_CampaignBuildingComponent = SCR_CampaignBuildingEditorComponent.Cast(FindEditorComponent(SCR_CampaignBuildingEditorComponent, true, true));
20 
21  SCR_FactionManager factionManager = SCR_FactionManager.Cast(GetGame().GetFactionManager());
22  if (!factionManager)
23  return;
24 
25  array<ref SCR_RankID> ranks = factionManager.GetAllAvailableRanks();
26  if (!ranks)
27  return;
28 
29  ranks.Sort();
30 
31  SCR_RankID highestRankID = ranks[ranks.Count() - 1];
32  if (!highestRankID)
33  return;
34 
35  m_eHighestRank = highestRankID.GetRankID();
36 
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  protected override void EOnEditorActivate()
42  {
43  m_CampaignBuildingComponent = SCR_CampaignBuildingEditorComponent.Cast(FindEditorComponent(SCR_CampaignBuildingEditorComponent, true, true));
45  return;
46 
48  m_CampaignBuildingComponent.GetOnProviderChanged().Insert(OnTargetBaseChanged);
49 
50  SCR_BaseGameMode baseGameMode = SCR_BaseGameMode.Cast(GetGame().GetGameMode());
51  if (baseGameMode)
52  baseGameMode.GetOnResourceTypeEnabledChanged().Insert(OnResourceTypeEnabledChanged);
53  }
54 
55  //------------------------------------------------------------------------------------------------
56  protected override void EOnEditorDeactivate()
57  {
59  m_CampaignBuildingComponent.GetOnProviderChanged().Remove(OnTargetBaseChanged);
60 
61  SCR_BaseGameMode baseGameMode = SCR_BaseGameMode.Cast(GetGame().GetGameMode());
62  if (baseGameMode)
63  baseGameMode.GetOnResourceTypeEnabledChanged().Remove(OnResourceTypeEnabledChanged);
64  }
65 
66  //------------------------------------------------------------------------------------------------
67  protected void OnResourceTypeEnabledChanged(array<EResourceType> disabledResourceTypes)
68  {
70  }
71 
72  //------------------------------------------------------------------------------------------------
73  [Obsolete("SCR_CampaignBuildingBudgetEditorComponent.RefreshResourcesComponent() should be used instead.")]
74  protected bool RefreshSuppliesComponent()
75  {
77  return false;
78 
79  SCR_CampaignSuppliesComponent providerSuppliesComponent;
80  if (m_CampaignBuildingComponent.GetProviderSuppliesComponent(providerSuppliesComponent))
81  {
83  {
84  if (m_SuppliesComponent != providerSuppliesComponent)
85  {
86  m_SuppliesComponent.m_OnSuppliesChanged.Remove(OnBaseSuppliesChanged);
87  }
88  }
89  else
90  {
91  providerSuppliesComponent.m_OnSuppliesChanged.Insert(OnBaseSuppliesChanged);
92  }
93  }
94 
95  m_SuppliesComponent = providerSuppliesComponent;
96 
97  return m_SuppliesComponent != null;
98  }
99 
100  //------------------------------------------------------------------------------------------------
101  protected void OnBaseResourcesChanged(SCR_ResourceConsumer consumer, int previousValue)
102  {
104  }
105 
106  //------------------------------------------------------------------------------------------------
107  [Obsolete("SCR_CampaignBuildingBudgetEditorComponent.OnBaseResourcesChanged() should be used instead.")]
108  protected void OnBaseSuppliesChanged(int supplies)
109  {
111  }
112 
113  //------------------------------------------------------------------------------------------------
114  protected void OnTargetBaseChanged(IEntity targetEntity)
115  {
117  }
118 
119  //------------------------------------------------------------------------------------------------
120  override bool GetMaxBudgetValue(EEditableEntityBudget type, out int maxBudget)
121  {
122  switch (type)
123  {
124  case EEditableEntityBudget.CAMPAIGN:
125  if (!m_ResourceComponent)
126  return true;
127 
128  SCR_ResourceConsumer consumer = m_ResourceComponent.GetConsumer(EResourceGeneratorID.DEFAULT, EResourceType.SUPPLIES);
129  if (consumer)
130  maxBudget = consumer.GetAggregatedMaxResourceValue();
131 
132  return true;
133 
134  case EEditableEntityBudget.RANK_CORPORAL:
135  maxBudget = m_eHighestRank;
136  return true;
137 
138  case EEditableEntityBudget.RANK_SERGEANT:
139  maxBudget = m_eHighestRank;
140  return true;
141 
142  case EEditableEntityBudget.PROPS:
143  maxBudget = GetProviderMaxValue(type);
144  return true;
145 
146  case EEditableEntityBudget.COOLDOWN:
147  if (HasCooldownTime())
148  maxBudget = 0;
149  else
150  maxBudget = 1;
151 
152  return true;
153 
154  case EEditableEntityBudget.AI:
155  maxBudget = GetProviderMaxValue(type);
156  return true;
157 
158  case EEditableEntityBudget.AI_SERVER:
159  AIWorld aiWorld = GetGame().GetAIWorld();
160  if (!aiWorld)
161  return true;
162 
163  maxBudget = aiWorld.GetLimitOfActiveAIs();
164  return true;
165  }
166 
167  return true;
168  }
169 
170  //------------------------------------------------------------------------------------------------
172  {
173  SCR_CampaignBuildingProviderComponent providerComponent = m_CampaignBuildingComponent.GetProviderComponent();
174  if (!providerComponent)
175  return -1;
176 
177  switch (type)
178  {
179  case EEditableEntityBudget.CAMPAIGN:
180  if (!m_ResourceComponent || !m_ResourceComponent.IsResourceTypeEnabled())
181  return -1;
182 
183  SCR_ResourceConsumer consumer = m_ResourceComponent.GetConsumer(EResourceGeneratorID.DEFAULT, EResourceType.SUPPLIES);
184  if (!consumer)
185  return -1;
186 
187  return consumer.GetAggregatedMaxResourceValue() - consumer.GetAggregatedResourceValue();
188 
189  case EEditableEntityBudget.RANK_CORPORAL:
190  return m_eHighestRank - GetUserRank();
191 
192  case EEditableEntityBudget.RANK_SERGEANT:
193  return m_eHighestRank - GetUserRank();
194 
195  case EEditableEntityBudget.PROPS:
196  return providerComponent.GetCurrentPropValue();
197 
198  case EEditableEntityBudget.COOLDOWN:
199  return HasCooldownTime();
200 
201  case EEditableEntityBudget.AI:
202  return providerComponent.GetCurrentAIValue();
203 
204  case EEditableEntityBudget.AI_SERVER:
205  AIWorld aiWorld = GetGame().GetAIWorld();
206  if (!aiWorld)
207  return -1;
208 
209  return aiWorld.GetCurrentNumOfActiveAIs();
210  }
211 
212  return -1;
213  }
214 
215  //------------------------------------------------------------------------------------------------
218  {
220  return UNLIMITED_PROP_BUDGET;
221 
222  SCR_CampaignBuildingProviderComponent providerComponent = m_CampaignBuildingComponent.GetProviderComponent();
223  if (!providerComponent)
224  return UNLIMITED_PROP_BUDGET;
225 
226  return providerComponent.GetMaxBudgetValue(budget);
227  }
228 
229  //------------------------------------------------------------------------------------------------
232  {
234  return false;
235 
236  SCR_CampaignBuildingProviderComponent providerComponent = m_CampaignBuildingComponent.GetProviderComponent();
237  if (!providerComponent)
238  return false;
239 
240  if (!m_Manager)
241  return false;
242 
243  return providerComponent.HasCooldownSet(m_Manager.GetPlayerID());
244  }
245 
246  //------------------------------------------------------------------------------------------------
248  {
250  return 0;
251 
252  SCR_CampaignBuildingProviderComponent providerComponent = m_CampaignBuildingComponent.GetProviderComponent();
253  if (!providerComponent)
254  return 0;
255 
256  return providerComponent.GetCooldownValue(m_Manager.GetPlayerID());
257  }
258 
259  //------------------------------------------------------------------------------------------------
262  {
263  int playerId = SCR_PlayerController.GetLocalPlayerId();
264 
265  PlayerController playerController = GetGame().GetPlayerManager().GetPlayerController(playerId);
266  if (!playerController)
267  return SCR_ECharacterRank.INVALID;
268 
269  return SCR_CharacterRankComponent.GetCharacterRank(playerController.GetControlledEntity());
270  }
271 
272  //------------------------------------------------------------------------------------------------
273  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
274  protected override void OnEntityCoreBudgetUpdatedOwner(EEditableEntityBudget entityBudget, int budgetValue, int budgetChange, bool sendBudgetMaxEvent, bool budgetMaxReached)
275  {
276  int maxBudget;
277  GetMaxBudgetValue(EEditableEntityBudget.PROPS, maxBudget);
278  Event_OnBudgetUpdated.Invoke(EEditableEntityBudget.PROPS, GetCurrentBudgetValue(EEditableEntityBudget.PROPS), budgetValue, maxBudget);
279 
280  if (entityBudget != EEditableEntityBudget.CAMPAIGN)
281  return;
282 
283  if (!m_ResourceComponent)
284  return;
285 
286  SCR_ResourceConsumer consumer = m_ResourceComponent.GetConsumer(EResourceGeneratorID.DEFAULT, EResourceType.SUPPLIES);
287 
288  if (!consumer)
289  return;
290 
291  if (consumer.GetAggregatedResourceValue() - budgetChange <= 0)
292  Event_OnBudgetMaxReached.Invoke(entityBudget, true);
293  }
294 
295  //------------------------------------------------------------------------------------------------
296  protected bool RefreshResourcesComponent()
297  {
298  return m_CampaignBuildingComponent && m_CampaignBuildingComponent.GetProviderResourceComponent(m_ResourceComponent);
299  }
300 
301  //------------------------------------------------------------------------------------------------
302  protected override void RefreshBudgetSettings()
303  {
305  return;
306 
307  SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(m_CampaignBuildingComponent.GetProviderComponent());
308  if (!providerComponent)
309  return;
310 
311  array<ref EEditableEntityBudget> budgetsType = {};
312  providerComponent.GetBudgetTypesToEvaluate(budgetsType);
313 
315 
316  for (int i = budgetsType.Count() - 1; i >= 0; i--)
317  {
318  EEditableEntityBudget budgetType = budgetsType[i];
319 
320  int maxBudgetValue;
321 
322  if (m_EntityCore.GetBudget(budgetType, budget) && GetMaxBudgetValue(budgetType, maxBudgetValue))
323  m_BudgetSettingsMap.Insert(budgetType, budget);
324  }
325 
327  }
328 
329  //------------------------------------------------------------------------------------------------
330  override bool CanPlaceEntitySource(IEntityComponentSource editableEntitySource, out EEditableEntityBudget blockingBudget, bool isPlacingPlayer = false, bool updatePreview = true, bool showNotification = true)
331  {
332  bool canPlace = true;
333  if (IsBudgetCapEnabled() && editableEntitySource)
334  {
335  array<ref SCR_EntityBudgetValue> budgetCosts = {};
336  if (!GetEntitySourcePreviewBudgetCosts(editableEntitySource, budgetCosts))
337  canPlace = false;
338 
339  // Clear budget cost when placing as player
340  if (isPlacingPlayer)
341  budgetCosts.Clear();
342 
343  if (updatePreview)
344  UpdatePreviewCost(budgetCosts);
345 
346  canPlace = canPlace && CanPlace(budgetCosts, blockingBudget);
347  }
348  return CanPlaceResultCampaignBuilding(canPlace, showNotification, blockingBudget);
349  }
350 
351  //------------------------------------------------------------------------------------------------
352  protected bool CanPlaceResultCampaignBuilding(bool canPlace, bool showNotification, EEditableEntityBudget blockingBudget)
353  {
354  if (showNotification)
355  {
356  Rpc(CanPlaceOwnerCampaignBuilding, canPlace, blockingBudget);
357  }
358  return canPlace;
359  }
360 
361  //------------------------------------------------------------------------------------------------
365  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
366  void CanPlaceOwnerCampaignBuilding(bool canPlace, EEditableEntityBudget blockingBudget)
367  {
368  if (!canPlace)
369  {
370  switch (blockingBudget)
371  {
372  case EEditableEntityBudget.CAMPAIGN:
373  {
374  GetManager().SendNotification(ENotification.EDITOR_PLACING_NO_ENOUGH_SUPPLIES);
375  break;
376  }
377 
378  case EEditableEntityBudget.RANK_CORPORAL:
379  {
380  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_PLACING_RANK_CORPORAL_NEEDED, SCR_PlayerController.GetLocalPlayerId(), SCR_ECharacterRank.CORPORAL);
381  break;
382  }
383 
384  case EEditableEntityBudget.RANK_SERGEANT:
385  {
386  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_PLACING_RANK_SERGEANT_NEEDED, SCR_PlayerController.GetLocalPlayerId(), SCR_ECharacterRank.SERGEANT);
387  break;
388  }
389 
390  case EEditableEntityBudget.PROPS:
391  {
392  GetManager().SendNotification(ENotification.EDITOR_PLACING_NO_MORE_COMPOSITIONS_AT_BASE);
393  break;
394  }
395 
396  case EEditableEntityBudget.COOLDOWN:
397  {
398  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_COOLDOWN, GetCooldownTime());
399  break;
400  }
401 
402  case EEditableEntityBudget.AI:
403  {
404  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_AILIMIT);
405  break;
406  }
407 
408  case EEditableEntityBudget.AI_SERVER:
409  {
410  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_PLACING_BUDGET_MAX);
411  break;
412  }
413  }
414  }
415  }
416 
417  //------------------------------------------------------------------------------------------------
419  {
420  foreach (SCR_EntityBudgetValue maxBudget : m_MaxBudgets)
421  {
422  if (maxBudget.GetBudgetType() != type)
423  continue;
424 
425  int newMaxBudget;
426 
427  switch (type)
428  {
429  case EEditableEntityBudget.CAMPAIGN:
430  {
431  if (!m_ResourceComponent)
432  break;
433 
434  SCR_ResourceConsumer consumer = m_ResourceComponent.GetConsumer(EResourceGeneratorID.DEFAULT, EResourceType.SUPPLIES);
435  if (!consumer)
436  break;
437 
438  newMaxBudget = consumer.GetAggregatedResourceValue();
439  break;
440  }
441 
442  case EEditableEntityBudget.RANK_CORPORAL:
443  {
444  newMaxBudget = GetUserRank();
445  break;
446  }
447 
448  case EEditableEntityBudget.RANK_SERGEANT:
449  {
450  newMaxBudget = GetUserRank();
451  break;
452  }
453 
454  case EEditableEntityBudget.PROPS:
455  {
456  newMaxBudget = GetProviderMaxValue(EEditableEntityBudget.PROPS);
457  break;
458  }
459 
460  case EEditableEntityBudget.COOLDOWN:
461  {
462  newMaxBudget = HasCooldownTime();
463  break;
464  }
465 
466  case EEditableEntityBudget.AI:
467  {
468  newMaxBudget = GetProviderMaxValue(EEditableEntityBudget.AI);
469  break;
470  }
471 
472  case EEditableEntityBudget.AI_SERVER:
473  {
474  AIWorld aiWorld = GetGame().GetAIWorld();
475  if (!aiWorld)
476  break;
477 
478  newMaxBudget = aiWorld.GetLimitOfActiveAIs();
479  break;
480  }
481  }
482 
483  maxBudget.SetBudgetValue(newMaxBudget);
484 
485  budget = maxBudget;
486 
487  return true;
488  }
489 
490  return false;
491  }
492 
493  //------------------------------------------------------------------------------------------------
494  override bool CanPlace(notnull array<ref SCR_EntityBudgetValue> budgetCosts, out EEditableEntityBudget blockingBudget)
495  {
496  if (!IsBudgetCapEnabled() || budgetCosts.IsEmpty())
497  return true;
498 
499  array<EEditableEntityBudget> blockingBudgets = {};
500  int initialPriorityOrder = -1;
501  EEditableEntityBudget blockingBudgetCandidate = -1;
502 
503  foreach (SCR_EntityBudgetValue budgetCost : budgetCosts)
504  {
505  if (!CanPlace(budgetCost, blockingBudget))
506  {
507  if (IsBudgetCapEnabled(blockingBudget))
508  {
509  SCR_EditableEntityCoreBudgetSetting budgetSettings = GetBudgetSetting(blockingBudget);
510  if (!budgetSettings)
511  continue;
512 
513  // promote budget to candidate if it's non priority budget, only when there wasn't set any priority budget yet.
514  SCR_BudgetUIInfo budgetUIInfo = SCR_BudgetUIInfo.Cast(budgetSettings.GetInfo());
515  if (!budgetUIInfo && initialPriorityOrder == -1)
516  {
517  blockingBudgetCandidate = blockingBudget;
518  continue;
519  }
520 
521  if (!budgetUIInfo)
522  continue;
523 
524  // this budget has higher priority then any other before, promote it as a priority budget.
525  if (initialPriorityOrder < budgetUIInfo.GetPriorityOrder())
526  {
527  blockingBudgetCandidate = blockingBudget;
528  initialPriorityOrder = budgetUIInfo.GetPriorityOrder();
529  }
530  }
531  };
532  }
533 
534  if (blockingBudgetCandidate == -1)
535  return true;
536 
537  blockingBudget = blockingBudgetCandidate;
538 
539  return false;
540  }
541 
542  //------------------------------------------------------------------------------------------------
547  {
549  return true;
550 
551  SCR_CampaignBuildingProviderComponent providerComponent = m_CampaignBuildingComponent.GetProviderComponent();
552  if (!providerComponent)
553  return true;
554 
555  return providerComponent.IsBudgetToEvaluate(blockingBudget);
556  }
557 
558  //------------------------------------------------------------------------------------------------
559  override bool GetEntityPreviewBudgetCosts(SCR_EditableEntityUIInfo entityUIInfo, out notnull array<ref SCR_EntityBudgetValue> budgetCosts)
560  {
561  if (!entityUIInfo)
562  return false;
563 
564  SCR_EditableGroupUIInfo groupUIInfo = SCR_EditableGroupUIInfo.Cast(entityUIInfo);
565  if (groupUIInfo)
566  {
567  entityUIInfo.GetEntityAndChildrenBudgetCost(budgetCosts);
568 
569  if (!entityUIInfo.GetEntityBudgetCost(budgetCosts))
570  GetEntityTypeBudgetCost(entityUIInfo.GetEntityType(), budgetCosts);
571  }
572  else
573  {
574  array<ref SCR_EntityBudgetValue> entityChildrenBudgetCosts = {};
575 
576  if (!entityUIInfo.GetEntityBudgetCost(budgetCosts))
577  GetEntityTypeBudgetCost(entityUIInfo.GetEntityType(), budgetCosts);
578 
579  entityUIInfo.GetEntityChildrenBudgetCost(entityChildrenBudgetCosts);
580 
581  SCR_EntityBudgetValue.MergeBudgetCosts(budgetCosts, entityChildrenBudgetCosts);
582  }
583 
584  FilterAvailableBudgets(budgetCosts);
585 
586  return true;
587  }
588 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SCR_BudgetEditorComponentClass
Definition: SCR_BudgetEditorComponent.c:2
SCR_BaseGameMode
Definition: SCR_BaseGameMode.c:137
GetUserRank
SCR_ECharacterRank GetUserRank()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:261
OnResourceTypeEnabledChanged
protected void OnResourceTypeEnabledChanged(array< EResourceType > disabledResourceTypes)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:67
SCR_EditableEntityCore
Definition: SCR_EditableEntityCore.c:10
RefreshBudgetSettings
protected override void RefreshBudgetSettings()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:302
SCR_PlayerController
Definition: SCR_PlayerController.c:31
SCR_EditableEntityCoreBudgetSetting
Definition: SCR_EditableEntityCoreBudgetSetting.c:2
HasCooldownTime
bool HasCooldownTime()
Return current cooldown timer state.
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:231
GetMaxBudget
override bool GetMaxBudget(EEditableEntityBudget type, out SCR_EntityBudgetValue budget)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:418
GetMaxBudgetValue
override bool GetMaxBudgetValue(EEditableEntityBudget type, out int maxBudget)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:120
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
CanPlace
override bool CanPlace(notnull array< ref SCR_EntityBudgetValue > budgetCosts, out EEditableEntityBudget blockingBudget)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:494
m_eHighestRank
protected SCR_ECharacterRank m_eHighestRank
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:11
OnEntityCoreBudgetUpdatedOwner
protected override void OnEntityCoreBudgetUpdatedOwner(EEditableEntityBudget entityBudget, int budgetValue, int budgetChange, bool sendBudgetMaxEvent, bool budgetMaxReached)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:274
SCR_ECharacterRank
SCR_ECharacterRank
Definition: SCR_CharacterRankComponent.c:305
SCR_EditableEntityUIInfo
Definition: SCR_EditableEntityUIInfo.c:2
IsBudgetCapEnabled
bool IsBudgetCapEnabled(EEditableEntityBudget blockingBudget)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:546
m_SuppliesComponent
protected SCR_CampaignSuppliesComponent m_SuppliesComponent
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:10
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
GetEntityPreviewBudgetCosts
override bool GetEntityPreviewBudgetCosts(SCR_EditableEntityUIInfo entityUIInfo, out notnull array< ref SCR_EntityBudgetValue > budgetCosts)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:559
m_ResourceComponent
SCR_CampaignBuildingBudgetEditorComponentClass m_ResourceComponent
SCR_CampaignBuildingBudgetEditorComponentClass
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:2
EEditableEntityBudget
EEditableEntityBudget
Definition: EEditableEntityBudget.c:1
SCR_BudgetEditorComponent
Definition: SCR_BudgetEditorComponent.c:18
OnBaseResourcesChanged
protected void OnBaseResourcesChanged(SCR_ResourceConsumer consumer, int previousValue)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:101
SCR_CharacterRankComponent
void SCR_CharacterRankComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_CharacterRankComponent.c:209
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition: SCR_BaseGameModeComponent.c:15
CanPlaceEntitySource
override bool CanPlaceEntitySource(IEntityComponentSource editableEntitySource, out EEditableEntityBudget blockingBudget, bool isPlacingPlayer=false, bool updatePreview=true, bool showNotification=true)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:330
SCR_CampaignSuppliesComponent
void SCR_CampaignSuppliesComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_CampaignSuppliesComponent.c:327
GetCooldownTime
int GetCooldownTime()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:247
ENotification
ENotification
Definition: ENotification.c:4
CanPlaceOwnerCampaignBuilding
void CanPlaceOwnerCampaignBuilding(bool canPlace, EEditableEntityBudget blockingBudget)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:366
m_CampaignBuildingComponent
protected SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:9
m_EntityCore
protected SCR_EditableEntityCore m_EntityCore
Definition: SCR_CampaignBuildingManagerComponent.c:40
EOnEditorActivateServer
protected override void EOnEditorActivateServer()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:16
CanPlaceResultCampaignBuilding
protected bool CanPlaceResultCampaignBuilding(bool canPlace, bool showNotification, EEditableEntityBudget blockingBudget)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:352
EResourceType
EResourceType
Definition: SCR_ResourceContainer.c:1
SCR_EntityBudgetValue
Definition: SCR_EntityBudgetValue.c:2
EOnEditorDeactivate
protected override void EOnEditorDeactivate()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:56
RefreshSuppliesComponent
protected bool RefreshSuppliesComponent()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:74
OnTargetBaseChanged
protected void OnTargetBaseChanged(IEntity targetEntity)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:114
RefreshResourcesComponent
protected bool RefreshResourcesComponent()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:296
GetCurrentBudgetValue
override int GetCurrentBudgetValue(EEditableEntityBudget type)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:171
SCR_BudgetUIInfo
Definition: SCR_BudgetUIInfo.c:2
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
EOnEditorActivate
protected override void EOnEditorActivate()
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:41
SCR_EditableGroupUIInfo
Definition: SCR_EditableGroupUIInfo.c:2
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition: SCR_FactionManager.c:461
OnBaseSuppliesChanged
protected void OnBaseSuppliesChanged(int supplies)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:108
Obsolete
RespawnSystemComponentClass GameComponentClass Obsolete()] proto external GenericEntity DoSpawn(string prefab
RespawnSystemComponent should be attached to a gamemode to handle player spawning and respawning.
GetProviderMaxValue
int GetProviderMaxValue(EEditableEntityBudget budget)
Definition: SCR_CampaignBuildingBudgetEditorComponent.c:217
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
EResourceGeneratorID
EResourceGeneratorID
Definition: SCR_ResourceGenerator.c:1