51{
53
67
68
69 int m_CH_WeapAction = -1;
70 int m_CH_WeapActionType = -1;
71 int m_CH_LastWeapAction = -1;
72 int m_CH_LastWeapActionType = -1;
73 float m_CH_WeapActionProgressStart = 0;
74 float m_CH_WeapActionProgressEnd = 1;
75
76 string m_CH_WeaponChangeI;
77 int m_CH_WeaponChangeSlotH = -1;
78 int m_CH_WeaponChangeSlotS = -1;
79
80
81
82
93
102
105
110
115
120
123
128
131
136
140
142
143
146
150
157
158 };
159
160
162 {
163 int l = m_AbilityConfig.Count();
164 for (
int i = 0;
i <
l;
i++)
165 {
168 }
169 return -1;
170 }
171
172
173
174
175
177 {
179
181
185 {
187 hcw.DebugResetEvents();
188 }
189 }
190
191
193 {
195 }
196
197
199 {
202
205
208
215
216
217 m_WidgetActionEvents.SetText("Events:");
218
219 }
220
222 {
223 }
224
225
226
227
228
229
231 {
234 return;
235
237 {
241 {
242 if (m_CurrentWeapon !=
w)
244 }
245 else
246 m_Selector.ClearItems();
247 }
248
251
252 string text =
"Action: " +
hcw.GetRunningAction().ToString() +
" " +
hcw.GetRunningActionType().ToString();
253 m_WidgetActionRunning.SetText(
text);
254
255
258 {
261 while (true)
262 {
265 break;
266
268
271 }
272
273 m_WidgetActionEvents.SetText(
eventStr);
274 }
275 }
276
277
278
279
280
282 {
283
284 m_Selector.ClearItems();
285
288
290 {
295 }
296
297 m_Selector.AddItem(
"=========== All - not safe =========",
NULL, 0);
298
299
300
301 {
302 int l = m_AbilityConfig.Count();
303 for (
int a = 0; a <
l; a++)
305 }
306
308 }
309
310
312 void WeaponsStartAction()
313 {
314 int row = m_Selector.GetSelectedRow();
316 return;
317
321 {
322 m_CH_WeapAction =
userData.GetAction();
323 m_CH_WeapActionType =
userData.GetActionType();
324 m_CH_WeapActionProgressStart = m_WeaponActionProgressStart.GetText().ToFloat();
325 m_CH_WeapActionProgressEnd = m_WeaponActionProgressEnd.GetText().ToFloat();
326
327 Print(
"DayzPlayerImplement_Weapons::WeaponsStartAction");
328 }
329 }
330
331
332
333
334
337 {
338 if (
w == m_ButtonStart)
339 {
340 WeaponsStartAction();
341 return true;
342 }
343 else if (
w == m_SetInitStateB)
344 {
345 int frameI = m_SetInitStateI.GetText().ToInt();
346
348
351 }
352 else if (
w == m_WeaponChange)
353 {
354 Print(
"Weapon Change pressed");
355
358 {
359 Print(
"No dispatcher - cannot get selected weapon");
360 return false;
361 }
362
365 {
366 Print(
"No selected object");
367 return false;
368 }
369
372
373 m_CH_WeaponChangeI =
p1.param1;
374 m_CH_WeaponChangeSlotH = m_WeaponSlotH.GetText().ToInt();
375 m_CH_WeaponChangeSlotS = m_WeaponSlotS.GetText().ToInt();
376 }
377 else if (
w == m_WeaponHide)
378 {
379 m_CH_WeaponChangeI = "";
380 m_CH_WeaponChangeSlotH = m_WeaponSlotH.GetText().ToInt();
381 m_CH_WeaponChangeSlotS = m_WeaponSlotS.GetText().ToInt();
382 }
383
384
385 return false;
386 }
387
388
389
390
392 {
393 if (m_CH_WeaponChangeSlotH == -1)
394 return false;
395
399
400 m_CH_WeaponChangeSlotH = -1;
401 m_CH_WeaponChangeSlotS = -1;
402
403 return true;
404 }
405
406
407
408
409
411 {
412
413
415 {
417 m_CH_WeapAction = m_CH_LastWeapAction;
418 m_CH_WeapActionType = m_CH_LastWeapActionType;
419
420 Print(
"DayzPlayerImplement_Weapons OnKC_MULTIPLY");
421 }
422
423
424 if (m_CH_WeapAction >= 0)
425 {
426 m_CH_LastWeapAction = m_CH_WeapAction;
427 m_CH_LastWeapActionType = m_CH_WeapActionType;
428
432 {
434 hcw.SetActionProgressParams(m_CH_WeapActionProgressStart, m_CH_WeapActionProgressEnd);
435 hcw.StartAction(m_CH_WeapAction, m_CH_WeapActionType);
436
437 Print(
"DayzPlayerImplement_Weapons::WeaponsStartAction2");
438
439 }
440
441 m_CH_WeapAction = -1;
442 }
443
444 }
445}
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
Dispatcher GetDispatcher()
const CallID CALL_ID_SCR_CNSL_GETSELECTEDITEM
bool IsWeaponChange(out string pNewWeapon, out int pHideSlot, out int pShowSlot)
void DestroyModuleWidgets()
void CreateModuleWidgets()
void PluginDayzPlayerWeaponsDebugUserData(int pAction, int pActionType)
class PluginDayzPlayerWeaponsDebugUserData PluginDayzPlayerDebug_AbilityConfig(string pName, int pAction, int pActionT)
pair ( action, actionType )
Super root of all classes in Enforce script.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native void ClearKey(KeyCode key)
proto native int KeyState(KeyCode key)
WeaponActionReloadClipTypes
WeaponActionChamberingTypes
WeaponActionChamberingLoaderTypes
WeaponActionUnjammingTypes