232 {
234 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[syncinv] t=" + t +
" lambda.Execute start ");
235
236
238
240 {
241
244 {
245 Error(
"[inv] ReplaceItemWithNewLambdaBase Step B) ABORT - failed while rm old item from loc=" + InventoryLocation.DumpToStringNullSafe(
m_OldLocation));
246
247 if (fsm_to_notify)
250 return;
251 }
252
253
255
256
259 {
260
261 Print(
"Error [inv] ReplaceItemWithNewLambdaBase Step D) ABORT - wanted to create=" +
m_NewItemType +
" at loc=" + InventoryLocation.DumpToStringNullSafe(
m_NewLocation) +
", but failed");
266
268 if (fsm_to_notify)
270 return;
271 }
272
273
275
276
278
279
281
282
284 }
285 else
286 {
287 Print(
"[syncinv] warning, lambda cannot be executed, skipping!");
288 if (fsm_to_notify)
291 return;
292 }
294 int dt = te - t;
295 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[syncinv] te=" + te +
" lambda.Execute end, exec time=" + dt);
296 }
void hndDebugPrint(string s)
proto int GetTime()
returns mission time in milliseconds
bool ProcessHandAbortEvent(HandEventBase e)
void DeleteOldEntity()
Step F. - deletes physically old item.
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 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.
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.