base class for transformation operations (creating one item from another) More...
Private Member Functions | |
| void | ReplaceItemWithNewLambdaBase (EntityAI old_item, string new_item_type) | 
| void | OverrideNewLocation (InventoryLocation newLocation) | 
| void | VerifyItemTypeBySlotType () | 
| protected bool | WantCreateNewEntity () | 
| protected bool | CanExecuteLambda () | 
| protected bool | PrepareLocations () | 
| Step A. - prepare inventory locations.   | |
| protected void | RemoveOldItemFromLocation () | 
| Step B. - free location for new item @NOTE this operation does not delete the object, only removes it from inventory location.   | |
| protected void | UndoRemoveOldItemFromLocation () | 
| protected void | RemoveNetworkObjectInfo () | 
| Step C. - remove network part of the object @NOTE this operation does not delete the object, only removes its network part (and deletes it on client)   | |
| protected void | UndoRemoveNetworkObjectInfo () | 
| protected EntityAI | CreateNewEntity () | 
| Step D. - create new entity (LOCAL) with specified type.   | |
| void | CopyOldPropertiesToNew (notnull EntityAI old_item, EntityAI new_item) | 
| Step E. copy properties from old object to the created one.   | |
| protected void | DeleteOldEntity () | 
| Step F. - deletes physically old item.   | |
| protected void | CreateNetworkObjectInfo (EntityAI new_item) | 
| Step G. - create NetworkObjectInfo for new item.   | |
| protected void | OnSuccess (EntityAI new_item) | 
| Step H. - notification on finish.   | |
| protected void | OnAbort () | 
| Step Out - notification on abort.   | |
| void | Execute (HumanInventoryWithFSM fsm_to_notify=null) | 
| string | DumpToString () | 
Private Attributes | |
| EntityAI | m_OldItem | 
| string | m_NewItemType | 
| protected ref InventoryLocation | m_OldLocation | 
| protected ref InventoryLocation | m_NewLocation | 
| protected bool | m_RemoveFromLocationPassed = false | 
| private bool | m_RemoveNetworkObjectInfoPassed = false | 
base class for transformation operations (creating one item from another)
      
  | 
  inlineprivate | 
References m_NewItemType, and m_OldItem.
      
  | 
  inlineprivate | 
References GameInventory::LocationCanRemoveEntity(), m_OldItem, and m_OldLocation.
Referenced by Execute().
Step E. copy properties from old object to the created one.
@NOTE: This is supposed to be overriden in derived classes
References hndDebugPrint(), and LogManager::IsInventoryHFSMLogEnable().
Referenced by Execute().
      
  | 
  inlineprivate | 
Step G. - create NetworkObjectInfo for new item.
@NOTE: new_item can be null if the lambda did not create any item (intentionaly)
References GetGame(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), and CGame::RemoteObjectTreeCreate().
Referenced by Execute().
      
  | 
  inlineprivate | 
Step D. - create new entity (LOCAL) with specified type.
@NOTE: if (!m_NewLocation || m_NewItemType.Empty) ==> this function does not create a new entity
References CFG_VEHICLESPATH, CGame::ConfigGetInt(), CGame::ConfigIsExisting(), ECE_LOCAL, ECE_OBJECT_SWAP, ECE_PLACE_ON_SURFACE, GetGame(), InventoryLocation::GetParent(), InventoryLocation::GetPos(), InventoryLocation::GetSlot(), InventoryLocation::GetType(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationCreateEntity(), GameInventory::LocationCreateLocalEntity(), m_NewItemType, m_NewLocation, m_OldItem, path, RF_NONE, InventoryLocation::SetAttachment(), VerifyItemTypeBySlotType(), and WantCreateNewEntity().
Referenced by Execute().
      
  | 
  inlineprivate | 
Step F. - deletes physically old item.
References hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), and m_OldItem.
Referenced by Execute().
      
  | 
  inlineprivate | 
      
  | 
  inlineprivate | 
References CanExecuteLambda(), CopyOldPropertiesToNew(), CreateNetworkObjectInfo(), CreateNewEntity(), DeleteOldEntity(), InventoryLocation::DumpToStringNullSafe(), Error(), GetGame(), CGame::GetTime(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), m_NewItemType, m_NewLocation, m_OldItem, m_OldLocation, m_RemoveFromLocationPassed, m_RemoveNetworkObjectInfoPassed, OnAbort(), OnSuccess(), PrepareLocations(), Print(), RemoveNetworkObjectInfo(), RemoveOldItemFromLocation(), UndoRemoveNetworkObjectInfo(), UndoRemoveOldItemFromLocation(), and WantCreateNewEntity().
Referenced by GameInventory::ReplaceItemWithNew().
      
  | 
  inlineprivate | 
      
  | 
  inlineprivate | 
Step H. - notification on finish.
@NOTE: new_item can be null if the lambda did not create any item (intentionaly)
References hndDebugPrint(), and LogManager::IsInventoryHFSMLogEnable().
Referenced by Execute().
      
  | 
  inlineprivate | 
References m_NewLocation.
      
  | 
  inlineprivate | 
Step A. - prepare inventory locations.
References CFG_VEHICLESPATH, CGame::ConfigGetInt(), CGame::ConfigIsExisting(), InventoryLocation::CopyLocationFrom(), Error(), InventoryLocation::GetDir(), GetGame(), InventoryLocation::GetParent(), InventoryLocation::GetPos(), InventoryLocation::GetType(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), m_NewItemType, m_NewLocation, m_OldItem, m_OldLocation, Math3D::MatrixIdentity4(), path, InventoryLocation::SetGround(), and InventoryLocation::SetGroundEx().
Referenced by Execute().
      
  | 
  inlineprivate | 
Step C. - remove network part of the object @NOTE this operation does not delete the object, only removes its network part (and deletes it on client)
References GetGame(), m_OldItem, m_RemoveNetworkObjectInfoPassed, and CGame::RemoteObjectTreeDelete().
Referenced by Execute().
      
  | 
  inlineprivate | 
Step B. - free location for new item @NOTE this operation does not delete the object, only removes it from inventory location.
References InventoryLocation::DumpToStringNullSafe(), Error(), GameInventory::LocationRemoveEntity(), m_OldLocation, m_RemoveFromLocationPassed, and Print().
Referenced by Execute().
      
  | 
  inlineprivate | 
References GetGame(), m_OldItem, and CGame::RemoteObjectTreeCreate().
Referenced by Execute().
      
  | 
  inlineprivate | 
References InventoryLocation::DumpToStringNullSafe(), Error(), GameInventory::LocationAddEntity(), m_OldLocation, and Print().
Referenced by Execute().
      
  | 
  inlineprivate | 
Referenced by CreateNewEntity().
      
  | 
  inlineprivate | 
References string::Empty, m_NewItemType, and m_NewLocation.
Referenced by CreateNewEntity(), and Execute().
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
Referenced by CanExecuteLambda(), CreateNewEntity(), DeleteOldEntity(), DumpToString(), Execute(), ReplaceDetonatorItemOnDisarmLambda::OnSuccess(), PrepareLocations(), RemoveNetworkObjectInfo(), HumanInventory::ReplaceItemWithNew(), GameInventory::ReplaceItemWithNew(), ReplaceItemWithNewLambdaBase(), and UndoRemoveNetworkObjectInfo().
      
  | 
  private | 
Referenced by CanExecuteLambda(), Execute(), PrepareLocations(), RemoveOldItemFromLocation(), and UndoRemoveOldItemFromLocation().
      
  | 
  private | 
Referenced by Execute(), and RemoveOldItemFromLocation().
      
  | 
  private | 
Referenced by Execute(), and RemoveNetworkObjectInfo().