Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MapModuleBase.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
4 class SCR_MapModuleBase : Managed
5 {
6  [Attribute("0", UIWidgets.Auto, "Disable this module, useful for example when we want to inherit config without a specific module" )]
7  protected bool m_bDisableModule;
8 
9  protected Widget m_wRootWidget;
10  protected SCR_MapEntity m_MapEntity;
11 
12  //------------------------------------------------------------------------------------------------
14  protected void OnMapOpen(MapConfiguration config)
15  {}
16 
17  //------------------------------------------------------------------------------------------------
19  protected void OnMapClose(MapConfiguration config)
20  {}
21 
22  //------------------------------------------------------------------------------------------------
24  bool IsConfigDisabled()
25  {
26  return m_bDisableModule;
27  }
28 
29  //------------------------------------------------------------------------------------------------
33  void SetActive(bool active, bool isCleanup = false)
34  {
35  if (active)
36  {
37  m_wRootWidget = m_MapEntity.GetMapConfig().RootWidgetRef; // Needs to be refreshed here
38 
39  m_MapEntity.GetOnMapOpen().Insert(OnMapOpen);
40  m_MapEntity.GetOnMapClose().Insert(OnMapClose);
41  }
42  else
43  {
44  m_MapEntity.GetOnMapOpen().Remove(OnMapOpen);
45  m_MapEntity.GetOnMapClose().Remove(OnMapClose);
46 
47  if (!isCleanup)
48  m_MapEntity.DeactivateModule(this);
49  }
50  }
51 
52  //------------------------------------------------------------------------------------------------
54  void Init()
55  {}
56 
57  //------------------------------------------------------------------------------------------------
59  void Update(float timeSlice)
60  {}
61 
62  //------------------------------------------------------------------------------------------------
64  void SCR_MapModuleBase()
65  {
66  m_MapEntity = SCR_MapEntity.GetMapInstance();
67  }
68 };
m_MapEntity
protected SCR_MapEntity m_MapEntity
Definition: SCR_MapGadgetComponent.c:14
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_MapEntity
Map entity.
Definition: SCR_MapEntity.c:20
SCR_MapModuleBase
Map module base class.
Definition: SCR_MapModuleBase.c:4
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