Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
handreplacingitemelsewherewithnewinhands.c
Go to the documentation of this file.
1
class
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;
11
HandEventReplaceWithNewBase
edr =
HandEventReplaceWithNewBase
.Cast(e);
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
38
class
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
HandEventBase
Abstracted event, not to be used, only inherited.
Definition
hand_events.c:212
HandEventReplaceWithNewBase
Definition
hand_events.c:821
HandFSM
Hand finite state machine.
HandStateBase
represent hand state base
Definition
handanimatedforceswapping.c:4
HandStateBase::OnAbort
override void OnAbort(HandEventBase e)
Definition
handreplacingitemelsewherewithnewinhands.c:24
HandStateBase::m_Replacing
ref HandStartReplacingItemElsewhereWithNewInHands m_Replacing
Definition
handreplacingitemelsewherewithnewinhands.c:40
HandStateBase::OnEntry
override void OnEntry(HandEventBase e)
Definition
handreplacingitemelsewherewithnewinhands.c:6
HandStateBase::m_FSM
ref HandFSM m_FSM
hierarchical parent state of this state (or null)
Definition
handstatebase.c:10
HandStateBase::HandStateBase
void HandStateBase(Man player=NULL, HandStateBase parent=NULL)
nested state machine (or null)
Definition
handstatebase.c:11
HandStateBase::OnExit
override void OnExit(HandEventBase e)
Definition
handreplacingitemelsewherewithnewinhands.c:29
HandStateBase::HandReplacingItemElsewhereWithNewInHands
void HandReplacingItemElsewhereWithNewInHands(Man player=NULL, HandStateBase parent=NULL)
Definition
handreplacingitemelsewherewithnewinhands.c:42
HandStateBase::HandStartReplacingItemElsewhereWithNewInHands
void HandStartReplacingItemElsewhereWithNewInHands(Man player=NULL, HandStateBase parent=NULL)
Definition
handreplacingitemelsewherewithnewinhands.c:3
HandStateBase::IsWaitingForActionFinish
override bool IsWaitingForActionFinish()
Definition
handreplacingitemelsewherewithnewinhands.c:34
HumanInventoryWithFSM
HumanInventory... with FSM (synchronous, no anims).
Definition
humaninventorywithfsm.c:6
LogManager
Definition
debug.c:692
LogManager::IsInventoryHFSMLogEnable
static bool IsInventoryHFSMLogEnable()
Definition
debug.c:766
Error
void Error(string err)
Messagebox with error message.
Definition
endebug.c:90
hndDebugPrint
void hndDebugPrint(string s)
Definition
handfsm.c:1
HandTransition
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
Definition
handfsm.c:28
Games
Dayz
scripts
3_game
systems
inventory
handreplacingitemelsewherewithnewinhands.c
Generated by
1.17.0