DayZ 1.24
Loading...
Searching...
No Matches
HandReplacingItemElsewhereWithNewInHands.c
Go to the documentation of this file.
1class HandStartReplacingItemElsewhereWithNewInHands extends HandStateBase
2{
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
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
43 {
44 // setup nested state machine
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
void hndDebugPrint(string s)
Definition HandFSM.c:1
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
Definition HandFSM.c:27
Abstracted event, not to be used, only inherited.
Hand finite state machine.
represent hand state base
override void OnExit(HandEventBase e)
override void OnEntry(HandEventBase e)
ref HandStartReplacingItemElsewhereWithNewInHands m_Replacing
void HandStartReplacingItemElsewhereWithNewInHands(Man player=NULL, HandStateBase parent=NULL)
void HandReplacingItemElsewhereWithNewInHands(Man player=NULL, HandStateBase parent=NULL)
override void OnAbort(HandEventBase e)
HumanInventory... with FSM (synchronous, no anims)
static bool IsInventoryHFSMLogEnable()
Definition Debug.c:749
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90