Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
ReplaceItemWithNewLambdaBase Class Reference

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

Inheritance diagram for ReplaceItemWithNewLambdaBase:
BreakLongWoodenStick DropEquipAndDestroyRootLambda MoveEquipToExistingItemAndDestroyOldRootLambda ReplaceDetonatorItemLambda ReplaceItemWithNewLambda TorchLambda UnboxLambda UnrestrainSelfPlayer

Protected Member Functions

bool CanExecuteLambda ()
void CopyOldPropertiesToNew (notnull EntityAI old_item, EntityAI new_item)
void CreateNetworkObjectInfo (EntityAI new_item)
EntityAI CreateNewEntity ()
 Step D.
void DeleteOldEntity ()
 Step F.
string DumpToString ()
void Execute (HumanInventoryWithFSM fsm_to_notify=null)
void OnAbort ()
 Step Out - notification on abort.
void OnSuccess (EntityAI new_item)
bool PrepareLocations ()
 Step A.
void RemoveNetworkObjectInfo ()
 Step C.
void RemoveOldItemFromLocation ()
 Step B.
void UndoRemoveNetworkObjectInfo ()
void UndoRemoveOldItemFromLocation ()
bool WantCreateNewEntity ()

Protected Attributes

ref InventoryLocation m_NewLocation
ref InventoryLocation m_OldLocation
bool m_RemoveFromLocationPassed = false

Private Member Functions

void ReplaceItemWithNewLambdaBase (EntityAI old_item, string new_item_type)
void OverrideNewLocation (InventoryLocation newLocation)
void VerifyItemTypeBySlotType ()

Private Attributes

string m_NewItemType
EntityAI m_OldItem
bool m_RemoveNetworkObjectInfoPassed = false

Detailed Description

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

Definition at line 4 of file replaceitemwithnewlambdabase.c.

Constructor & Destructor Documentation

◆ ReplaceItemWithNewLambdaBase()

void ReplaceItemWithNewLambdaBase ( EntityAI old_item,
string new_item_type )
inlineprivate

Definition at line 13 of file replaceitemwithnewlambdabase.c.

References m_NewItemType, and m_OldItem.

Member Function Documentation

◆ CanExecuteLambda()

bool CanExecuteLambda ( )
inlineprotected

◆ CopyOldPropertiesToNew()

void CopyOldPropertiesToNew ( notnull EntityAI old_item,
EntityAI new_item )
inlineprotected

Definition at line 193 of file replaceitemwithnewlambdabase.c.

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

Referenced by Execute().

◆ CreateNetworkObjectInfo()

void CreateNetworkObjectInfo ( EntityAI new_item)
inlineprotected

Definition at line 212 of file replaceitemwithnewlambdabase.c.

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

Referenced by Execute().

◆ CreateNewEntity()

EntityAI CreateNewEntity ( )
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 131 of file replaceitemwithnewlambdabase.c.

References CFG_VEHICLESPATH, ECE_LOCAL, ECE_OBJECT_SWAP, ECE_PLACE_ON_SURFACE, g_Game, hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationCreateEntity(), GameInventory::LocationCreateLocalEntity(), m_NewItemType, m_NewLocation, m_OldItem, path, RF_NONE, VerifyItemTypeBySlotType(), and WantCreateNewEntity().

Referenced by Execute().

◆ DeleteOldEntity()

void DeleteOldEntity ( )
inlineprotected

Step F.

  • deletes physically old item

Definition at line 201 of file replaceitemwithnewlambdabase.c.

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

Referenced by Execute().

◆ DumpToString()

◆ Execute()

◆ OnAbort()

void OnAbort ( )
inlineprotected

Step Out - notification on abort.

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

Definition at line 234 of file replaceitemwithnewlambdabase.c.

References Print().

Referenced by Execute().

◆ OnSuccess()

void OnSuccess ( EntityAI new_item)
inlineprotected

Definition at line 224 of file replaceitemwithnewlambdabase.c.

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

Referenced by Execute().

◆ OverrideNewLocation()

void OverrideNewLocation ( InventoryLocation newLocation)
inlineprivate

Definition at line 19 of file replaceitemwithnewlambdabase.c.

References m_NewLocation.

◆ PrepareLocations()

bool PrepareLocations ( )
inlineprotected

◆ RemoveNetworkObjectInfo()

void RemoveNetworkObjectInfo ( )
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 115 of file replaceitemwithnewlambdabase.c.

References g_Game, m_OldItem, and m_RemoveNetworkObjectInfoPassed.

Referenced by Execute().

◆ RemoveOldItemFromLocation()

void RemoveOldItemFromLocation ( )
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 86 of file replaceitemwithnewlambdabase.c.

References InventoryLocation::DumpToStringNullSafe(), Error(), GameInventory::LocationRemoveEntity(), m_OldLocation, m_RemoveFromLocationPassed, and Print().

Referenced by Execute().

◆ UndoRemoveNetworkObjectInfo()

void UndoRemoveNetworkObjectInfo ( )
inlineprotected

Definition at line 121 of file replaceitemwithnewlambdabase.c.

References g_Game, and m_OldItem.

Referenced by Execute().

◆ UndoRemoveOldItemFromLocation()

void UndoRemoveOldItemFromLocation ( )
inlineprotected

◆ VerifyItemTypeBySlotType()

void VerifyItemTypeBySlotType ( )
inlineprivate

Definition at line 24 of file replaceitemwithnewlambdabase.c.

Referenced by CreateNewEntity().

◆ WantCreateNewEntity()

bool WantCreateNewEntity ( )
inlineprotected

Definition at line 26 of file replaceitemwithnewlambdabase.c.

References m_NewItemType, and m_NewLocation.

Referenced by CreateNewEntity(), and Execute().

Field Documentation

◆ m_NewItemType

◆ m_NewLocation

◆ m_OldItem

◆ m_OldLocation

◆ m_RemoveFromLocationPassed

bool m_RemoveFromLocationPassed = false
protected

Definition at line 10 of file replaceitemwithnewlambdabase.c.

Referenced by Execute(), and RemoveOldItemFromLocation().

◆ m_RemoveNetworkObjectInfoPassed

bool m_RemoveNetworkObjectInfoPassed = false
private

Definition at line 11 of file replaceitemwithnewlambdabase.c.

Referenced by Execute(), and RemoveNetworkObjectInfo().


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