DIFF

class InventoryLocationSource

Methods 36

proto native bool IsValid()

verify current set inventory location

Returns: true if valid, false otherwise

proto native int GetType()

returns type of InventoryLocation

See also: InventoryLocationType, for, known, types, of, inventory, locations

proto native EntityAI GetParent()

returns parent of current inventory location

Parent entity can be null if item is on ground.

Returns: parent entity, null otherwise

proto native EntityAI GetItem()

returns item of current inventory location

Item can be null if and only if this is a query for location of item that is about to be created (new spawn).

Returns: item

proto native int GetSlot()

returns slot id if current type is Attachment

@NOTE: slot id is related to order of entries in DZ/data/config.cpp secton CfgSlots

Returns: slot id if attachment, -1 otherwise

proto native int GetIdx()

returns index of cargo if current type is Cargo / ProxyCargo

Returns: index or -1

proto native int GetRow()

returns row of cargo if current type is Cargo / ProxyCargo

Returns: row or -1

proto native int GetCol()

returns column of cargo if current type is Cargo / ProxyCargo

Returns: index or -1

proto native void GetDir(out float dir[4])

returns direction of item in world if type is Ground

Returns: position

proto native void SetGroundEx(EntityAI e, vector pos, float dir[4])

sets current inventory location type to Ground with transformation mat

in e
entity with this inventory location (null for new spawns)
in pos
position vector
in dir
direction quat
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)

sets current inventory location type to Attachment with slot id set to <slotId>

in parent
parent entity the item <e> will be attached to
in e
entity with this inventory location (null for new spawns)
in slotId
slot id where the item will be attached
proto native void SetCargoAuto(notnull CargoBase cargo, EntityAI e, int row, int col, bool flip)

based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively

in cargo
cargo that will receive item <e> into cargo
in e
entity with this inventory location (null for new spawns)
in row
row of the cargo
in col
column of the cargo
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)

sets current inventory location type to Cargo with coordinates (idx, row, col)

in parent
parent entity that will receive item <e> into cargo
in e
entity with this inventory location (null for new spawns)
in idx
index of cargo
in row
row of the cargo
in col
column of the cargo
proto native void SetProxyCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)

sets current inventory location type to ProxyCargo with coordinates (idx, row, col) @NOTE: typical usage is in building-like dummy structures, where furniture with cargo is part of the model, and is not a physical entity (like person or bag).

in parent
parent entity that will receive item <e> into proxy cargo
in e
entity with this inventory location (null for new spawns)
in idx
index of cargo
in row
row of the cargo
in col
column of the cargo
Referenced by ReadFromContext()
proto native void SetVehicle(notnull EntityAI parent, EntityAI e, int idx)

brief sets current inventory location's GetParent

in idx
index of seat
proto native void SetTemporary(notnull EntityAI parent, EntityAI e)

brief sets current inventory location's GetParent

proto native void SetParent(notnull EntityAI parent)

brief sets current inventory location's GetParent

proto native void SetItem(notnull EntityAI item)

brief sets current inventory location's item

proto native void SetSlot(int slotId)
proto native void SetIndex(int idx)
proto native void SetRow(int row)
proto native void SetCol(int col)
proto native void SetFlip(bool flip)
proto native void Reset()
proto native bool CollidesWith(notnull InventoryLocation rhs)

checks if inventory locations collides each with other

proto native InventoryLocation CopyLocationFrom(notnull InventoryLocation rhs, bool copyFlip)

copies location to another location without m_item member

@NOTE it does NOT do a copy of m_item member!

static string DumpToStringNullSafe(InventoryLocation loc)
References DumpToString()
Referenced by SelectAnimationOfForceSwapInHands(), TryAcquireInventoryJunctureFromServer(), TryAcquireTwoInventoryJuncturesFromServer()
Show 42 more, ActionBase.SetupAction(), ActionDigInStash.OnFinishProgressServer(), CGame.AddInventoryJunctureEx(), DayZPlayerInventory.ForceSwapEntities(), DayZPlayerInventory.HandleForceSwapEntities(), DayZPlayerInventory.HandleSwapEntities(), DayZPlayerInventory.HandleTakeToDst(), DayZPlayerInventory.SendServerHandEventViaJuncture(), DayZPlayerInventory.TakeToDst(), DayZPlayerInventory.ValidateDestroy(), DayZPlayerInventory.ValidateSwap(), DayZPlayerInventory.ValidateSyncMove(), GameInventory.AddInventoryReservationEx(), GameInventory.ClearInventoryReservationEx(), GameInventory.ExtendInventoryReservationEx(), GameInventory.OnServerInventoryCommandStatic(), HandEventBase.DumpToString(), HandEventMoveTo.CheckRequestSrc(), HandEventMoveTo.DumpToString(), HandEventRemove.CheckRequestSrc(), HandEventReplaceWithNewBase.DumpToString(), HandEventSwap.CheckRequestSrc(), HandEventSwap.DumpToString(), HandEventTake.CheckRequestSrc(), HandGuardHasRoomForItem.GuardCondition(), HandSelectAnimationOfForceSwapInHandsEvent.GuardCondition(), HumanInventory.ForceSwapEntities(), HumanInventory.OnEntityInHandsCreated(), HumanInventory.OnEntityInHandsDestroyed(), HumanInventory.SwapEntities(), HumanInventory.TakeToDst(), InventoryInputUserData.SendInputUserDataMove(), InventoryInputUserData.SendInputUserDataSwap(), InventoryInputUserData.SendServerMove(), InventoryInputUserData.SendServerSwap(), Man.TakeToDstImpl(), PlayerBase.CreateCopyOfItemInInventory(), PlayerBase.OnQuickBarSingleUse(), ReplaceItemWithNewLambdaBase.Execute(), ReplaceItemWithNewLambdaBase.RemoveOldItemFromLocation(), ReplaceItemWithNewLambdaBase.UndoRemoveOldItemFromLocation(), and SwapOldAndNewMagazine.OnEntry()