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_TestEditorAttribute.c
Go to the documentation of this file.
1
//#define ATTRIBUTES_DEBUG
2
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
3
class
SCR_TestEditorAttribute:
SCR_BaseEditorAttribute
4
{
5
[
Attribute
()];
6
private
bool
m_bRandomize;
7
8
[
Attribute
()];
9
private
bool
m_bIncompatible;
10
11
private
bool
m_Value;
12
13
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
14
{
15
#ifndef ATTRIBUTES_DEBUG
16
return
null;
17
#endif
18
if
(m_bIncompatible)
return
null;
19
Print
(
GetUIInfo
().
GetName
() +
": Read "
+ m_Value.ToString(),
LogLevel
.DEBUG);
20
return
SCR_BaseEditorAttributeVar
.
CreateBool
(m_Value);
21
}
22
override
SCR_BaseEditorAttributeVar
CreateDefaultVariable
()
23
{
24
return
SCR_BaseEditorAttributeVar
.
CreateBool
(
false
);
25
}
26
27
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
28
{
29
if
(var) m_Value = var.
GetInt
();
30
Print
(
GetUIInfo
().
GetName
() +
": Write "
+ m_Value.ToString(),
LogLevel
.DEBUG);
31
}
32
override
void
PreviewVariable(
bool
setPreview, SCR_AttributesManagerEditorComponent manager)
33
{
34
Print
(
GetUIInfo
().
GetName
() +
": Preview"
,
LogLevel
.DEBUG);
35
}
36
37
void
SCR_TestEditorAttribute()
38
{
39
if
(m_bRandomize) m_Value =
Math
.RandomIntInclusive(0, 1);
40
}
41
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
GetName
string GetName()
Definition
SCR_NotificationSenderComponent.c:15
Math
Definition
Math.c:13
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_BaseEditorAttribute::CreateDefaultVariable
SCR_BaseEditorAttributeVar CreateDefaultVariable()
Create a default bool (false) variable.
Definition
SCR_BaseEditorAttribute.c:417
SCR_BaseEditorAttribute::GetUIInfo
SCR_EditorAttributeUIInfo GetUIInfo()
Definition
SCR_BaseEditorAttribute.c:57
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateBool
static SCR_BaseEditorAttributeVar CreateBool(bool value)
Definition
SCR_BaseEditorAttributeVar.c:119
SCR_BaseEditorAttributeVar::GetInt
int GetInt()
Definition
SCR_BaseEditorAttributeVar.c:20
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
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
Containers
Attributes
SCR_TestEditorAttribute.c
Generated by
1.17.0