Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LightFireplaceUserAction.c
Go to the documentation of this file.
1//simple script for lighting fireplces
2
4{
5 [Attribute("#AR-UserAction_LightFire", UIWidgets.EditBox, "Description for action menu (light up)", "")]
7 [Attribute("#AR-UserAction_PutOutFire", UIWidgets.EditBox, "Description for action menu (extinguish)", "")]
9
10 protected SCR_FireplaceComponent m_FireplaceComponent;
11
12 //------------------------------------------------------------------------------------------------
13 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
14 {
15 m_FireplaceComponent = SCR_FireplaceComponent.Cast(pOwnerEntity.FindComponent(SCR_FireplaceComponent));
16 }
17
18 //------------------------------------------------------------------------------------------------
19 override bool CanBeShownScript(IEntity user)
20 {
22 return false;
23
24 return true;
25 }
26
27 //------------------------------------------------------------------------------------------------
28 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
29 {
31 }
32
33 //------------------------------------------------------------------------------------------------
34 override bool GetActionNameScript(out string outName)
35 {
37 return false;
38
39 if (!m_FireplaceComponent.IsOn())
40 outName = m_sLightDescription;
41 else
43
44 return true;
45 }
46};
proto external Managed FindComponent(typename typeName)
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
override bool CanBeShownScript(IEntity user)
override bool GetActionNameScript(out string outName)
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
SCR_FieldOfViewSettings Attribute