Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_HeldItemAvailableActionContext.c
Go to the documentation of this file.
3{
6
7 //------------------------------------------------------------------------------------------------
8 override string GetUIName()
9 {
10 if (m_sItemName.IsEmpty())
11 return super.GetUIName();
12
13 return WidgetManager.Translate(m_sName, m_sItemName);
14 }
15
16 //------------------------------------------------------------------------------------------------
17 override bool IsAvailable(notnull SCR_AvailableActionsConditionData data, float timeSlice)
18 {
19 IEntity heldItem = data.GetHeldGadget();
20 if (!heldItem)
21 heldItem = data.GetCurrentWeaponEntity();
22
23 if (!heldItem)
24 return false;
25
26 if (m_LastEntity != heldItem)
27 {
28 if (m_fShowCountdown <= 0)
30
31 if (m_fHideCountdown <= 0)
33 }
34
35 if (!super.IsAvailable(data, timeSlice))
36 return false;
37
38 if (m_LastEntity == heldItem)
39 return true;
40
42 if (!itemIIC)
43 return true;
44
45 UIInfo itemUiInfo = itemIIC.GetUIInfo();
46 if (!itemUiInfo)
47 return true;
48
49 m_LastEntity = heldItem;
50 m_sItemName = itemUiInfo.GetName();
51 return true;
52 }
53}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Get all prefabs that have the spawner data
proto external Managed FindComponent(typename typeName)
override bool IsAvailable(notnull SCR_AvailableActionsConditionData data, float timeSlice)
UIInfo - allows to define UI elements.
Definition UIInfo.c:14