Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_BaseSupportStationEnableEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_BaseSupportStationEnableEditorAttribute
:
SCR_BaseEditorAttribute
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
{
15
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
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
32
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
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
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition
SCR_BaseEditorAttribute.c:4
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateBool
static SCR_BaseEditorAttributeVar CreateBool(bool value)
Definition
SCR_BaseEditorAttributeVar.c:119
SCR_BaseEditorAttributeVar::GetBool
bool GetBool()
Definition
SCR_BaseEditorAttributeVar.c:56
SCR_BaseSupportStationEnableEditorAttribute
Definition
SCR_BaseSupportStationEnableEditorAttribute.c:3
SCR_BaseSupportStationEnableEditorAttribute::GetSupportStationType
SCR_ESupportStationResupplyType GetSupportStationType()
Definition
SCR_BaseSupportStationEnableEditorAttribute.c:6
SCR_BaseSupportStationEnableEditorAttribute::ReadVariable
override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
Definition
SCR_BaseSupportStationEnableEditorAttribute.c:13
SCR_BaseSupportStationEnableEditorAttribute::WriteVariable
override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
Definition
SCR_BaseSupportStationEnableEditorAttribute.c:27
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
scripts
Game
Editor
Containers
Attributes
SCR_BaseSupportStationEnableEditorAttribute.c
Generated by
1.17.0