DayZ 1.24
Loading...
Searching...
No Matches
CfgParam.c
Go to the documentation of this file.
1const int CFG_TYPE_STRING = 0;
2const int CFG_TYPE_INT = 1;
3const int CFG_TYPE_FLOAT = 2;
4const int CFG_TYPE_BOOL = 3;
5const int CFG_TYPE_ARRAY = 4;
6const int CFG_TYPE_PARAM = 5;
7
9{
10 protected string m_ParamName;
11 protected string m_ParamValueString;
12
13 void CfgParam(string param_name)
14 {
16 }
17
18 void SetName(string param_name)
19 {
21 }
22
23 string GetName()
24 {
25 return m_ParamName;
26 }
27
28 int GetType()
29 {
30 return -1;
31 }
32
33 bool IsArray()
34 {
35 return false;
36 }
37
38 static CfgParam CreateParam(string name, int cfg_type)
39 {
41
42 switch (cfg_type)
43 {
44 case CFG_TYPE_STRING:
45 {
46 param = new CfgParamString(name);
47 break;
48 }
49 case CFG_TYPE_INT:
50 {
51 param = new CfgParamInt(name);
52 break;
53 }
54 case CFG_TYPE_FLOAT:
55 {
56 param = new CfgParamFloat(name);
57 break;
58 }
59 case CFG_TYPE_BOOL:
60 {
61 param = new CfgParamBool(name);
62 break;
63 }
64 case CFG_TYPE_ARRAY:
65 {
67 break;
68 }
69 }
70
71 return param;
72 }
73}
const int CFG_TYPE_BOOL
Definition CfgParam.c:4
const int CFG_TYPE_ARRAY
Definition CfgParam.c:5
const int CFG_TYPE_PARAM
Definition CfgParam.c:6
const int CFG_TYPE_INT
Definition CfgParam.c:2
const int CFG_TYPE_STRING
Definition CfgParam.c:1
const int CFG_TYPE_FLOAT
Definition CfgParam.c:3
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
string GetName()
Definition CfgParam.c:23
static CfgParam CreateParam(string name, int cfg_type)
Definition CfgParam.c:38
bool IsArray()
Definition CfgParam.c:33
string m_ParamName
Definition CfgParam.c:10
void SetName(string param_name)
Definition CfgParam.c:18
void CfgParamArray(string param_name)
int GetType()
Definition CfgParam.c:28
string m_ParamValueString
Definition CfgParam.c:11
void CfgParam(string param_name)
Definition CfgParam.c:13
TODO doc.
Definition EnScript.c:118