DayZ 1.24
Loading...
Searching...
No Matches
UnboxLambda Class Reference
Inheritance diagram for UnboxLambda:
[legend]
Collaboration diagram for UnboxLambda:
[legend]

Private Member Functions

void UnboxLambda (EntityAI old_item, string new_item_type, PlayerBase player, int count)
 
override void CopyOldPropertiesToNew (notnull EntityAI old_item, EntityAI new_item)
 
override void OnSuccess (EntityAI new_item)
 
- Private Member Functions inherited from ReplaceItemWithNewLambdaBase
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 ()
 

Private Attributes

int m_ItemCount
 
- Private Attributes inherited from ReplaceItemWithNewLambdaBase
ref InventoryLocation m_OldLocation
 
ref InventoryLocation m_NewLocation
 
bool m_RemoveFromLocationPassed = false
 

Detailed Description

Definition at line 70 of file ActionUnpackBox.c.

Constructor & Destructor Documentation

◆ UnboxLambda()

void UnboxLambda::UnboxLambda ( EntityAI old_item,
string new_item_type,
PlayerBase player,
int count )
inlineprivate

Definition at line 73 of file ActionUnpackBox.c.

References m_ItemCount.

Member Function Documentation

◆ CopyOldPropertiesToNew()

override void UnboxLambda::CopyOldPropertiesToNew ( notnull EntityAI old_item,
EntityAI new_item )
inlineprivate

Definition at line 75 of file ActionUnpackBox.c.

76 {
77 super.CopyOldPropertiesToNew(old_item, new_item);
78
79 if (GetGame().ConfigIsExisting("CfgMagazines " + m_NewItemType))
80 {
83 pile.ServerSetAmmoCount(m_ItemCount);
84 }
85 else
86 {
89 unboxed.SetQuantity(m_ItemCount);
90 }
91 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), GetGame(), m_ItemCount, and ReplaceItemWithNewLambdaBase::m_NewItemType.

◆ OnSuccess()

override void UnboxLambda::OnSuccess ( EntityAI new_item)
inlineprivate

Definition at line 93 of file ActionUnpackBox.c.

94 {
95 super.OnSuccess(new_item);
96
97 //spawns wrapping Paper
98 ItemBase paper = ItemBase.Cast(GetGame().CreateObjectEx("Paper", new_item.GetHierarchyRoot().GetPosition(), ECE_PLACE_ON_SURFACE));
99 }
const int ECE_PLACE_ON_SURFACE

References ECE_PLACE_ON_SURFACE, and GetGame().

Member Data Documentation

◆ m_ItemCount

int UnboxLambda::m_ItemCount
private

Definition at line 72 of file ActionUnpackBox.c.

Referenced by CopyOldPropertiesToNew(), and UnboxLambda().


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