PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
ReplaceItemWithNewLambdaBase Class Reference

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
 

Detailed Description

base class for transformation operations (creating one item from another)

Constructor & Destructor Documentation

◆ ReplaceItemWithNewLambdaBase()

void ReplaceItemWithNewLambdaBase ( EntityAI  old_item,
string  new_item_type 
)
inlineprivate

References m_NewItemType, and m_OldItem.

Member Function Documentation

◆ CanExecuteLambda()

protected bool CanExecuteLambda ( )
inlineprivate

◆ CopyOldPropertiesToNew()

CopyOldPropertiesToNew ( notnull EntityAI  old_item,
EntityAI  new_item 
)
inlineprivate

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().

◆ CreateNetworkObjectInfo()

CreateNetworkObjectInfo ( EntityAI  new_item)
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().

◆ CreateNewEntity()

◆ DeleteOldEntity()

DeleteOldEntity ( )
inlineprivate

Step F. - deletes physically old item.

References hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), and m_OldItem.

Referenced by Execute().

◆ DumpToString()

◆ Execute()

◆ OnAbort()

OnAbort ( )
inlineprivate

Step Out - notification on abort.

@NOTE: new_item can be null if the lambda did not create any item (intentionaly)

References Print().

Referenced by Execute().

◆ OnSuccess()

OnSuccess ( EntityAI  new_item)
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().

◆ OverrideNewLocation()

void OverrideNewLocation ( InventoryLocation  newLocation)
inlineprivate

References m_NewLocation.

◆ PrepareLocations()

◆ RemoveNetworkObjectInfo()

RemoveNetworkObjectInfo ( )
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().

◆ RemoveOldItemFromLocation()

RemoveOldItemFromLocation ( )
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().

◆ UndoRemoveNetworkObjectInfo()

protected void UndoRemoveNetworkObjectInfo ( )
inlineprivate

◆ UndoRemoveOldItemFromLocation()

protected void UndoRemoveOldItemFromLocation ( )
inlineprivate

◆ VerifyItemTypeBySlotType()

void VerifyItemTypeBySlotType ( )
inlineprivate

Referenced by CreateNewEntity().

◆ WantCreateNewEntity()

protected bool WantCreateNewEntity ( )
inlineprivate

References string::Empty, m_NewItemType, and m_NewLocation.

Referenced by CreateNewEntity(), and Execute().

Field Documentation

◆ m_NewItemType

◆ m_NewLocation

◆ m_OldItem

◆ m_OldLocation

◆ m_RemoveFromLocationPassed

protected bool m_RemoveFromLocationPassed = false
private

◆ m_RemoveNetworkObjectInfoPassed

private bool m_RemoveNetworkObjectInfoPassed = false
private

Referenced by Execute(), and RemoveNetworkObjectInfo().


The documentation for this class was generated from the following file: