27 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());
46 bool result = !m_arg0.GuardCondition(
e);
50 Debug.
InventoryHFSMLog(
"GuardCondition result: " +
result +
" - " + m_arg0.Type(),
"HandGuardNot",
"n/a",
"GuardCondition",
e.m_Player.ToString());
65 bool result = m_arg0.GuardCondition(
e) || m_arg1.GuardCondition(
e);
69 Debug.
InventoryHFSMLog(
"GuardCondition result: " +
result +
" - " + m_arg0.Type() +
" || " + m_arg1.Type(),
"HandGuardOr",
"n/a",
"GuardCondition",
e.m_Player.ToString());
116 Debug.
InventoryHFSMLog(
"GuardCondition result: " +
result,
"HandGuardHasWeaponInEvent",
"n/a",
"GuardCondition",
e.m_Player.ToString());
130 if (
e.GetSrcEntity() ==
m_Player.GetHumanInventory().GetEntityInHands())
135 Debug.
InventoryHFSMLog(
"GuardCondition result: " +
result +
" - srcItem = " +
e.GetSrcEntity() +
" hnd= " +
m_Player.GetHumanInventory().GetEntityInHands(),
"HandGuardIsSameItemInHands",
"n/a",
"GuardCondition",
e.m_Player.ToString());
149 if (
e.GetSrcEntity())
151 if (
e.GetSrcEntity() ==
hnd)
155 Debug.
InventoryHFSMLog(
"GuardCondition result: true - has same entity in hands " +
hnd,
"HandGuardHasDestroyedItemInHands",
"n/a",
"GuardCondition",
m_Player.ToString());
164 Debug.
InventoryHFSMLog(
"GuardCondition result: true - hands already empty",
"HandGuardHasDestroyedItemInHands",
"n/a",
"GuardCondition",
m_Player.ToString());
173 Debug.
InventoryHFSMLog(
"GuardCondition result: true - hands already empty and item destroyed",
"HandGuardHasDestroyedItemInHands",
"n/a",
"GuardCondition",
m_Player.ToString());
179 Debug.
InventoryHFSMLog(
"GuardCondition result: false - destroyed entity not in hands",
"HandGuardHasDestroyedItemInHands",
"n/a",
"GuardCondition",
m_Player.ToString());
193 if (
m_Player.GetHumanInventory().GetEntityInHands())
212 if (
e.GetDst() &&
e.GetDst().IsValid())
214 if (!
GetGame().IsDedicatedServer())
217 m_Player.GetHumanInventory().ClearInventoryReservationEx(
e.GetDst().GetItem(),
e.GetDst());
232 if (!
GetGame().IsDedicatedServer())
247 Debug.
InventoryHFSMLog(
"GuardCondition result: false - e.m_Dst is null",
"HandGuardHasRoomForItem",
"n/a",
"GuardCondition",
m_Player.ToString());
261 HandEventMoveTo
es = HandEventMoveTo.Cast(
e);
263 bool result =
e.m_IsJuncture ||
e.m_IsRemote;
285 bool result =
e.m_IsJuncture ||
e.m_IsRemote;
305 HandEventForceSwap
es = HandEventForceSwap.Cast(
e);
307 bool result =
e.m_IsJuncture ||
e.m_IsRemote;
332 HandEventForceSwap
es = HandEventForceSwap.Cast(
e);
340 if (
src1.GetParent() ==
dst2.GetParent())
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
const int c_InventoryReservationTimeoutShortMS
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
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/....
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
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...
Abstracted event, not to be used, only inherited.
TODO(kumarjac): This guard is unused but it has a fault and doesn't conform with maximimal/minimal ch...
void HandGuardIsSameItemInHands(Man p=null)
void HandGuardInstantForceSwap(Man p=NULL)
void HandGuardCanMove(Man p=null)
void HandGuardHasRoomForItem(Man p=null)
void HandGuardCanSwap(Man p=NULL)
void HandGuardHasDestroyedItemInHands(Man p=null)
void HandGuardNot(HandGuardBase arg0=null)
void HandGuardOr(HandGuardBase arg0=null, HandGuardBase arg1=null)
void HandGuardHasItemInEvent(Man p=null)
void HandGuardCanForceSwap(Man p=NULL)
void HandGuardAnd(HandGuardBase arg0=null, HandGuardBase arg1=null)
bool GuardCondition(HandEventBase e)
void HandGuardHasItemInHands(Man p=null)
override bool GuardCondition(HandEventBase e)
void HandGuardHasWeapoonInEvent(Man p=null)
override bool GuardCondition(HandEventBase e)
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsInventoryHFSMLogEnable()
proto native CGame GetGame()