Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GroupNameConfig.c
Go to the documentation of this file.
1
[
BaseContainerProps
(configRoot:
true
)]
2
class
SCR_GroupNameConfig
3
{
4
[
Attribute
()]
5
protected
ref array<ref SCR_GroupNameConfigEntry> m_aEntries;
6
12
LocalizedString
GetGroupName(
SCR_MilitarySymbol
symbol)
13
{
14
foreach
(
SCR_GroupNameConfigEntry
entry:
m_aEntries
)
15
{
16
if
(entry.IsCompatible(symbol))
17
return
entry.GetName();
18
}
19
return
LocalizedString
.Empty;
20
}
26
LocalizedString
GetGroupName(
int
id
)
27
{
28
if
(
id
>= 0)
29
return
m_aEntries
[id].GetName();
30
else
31
return
string
.Empty;
32
}
38
int
GetGroupNameID(
SCR_MilitarySymbol
symbol)
39
{
40
foreach
(
int
id
,
SCR_GroupNameConfigEntry
entry:
m_aEntries
)
41
{
42
if
(entry.IsCompatible(symbol))
43
return
id;
44
}
45
return
-1;
46
}
47
};
48
[
BaseContainerProps
(),
SCR_BaseContainerGroupNameConfigEntry
()]
49
class
SCR_GroupNameConfigEntry
50
{
51
[
Attribute
(uiwidget: UIWidgets.LocaleEditBox)]
52
protected
LocalizedString
m_sName;
53
54
[
Attribute
(
"1"
, uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(
EMilitarySymbolDimension
))]
55
protected
EMilitarySymbolDimension
m_Dimension;
56
57
[
Attribute
(
"0"
, uiwidget: UIWidgets.Flags, enums: ParamEnumArray.FromEnum(
EMilitarySymbolIcon
))]
58
protected
EMilitarySymbolIcon
m_Icons;
59
60
[
Attribute
(
"0"
, uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(
EMilitarySymbolAmplifier
))]
61
protected
EMilitarySymbolAmplifier
m_Amplifier;
62
63
string
GetName()
64
{
65
return
m_sName
;
66
}
67
bool
IsCompatible(
SCR_MilitarySymbol
symbol)
68
{
69
return
(symbol.GetDimension() == m_Dimension || m_Dimension ==
EMilitarySymbolDimension
.NONE)
70
&& (symbol.GetIcons() == m_Icons || m_Icons == 0)
71
&& (symbol.GetAmplifier() == m_Amplifier || m_Amplifier ==
EMilitarySymbolAmplifier
.NONE);
72
}
73
};
74
75
class
SCR_BaseContainerGroupNameConfigEntry
: BaseContainerCustomTitle
76
{
77
override
bool
_WB_GetCustomTitle(BaseContainer source, out
string
title)
78
{
79
EMilitarySymbolDimension
dimension;
80
source.Get(
"m_Dimension"
, dimension);
81
82
EMilitarySymbolIcon
icons;
83
source.Get(
"m_Icons"
, icons);
84
85
EMilitarySymbolAmplifier
amplifier;
86
source.Get(
"m_Amplifier"
, amplifier);
87
88
string
dimensionName =
typename
.EnumToString(
EMilitarySymbolDimension
, dimension);
89
string
iconNames =
SCR_Enum
.FlagsToString(
EMilitarySymbolIcon
, icons);
90
string
amplifierName =
typename
.EnumToString(
EMilitarySymbolAmplifier
, amplifier);
91
92
title =
string
.Format(
"%1 | %2 | %3"
, dimensionName, iconNames, amplifierName);
93
return
true
;
94
}
95
};
SCR_MilitarySymbol
Definition:
SCR_MilitarySymbol.c:2
SCR_Enum
Definition:
SCR_Enum.c:1
SCR_GroupNameConfig
Definition:
SCR_GroupNameConfig.c:2
m_aEntries
protected ref array< ref SCR_TextsTaskManagerEntry > m_aEntries
Definition:
SCR_TextsTaskManagerComponent.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_BaseContainerGroupNameConfigEntry
Definition:
SCR_GroupNameConfig.c:75
EMilitarySymbolAmplifier
EMilitarySymbolAmplifier
Definition:
EMilitarySymbol.c:63
SCR_GroupNameConfigEntry
Definition:
SCR_GroupNameConfig.c:49
EMilitarySymbolDimension
EMilitarySymbolDimension
Definition:
EMilitarySymbol.c:14
m_sName
protected LocalizedString m_sName
Definition:
SCR_GroupIdentityComponent.c:19
LocalizedString
Definition:
LocalizedString.c:21
EMilitarySymbolIcon
EMilitarySymbolIcon
Definition:
EMilitarySymbol.c:29
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition:
SCR_AIGoalReaction.c:468
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
GroupIdentity
SCR_GroupNameConfig.c
Generated by
1.8.17