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");
103 Error(
"[inv] ReplaceItemWithNewLambdaBase Step B) failed to undo remove");
146 new_item.SetOrientation(
m_OldItem.GetOrientation());
216 g_Game.RemoteObjectTreeCreate(new_item);
236 Print(
"Error [inv] ReplaceItemWithNewLambdaBase OnAbort");
256 fsm_to_notify.ProcessHandAbortEvent(
new HandEventHumanCommandActionAborted(fsm_to_notify.GetManOwner()));
277 fsm_to_notify.ProcessHandAbortEvent(
new HandEventHumanCommandActionAborted(fsm_to_notify.GetManOwner()));
295 Print(
"[syncinv] warning, lambda cannot be executed, skipping!");
297 fsm_to_notify.ProcessHandAbortEvent(
new HandEventHumanCommandActionAborted(fsm_to_notify.GetManOwner()));
301 int te =
g_Game.GetTime();
const int ECE_OBJECT_SWAP
const int ECE_PLACE_ON_SURFACE
void hndDebugPrint(string s)
InventoryLocationType
types of Inventory Location
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,...
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.