Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
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{
41
42 void HandReplacingItemElsewhereWithNewInHands (Man player = NULL, HandStateBase parent = NULL)
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
58
Abstracted event, not to be used, only inherited.
Hand finite state machine.
represent hand state base
override void OnAbort(HandEventBase e)
ref HandStartReplacingItemElsewhereWithNewInHands m_Replacing
override void OnEntry(HandEventBase e)
ref HandFSM m_FSM
hierarchical parent state of this state (or null)
void HandStateBase(Man player=NULL, HandStateBase parent=NULL)
nested state machine (or null)
override void OnExit(HandEventBase e)
void HandReplacingItemElsewhereWithNewInHands(Man player=NULL, HandStateBase parent=NULL)
void HandStartReplacingItemElsewhereWithNewInHands(Man player=NULL, HandStateBase parent=NULL)
HumanInventory... with FSM (synchronous, no anims).
static bool IsInventoryHFSMLogEnable()
Definition debug.c:766
void Error(string err)
Messagebox with error message.
Definition endebug.c:90
void hndDebugPrint(string s)
Definition handfsm.c:1
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
Definition handfsm.c:28