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 #ifdef ENABLE_LOGGING
119 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionDestroy", e.m_Player.ToString() );
124 e.m_Player.OnItemInHandsChanged();
132 #ifdef ENABLE_LOGGING
135 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionDestroyed", e.m_Player.ToString() );
138 e.m_Player.OnItemInHandsChanged();
146 #ifdef ENABLE_LOGGING
149 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionDestroyAndReplaceWithNew", e.m_Player.ToString() );
152 Man player = e.m_Player;
156 if (itemInHands.GetInventory().GetCurrentInventoryLocation(src))
161 edr.m_Lambda.Execute();
165 Error(
"[hndfsm] HandActionDestroyAndReplaceWithNew - not a HandEventDestroyAndReplaceWithNew event");
168 Error(
"[hndfsm] HandActionDestroyAndReplaceWithNew - itemInHands has no InventoryLocation");
184 #ifdef ENABLE_LOGGING
187 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionReplaced", e.m_Player.ToString() );
190 Man player = e.m_Player;
192 player.OnItemInHandsChanged();
200 #ifdef ENABLE_LOGGING
203 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionSwap", e.m_Player.ToString() );
210 e.m_Player.OnItemInHandsChanged();
213 Error(
"[hndfsm] HandActionSwap - this is no HandEventSwap");
221 #ifdef ENABLE_LOGGING
224 Debug.
InventoryHFSMLog(
"Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString() ,
"n/a",
"HandActionForceSwap", e.m_Player.ToString() );
227 HandEventForceSwap es = HandEventForceSwap.Cast(e);
231 e.m_Player.OnItemInHandsChanged();
234 Error(
"[hndfsm] HandActionForceSwap - this is no HandEventForceSwap");
proto native void ObjectDelete(Object obj)
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)
proto native HumanInventory GetHumanInventory()
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.
proto native EntityAI GetEntityInHands()
static bool IsInventoryHFSMLogEnable()
DayZPlayerInstanceType
defined in C++
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.