DayZ 1.24
|
base class for transformation operations (creating one item from another) More...
Protected Member Functions | |
bool | WantCreateNewEntity () |
bool | CanExecuteLambda () |
bool | PrepareLocations () |
Step A. - prepare inventory locations. | |
void | RemoveOldItemFromLocation () |
Step B. - free location for new item @NOTE this operation does not delete the object, only removes it from inventory location. | |
void | UndoRemoveOldItemFromLocation () |
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) | |
void | UndoRemoveNetworkObjectInfo () |
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. | |
void | DeleteOldEntity () |
Step F. - deletes physically old item. | |
void | CreateNetworkObjectInfo (EntityAI new_item) |
Step G. - create NetworkObjectInfo for new item. | |
void | OnSuccess (EntityAI new_item) |
Step H. - notification on finish. | |
void | OnAbort () |
Step Out - notification on abort. | |
void | Execute (HumanInventoryWithFSM fsm_to_notify=null) |
string | DumpToString () |
Protected Attributes | |
ref InventoryLocation | m_OldLocation |
ref InventoryLocation | m_NewLocation |
bool | m_RemoveFromLocationPassed = false |
Private Member Functions | |
void | ReplaceItemWithNewLambdaBase (EntityAI old_item, string new_item_type) |
void | OverrideNewLocation (InventoryLocation newLocation) |
void | VerifyItemTypeBySlotType () |
Private Attributes | |
EntityAI | m_OldItem |
string | m_NewItemType |
bool | m_RemoveNetworkObjectInfoPassed = false |
base class for transformation operations (creating one item from another)
Definition at line 4 of file ReplaceItemWithNewLambdaBase.c.
|
inlineprivate |
Definition at line 13 of file ReplaceItemWithNewLambdaBase.c.
References m_NewItemType, and m_OldItem.
|
inlineprotected |
Definition at line 31 of file ReplaceItemWithNewLambdaBase.c.
References GameInventory::LocationCanRemoveEntity(), m_OldItem, and m_OldLocation.
Referenced by Execute().
|
inlineprotected |
Step E. copy properties from old object to the created one.
@NOTE: This is supposed to be overriden in derived classes
Definition at line 181 of file ReplaceItemWithNewLambdaBase.c.
References hndDebugPrint(), and LogManager::IsInventoryHFSMLogEnable().
Referenced by Execute().
|
inlineprotected |
Step G. - create NetworkObjectInfo for new item.
@NOTE: new_item can be null if the lambda did not create any item (intentionaly)
Definition at line 200 of file ReplaceItemWithNewLambdaBase.c.
References GetGame(), hndDebugPrint(), and LogManager::IsInventoryHFSMLogEnable().
Referenced by Execute().
|
inlineprotected |
Step D. - create new entity (LOCAL) with specified type.
@NOTE: if (!m_NewLocation || m_NewItemType.Empty) ==> this function does not create a new entity
Definition at line 121 of file ReplaceItemWithNewLambdaBase.c.
References CFG_VEHICLESPATH, ECE_LOCAL, ECE_OBJECT_SWAP, ECE_PLACE_ON_SURFACE, GetGame(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationCreateEntity(), GameInventory::LocationCreateLocalEntity(), m_NewItemType, m_NewLocation, m_OldItem, path, RF_NONE, VerifyItemTypeBySlotType(), and WantCreateNewEntity().
Referenced by Execute().
|
inlineprotected |
Step F. - deletes physically old item.
Definition at line 189 of file ReplaceItemWithNewLambdaBase.c.
References hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), and m_OldItem.
Referenced by Execute().
|
inlineprotected |
Definition at line 294 of file ReplaceItemWithNewLambdaBase.c.
References m_NewItemType, and m_OldItem.
|
inlineprotected |
Definition at line 227 of file ReplaceItemWithNewLambdaBase.c.
References CanExecuteLambda(), CopyOldPropertiesToNew(), CreateNetworkObjectInfo(), CreateNewEntity(), DeleteOldEntity(), InventoryLocation::DumpToStringNullSafe(), Error(), GetGame(), 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().
|
inlineprotected |
Step Out - notification on abort.
@NOTE: new_item can be null if the lambda did not create any item (intentionaly)
Definition at line 222 of file ReplaceItemWithNewLambdaBase.c.
References Print().
Referenced by Execute().
|
inlineprotected |
Step H. - notification on finish.
@NOTE: new_item can be null if the lambda did not create any item (intentionaly)
Definition at line 212 of file ReplaceItemWithNewLambdaBase.c.
References hndDebugPrint(), and LogManager::IsInventoryHFSMLogEnable().
Referenced by Execute().
|
inlineprivate |
Definition at line 19 of file ReplaceItemWithNewLambdaBase.c.
References m_NewLocation.
|
inlineprotected |
Step A. - prepare inventory locations.
Definition at line 43 of file ReplaceItemWithNewLambdaBase.c.
References CFG_VEHICLESPATH, Error(), GetGame(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), m_NewItemType, m_NewLocation, m_OldItem, m_OldLocation, Math3D::MatrixIdentity4(), and path.
Referenced by Execute().
|
inlineprotected |
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)
Definition at line 105 of file ReplaceItemWithNewLambdaBase.c.
References GetGame(), m_OldItem, and m_RemoveNetworkObjectInfoPassed.
Referenced by Execute().
|
inlineprotected |
Step B. - free location for new item @NOTE this operation does not delete the object, only removes it from inventory location.
Definition at line 84 of file ReplaceItemWithNewLambdaBase.c.
References InventoryLocation::DumpToStringNullSafe(), Error(), GameInventory::LocationRemoveEntity(), m_OldLocation, m_RemoveFromLocationPassed, and Print().
Referenced by Execute().
|
inlineprotected |
|
inlineprotected |
Definition at line 94 of file ReplaceItemWithNewLambdaBase.c.
References InventoryLocation::DumpToStringNullSafe(), Error(), GameInventory::LocationAddEntity(), m_OldLocation, and Print().
Referenced by Execute().
|
inlineprivate |
|
inlineprotected |
Definition at line 26 of file ReplaceItemWithNewLambdaBase.c.
References string::Empty, m_NewItemType, and m_NewLocation.
Referenced by CreateNewEntity(), and Execute().
|
private |
Definition at line 7 of file ReplaceItemWithNewLambdaBase.c.
Referenced by UnboxLambda::CopyOldPropertiesToNew(), CreateNewEntity(), DumpToString(), Execute(), PrepareLocations(), ReplaceItemWithNewLambdaBase(), and WantCreateNewEntity().
|
protected |
Definition at line 9 of file ReplaceItemWithNewLambdaBase.c.
Referenced by DropEquipAndDestroyRootLambda::CopyOldPropertiesToNew(), CreateNewEntity(), Execute(), OverrideNewLocation(), PrepareLocations(), and WantCreateNewEntity().
|
private |
Definition at line 6 of file ReplaceItemWithNewLambdaBase.c.
Referenced by CanExecuteLambda(), CreateNewEntity(), DeleteOldEntity(), DumpToString(), Execute(), ReplaceDetonatorItemOnDisarmLambda::OnAbort(), PrepareLocations(), RemoveNetworkObjectInfo(), ReplaceItemWithNewLambdaBase(), SetControlledDevice(), and UndoRemoveNetworkObjectInfo().
|
protected |
Definition at line 8 of file ReplaceItemWithNewLambdaBase.c.
Referenced by CanExecuteLambda(), Execute(), PrepareLocations(), RemoveOldItemFromLocation(), and UndoRemoveOldItemFromLocation().
Definition at line 10 of file ReplaceItemWithNewLambdaBase.c.
Referenced by Execute(), and RemoveOldItemFromLocation().
Definition at line 11 of file ReplaceItemWithNewLambdaBase.c.
Referenced by Execute(), and RemoveNetworkObjectInfo().