Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ServicePointDelegateComponent.c
Go to the documentation of this file.
4
5// Holds UI-related info for service points so they can handle the data even after the service itself got streamed out
6class 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 //------------------------------------------------------------------------------------------------
32
33 //------------------------------------------------------------------------------------------------
36 {
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}
AddonBuildInfoTool id
EEditableEntityLabel
RplMode
Mode of replication.
Definition RplMode.c:9
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
override EGadgetType GetType()
SCR_ECampaignBaseType m_eType
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
EEditableEntityLabel m_eBuildingLabel
EEditableEntityLabel GetLabel()
void SetParentBaseId(RplId id)
SCR_MilitaryBaseComponent m_ParentBase
void SCR_ServicePointMapDescriptorComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
proto external GenericComponent FindComponent(typename typeName)
Main replication API.
Definition Replication.c:14
Replication item identifier.
Definition RplId.c:14
proto external GenericEntity GetOwner()
Get owner entity.
SCR_FieldOfViewSettings Attribute