Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignBuildingNotMilitaryBaseHintCondition.c
Go to the documentation of this file.
1 [BaseContainerProps(), SCR_BaseContainerHintCondition()]
3 {
4  //------------------------------------------------------------------------------------------------
5  override protected void OnInitConditionEditor(SCR_EditorManagerEntity editorManager)
6  {
7  if (IsRegisteredAtMilitaryBase())
8  return;
9 
10  editorManager.GetOnOpened().Insert(Activate);
11  editorManager.GetOnClosed().Insert(Deactivate);
12  }
13 
14  //------------------------------------------------------------------------------------------------
15  override protected void OnExitConditionEditor(SCR_EditorManagerEntity editorManager)
16  {
17  if (IsRegisteredAtMilitaryBase())
18  return;
19 
20  editorManager.GetOnOpened().Remove(Activate);
21  editorManager.GetOnClosed().Remove(Deactivate);
22  }
23 
24  //------------------------------------------------------------------------------------------------
26  bool IsRegisteredAtMilitaryBase()
27  {
28  SCR_CampaignBuildingEditorComponent CampaignBuildingEditorComponent = SCR_CampaignBuildingEditorComponent.Cast(SCR_CampaignBuildingEditorComponent.GetInstance(SCR_CampaignBuildingEditorComponent));
29  if (!CampaignBuildingEditorComponent)
30  return false;
31 
32  SCR_CampaignBuildingProviderComponent providerComponent = CampaignBuildingEditorComponent.GetProviderComponent();
33  if (!providerComponent)
34  return false;
35 
36  return providerComponent.CanRegisterAtMilitaryBase();
37  }
38 }
SCR_BaseEditorHintCondition
Definition: SCR_BaseEditorHintCondition.c:2
SCR_CampaignBuildingNotMilitaryBaseHintCondition
Definition: SCR_CampaignBuildingNotMilitaryBaseHintCondition.c:2
Deactivate
protected void Deactivate()
Definition: SCR_BaseHintCondition.c:27
Activate
protected void Activate()
Definition: SCR_BaseHintCondition.c:9
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26