Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ServicePointDelegateComponent.c
Go to the documentation of this file.
1 class SCR_ServicePointDelegateComponentClass : ScriptComponentClass
2 {
3 }
4 
5 // Holds UI-related info for service points so they can handle the data even after the service itself got streamed out
6 class SCR_ServicePointDelegateComponent : ScriptComponent
7 {
8  [Attribute(SCR_EServicePointType.SUPPLY_DEPOT.ToString(), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(SCR_EServicePointType))]
10 
11  [Attribute(defvalue: "0", uiwidget: UIWidgets.SearchComboBox, desc: "Type", enums: ParamEnumArray.FromEnum(EEditableEntityLabel))]
13 
14  protected SCR_MilitaryBaseComponent m_ParentBase;
15 
16  [RplProp(onRplName: "OnParentBaseIdSet")]
17  protected int m_iParentBaseId;
18 
19  //------------------------------------------------------------------------------------------------
22  {
23  return m_eType;
24  }
25 
26  //------------------------------------------------------------------------------------------------
29  {
30  return m_eBuildingLabel;
31  }
32 
33  //------------------------------------------------------------------------------------------------
35  void SetParentBaseId(RplId id)
36  {
37  m_iParentBaseId = id;
38  Replication.BumpMe();
40  }
41 
42  //------------------------------------------------------------------------------------------------
44  {
45  m_ParentBase = SCR_MilitaryBaseComponent.Cast(Replication.FindItem(m_iParentBaseId));
46 
47  if (!m_ParentBase)
48  return;
49 
50  m_ParentBase.RegisterServiceDelegate(this);
51 
52  if (RplSession.Mode() == RplMode.Dedicated)
53  return;
54 
56 
57  if (!mapDescr)
58  return;
59 
60  mapDescr.SetParentBase(m_ParentBase);
61  }
62 
63  //------------------------------------------------------------------------------------------------
64  override void OnDelete(IEntity owner)
65  {
66  super.OnDelete(owner);
67 
68  if (m_ParentBase)
69  m_ParentBase.UnregisterServiceDelegate(this);
70  }
71 }
EEditableEntityLabel
EEditableEntityLabel
Definition: EEditableEntityLabel.c:1
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
m_eBuildingLabel
protected EEditableEntityLabel m_eBuildingLabel
Definition: SCR_ServicePointDelegateComponent.c:12
RplProp
SCR_RplTestEntityClass RplProp
Used for handling entity spawning requests for SCR_CatalogEntitySpawnerComponent and inherited classe...
GetLabel
EEditableEntityLabel GetLabel()
Definition: SCR_ServicePointDelegateComponent.c:28
OnDelete
override void OnDelete(IEntity owner)
Definition: SCR_ServicePointDelegateComponent.c:64
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_ServicePointMapDescriptorComponent
void SCR_ServicePointMapDescriptorComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ServicePointMapDescriptorComponent.c:198
OnParentBaseIdSet
void OnParentBaseIdSet()
Definition: SCR_ServicePointDelegateComponent.c:43
SCR_ServicePointDelegateComponentClass
Definition: SCR_ServicePointDelegateComponent.c:1
SetParentBaseId
void SetParentBaseId(RplId id)
Definition: SCR_ServicePointDelegateComponent.c:35
Attribute
SCR_ServicePointDelegateComponentClass ScriptComponentClass Attribute(SCR_EServicePointType.SUPPLY_DEPOT.ToString(), uiwidget:UIWidgets.ComboBox, enums:ParamEnumArray.FromEnum(SCR_EServicePointType))] protected SCR_EServicePointType m_eType
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
m_iParentBaseId
protected int m_iParentBaseId
Definition: SCR_ServicePointDelegateComponent.c:17
m_eType
protected SCR_ECampaignBaseType m_eType
Definition: SCR_CampaignMilitaryBaseComponent.c:59
GetType
SCR_EServicePointType GetType()
Definition: SCR_ServicePointDelegateComponent.c:21
m_ParentBase
protected SCR_MilitaryBaseComponent m_ParentBase
Definition: SCR_ServicePointDelegateComponent.c:14
SCR_EServicePointType
SCR_EServicePointType
Definition: SCR_ServicePointComponent.c:180