Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ChangeBallisticPageAction.c
Go to the documentation of this file.
2{
3 [Attribute("1", UIWidgets.CheckBox, "Value that determines if this action will load next (1) or previous (-1) page", "-1 1 2")]
4 protected int m_iStep;
5
6 protected SCR_BallisticTableComponent m_BallisticTableComp;
7
8 //------------------------------------------------------------------------------------------------
9 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
10 {
11 m_BallisticTableComp = SCR_BallisticTableComponent.Cast(pOwnerEntity.FindComponent(SCR_BallisticTableComponent));
12 }
13
14 //------------------------------------------------------------------------------------------------
15 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
16 {
17 m_BallisticTableComp.ChangePage(m_iStep);
18 }
19
20 //------------------------------------------------------------------------------------------------
21 override bool CanBeShownScript(IEntity user)
22 {
24 return false;
25
26 if (m_BallisticTableComp.GetNumberOfPages() <= 1)
27 return false;
28
29 if (m_BallisticTableComp.GetMode() != EGadgetMode.IN_HAND)
30 return false;
31
32 return true;
33 }
34
35 //------------------------------------------------------------------------------------------------
36 override bool CanBroadcastScript()
37 {
38 return false;
39 }
40}
proto external Managed FindComponent(typename typeName)
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
SCR_BallisticTableComponent m_BallisticTableComp
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
override bool CanBeShownScript(IEntity user)
SCR_FieldOfViewSettings Attribute