53{
55
69
70
71 int m_CH_WeapAction = -1;
72 int m_CH_WeapActionType = -1;
73 int m_CH_LastWeapAction = -1;
74 int m_CH_LastWeapActionType = -1;
75 float m_CH_WeapActionProgressStart = 0;
76 float m_CH_WeapActionProgressEnd = 1;
77
78 string m_CH_WeaponChangeI;
79 int m_CH_WeaponChangeSlotH = -1;
80 int m_CH_WeaponChangeSlotS = -1;
81
82
83
84
87 {
96
105
108
113
118
123
126
131
134
139
143
145
146
149
153
160
161 };
162
163
165 {
166 int l = m_AbilityConfig.Count();
167 for (
int i = 0;
i <
l;
i++)
168 {
170 {
172 }
173 }
174 return -1;
175 }
176
177
178
179
180
182 {
184
186
190 {
192 hcw.DebugResetEvents();
193 }
194 }
195
196
198 {
200 }
201
202
204 {
207
210
213
220
221
222 m_WidgetActionEvents.SetText("Events:");
223
224 }
225
227 {
228 }
229
230
231
232
233
234
235
237 {
240 {
241 return;
242 }
243
245 {
249 {
250 if (m_CurrentWeapon !=
w)
252 }
253 else
254 {
255 m_Selector.ClearItems();
256 }
257 }
258
261
262 string text =
"Action: " +
hcw.GetRunningAction().ToString() +
" " +
hcw.GetRunningActionType().ToString();
263 m_WidgetActionRunning.SetText(
text);
264
265
268 {
271 while(true)
272 {
275 {
276 break;
277 }
278
280
283 }
284
285 m_WidgetActionEvents.SetText(
eventStr);
286 }
287 }
288
289
290
291
292
293
295 {
296
297 m_Selector.ClearItems();
298
301
303 {
307 {
309 }
310 }
311
312 m_Selector.AddItem(
"=========== All - not safe =========",
NULL, 0);
313
314
315
316 {
317 int l = m_AbilityConfig.Count();
318 for (
int a = 0; a <
l; a++)
319 {
321 }
322 }
323
325 }
326
327
329 void WeaponsStartAction()
330 {
331 int row = m_Selector.GetSelectedRow();
333 {
334 return;
335 }
336
340 {
341 m_CH_WeapAction =
userData.GetAction();
342 m_CH_WeapActionType =
userData.GetActionType();
343 m_CH_WeapActionProgressStart = m_WeaponActionProgressStart.GetText().ToFloat();
344 m_CH_WeapActionProgressEnd = m_WeaponActionProgressEnd.GetText().ToFloat();
345
346 Print(
"DayzPlayerImplement_Weapons::WeaponsStartAction");
347 }
348 }
349
350
351
352
353
356 {
357 if (
w == m_ButtonStart)
358 {
359 WeaponsStartAction();
360 return true;
361 }
362 else if (
w == m_SetInitStateB)
363 {
364 int frameI = m_SetInitStateI.GetText().ToInt();
365
367
370 }
371 else if (
w == m_WeaponChange)
372 {
373 Print(
"Weapon Change pressed");
374
377 {
378 Print(
"No dispatcher - cannot get selected weapon");
379 return false;
380 }
381
384 {
385 Print(
"No selected object");
386 return false;
387 }
388
391
392 m_CH_WeaponChangeI =
p1.param1;
393 m_CH_WeaponChangeSlotH = m_WeaponSlotH.GetText().ToInt();
394 m_CH_WeaponChangeSlotS = m_WeaponSlotS.GetText().ToInt();
395 }
396 else if (
w == m_WeaponHide)
397 {
398 m_CH_WeaponChangeI = "";
399 m_CH_WeaponChangeSlotH = m_WeaponSlotH.GetText().ToInt();
400 m_CH_WeaponChangeSlotS = m_WeaponSlotS.GetText().ToInt();
401 }
402
403
404 return false;
405 }
406
407
408
409
411 {
412 if (m_CH_WeaponChangeSlotH == -1)
413 {
414 return false;
415 }
416
420
421 m_CH_WeaponChangeSlotH = -1;
422 m_CH_WeaponChangeSlotS = -1;
423
424 return true;
425 }
426
427
428
429
430
432 {
433
434
436 {
438 m_CH_WeapAction = m_CH_LastWeapAction;
439 m_CH_WeapActionType = m_CH_LastWeapActionType;
440
441 Print(
"DayzPlayerImplement_Weapons OnKC_MULTIPLY");
442 }
443
444
445 if (m_CH_WeapAction >= 0)
446 {
447 m_CH_LastWeapAction = m_CH_WeapAction;
448 m_CH_LastWeapActionType = m_CH_WeapActionType;
449
453 {
455 hcw.SetActionProgressParams(m_CH_WeapActionProgressStart, m_CH_WeapActionProgressEnd);
456 hcw.StartAction(m_CH_WeapAction, m_CH_WeapActionType);
457
458 Print(
"DayzPlayerImplement_Weapons::WeaponsStartAction2");
459
460 }
461
462 m_CH_WeapAction = -1;
463 }
464
465 }
466}
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
Definition DayZGame.c:146
Dispatcher GetDispatcher()
Definition Dispatcher.c:20
const CallID CALL_ID_SCR_CNSL_GETSELECTEDITEM
Definition Dispatcher.c:11
PlayerBase GetPlayer()
Definition ModifierBase.c:51
bool IsWeaponChange(out string pNewWeapon, out int pHideSlot, out int pShowSlot)
Definition PluginDayzPlayerDebug.c:1037
Widget m_MainWnd
Definition PluginDayzPlayerDebug.c:206
void CommandHandler()
Definition PluginDayzPlayerDebug.c:1051
void DestroyModuleWidgets()
Definition PluginDayzPlayerDebug.c:524
void CreateModuleWidgets()
Definition PluginDayzPlayerDebug.c:448
int m_iAction
Definition PluginDayzPlayerDebug_Weapons.c:54
string m_Name
Definition PluginDayzPlayerDebug_Weapons.c:42
void PluginDayzPlayerWeaponsDebugUserData(int pAction, int pActionType)
Definition PluginDayzPlayerDebug_Weapons.c:36
int m_iActionT
Definition PluginDayzPlayerDebug_Weapons.c:55
class PluginDayzPlayerWeaponsDebugUserData PluginDayzPlayerDebug_AbilityConfig(string pName, int pAction, int pActionT)
Definition PluginDayzPlayerDebug_Weapons.c:35
void Tick()
Definition SoundEvents.c:107
pair ( action, actionType )
Definition Weapon_Base.c:5
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition DayZPlayerImplement.c:111
Definition Dispatcher.c:14
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
Definition PluginDayzPlayerDebug_Weapons.c:53
Definition PluginDayzPlayerDebug_Weapons.c:6
Definition EnWidgets.c:220
shorthand
Definition BoltActionRifle_Base.c:6
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)
KeyCode
Definition EnSystem.c:157
proto native int KeyState(KeyCode key)
WeaponActionReloadClipTypes
Definition human.c:861
WeaponActionChamberingTypes
Definition human.c:876
WeaponActions
actions
Definition human.c:816
WeaponActionChamberingLoaderTypes
Definition human.c:906
WeaponActionReloadTypes
Definition human.c:832
WeaponActionUnjammingTypes
Definition human.c:912
WeaponActionFireTypes
Definition human.c:920