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

inventory for plain man/human More...

Private Member Functions

proto native EntityAI GetEntityInHands ()
 
proto native bool CanAddEntityInHands (EntityAI e)
 alternative for TestAddEntityInHands(e, true, true, true);
 
proto native bool TestAddEntityInHands (EntityAI e, bool do_resevation_check, bool do_item_check, bool do_lock_check, bool do_occupancy_test, bool do_script_check)
 
proto native bool CanRemoveEntityInHands ()
 
proto native bool CanOpenInventory ()
 
proto native EntityAI CreateInHands (string typeName)
 creates new entity in hands
 
proto native int GetUserReservedLocationCount ()
 
proto native int FindUserReservedLocationIndex (notnull EntityAI e)
 
proto native int FindCollidingUserReservedLocationIndex (notnull EntityAI e, notnull InventoryLocation dst)
 
proto native void GetUserReservedLocation (int index, out notnull InventoryLocation dst)
 
proto native int FindFirstUserReservedLocationIndexForContainer (notnull EntityAI e)
 
proto native void SetUserReservedLocation (notnull EntityAI eai, notnull InventoryLocation dst)
 
proto native void ClearUserReservedLocation (notnull EntityAI eai)
 
proto native bool ClearUserReservedLocationAtIndex (int index)
 
proto native void ClearUserReservedLocationForContainer (notnull EntityAI eai)
 
proto native bool GetDebugFlag ()
 
override EntityAI CreateInInventory (string type)
 creates entity somewhere in inventory
 
void ClearUserReservedLocationSynced (notnull EntityAI eai)
 
void ClearUserReservedLocationAtIndexSynced (int index)
 
Man GetManOwner ()
 
bool HasEntityInHands (EntityAI e)
 
bool ProcessHandEvent (HandEventBase e)
 
void OnHandsStateChanged (HandStateBase src, HandStateBase dst)
 
void OnHandsExitedStableState (HandStateBase src, HandStateBase dst)
 
void OnHandsEnteredStableState (HandStateBase src, HandStateBase dst)
 
void OnEntityInHandsCreated (InventoryLocation src)
 
void OnEntityInHandsDestroyed (InventoryLocation src)
 
bool HandEvent (InventoryMode mode, HandEventBase e)
 
override bool DropEntity (InventoryMode mode, EntityAI owner, notnull EntityAI item)
 
bool ThrowEntity (EntityAI item, vector dir, float force)
 
bool RedirectToHandEvent (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
 
override bool TakeToDst (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
 
override bool TakeEntityToInventory (InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
 
override bool TakeEntityToCargoEx (InventoryMode mode, notnull EntityAI item, int idx, int row, int col)
 Put item into into cargo on specific cargo location.
 
override bool TakeEntityAsAttachmentEx (InventoryMode mode, notnull EntityAI item, int slot)
 
override bool SwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
 
override bool ForceSwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
 
override bool LocalDestroyEntity (notnull EntityAI item)
 
override bool ReplaceItemWithNew (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 
bool ReplaceItemElsewhereWithNewInHands (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 
protected bool ReplaceItemInElsewhereWithNewinHandsImpl (InventoryMode mode, HandEventBase e)
 
protected bool ReplaceItemInHandsWithNewImpl (InventoryMode mode, HandEventBase e)
 
bool ReplaceItemInHandsWithNew (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 
bool ReplaceItemInHandsWithNewElsewhere (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 
bool SwappingToPreviousLocation (EntityAI item1, EntityAI item2, out InventoryLocation dst)
 
void HandleInventoryManipulation ()
 
void Update (float delta_time)
 
bool ValidateUserReservationCancel (inout Serializer ctx, InventoryValidation validation)
 
bool PostDeferredEventTakeToDst (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool PostDeferredForceSwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
 

Private Attributes

int m_syncClearUserReservationindex = -1
 

Detailed Description

inventory for plain man/human

HumanInventory has simple synchronous operations only, i.e. no animations are involved while adding/removing/swapping to/from hands.

Animations are added on higher level of hierarchy (DayZPlayerInventory for example)

Member Function Documentation

◆ CanAddEntityInHands()

CanAddEntityInHands ( EntityAI  e)
private

alternative for TestAddEntityInHands(e, true, true, true);

◆ CanOpenInventory()

proto native bool CanOpenInventory ( )
private

◆ CanRemoveEntityInHands()

CanRemoveEntityInHands ( )
private
Returns
true if entity can be removed from hands

◆ ClearUserReservedLocation()

proto native void ClearUserReservedLocation ( notnull EntityAI  eai)
private

◆ ClearUserReservedLocationAtIndex()

proto native bool ClearUserReservedLocationAtIndex ( int  index)
private

◆ ClearUserReservedLocationAtIndexSynced()

void ClearUserReservedLocationAtIndexSynced ( int  index)
inlineprivate

◆ ClearUserReservedLocationForContainer()

proto native void ClearUserReservedLocationForContainer ( notnull EntityAI  eai)
private

◆ ClearUserReservedLocationSynced()

void ClearUserReservedLocationSynced ( notnull EntityAI  eai)
inlineprivate

◆ CreateInHands()

CreateInHands ( string  typeName)
private

creates new entity in hands

Parameters
[in]typeNametype name of the entity to be created
Returns
new entity or null otherwise

Referenced by CreateInInventory(), CTObjectFollower::SetHandsItem(), and ActionUncoverHeadBase::UncoverHead().

◆ CreateInInventory()

CreateInInventory ( string  type)
inlineprivate

creates entity somewhere in inventory

Parameters
[in]typeitem type to be placed in inventory
Returns
created entity

References CreateInHands().

◆ DropEntity()

override bool DropEntity ( InventoryMode  mode,
EntityAI  owner,
notnull EntityAI  item 
)
inlineprivate

◆ FindCollidingUserReservedLocationIndex()

proto native int FindCollidingUserReservedLocationIndex ( notnull EntityAI  e,
notnull InventoryLocation  dst 
)
private

◆ FindFirstUserReservedLocationIndexForContainer()

proto native int FindFirstUserReservedLocationIndexForContainer ( notnull EntityAI  e)
private

Referenced by Entity::IsSlotReserved().

◆ FindUserReservedLocationIndex()

proto native int FindUserReservedLocationIndex ( notnull EntityAI  e)
private

◆ ForceSwapEntities()

◆ GetDebugFlag()

proto native bool GetDebugFlag ( )
private

◆ GetEntityInHands()

◆ GetManOwner()

◆ GetUserReservedLocation()

proto native void GetUserReservedLocation ( int  index,
out notnull InventoryLocation  dst 
)
private

◆ GetUserReservedLocationCount()

proto native int GetUserReservedLocationCount ( )
private

Referenced by Entity::IsSlotReserved().

◆ HandEvent()

◆ HandleInventoryManipulation()

void HandleInventoryManipulation ( )
private

Referenced by Update().

◆ HasEntityInHands()

bool HasEntityInHands ( EntityAI  e)
inlineprivate

References GetEntityInHands().

◆ LocalDestroyEntity()

◆ OnEntityInHandsCreated()

◆ OnEntityInHandsDestroyed()

◆ OnHandsEnteredStableState()

void OnHandsEnteredStableState ( HandStateBase  src,
HandStateBase  dst 
)
private

◆ OnHandsExitedStableState()

void OnHandsExitedStableState ( HandStateBase  src,
HandStateBase  dst 
)
private

◆ OnHandsStateChanged()

void OnHandsStateChanged ( HandStateBase  src,
HandStateBase  dst 
)
private

◆ PostDeferredEventTakeToDst()

bool PostDeferredEventTakeToDst ( InventoryMode  mode,
notnull InventoryLocation  src,
notnull InventoryLocation  dst 
)
inlineprivate

◆ PostDeferredForceSwapEntities()

bool PostDeferredForceSwapEntities ( InventoryMode  mode,
notnull EntityAI  item1,
notnull EntityAI  item2,
notnull InventoryLocation  dst1,
notnull InventoryLocation  dst2 
)
inlineprivate

◆ ProcessHandEvent()

bool ProcessHandEvent ( HandEventBase  e)
private

◆ RedirectToHandEvent()

◆ ReplaceItemElsewhereWithNewInHands()

bool ReplaceItemElsewhereWithNewInHands ( InventoryMode  mode,
ReplaceItemWithNewLambdaBase  lambda 
)
inlineprivate

◆ ReplaceItemInElsewhereWithNewinHandsImpl()

◆ ReplaceItemInHandsWithNew()

bool ReplaceItemInHandsWithNew ( InventoryMode  mode,
ReplaceItemWithNewLambdaBase  lambda 
)
inlineprivate

◆ ReplaceItemInHandsWithNewElsewhere()

bool ReplaceItemInHandsWithNewElsewhere ( InventoryMode  mode,
ReplaceItemWithNewLambdaBase  lambda 
)
inlineprivate

◆ ReplaceItemInHandsWithNewImpl()

◆ ReplaceItemWithNew()

◆ SetUserReservedLocation()

proto native void SetUserReservedLocation ( notnull EntityAI  eai,
notnull InventoryLocation  dst 
)
private

◆ SwapEntities()

◆ SwappingToPreviousLocation()

bool SwappingToPreviousLocation ( EntityAI  item1,
EntityAI  item2,
out InventoryLocation  dst 
)
inlineprivate

◆ TakeEntityAsAttachmentEx()

◆ TakeEntityToCargoEx()

override bool TakeEntityToCargoEx ( InventoryMode  mode,
notnull EntityAI  item,
int  idx,
int  row,
int  col 
)
inlineprivate

◆ TakeEntityToInventory()

◆ TakeToDst()

◆ TestAddEntityInHands()

TestAddEntityInHands ( EntityAI  e,
bool  do_resevation_check,
bool  do_item_check,
bool  do_lock_check,
bool  do_occupancy_test,
bool  do_script_check 
)
private
Parameters
[in]eentity to test for taking in hands
[in]do_item_checkdeny if entity is not InventoryItem
[in]do_occupancy_testdeny if there is item in hands already
[in]do_script_checkdeny if script conditions fail
Returns
true if item passed all tests

◆ ThrowEntity()

◆ Update()

◆ ValidateUserReservationCancel()

bool ValidateUserReservationCancel ( inout Serializer  ctx,
InventoryValidation  validation 
)
inlineprivate

TODO(kumarjac): It returned true and claimed success before, is this correct?

References ClearUserReservedLocationAtIndex(), and InventoryValidation::m_Result.

Field Documentation

◆ m_syncClearUserReservationindex

int m_syncClearUserReservationindex = -1
private

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