Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
handreplacingitemelsewherewithnewinhands.c
Go to the documentation of this file.
1class HandStartReplacingItemElsewhereWithNewInHands extends HandStateBase
2{
3 void HandStartReplacingItemElsewhereWithNewInHands (Man player = NULL, HandStateBase parent = NULL)
4 { }
5
6 override void OnEntry (HandEventBase e)
7 {
8 super.OnEntry(e);
9
10 Man player = e.m_Player;
12 if (edr)
13 {
14 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] HandStartReplacingItemElsewhereWithNewInHands about to execute lambda");
15
16 HumanInventoryWithFSM inv = HumanInventoryWithFSM.Cast(player.GetInventory());
17 edr.m_Lambda.Execute(inv);
18 return;
19 }
20 else
21 Error("[hndfsm] HandStartReplacingItemElsewhereWithNewInHands - not a HandEvenReplaceWithNewBase event");
22 }
23
24 override void OnAbort (HandEventBase e)
25 {
26 super.OnAbort(e);
27 }
28
29 override void OnExit (HandEventBase e)
30 {
31 super.OnExit(e);
32 }
33
34 override bool IsWaitingForActionFinish () { return true; }
35};
36
37
38class HandReplacingItemElsewhereWithNewInHands extends HandStateBase
39{
40 ref HandStartReplacingItemElsewhereWithNewInHands m_Replacing;
41
42 void HandReplacingItemElsewhereWithNewInHands (Man player = NULL, HandStateBase parent = NULL)
43 {
44 // setup nested state machine
45 m_Replacing = new HandStartReplacingItemElsewhereWithNewInHands(player, this);
46
47 // events:
48 HandEventBase _fin_ = new HandEventHumanCommandActionFinished;
49
50 m_FSM = new HandFSM(this); // @NOTE: set owner of the submachine fsm
51
52 m_FSM.AddTransition(new HandTransition( m_Replacing, _fin_, NULL ));
53
54 m_FSM.SetInitialState(m_Replacing);
55 }
56};
57
58
Abstracted event, not to be used, only inherited.
Hand finite state machine.
represent hand state base
HumanInventory... with FSM (synchronous, no anims)
void Error(string err)
Messagebox with error message.
Definition endebug.c:90
HandStateEquipped OnEntry
void hndDebugPrint(string s)
Definition handfsm.c:1
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
Definition handfsm.c:28
override void OnAbort()
class WeaponChambering extends WeaponStateBase IsWaitingForActionFinish
class WeaponChambering_Chamber_OnEntry extends WeaponChambering_Base OnExit