22 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionCreated", e.m_Player.ToString() );
26 e.m_Player.OnItemInHandsChanged();
37 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionTake", e.m_Player.ToString() );
42 e.m_Player.OnItemInHandsChanged();
53 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionDrop", e.m_Player.ToString() );
58 e.m_Player.OnItemInHandsChanged();
69 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionThrow", e.m_Player.ToString() );
72 HandEventThrow throwEvent = HandEventThrow.Cast(e);
81 item.ThrowPhysically(player, throwEvent.GetForce());
83 Error(
"[hndfsm] HandActionThrow - src entity null!");
97 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionMoveTo", e.m_Player.ToString() );
101 HandEventMoveTo es = HandEventMoveTo.Cast(e);
105 e.m_Player.OnItemInHandsChanged();
108 Error(
"[hndfsm] HandActionMoveTo - this is no HandEventMoveTo");
116 if (e.m_Player.GetEntityInHands() != e.GetSrcEntity())
118 #ifdef ENABLE_LOGGING
121 Error(
"[hndfsm] HandActionDestroy - item is not in player hands");
128 #ifdef ENABLE_LOGGING
131 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionDestroy", e.m_Player.ToString() );
135 g_Game.ObjectDelete(e.GetSrcEntity());
136 e.m_Player.OnItemInHandsChanged();
144 #ifdef ENABLE_LOGGING
147 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionDestroyed", e.m_Player.ToString() );
150 e.m_Player.OnItemInHandsChanged();
158 #ifdef ENABLE_LOGGING
161 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionDestroyAndReplaceWithNew", e.m_Player.ToString() );
164 Man player = e.m_Player;
165 EntityAI itemInHands = player.GetEntityInHands();
168 if (itemInHands.GetInventory().GetCurrentInventoryLocation(src))
173 edr.m_Lambda.Execute();
177 Error(
"[hndfsm] HandActionDestroyAndReplaceWithNew - not a HandEventDestroyAndReplaceWithNew event");
180 Error(
"[hndfsm] HandActionDestroyAndReplaceWithNew - itemInHands has no InventoryLocation");
196 #ifdef ENABLE_LOGGING
199 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionReplaced", e.m_Player.ToString() );
202 Man player = e.m_Player;
204 player.OnItemInHandsChanged();
212 #ifdef ENABLE_LOGGING
215 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionSwap", e.m_Player.ToString() );
222 e.m_Player.OnItemInHandsChanged();
225 Error(
"[hndfsm] HandActionSwap - this is no HandEventSwap");
233 #ifdef ENABLE_LOGGING
236 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionForceSwap", e.m_Player.ToString() );
239 HandEventForceSwap es = HandEventForceSwap.Cast(e);
243 e.m_Player.OnItemInHandsChanged();
246 Error(
"[hndfsm] HandActionForceSwap - this is no HandEventForceSwap");
override void OnItemInHandsChanged()
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...
static proto native bool LocationSwap(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
swaps two entities
script counterpart to engine's class Inventory
override void Action(HandEventBase e)
void Action(HandEventBase e)
override void Action(HandEventBase e)
override InventoryLocation GetDst()
ref InventoryLocation m_Dst
Abstracted event, not to be used, only inherited.
static bool IsInventoryHFSMLogEnable()
DayZPlayerInstanceType
defined in C++
void Error(string err)
Messagebox with error message.