78 Error(
"[inv] ReplaceItemWithNewLambdaBase Step A.1) failed to get old_item inventory location");
90 Error(
"[inv] ReplaceItemWithNewLambdaBase Step B) failed to remove old_item rom current inventory location");
99 Error(
"[inv] ReplaceItemWithNewLambdaBase Step B) failed to undo remove");
138 new_item.SetOrientation(
m_OldItem.GetOrientation());
228 Print(
"Error [inv] ReplaceItemWithNewLambdaBase OnAbort");
248 fsm_to_notify.ProcessHandAbortEvent(
new HandEventHumanCommandActionAborted(fsm_to_notify.GetManOwner()));
269 fsm_to_notify.ProcessHandAbortEvent(
new HandEventHumanCommandActionAborted(fsm_to_notify.GetManOwner()));
287 Print(
"[syncinv] warning, lambda cannot be executed, skipping!");
289 fsm_to_notify.ProcessHandAbortEvent(
new HandEventHumanCommandActionAborted(fsm_to_notify.GetManOwner()));
const int ECE_OBJECT_SWAP
const int ECE_PLACE_ON_SURFACE
void hndDebugPrint(string s)
InventoryLocationType
types of Inventory Location
proto native bool ConfigIsExisting(string path)
proto native void RemoteObjectTreeDelete(Object obj)
RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure wh...
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto int GetTime()
returns mission time in milliseconds
proto native void RemoteObjectTreeCreate(Object obj)
RemoteObjectCreate - postponed registration of network object (and creation of remote object)....
static proto native EntityAI LocationCreateLocalEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new local item directly at location @NOTE: the item is created localy, i.e....
static proto native EntityAI LocationCreateEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new item directly at location
static proto native bool LocationAddEntity(notnull InventoryLocation inv_loc)
adds item to inventory location
static proto native bool LocationCanRemoveEntity(notnull InventoryLocation inv_loc)
queries if the entity contained in inv_loc.m_item can be removed from ground/attachment/cargo/hands/....
static proto native bool LocationRemoveEntity(notnull InventoryLocation inv_loc)
removes item from inventory location
script counterpart to engine's class Inventory
HumanInventory... with FSM (synchronous, no anims)
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsInventoryHFSMLogEnable()
void ReplaceItemWithNewLambdaBase(EntityAI old_item, string new_item_type)
void DeleteOldEntity()
Step F. - deletes physically old item.
void OverrideNewLocation(InventoryLocation newLocation)
void OnAbort()
Step Out - notification on abort.
void UndoRemoveNetworkObjectInfo()
void UndoRemoveOldItemFromLocation()
ref InventoryLocation m_OldLocation
void CreateNetworkObjectInfo(EntityAI new_item)
Step G. - create NetworkObjectInfo for new item.
bool WantCreateNewEntity()
bool m_RemoveNetworkObjectInfoPassed
ref InventoryLocation m_NewLocation
bool m_RemoveFromLocationPassed
void RemoveOldItemFromLocation()
Step B. - free location for new item @NOTE this operation does not delete the object,...
void Execute(HumanInventoryWithFSM fsm_to_notify=null)
void OnSuccess(EntityAI new_item)
Step H. - notification on finish.
void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
Step E. copy properties from old object to the created one.
void VerifyItemTypeBySlotType()
EntityAI CreateNewEntity()
Step D. - create new entity (LOCAL) with specified type.
bool PrepareLocations()
Step A. - prepare inventory locations.
void RemoveNetworkObjectInfo()
Step C. - remove network part of the object @NOTE this operation does not delete the object,...
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.