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_GroupPreset.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_GroupPreset
: BaseContainerObject
3
{
4
[
Attribute
(
"1"
)]
5
protected
bool
m_bIsEnabled
;
6
7
[
Attribute
(
desc
:
"Name of the Group"
)]
8
protected
string
m_sGroupName
;
9
10
[
Attribute
(defvalue:
"0"
, uiwidget:
UIWidgets
.ComboBox,
desc
:
"Group role"
,
params
:
""
, enumType:
SCR_EGroupRole
)]
11
protected
SCR_EGroupRole
m_eGroupRole
;
12
13
[
Attribute
(
""
,
UIWidgets
.ResourcePickerThumbnail,
"Flag icon of this particular group."
,
params
:
"edds"
)]
14
private
ResourceName
m_sGroupFlag;
15
16
[
Attribute
(
desc
:
"Name of item in imageset"
)]
17
protected
string
m_sGroupFlagName
;
18
19
[
Attribute
(
desc
:
"Description of the Group"
)]
20
protected
string
m_sGroupDescription
;
21
22
[
Attribute
(
desc
:
"Max number of players in this group where 0 means infinite members"
,
params
:
"0 inf"
)]
23
protected
int
m_iGroupSize
;
24
25
[
Attribute
(
desc
:
"Radio frequency for communication in kHz."
)]
26
protected
int
m_iRadioFrequency
;
27
28
[
Attribute
(
"0"
,
params
:
"0 inf"
,
desc
:
"Index of default active radio channel of group"
)]
29
protected
int
m_iDefaultActiveRadioChannel
;
30
31
[
Attribute
(defvalue: SCR_ECharacterRank.PRIVATE.ToString(), uiwidget:
UIWidgets
.ComboBox,
desc
:
"Rank required to create and join the group"
,
params
:
""
, enumType: SCR_ECharacterRank)]
32
protected
SCR_ECharacterRank
m_eRequiredRank
;
33
34
[
Attribute
(
desc
:
"Group is private."
)]
35
protected
bool
m_bIsPrivate
;
36
37
[
Attribute
(
"1"
,
desc
:
"Is privacy changeable"
)]
38
protected
bool
m_bIsPrivacyChangeable
;
39
40
//------------------------------------------------------------------------------------------------
41
void
SetupGroup
(
SCR_AIGroup
group)
42
{
43
group.
SetCustomName
(
m_sGroupName
, 0);
44
group.
SetRadioFrequency
(
m_iRadioFrequency
);
45
group.
SetMaxGroupMembers
(
m_iGroupSize
);
46
group.
SetPrivate
(
m_bIsPrivate
);
47
group.
SetCustomDescription
(
m_sGroupDescription
, 0);
48
group.
SetPrivacyChangeable
(
m_bIsPrivacyChangeable
);
49
group.
SetRequiredRank
(
m_eRequiredRank
);
50
51
if
(!m_sGroupFlag.IsEmpty())
52
group.
SetCustomGroupFlag
(m_sGroupFlag);
53
}
54
55
//------------------------------------------------------------------------------------------------
58
void
SetupGroupWithOverride
(
SCR_AIGroup
group,
SCR_GroupPreset
overridingGroupPreset)
59
{
60
if
(!overridingGroupPreset.
m_sGroupName
.IsEmpty())
61
group.
SetCustomName
(overridingGroupPreset.
m_sGroupName
, 0);
62
else
63
group.
SetCustomName
(
m_sGroupName
, 0);
64
65
if
(overridingGroupPreset.
m_iRadioFrequency
> 0)
66
group.
SetRadioFrequency
(overridingGroupPreset.
m_iRadioFrequency
);
67
else
68
group.
SetRadioFrequency
(
m_iRadioFrequency
);
69
70
if
(overridingGroupPreset.
m_iGroupSize
> 0)
71
group.
SetMaxGroupMembers
(overridingGroupPreset.
m_iGroupSize
);
72
else
73
group.
SetMaxGroupMembers
(
m_iGroupSize
);
74
75
if
(overridingGroupPreset.
m_bIsPrivate
)
76
group.
SetPrivate
(overridingGroupPreset.
m_bIsPrivate
);
77
else
78
group.
SetPrivate
(
m_bIsPrivate
);
79
80
if
(!overridingGroupPreset.
m_sGroupDescription
.IsEmpty())
81
group.
SetCustomDescription
(overridingGroupPreset.
m_sGroupDescription
, 0);
82
else
83
group.
SetCustomDescription
(
m_sGroupDescription
, 0);
84
85
if
(!overridingGroupPreset.
GetGroupFlag
().IsEmpty())
86
group.
SetCustomGroupFlag
(overridingGroupPreset.
GetGroupFlag
());
87
else
if
(!
GetGroupFlag
().
IsEmpty
())
88
group.
SetCustomGroupFlag
(
GetGroupFlag
());
89
90
if
(!overridingGroupPreset.
m_bIsPrivacyChangeable
)
91
group.
SetPrivacyChangeable
(overridingGroupPreset.
m_bIsPrivacyChangeable
);
92
else
93
group.
SetPrivacyChangeable
(
m_bIsPrivacyChangeable
);
94
95
if
(overridingGroupPreset.
GetRequiredRank
() != SCR_ECharacterRank.INVALID)
96
group.
SetRequiredRank
(overridingGroupPreset.
m_eRequiredRank
);
97
else
98
group.
SetRequiredRank
(
m_eRequiredRank
);
99
100
if
(overridingGroupPreset.
GetDefaultActiveRadioChannel
() > 0)
101
group.
SetDefaultActiveRadioChannel
(overridingGroupPreset.
GetDefaultActiveRadioChannel
());
102
else
103
group.
SetDefaultActiveRadioChannel
(
m_iDefaultActiveRadioChannel
);
104
}
105
106
//------------------------------------------------------------------------------------------------
109
void
SetupGroupFlag
(
SCR_AIGroup
group,
SCR_Faction
faction)
110
{
111
if
(!
GetDefaultGroupFlagName
().
IsEmpty
() && !faction.
GetGroupFlagImageSet
().IsEmpty())
112
{
113
array<string> flagNames = {};
114
faction.
GetFlagNames
(flagNames);
115
group.
SetGroupFlag
(flagNames.Find(
GetDefaultGroupFlagName
()), !faction.
GetGroupFlagImageSet
().IsEmpty());
116
}
117
else
118
{
119
if
(group.
GetGroupFlag
().IsEmpty())
120
group.
SetGroupFlag
(0, !faction.
GetGroupFlagImageSet
().IsEmpty());
121
}
122
}
123
124
//Getters
125
//------------------------------------------------------------------------------------------------
126
string
GetGroupName
()
127
{
128
return
m_sGroupName
;
129
}
130
131
//------------------------------------------------------------------------------------------------
132
bool
IsEnabled
()
133
{
134
return
m_bIsEnabled
;
135
}
136
137
//------------------------------------------------------------------------------------------------
138
ResourceName
GetGroupFlag
()
139
{
140
return
m_sGroupFlag;
141
}
142
143
//------------------------------------------------------------------------------------------------
144
int
GetGroupSize
()
145
{
146
return
m_iGroupSize
;
147
}
148
149
//------------------------------------------------------------------------------------------------
150
int
GetRadioFrequency
()
151
{
152
return
m_iRadioFrequency
;
153
}
154
155
//------------------------------------------------------------------------------------------------
156
int
GetDefaultActiveRadioChannel
()
157
{
158
return
m_iDefaultActiveRadioChannel
;
159
}
160
161
//------------------------------------------------------------------------------------------------
162
string
GetGroupDescription
()
163
{
164
return
m_sGroupDescription
;
165
}
166
167
//------------------------------------------------------------------------------------------------
168
bool
IsPrivate
()
169
{
170
return
m_bIsPrivate
;
171
}
172
173
//------------------------------------------------------------------------------------------------
174
bool
IsPrivacyChangeable
()
175
{
176
return
m_bIsPrivacyChangeable
;
177
}
178
179
//------------------------------------------------------------------------------------------------
181
SCR_EGroupRole
GetGroupRole
()
182
{
183
return
m_eGroupRole
;
184
}
185
186
//------------------------------------------------------------------------------------------------
188
string
GetDefaultGroupFlagName
()
189
{
190
return
m_sGroupFlagName
;
191
}
192
193
//------------------------------------------------------------------------------------------------
195
SCR_ECharacterRank
GetRequiredRank
()
196
{
197
return
m_eRequiredRank
;
198
}
199
200
//Setters
201
//------------------------------------------------------------------------------------------------
202
203
void
SetGroupName
(
string
name)
204
{
205
m_sGroupName
= name;
206
}
207
208
//------------------------------------------------------------------------------------------------
209
void
SetGroupSize
(
int
size
)
210
{
211
m_iGroupSize
=
size
;
212
}
213
214
//------------------------------------------------------------------------------------------------
215
void
SetRadioFrequency
(
int
freq)
216
{
217
m_iRadioFrequency
= freq;
218
}
219
220
//------------------------------------------------------------------------------------------------
221
void
SetIsPrivate
(
bool
privacy)
222
{
223
m_bIsPrivate
= privacy;
224
}
225
}
size
int size
Definition
PrefabImporter.c:35
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_EGroupRole
SCR_EGroupRole
Group roles.
Definition
SCR_EGroupRole.c:3
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
ResourceName
Definition
ResourceName.c:13
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::SetCustomDescription
void SetCustomDescription(string desc, int authorID)
called on server only
Definition
SCR_AIGroup.c:818
SCR_AIGroup::SetCustomName
void SetCustomName(string name, int authorID)
Definition
SCR_AIGroup.c:744
SCR_AIGroup::SetRadioFrequency
void SetRadioFrequency(int frequency)
Definition
SCR_AIGroup.c:1556
SCR_AIGroup::SetRequiredRank
void SetRequiredRank(SCR_ECharacterRank rank)
Definition
SCR_AIGroup.c:1015
SCR_AIGroup::SetPrivate
void SetPrivate(bool isPrivate)
Called on the server (authority).
Definition
SCR_AIGroup.c:535
SCR_AIGroup::SetPrivacyChangeable
void SetPrivacyChangeable(bool IsPrivacyChangeable)
Definition
SCR_AIGroup.c:548
SCR_AIGroup::SetGroupFlag
void SetGroupFlag(int flagIndex, bool isFromImageset)
called on server only
Definition
SCR_AIGroup.c:703
SCR_AIGroup::SetMaxGroupMembers
void SetMaxGroupMembers(int value)
Definition
SCR_AIGroup.c:825
SCR_AIGroup::SetCustomGroupFlag
void SetCustomGroupFlag(ResourceName flag)
Definition
SCR_AIGroup.c:425
SCR_AIGroup::SetDefaultActiveRadioChannel
void SetDefaultActiveRadioChannel(int id)
Definition
SCR_AIGroup.c:525
SCR_AIGroup::GetGroupFlag
ResourceName GetGroupFlag()
Definition
SCR_AIGroup.c:444
SCR_Faction
Definition
SCR_Faction.c:6
SCR_Faction::GetGroupFlagImageSet
ResourceName GetGroupFlagImageSet()
Definition
SCR_Faction.c:237
SCR_Faction::GetFlagNames
int GetFlagNames(out array< string > flagNames)
Definition
SCR_Faction.c:230
SCR_GroupPreset
Definition
SCR_GroupPreset.c:3
SCR_GroupPreset::GetGroupFlag
ResourceName GetGroupFlag()
Definition
SCR_GroupPreset.c:138
SCR_GroupPreset::GetGroupRole
SCR_EGroupRole GetGroupRole()
Definition
SCR_GroupPreset.c:181
SCR_GroupPreset::GetDefaultActiveRadioChannel
int GetDefaultActiveRadioChannel()
Definition
SCR_GroupPreset.c:156
SCR_GroupPreset::SetGroupSize
void SetGroupSize(int size)
Definition
SCR_GroupPreset.c:209
SCR_GroupPreset::SetIsPrivate
void SetIsPrivate(bool privacy)
Definition
SCR_GroupPreset.c:221
SCR_GroupPreset::GetRequiredRank
SCR_ECharacterRank GetRequiredRank()
Definition
SCR_GroupPreset.c:195
SCR_GroupPreset::GetDefaultGroupFlagName
string GetDefaultGroupFlagName()
Definition
SCR_GroupPreset.c:188
SCR_GroupPreset::m_iRadioFrequency
int m_iRadioFrequency
Definition
SCR_GroupPreset.c:26
SCR_GroupPreset::m_sGroupDescription
string m_sGroupDescription
Definition
SCR_GroupPreset.c:20
SCR_GroupPreset::SetGroupName
void SetGroupName(string name)
Definition
SCR_GroupPreset.c:203
SCR_GroupPreset::SetRadioFrequency
void SetRadioFrequency(int freq)
Definition
SCR_GroupPreset.c:215
SCR_GroupPreset::m_iGroupSize
int m_iGroupSize
Definition
SCR_GroupPreset.c:23
SCR_GroupPreset::m_bIsPrivacyChangeable
bool m_bIsPrivacyChangeable
Definition
SCR_GroupPreset.c:38
SCR_GroupPreset::SetupGroup
void SetupGroup(SCR_AIGroup group)
Definition
SCR_GroupPreset.c:41
SCR_GroupPreset::m_bIsPrivate
bool m_bIsPrivate
Definition
SCR_GroupPreset.c:35
SCR_GroupPreset::m_sGroupFlagName
string m_sGroupFlagName
Definition
SCR_GroupPreset.c:17
SCR_GroupPreset::m_bIsEnabled
bool m_bIsEnabled
Definition
SCR_GroupPreset.c:5
SCR_GroupPreset::m_eRequiredRank
SCR_ECharacterRank m_eRequiredRank
Definition
SCR_GroupPreset.c:32
SCR_GroupPreset::m_sGroupName
string m_sGroupName
Definition
SCR_GroupPreset.c:8
SCR_GroupPreset::GetGroupDescription
string GetGroupDescription()
Definition
SCR_GroupPreset.c:162
SCR_GroupPreset::GetGroupName
string GetGroupName()
Definition
SCR_GroupPreset.c:126
SCR_GroupPreset::m_eGroupRole
SCR_EGroupRole m_eGroupRole
Definition
SCR_GroupPreset.c:11
SCR_GroupPreset::IsEnabled
bool IsEnabled()
Definition
SCR_GroupPreset.c:132
SCR_GroupPreset::GetRadioFrequency
int GetRadioFrequency()
Definition
SCR_GroupPreset.c:150
SCR_GroupPreset::SetupGroupFlag
void SetupGroupFlag(SCR_AIGroup group, SCR_Faction faction)
Definition
SCR_GroupPreset.c:109
SCR_GroupPreset::m_iDefaultActiveRadioChannel
int m_iDefaultActiveRadioChannel
Definition
SCR_GroupPreset.c:29
SCR_GroupPreset::IsPrivacyChangeable
bool IsPrivacyChangeable()
Definition
SCR_GroupPreset.c:174
SCR_GroupPreset::GetGroupSize
int GetGroupSize()
Definition
SCR_GroupPreset.c:144
SCR_GroupPreset::IsPrivate
bool IsPrivate()
Definition
SCR_GroupPreset.c:168
SCR_GroupPreset::SetupGroupWithOverride
void SetupGroupWithOverride(SCR_AIGroup group, SCR_GroupPreset overridingGroupPreset)
Definition
SCR_GroupPreset.c:58
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
IsEmpty
proto native bool IsEmpty()
scripts
Game
Groups
SCR_GroupPreset.c
Generated by
1.17.0