Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseSupportStationEnableEditorAttribute.c
Go to the documentation of this file.
3{
4 //------------------------------------------------------------------------------------------------
5 //~ Overwrite this
6 protected SCR_ESupportStationResupplyType GetSupportStationType()
7 {
8 Print("SCR_BaseSupportStationEnableEditorAttribute should never be used. Inherit instead!", LogLevel.ERROR);
9 return SCR_ESupportStationResupplyType.NONE;
10 }
11
12 //------------------------------------------------------------------------------------------------
13 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
14 {
16 if (!editableEntity || !editableEntity.GetOwner())
17 return null;
18
19 SCR_BaseSupportStationComponent supportStation = SCR_BaseSupportStationComponent.FindSupportStation(editableEntity.GetOwner(), GetSupportStationType());
20 if (!supportStation)
21 return null;
22
23 return SCR_BaseEditorAttributeVar.CreateBool(supportStation.IsEnabled());
24 }
25
26 //------------------------------------------------------------------------------------------------
27 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
28 {
29 if (!var)
30 return;
31
33 if (!editableEntity || !editableEntity.GetOwner())
34 return;
35
36 SCR_BaseSupportStationComponent supportStation = SCR_BaseSupportStationComponent.FindSupportStation(editableEntity.GetOwner(), GetSupportStationType());
37 if (!supportStation)
38 return;
39
40 supportStation.SetEnabled(var.GetBool());
41 }
42};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
static SCR_BaseEditorAttributeVar CreateBool(bool value)
override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14