Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
cfgparamarray.c
Go to the documentation of this file.
1
class
CfgParamArray
extends
CfgParam
2
{
3
private
ref
array<ref CfgParam>
m_Values
;
4
5
void
CfgParamArray(
string
param_name)
6
{
7
m_Values
=
new
array<ref CfgParam>
;
8
}
9
10
void
~CfgParamArray()
11
{
12
if
(
m_Values
!= NULL )
13
{
14
Clear
();
15
}
16
}
17
18
void
Clear
()
19
{
20
m_Values
.Clear();
21
}
22
23
array<ref CfgParam>
GetValues()
24
{
25
return
m_Values
;
26
}
27
28
CfgParam
GetValue
(
int
i)
29
{
30
return
m_Values
.Get(i);
31
}
32
33
void
InsertValue(
CfgParam
value)
34
{
35
if
(
m_Values
== NULL )
36
{
37
m_Values
=
new
array<ref CfgParam>
;
38
}
39
40
m_Values
.Insert(value);
41
}
42
43
bool
IsParamExist(
string
name
,
int
cfg_type)
44
{
45
if
(
m_Values
== NULL )
46
{
47
m_Values
=
new
array<ref CfgParam>
;
48
}
49
50
for
(
int
i = 0; i <
m_Values
.Count(); ++i )
51
{
52
CfgParam
p =
m_Values
.Get(i);
53
54
if
(
name
== p.GetName() )
55
{
56
return
true
;
57
}
58
}
59
60
return
false
;
61
}
62
63
bool
RenameParam(
string
name
,
int
cfg_type,
string
new_name)
64
{
65
if
(
m_Values
== NULL )
66
{
67
m_Values
=
new
array<ref CfgParam>
;
68
}
69
70
for
(
int
i = 0; i <
m_Values
.Count(); ++i )
71
{
72
CfgParam
p =
m_Values
.Get(i);
73
74
if
(
name
== p.GetName() )
75
{
76
p.SetName(new_name);
77
return
true
;
78
}
79
}
80
81
return
false
;
82
}
83
84
CfgParam
GetValueByName(
string
name
,
int
cfg_type)
85
{
86
if
(
m_Values
== NULL )
87
{
88
m_Values
=
new
array<ref CfgParam>
;
89
}
90
91
for
(
int
i = 0; i <
m_Values
.Count(); ++i )
92
{
93
CfgParam
p =
m_Values
.Get(i);
94
95
if
(
name
== p.GetName() )
96
{
97
return
p;
98
}
99
}
100
101
CfgParam
param = CreateParam(
name
, cfg_type);
102
m_Values
.Insert(param);
103
104
return
param;
105
}
106
107
void
SetParams(
array<ref CfgParam>
value_array)
108
{
109
m_Values
= value_array;
110
}
111
112
bool
IsValueArray()
113
{
114
return
true
;
115
}
116
117
override
int
GetType
()
118
{
119
return
CFG_TYPE_ARRAY
;
120
}
121
}
Clear
protected void Clear(bool clearFile=false)
Definition:
scriptconsoleenfscripttab.c:95
CfgParam
Definition:
cfgparam.c:8
CFG_TYPE_ARRAY
const int CFG_TYPE_ARRAY
Definition:
cfgparam.c:5
array< ref CfgParam >
GetValue
string GetValue(int pIndex)
Definition:
universaltemperaturesource.c:256
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
m_Values
ref array< string > m_Values
names parsed from m_Pairs
Definition:
universaltemperaturesource.c:207
GetType
override int GetType()
Definition:
huddebugwincharagents.c:49
DAYZ
scripts_v1.24.157551
scripts
world
classes
confighandler
cfgparamarray.c
Generated by
1.8.17