|
proto native bool | GetCurrentInventoryLocation (out notnull InventoryLocation loc) |
| returns information about current item location
|
|
proto native bool | FindFreeLocationFor (notnull EntityAI item, FindInventoryLocationType flags, out notnull InventoryLocation loc) |
| FindFreeLocationFor.
|
|
proto native bool | FindFreeLocationForEx (notnull EntityAI item, FindInventoryLocationType flags, notnull InventoryLocation exclude, out notnull InventoryLocation loc) |
| FindFreeLocationForEx.
|
|
proto native bool | FindFirstFreeLocationForNewEntity (string item_type, FindInventoryLocationType flags, out notnull InventoryLocation loc) |
| FindFirstFreeLocationForNewEntity.
|
|
proto native int | FindFreeLocationsFor (notnull EntityAI item, FindInventoryLocationType flags, out notnull array< ref InventoryLocation > locs) |
| searches inventory for suitable location for @item
|
|
bool | IsInCargo () |
| Returns true if this Inventory owner is in cargo of something.
|
|
bool | IsAttachment () |
| Returns true if this Inventory owner is an attachment of something.
|
|
bool | IsCargoInHiearchy () |
| Returns true if inventory owner or his hiearchy parents are in cargo.
|
|
bool | GetCurrentAttachmentSlotInfo (out int slot_id, out string slot_name) |
| Returns true if the item is currently attached and outputs attachment slot id and name.
|
|
proto native bool | CanAddSwappedEntity (notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2) |
|
void | OnInventoryFailure (InventoryCommandType type, InventoryValidationReason reason, InventoryLocation src, InventoryLocation dst) |
|
bool | TakeEntityToInventory (InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item) |
| Put item anywhere into this entity (as attachment or into cargo, recursively)
|
|
bool | TakeEntityToTargetInventory (InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item) |
| helper that finds location first, then moves the entity into it
|
|
bool | TakeToDst (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst) |
| move src to dst
|
|
bool | TakeEntityToCargo (InventoryMode mode, notnull EntityAI item) |
| moves item to cargo of this intentory
|
|
bool | TakeEntityToTargetCargo (InventoryMode mode, notnull EntityAI target, notnull EntityAI item) |
| Put item into into cargo of another entity.
|
|
bool | TakeEntityToCargoEx (InventoryMode mode, notnull EntityAI item, int idx, int row, int col) |
| moves item on specific cargo location
|
|
bool | TakeEntityToTargetCargoEx (InventoryMode mode, notnull CargoBase cargo, notnull EntityAI item, int row, int col) |
| Put item into into cargo on specific cargo location of another entity.
|
|
bool | TakeEntityAsAttachmentEx (InventoryMode mode, notnull EntityAI item, int slot) |
|
bool | TakeEntityAsTargetAttachmentEx (InventoryMode mode, notnull EntityAI target, notnull EntityAI item, int slot) |
| put item as attachment of target
|
|
bool | TakeEntityAsAttachment (InventoryMode mode, notnull EntityAI item) |
|
bool | TakeEntityAsTargetAttachment (InventoryMode mode, notnull EntityAI target, notnull EntityAI item) |
|
bool | SwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2) |
|
bool | ForceSwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst) |
|
bool | DropEntity (InventoryMode mode, EntityAI owner, notnull EntityAI item) |
|
bool | DropEntityWithTransform (InventoryMode mode, EntityAI owner, notnull EntityAI item, vector transform[4]) |
|
bool | DropEntityInBounds (InventoryMode mode, EntityAI owner, notnull EntityAI item, vector halfExtents, float angle, float cosAngle, float sinAngle) |
|
bool | LocalDestroyEntity (notnull EntityAI item) |
|
bool | ReplaceItemWithNew (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda) |
|
proto native bool | GetFlipCargo () |
|
proto native void | SetFlipCargo (bool flip) |
|
proto native void | FlipCargo () |
|
proto native void | ResetFlipCargo () |
|
proto native EntityAI | GetInventoryOwner () |
| Engine native functions.
|
|
proto native bool | HasEntityInInventory (notnull EntityAI item) |
| query inventory if item is somewhere
|
|
proto native bool | EnumerateInventory (InventoryTraversalType tt, out array< EntityAI > items) |
| enumerate inventory using traversal type and filling items array
|
|
proto native int | CountInventory () |
| almost identical to EnumerateInventory except it does not return items
|
|
proto native CargoBase | GetCargo () |
| cargo
|
|
proto native CargoBase | GetCargoFromIndex (int index) |
|
proto native EntityAI | CreateEntityInCargo (string typeName) |
| Create Entity of specified type in cargo of entity.
|
|
proto native EntityAI | CreateEntityInCargoEx (string typeName, int idx, int row, int col, bool flip) |
| Create Entity of specified type in cargo of entity at coordinates (row, col)
|
|
proto native bool | HasEntityInCargo (notnull EntityAI e) |
|
proto native bool | HasEntityInCargoEx (notnull EntityAI e, int idx, int row, int col) |
|
proto native bool | CanAddEntityInCargo (notnull EntityAI e, bool flip) |
|
proto native bool | CanAddEntityInCargoEx (notnull EntityAI e, int idx, int row, int col, bool flip) |
|
proto native bool | CanAddEntityInCargoExLoc (InventoryLocation loc) |
|
proto native bool | TestAddEntityInCargoEx (notnull EntityAI e, int idx, int row, int col, bool flip, bool do_resevation_check, bool do_item_check, bool do_lock_check, bool do_occupancy_test, bool do_script_check, bool do_script_load_check) |
|
proto native bool | TestAddEntityInCargoExLoc (notnull InventoryLocation loc, bool do_resevation_check, bool do_item_check, bool do_lock_check, bool do_occupancy_test, bool do_script_check, bool do_script_load_check) |
|
proto native bool | CanRemoveEntityInCargo (notnull EntityAI e) |
|
proto native bool | CanRemoveEntityInCargoEx (notnull EntityAI e, int idx, int row, int col) |
|
proto native int | GetSlotId (int index) |
| attachments
|
|
proto native int | GetSlotIdCount () |
|
proto native int | GetAttachmentSlotId (int index) |
|
proto native int | GetAttachmentSlotsCount () |
|
bool | HasAttachmentSlot (int slotId) |
|
proto native bool | HasInventorySlot (int slotId) |
|
proto native int | AttachmentCount () |
| Returns count of attachments attached to this item.
|
|
proto native EntityAI | CreateAttachment (string typeName) |
| Create Entity of specified type as attachment of entity.
|
|
proto native EntityAI | CreateAttachmentEx (string typeName, int slotId) |
| Create Entity of specified type as attachment of entity.
|
|
proto native EntityAI | GetAttachmentFromIndex (int index) |
|
proto native EntityAI | FindAttachment (int slot) |
| Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
|
|
proto native EntityAI | FindAttachmentByName (string slotName) |
| Returns attached entity in slot (you can use EntityAI.GetActionComponentName to get slot id)
|
|
proto native bool | HasAttachment (notnull EntityAI e) |
| brief Returns True if entity is attached to this
|
|
proto native bool | HasAttachmentEx (notnull EntityAI e, int slot) |
| brief Returns True if entity is attached to this in slot
|
|
proto native bool | CanAddAttachment (notnull EntityAI e) |
| Check if attachment can be added to any slot.
|
|
proto native bool | CanAddAttachmentEx (notnull EntityAI e, int slot) |
| Check if attachment can be added to slot @NOTE: Note that slot index IS NOT slot ID! Slot ID is defined in DZ/data/config.cpp.
|
|
proto native bool | CanRemoveAttachment (EntityAI attachment) |
|
proto native bool | CanRemoveAttachmentEx (EntityAI attachment, int slot) |
|
proto native EntityAI | FindPlaceholderForSlot (int slot) |
| Returns placeholder entity for slot (naked arms, legs etc)
|
|
proto native bool | IsPlaceholderEntity (notnull Object e) |
|
proto native bool | CanLockInventoryWithKey (notnull EntityAI key) |
| locks
|
|
proto native bool | CanUnlockInventoryWithKey (notnull EntityAI key) |
|
proto native void | LockInventoryWithKey (notnull EntityAI key) |
|
proto native void | UnlockInventoryWithKey (notnull EntityAI key) |
|
proto native bool | HasKeys () |
|
proto native void | LockInventory (int lockType) |
|
proto native void | UnlockInventory (int lockType) |
|
proto native int | GetScriptLockCount () |
|
proto native bool | IsInventoryUnlocked () |
|
proto native bool | IsInventoryLocked () |
|
proto native bool | IsInventoryLockedForLockType (int lockType) |
|
proto native bool | SetSlotLock (int slot, bool locked) |
|
proto native bool | GetSlotLock (int slot) |
|
void | Init () |
| script functions
|
|
bool | OnStoreLoad (ParamsReadContext ctx, int version) |
| db load hooks
|
|
void | OnAfterStoreLoad () |
|
void | OnStoreSave (ParamsWriteContext ctx) |
| db store hook
|
|
void | EEInit () |
|
void | EEDelete (EntityAI parent) |
|
EntityAI | CreateInInventory (string type) |
| creates entity somewhere in inventory
|
|
bool | CanAddEntityToInventory (notnull EntityAI item, int flag=FindInventoryLocationType.ANY) |
| ask inventory if item could be placed somewhere in inventory
|
|
bool | AddEntityToInventory (notnull EntityAI item) |
| add entity somewhere in inventory
|
|
bool | CanRemoveEntity () |
| Returns if entity can be removed from its current location.
|
|
bool | CanAddEntityInto (notnull EntityAI item, FindInventoryLocationType flags=FindInventoryLocationType.ANY) |
| Asks inventory if item could be placed in inventory, hands, etc.
|
|
bool | CanAddEntityIntoInventory (notnull EntityAI item) |
| Test if entity can be put to the inventory (Cargo, ProxyCargo, Attachment)
|
|
bool | CanAddEntityIntoHands (notnull EntityAI item) |
| Test if entity can be put into hands.
|
|
bool | OnInputUserDataProcess (ParamsReadContext ctx) |
| synchronization
|
|
bool | OnInventoryJunctureFromServer (ParamsReadContext ctx) |
|
bool | OnInventoryJunctureRepairFromServer (ParamsReadContext ctx) |
|
void | OnInventoryJunctureFailureFromServer (ParamsReadContext ctx) |
|
void | OnServerInventoryCommand (ParamsReadContext ctx) |
|
bool | AddInventoryReservationEx (EntityAI item, InventoryLocation dst, int timeout_ms) |
|
bool | ExtendInventoryReservationEx (EntityAI item, InventoryLocation dst, int timeout_ms) |
|
bool | ClearInventoryReservationEx (EntityAI item, InventoryLocation dst) |
|
proto native int | GetAnyInventoryReservationCount () |
|
static proto native EntityAI | LocationCreateEntity (notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation) |
| creates new item directly at location
|
|
static proto native EntityAI | LocationCreateLocalEntity (notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation) |
| creates new local item directly at location @NOTE: the item is created localy, i.e. it's not registered to network
|
|
static proto native bool | LocationCanAddEntity (notnull InventoryLocation inv_loc) |
| queries if the entity contained in inv_loc.m_item can be added to ground/attachment/cargo/hands/...
|
|
static bool | LocationCanAddEntityEx (notnull InventoryLocation inv_loc) |
|
static proto native bool | LocationTestAddEntity (notnull InventoryLocation inv_loc, bool do_resevation_check, bool do_item_check, bool do_lock_check, bool do_occupancy_test, bool do_script_check, bool do_script_load_check) |
| test if the entity contained in inv_loc.m_item can be added to ground/attachment/cargo/hands/...
|
|
static proto native bool | LocationCanRemoveEntity (notnull InventoryLocation inv_loc) |
| queries if the entity contained in inv_loc.m_item can be removed from ground/attachment/cargo/hands/...
|
|
static proto native bool | LocationCanMoveEntity (notnull InventoryLocation src, notnull InventoryLocation dst) |
| queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthand for CanRemove + CanAdd query
|
|
static int | GetInventoryCheckContext () |
|
static bool | LocationCanMoveEntitySyncCheck (notnull InventoryLocation src, notnull InventoryLocation dst) |
|
static proto native EntityAI | LocationGetEntity (notnull InventoryLocation inv_loc) |
|
static void | OnServerInventoryCommandStatic (ParamsReadContext ctx) |
|
static proto native bool | LocationAddEntity (notnull InventoryLocation inv_loc) |
| adds item to inventory location
|
|
static proto native bool | LocationRemoveEntity (notnull InventoryLocation inv_loc) |
| removes item from inventory location
|
|
static proto native bool | LocationMoveEntity (notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc) |
| removes item from current inventory location and adds it to destination
|
|
static proto native bool | LocationSyncMoveEntity (notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc) |
| synchronously removes item from current inventory location and adds it to destination no anims involved
|
|
static proto native bool | LocationSwap (notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2) |
| swaps two entities
|
|
static proto native bool | ServerLocationMoveEntity (notnull EntityAI item, ParamsWriteContext ctx) |
| removes item from current inventory location and adds it to destination + sync via inventory command
|
|
static proto native bool | ServerLocationSyncMoveEntity (Man player, notnull EntityAI item, ParamsWriteContext ctx) |
| synchronously removes item from current inventory location and adds it to destination + sync via inventory command no anims involved
|
|
static proto native bool | ServerLocationSwap (notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2, ParamsWriteContext ctx) |
| swaps two entities
|
|
static proto native bool | ServerHandEvent (notnull Man player, notnull EntityAI item, ParamsWriteContext ctx) |
| hand event to clients
|
|
static proto native bool | PrepareDropEntityPos (EntityAI owner, notnull EntityAI item, out vector mat[4], bool useValuesInMatrix=false, int conflictCheckDepth=-1) |
| Finds a transformation for the item to be dropped to If the initial transforation overlaps with another conflicting entity (i.e. car) then the transform will be snapped to the nearest outer edge. If no valid snapping transformation could be found, then the output from 'PlaceOnSurface' is used.
|
|
static proto native bool | TestDropEntityPos (EntityAI owner, notnull EntityAI item, out vector mat[4], bool useValuesInMatrix=false, int conflictCheckDepth=-1) |
|
static proto native bool | CanSwapEntities (notnull EntityAI item1, notnull EntityAI item2) |
| test if ordinary swap can be performed.
|
|
static bool | CanSwapEntitiesEx (notnull EntityAI item1, notnull EntityAI item2) |
|
static proto native bool | CanForceSwapEntities (notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst) |
| test if forced swap can be performed.
|
|
static bool | CanForceSwapEntitiesEx (notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst) |
|
static bool | MakeDstForSwap (notnull InventoryLocation src1, notnull InventoryLocation src2, out InventoryLocation dst1, out InventoryLocation dst2) |
| helper function for swap
|
|
static bool | MakeSrcAndDstForSwap (notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, out InventoryLocation dst2) |
| helper function for swap
|
|
static bool | MakeSrcAndDstForForceSwap (notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, notnull InventoryLocation dst2) |
| helper function for ForceSwap
|
|
static bool | SetGroundPosByOwner (EntityAI owner, notnull EntityAI item, out InventoryLocation ground) |
|
static bool | SetGroundPosByTransform (EntityAI owner, notnull EntityAI item, out InventoryLocation ground, vector transform[4]) |
|
static void | SetGroundPosByOwnerBounds (EntityAI owner, notnull EntityAI item, out InventoryLocation ground, vector halfExtents, float angle, float cosAngle, float sinAngle) |
|
static proto native bool | AddInventoryReservation (EntityAI item, InventoryLocation dst, int timeout_ms) |
|
static proto native bool | ExtendInventoryReservation (EntityAI item, InventoryLocation dst, int timeout_ms) |
|
static proto native bool | ClearInventoryReservation (EntityAI item, InventoryLocation dst) |
|
static proto native bool | HasInventoryReservation (EntityAI item, InventoryLocation dst) |
| Internally: HasInventoryReservationEx(item, dst, FindInventoryReservationMode.LEGACY, FindInventoryReservationMode.LEGACY)
|
|
static proto native bool | HasInventoryReservationCanAdd (EntityAI item, InventoryLocation dst) |
| Internally: !HasInventoryReservationEx(item, dst, FindInventoryReservationMode.ITEM, FindInventoryReservationMode.DST)
|
|
static proto native bool | HasInventoryReservationEx (EntityAI item, InventoryLocation dst, FindInventoryReservationMode itemMode, FindInventoryReservationMode parentMode) |
| itemMode will iterate over item reservations, parentMode will iterate over parent reservations
|
|
static proto native bool | GetInventoryReservationCount (EntityAI item, InventoryLocation dst) |
|
static proto native bool | CheckRequestSrc (notnull Man requestingPlayer, notnull InventoryLocation src, float radius) |
|
static proto native bool | CheckDropRequest (notnull Man requestingPlayer, notnull InventoryLocation src, float radius) |
|
static proto native bool | CheckTakeItemRequest (notnull Man requestingPlayer, notnull InventoryLocation src, notnull InventoryLocation dst, float radius) |
|
static proto native bool | CheckMoveToDstRequest (notnull Man requestingPlayer, notnull InventoryLocation src, notnull InventoryLocation dst, float radius) |
|
static proto native bool | CheckSwapItemsRequest (notnull Man requestingPlayer, notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2, float radius) |
|
static proto native bool | CheckManipulatedObjectsDistances (notnull EntityAI e0, notnull EntityAI e1, float radius) |
|
const int | c_InventoryReservationTimeoutMS = 5000 |
| reservations
|
|
const int | c_InventoryReservationTimeoutShortMS = 3000 |
|
const float | c_MaxItemDistanceRadius = 2.5 |
| anti-cheats
|
|
static int | m_inventory_check_context = InventoryCheckContext.DEFAULT |
|
inventory for buildings (also called "proxy cargo")
Definition at line 4 of file BuildingInventory.c.