DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PluginConfigEmotesProfile.c
См. документацию.
1class 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 //========================================
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 //========================================
74 {
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 {
99 }
100
101 //========================================
102 // EmoteStoring
103 //========================================
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
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
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
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
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
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
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
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
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
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
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
230enum EmoteSlots
231{
243 EMOTE_12
244}
const int CFG_TYPE_INT
Определения CfgParam.c:2
map
Определения ControlsXboxNew.c:4
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_6
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_8
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_11
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_2
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_1
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_9
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_3
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_7
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_10
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_4
class PluginConfigEmotesProfile extends PluginConfigHandler EMOTE_5
int GetInt()
Определения PluginDayzPlayerDebug.c:66
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
Определения constants.c:359
static PluginConfigEmotesProfile GetInstance()
Определения PluginConfigEmotesProfile.c:22
int GetInt(string key)
Определения PluginConfigEmotesProfile.c:49
void SetEmoteSlot8(int emoted_id)
Определения PluginConfigEmotesProfile.c:179
override string GetFileName()
Определения PluginConfigEmotesProfile.c:96
void SetEmoteSlot2(int emoted_id)
Определения PluginConfigEmotesProfile.c:119
void SetEmoteSlot9(int emoted_id)
Определения PluginConfigEmotesProfile.c:189
void SetEmoteSlot7(int emoted_id)
Определения PluginConfigEmotesProfile.c:169
CfgParamInt SetInt(string key, int value)
Определения PluginConfigEmotesProfile.c:41
int GetEmoteFromSlot(string slot)
Определения PluginConfigEmotesProfile.c:224
CfgParamInt GetNewCfgParamInt(int value)
Определения PluginConfigEmotesProfile.c:31
void PluginConfigEmotesProfile()
Определения PluginConfigEmotesProfile.c:73
void SetEmoteSlot3(int emoted_id)
Определения PluginConfigEmotesProfile.c:129
void SetEmoteSlot6(int emoted_id)
Определения PluginConfigEmotesProfile.c:159
void SetEmoteSlot1(int emoted_id)
Определения PluginConfigEmotesProfile.c:109
void SetEmoteSlot4(int emoted_id)
Определения PluginConfigEmotesProfile.c:139
ref map< string, ref CfgParam > m_DefaultValues
Определения PluginConfigDebugProfile.c:91
void SetEmoteSlot5(int emoted_id)
Определения PluginConfigEmotesProfile.c:149
void SetEmoteSlot10(int emoted_id)
Определения PluginConfigEmotesProfile.c:199
void SetEmoteSlot11(int emoted_id)
Определения PluginConfigEmotesProfile.c:209
const string CFG_FILE_EMOTES_PROFILE
Определения constants.c:243
const int ID_EMOTE_SURRENDER
Определения constants.c:399
const int ID_EMOTE_POINT
Определения constants.c:380
const int ID_EMOTE_THUMB
Определения constants.c:368
const int ID_EMOTE_TAUNT
Определения constants.c:363
const int ID_EMOTE_GREETING
Определения constants.c:360
const int ID_EMOTE_THROAT
Определения constants.c:369
const int ID_EMOTE_SUICIDE
Определения constants.c:370
const int ID_EMOTE_HEART
Определения constants.c:362
const int ID_EMOTE_SOS
Определения constants.c:361
const int ID_EMOTE_TAUNTKISS
Определения constants.c:365
const int ID_EMOTE_TAUNTELBOW
Определения constants.c:367
array< string > TStringArray
Определения EnScript.c:685