26 bool result = m_arg0.GuardCondition(e) && m_arg1.GuardCondition(e);
31 Debug.
InventoryHFSMLog(
"GuardCondition result: " + result +
" - " + m_arg0.Type() +
" && " + m_arg1.Type(),
"HandGuardAnd" ,
"n/a",
"GuardCondition", e.m_Player.ToString() );
47 bool result = !m_arg0.GuardCondition(e);
52 Debug.
InventoryHFSMLog(
"GuardCondition result: " + result +
" - " + m_arg0.Type(),
"HandGuardNot" ,
"n/a",
"GuardCondition", e.m_Player.ToString() );
68 bool result = m_arg0.GuardCondition(e) || m_arg1.GuardCondition(e);
73 Debug.
InventoryHFSMLog(
"GuardCondition result: " + result +
" - " + m_arg0.Type() +
" || " + m_arg1.Type(),
"HandGuardOr" ,
"n/a",
"GuardCondition", e.m_Player.ToString() );
128 Debug.
InventoryHFSMLog(
"GuardCondition result: " + result,
"HandGuardHasWeaponInEvent",
"n/a",
"GuardCondition", e.m_Player.ToString() );
143 if (e.GetSrcEntity() ==
m_Player.GetHumanInventory().GetEntityInHands())
151 Debug.
InventoryHFSMLog(
"GuardCondition result: " + result +
" - srcItem = " + e.GetSrcEntity() +
" hnd= " +
m_Player.GetHumanInventory().GetEntityInHands(),
"HandGuardIsSameItemInHands" ,
"n/a",
"GuardCondition", e.m_Player.ToString() );
166 if (e.GetSrcEntity())
168 if (e.GetSrcEntity() == hnd)
173 Debug.
InventoryHFSMLog(
"GuardCondition result: true - has same entity in hands " + hnd,
"HandGuardHasDestroyedItemInHands" ,
"n/a",
"GuardCondition",
m_Player.ToString() );
184 Debug.
InventoryHFSMLog(
"GuardCondition result: true - hands already empty",
"HandGuardHasDestroyedItemInHands" ,
"n/a",
"GuardCondition",
m_Player.ToString() );
195 Debug.
InventoryHFSMLog(
"GuardCondition result: true - hands already empty and item destroyed",
"HandGuardHasDestroyedItemInHands" ,
"n/a",
"GuardCondition",
m_Player.ToString() );
203 Debug.
InventoryHFSMLog(
"GuardCondition result: false - destroyed entity not in hands",
"HandGuardHasDestroyedItemInHands" ,
"n/a",
"GuardCondition",
m_Player.ToString() );
218 if (
m_Player.GetHumanInventory().GetEntityInHands())
226 Debug.
InventoryHFSMLog(
"GuardCondition result: " + result +
" - " +
m_Player.GetHumanInventory().GetEntityInHands(),
"HandGuardHasItemInHands" ,
"n/a",
"GuardCondition",
m_Player.ToString() );
242 if ( !
GetGame().IsDedicatedServer())
262 if ( !
GetGame().IsDedicatedServer())
280 Debug.
InventoryHFSMLog(
"GuardCondition result: false - e.m_Dst is null",
"HandGuardHasRoomForItem" ,
"n/a",
"GuardCondition",
m_Player.ToString() );
295 HandEventMoveTo es = HandEventMoveTo.Cast(e);
338 HandEventForceSwap es = HandEventForceSwap.Cast(e);
341 if (!result && es.m_Dst2)
362 HandEventForceSwap es = HandEventForceSwap.Cast(e);
InventoryLocationType
types of Inventory Location
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
script counterpart to engine's class Inventory
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
const int c_InventoryReservationTimeoutShortMS
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static proto native bool LocationCanMoveEntity(notnull InventoryLocation src, notnull InventoryLocation dst)
queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthan...
static proto native bool LocationTestAddEntity(notnull InventoryLocation inv_loc, bool do_resevation_check, bool do_item_check, bool do_lock_check, bool do_occupancy_test, bool do_script_check, bool do_script_load_check)
test if the entity contained in inv_loc.m_item can be added to ground/attachment/cargo/hands/....
Abstracted event, not to be used, only inherited.
override InventoryLocation GetDst()
override bool GuardCondition(HandEventBase e)
void HandGuardNot(HandGuardBase arg0=null)
void HandGuardCanForceSwap(Man p=NULL)
void HandGuardCanMove(Man p=null)
void HandGuardHasDestroyedItemInHands(Man p=null)
void HandGuardOr(HandGuardBase arg0=null, HandGuardBase arg1=null)
bool GuardCondition(HandEventBase e)
void HandGuardHasItemInEvent(Man p=null)
void HandGuardInstantForceSwap(Man p=NULL)
void HandGuardIsSameItemInHands(Man p=null)
void HandGuardAnd(HandGuardBase arg0=null, HandGuardBase arg1=null)
void HandGuardHasRoomForItem(Man p=null)
void HandGuardCanSwap(Man p=NULL)
void HandGuardHasItemInHands(Man p=null)
override bool GuardCondition(HandEventBase e)
void HandGuardHasWeapoonInEvent(Man p=null)
proto native int GetType()
returns type of InventoryLocation
proto native bool IsValid()
verify current set inventory location
proto native EntityAI GetParent()
returns parent of current inventory location
proto native EntityAI GetItem()
returns item of current inventory location
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsInventoryHFSMLogEnable()
proto native CGame GetGame()