Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseResourceTooltipDetail.c
Go to the documentation of this file.
3{
4 [Attribute()]
6
7 [Attribute(EResourceType.SUPPLIES.ToString(), uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EResourceType))]
9
11
12 protected SCR_ResourceConsumer m_ResourceConsumer;
13 protected SCR_ResourceComponent m_ResourceComponent;
15
16 //------------------------------------------------------------------------------------------------
17 override bool NeedUpdate()
18 {
19 return true;
20 }
21
22 //------------------------------------------------------------------------------------------------
23 //~ Temp solution until replication fixed
28
29 //------------------------------------------------------------------------------------------------
30 protected SCR_ResourceConsumer GetConsumer()
31 {
32 return null;
33 }
34
35 //------------------------------------------------------------------------------------------------
37 {
38 super.UpdateDetail(entity);
39
41 return;
42
45 else
46 m_ResourceSubscriptionHandleConsumer = GetGame().GetResourceSystemSubscriptionManager().RequestSubscriptionListenerHandleGraceful(m_ResourceConsumer, Replication.FindItemId(SCR_ResourcePlayerControllerInventoryComponent.Cast(GetGame().GetPlayerController().FindComponent(SCR_ResourcePlayerControllerInventoryComponent))));
47 }
48
49 //------------------------------------------------------------------------------------------------
50 override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
51 {
52 m_wText = TextWidget.Cast(widget);
53 if (!m_wText)
54 return false;
55
56 m_ResourceComponent = SCR_ResourceComponent.FindResourceComponent(entity.GetOwner());
58 return false;
59
60 if (!IsValid())
61 {
63 return false;
64 }
65
68 {
70 return false;
71 }
72
73 m_ResourceComponent.TEMP_GetOnInteractorReplicated().Insert(TEMP_OnInteractorReplicated);
74
75 UpdateDetail(entity);
76
77 return true;
78 }
79
80 //------------------------------------------------------------------------------------------------
81 protected bool IsValid()
82 {
83 return false;
84 }
85
86 //------------------------------------------------------------------------------------------------
87 // destructor
89 {
91 return;
92
93 m_ResourceComponent.TEMP_GetOnInteractorReplicated().Remove(TEMP_OnInteractorReplicated);
95 }
96}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_HitZoneGroupNameHolder BaseContainerCustomStringTitleField("USE INHERITED VERSION ONLY!")
Main replication API.
Definition Replication.c:14
SCR_ResourceSystemSubscriptionHandleBase m_ResourceSubscriptionHandleConsumer
override void UpdateDetail(SCR_EditableEntityComponent entity)
override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
SCR_FieldOfViewSettings Attribute
proto external PlayerController GetPlayerController()