Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
pluginconfigemotesprofile.c
Go to the documentation of this file.
1
class
PluginConfigEmotesProfile
extends
PluginConfigHandler
2
{
3
/*protected const string EMOTE_1 = "emote_slot_1";
4
protected const string EMOTE_2 = "emote_slot_2";
5
protected const string EMOTE_3 = "emote_slot_3";
6
protected const string EMOTE_4 = "emote_slot_4";
7
protected const string EMOTE_5 = "emote_slot_5";
8
protected const string EMOTE_6 = "emote_slot_6";
9
protected const string EMOTE_7 = "emote_slot_7";
10
protected const string EMOTE_8 = "emote_slot_8";
11
protected const string EMOTE_9 = "emote_slot_9";
12
protected const string EMOTE_10 = "emote_slot_10";
13
protected const string EMOTE_11 = "emote_slot_11";
14
protected const string EMOTE_12 = "emote_slot_12";*/
15
16
protected
ref map<string, ref CfgParam> m_DefaultValues;
17
protected
ref
TStringArray
m_PresetList;
18
19
//========================================
20
// GetInstance
21
//========================================
22
static
PluginConfigEmotesProfile
GetInstance
()
23
{
24
return
PluginConfigEmotesProfile
.Cast(
GetPlugin
(
PluginConfigEmotesProfile
) );
25
}
26
27
28
//========================================
29
// GetCfgParamInt
30
//========================================
31
protected
CfgParamInt
GetNewCfgParamInt
(
int
value )
32
{
33
CfgParamInt param =
new
CfgParamInt(
""
);
34
param.SetValue( value );
35
return
param;
36
}
37
38
//========================================
39
// Int
40
//========================================
41
protected
CfgParamInt
SetInt
(
string
key,
int
value )
42
{
43
CfgParamInt param = CfgParamInt.Cast( GetParamByName( key,
CFG_TYPE_INT
) );
44
param.SetValue( value );
45
//SaveConfigToFile();
46
return
param;
47
}
48
49
protected
int
GetInt
(
string
key )
50
{
51
if
( ParamExist(key) )
52
{
53
CfgParamInt param = CfgParamInt.Cast( GetParamByName( key,
CFG_TYPE_INT
) );
54
return
param.GetValue();
55
}
56
else
57
{
58
if
(
m_DefaultValues
.Contains(key) )
59
{
60
CfgParamInt default_param = CfgParamInt.Cast(
m_DefaultValues
.Get( key ) );
61
return
SetInt
( key, default_param.GetValue() ).GetValue();
62
}
63
else
64
{
65
return
SetInt
( key, 0 ).GetValue();
66
}
67
}
68
}
69
70
//========================================
71
// PluginConfigEmotesProfile
72
//========================================
73
void
PluginConfigEmotesProfile
()
74
{
75
m_DefaultValues
=
new
map<string, ref CfgParam>
;
76
//Here you can configure default EMOTES
77
78
m_DefaultValues
.Insert( EmoteSlots.EMOTE_1.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_GREETING
) );
79
m_DefaultValues
.Insert( EmoteSlots.EMOTE_2.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_SOS
) );
80
m_DefaultValues
.Insert( EmoteSlots.EMOTE_3.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_HEART
) );
81
m_DefaultValues
.Insert( EmoteSlots.EMOTE_4.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_TAUNT
) );
82
m_DefaultValues
.Insert( EmoteSlots.EMOTE_5.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_SURRENDER
) );
83
m_DefaultValues
.Insert( EmoteSlots.EMOTE_6.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_TAUNTKISS
) );
84
m_DefaultValues
.Insert( EmoteSlots.EMOTE_7.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_POINT
) );
85
m_DefaultValues
.Insert( EmoteSlots.EMOTE_8.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_TAUNTELBOW
) );
86
m_DefaultValues
.Insert( EmoteSlots.EMOTE_9.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_THUMB
) );
87
m_DefaultValues
.Insert( EmoteSlots.EMOTE_10.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_THROAT
) );
88
m_DefaultValues
.Insert( EmoteSlots.EMOTE_11.ToString(),
GetNewCfgParamInt
(
EmoteConstants
.
ID_EMOTE_SUICIDE
) );
89
//m_DefaultValues.Insert( EMOTE_12, GetNewCfgParamInt(EmoteConstants.ID_EMOTE_DANCE) );
90
//m_DefaultValues.Insert( EMOTE_12, GetNewCfgParamInt(EmoteConstants.ID_EMOTE_SOS) );
91
}
92
93
//========================================
94
// GetFileName
95
//========================================
96
override
string
GetFileName
()
97
{
98
return
CFG_FILE_EMOTES_PROFILE
;
99
}
100
101
//========================================
102
// EmoteStoring
103
//========================================
104
int
GetEmoteSlot1
()
105
{
106
return
GetInt
( EmoteSlots.EMOTE_1.ToString() );
107
}
108
109
void
SetEmoteSlot1
(
int
emoted_id )
110
{
111
SetInt
( EmoteSlots.EMOTE_1.ToString(), emoted_id );
112
}
113
114
int
GetEmoteSlot2
()
115
{
116
return
GetInt
( EmoteSlots.EMOTE_2.ToString() );
117
}
118
119
void
SetEmoteSlot2
(
int
emoted_id )
120
{
121
SetInt
( EmoteSlots.EMOTE_2.ToString(), emoted_id );
122
}
123
124
int
GetEmoteSlot3
()
125
{
126
return
GetInt
( EmoteSlots.EMOTE_3.ToString() );
127
}
128
129
void
SetEmoteSlot3
(
int
emoted_id )
130
{
131
SetInt
( EmoteSlots.EMOTE_3.ToString(), emoted_id );
132
}
133
134
int
GetEmoteSlot4
()
135
{
136
return
GetInt
( EmoteSlots.EMOTE_4.ToString() );
137
}
138
139
void
SetEmoteSlot4
(
int
emoted_id )
140
{
141
SetInt
( EmoteSlots.EMOTE_4.ToString(), emoted_id );
142
}
143
144
int
GetEmoteSlot5
()
145
{
146
return
GetInt
( EmoteSlots.EMOTE_5.ToString() );
147
}
148
149
void
SetEmoteSlot5
(
int
emoted_id )
150
{
151
SetInt
( EmoteSlots.EMOTE_5.ToString(), emoted_id );
152
}
153
154
int
GetEmoteSlot6
()
155
{
156
return
GetInt
( EmoteSlots.EMOTE_6.ToString() );
157
}
158
159
void
SetEmoteSlot6
(
int
emoted_id )
160
{
161
SetInt
( EmoteSlots.EMOTE_6.ToString(), emoted_id );
162
}
163
164
int
GetEmoteSlot7
()
165
{
166
return
GetInt
( EmoteSlots.EMOTE_7.ToString() );
167
}
168
169
void
SetEmoteSlot7
(
int
emoted_id )
170
{
171
SetInt
( EmoteSlots.EMOTE_7.ToString(), emoted_id );
172
}
173
174
int
GetEmoteSlot8
()
175
{
176
return
GetInt
( EmoteSlots.EMOTE_8.ToString() );
177
}
178
179
void
SetEmoteSlot8
(
int
emoted_id )
180
{
181
SetInt
( EmoteSlots.EMOTE_8.ToString(), emoted_id );
182
}
183
184
int
GetEmoteSlot9
()
185
{
186
return
GetInt
( EmoteSlots.EMOTE_9.ToString() );
187
}
188
189
void
SetEmoteSlot9
(
int
emoted_id )
190
{
191
SetInt
( EmoteSlots.EMOTE_9.ToString(), emoted_id );
192
}
193
194
int
GetEmoteSlot10
()
195
{
196
return
GetInt
( EmoteSlots.EMOTE_10.ToString() );
197
}
198
199
void
SetEmoteSlot10
(
int
emoted_id )
200
{
201
SetInt
( EmoteSlots.EMOTE_10.ToString(), emoted_id );
202
}
203
204
int
GetEmoteSlot11
()
205
{
206
return
GetInt
( EmoteSlots.EMOTE_11.ToString() );
207
}
208
209
void
SetEmoteSlot11
(
int
emoted_id )
210
{
211
SetInt
( EmoteSlots.EMOTE_11.ToString(), emoted_id );
212
}
213
214
/*int GetEmoteSlot12()
215
{
216
return GetInt( EMOTE_12 );
217
}
218
219
void SetEmoteSlot12( int emoted_id )
220
{
221
SetInt( EMOTE_12, emoted_id );
222
}*/
223
224
int
GetEmoteFromSlot
(
string
slot)
225
{
226
return
GetInt
( slot );
227
}
228
}
229
230
enum
EmoteSlots
231
{
232
EMOTE_1
= 1,
233
EMOTE_2
,
234
EMOTE_3
,
235
EMOTE_4
,
236
EMOTE_5
,
237
EMOTE_6
,
238
EMOTE_7
,
239
EMOTE_8
,
240
EMOTE_9
,
241
EMOTE_10
,
242
EMOTE_11
,
243
EMOTE_12
244
}
CFG_TYPE_INT
const int CFG_TYPE_INT
Definition
cfgparam.c:2
EmoteConstants
Definition
constants.c:359
PluginConfigHandler
Definition
pluginconfigdebugprofile.c:27
PluginConfigHandler::GetInstance
static PluginConfigEmotesProfile GetInstance()
Definition
pluginconfigemotesprofile.c:22
PluginConfigHandler::m_DefaultValues
ref map< string, ref CfgParam > m_DefaultValues
Definition
pluginconfigdebugprofile.c:67
PluginConfigHandler::PluginConfigEmotesProfile
void PluginConfigEmotesProfile()
Definition
pluginconfigemotesprofile.c:73
PluginConfigHandler::GetEmoteSlot3
int GetEmoteSlot3()
Definition
pluginconfigemotesprofile.c:124
PluginConfigHandler::SetEmoteSlot9
void SetEmoteSlot9(int emoted_id)
Definition
pluginconfigemotesprofile.c:189
PluginConfigHandler::SetEmoteSlot1
void SetEmoteSlot1(int emoted_id)
Definition
pluginconfigemotesprofile.c:109
PluginConfigHandler::SetEmoteSlot2
void SetEmoteSlot2(int emoted_id)
Definition
pluginconfigemotesprofile.c:119
PluginConfigHandler::GetFileName
override string GetFileName()
Definition
pluginconfigemotesprofile.c:96
PluginConfigHandler::GetEmoteSlot11
int GetEmoteSlot11()
Definition
pluginconfigemotesprofile.c:204
PluginConfigHandler::SetEmoteSlot4
void SetEmoteSlot4(int emoted_id)
Definition
pluginconfigemotesprofile.c:139
PluginConfigHandler::GetEmoteSlot2
int GetEmoteSlot2()
Definition
pluginconfigemotesprofile.c:114
PluginConfigHandler::SetInt
CfgParamInt SetInt(string key, int value)
Definition
pluginconfigemotesprofile.c:41
PluginConfigHandler::SetEmoteSlot3
void SetEmoteSlot3(int emoted_id)
Definition
pluginconfigemotesprofile.c:129
PluginConfigHandler::GetNewCfgParamInt
CfgParamInt GetNewCfgParamInt(int value)
Definition
pluginconfigemotesprofile.c:31
PluginConfigHandler::GetEmoteSlot9
int GetEmoteSlot9()
Definition
pluginconfigemotesprofile.c:184
PluginConfigHandler::GetEmoteSlot7
int GetEmoteSlot7()
Definition
pluginconfigemotesprofile.c:164
PluginConfigHandler::GetEmoteSlot4
int GetEmoteSlot4()
Definition
pluginconfigemotesprofile.c:134
PluginConfigHandler::SetEmoteSlot8
void SetEmoteSlot8(int emoted_id)
Definition
pluginconfigemotesprofile.c:179
PluginConfigHandler::SetEmoteSlot5
void SetEmoteSlot5(int emoted_id)
Definition
pluginconfigemotesprofile.c:149
PluginConfigHandler::SetEmoteSlot7
void SetEmoteSlot7(int emoted_id)
Definition
pluginconfigemotesprofile.c:169
PluginConfigHandler::GetInt
int GetInt(string key)
Definition
pluginconfigemotesprofile.c:49
PluginConfigHandler::GetEmoteSlot6
int GetEmoteSlot6()
Definition
pluginconfigemotesprofile.c:154
PluginConfigHandler::GetEmoteSlot1
int GetEmoteSlot1()
Definition
pluginconfigemotesprofile.c:104
PluginConfigHandler::GetEmoteFromSlot
int GetEmoteFromSlot(string slot)
Definition
pluginconfigemotesprofile.c:224
PluginConfigHandler::SetEmoteSlot11
void SetEmoteSlot11(int emoted_id)
Definition
pluginconfigemotesprofile.c:209
PluginConfigHandler::GetEmoteSlot10
int GetEmoteSlot10()
Definition
pluginconfigemotesprofile.c:194
PluginConfigHandler::GetEmoteSlot8
int GetEmoteSlot8()
Definition
pluginconfigemotesprofile.c:174
PluginConfigHandler::SetEmoteSlot6
void SetEmoteSlot6(int emoted_id)
Definition
pluginconfigemotesprofile.c:159
PluginConfigHandler::SetEmoteSlot10
void SetEmoteSlot10(int emoted_id)
Definition
pluginconfigemotesprofile.c:199
PluginConfigHandler::GetEmoteSlot5
int GetEmoteSlot5()
Definition
pluginconfigemotesprofile.c:144
map
Definition
cachedequipmentstorage.c:4
CFG_FILE_EMOTES_PROFILE
const string CFG_FILE_EMOTES_PROFILE
Definition
constants.c:243
EmoteConstants::ID_EMOTE_THROAT
const int ID_EMOTE_THROAT
Definition
constants.c:369
EmoteConstants::ID_EMOTE_SOS
const int ID_EMOTE_SOS
Definition
constants.c:361
EmoteConstants::ID_EMOTE_GREETING
const int ID_EMOTE_GREETING
Definition
constants.c:360
EmoteConstants::ID_EMOTE_THUMB
const int ID_EMOTE_THUMB
Definition
constants.c:368
EmoteConstants::ID_EMOTE_TAUNTELBOW
const int ID_EMOTE_TAUNTELBOW
Definition
constants.c:367
EmoteConstants::ID_EMOTE_SURRENDER
const int ID_EMOTE_SURRENDER
Definition
constants.c:399
EmoteConstants::ID_EMOTE_TAUNTKISS
const int ID_EMOTE_TAUNTKISS
Definition
constants.c:365
EmoteConstants::ID_EMOTE_TAUNT
const int ID_EMOTE_TAUNT
Definition
constants.c:363
EmoteConstants::ID_EMOTE_SUICIDE
const int ID_EMOTE_SUICIDE
Definition
constants.c:370
EmoteConstants::ID_EMOTE_HEART
const int ID_EMOTE_HEART
Definition
constants.c:362
EmoteConstants::ID_EMOTE_POINT
const int ID_EMOTE_POINT
Definition
constants.c:380
TStringArray
array< string > TStringArray
Definition
enscript.c:712
EMOTE_6
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_6
EMOTE_8
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_8
EMOTE_11
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_11
EMOTE_2
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_2
EMOTE_1
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_1
EMOTE_9
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_9
EMOTE_3
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_3
EMOTE_7
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_7
EMOTE_10
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_10
EMOTE_4
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_4
EMOTE_5
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_5
GetInt
int GetInt()
Definition
plugindayzplayerdebug.c:66
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition
pluginmanager.c:325
Games
Dayz
scripts
4_world
plugins
pluginbase
pluginfilehandler
pluginconfighandler
pluginconfigemotesprofile.c
Generated by
1.17.0