26 itemToRepair.GetInventory().GetCurrentInventoryLocation(currentIl);
32 player.OnItemInHandsChanged();
44 if (!ctx.
Read(itemCount))
47 for (
int i = 0; i < itemCount; i++)
64 item.GetInventory().GetCurrentInventoryLocation(ilTemp);
70 CargoBase cargo = parent.GetInventory().GetCargo();
74 if (itemInCargo != item)
76 itemInCargo.GetInventory().GetCurrentInventoryLocation(ilCargoItem);
88 EntityAI entityInAttachment = parent.GetInventory().FindAttachment(ilCorrect.
GetSlot());
90 if(entityInAttachment)
100 EntityAI entityInHands = player.GetItemInHands();
InventoryLocationType
types of Inventory Location
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
represents base for cargo storage for entities
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 involv...
script counterpart to engine's class Inventory
proto native EntityAI GetParent()
returns parent of current inventory location
proto native void SetTemporary(notnull EntityAI parent, EntityAI e)
proto native int GetSlot()
returns slot id if current type is Attachment
proto native bool CollidesWith(notnull InventoryLocation rhs)
checks if inventory locations collides each with other
proto native int GetType()
returns type of InventoryLocation
bool ReadFromContext(ParamsReadContext ctx)
proto native EntityAI GetItem()
returns item of current inventory location
float m_TimeFromLastRequest
static float PIR_MAX_ITEMS_TO_SEND
bool MoveItemToCorrectPosition(InventoryLocation ilCorrect)
bool RepairItem(EntityAI itemToRepair)
static float PIR_REQUEST_COOLDOWN
void OnRPC(ParamsReadContext ctx)
void Remove(EntityAI item)
ref array< EntityAI > m_ItemsToRepair
ref array< ref InventoryLocation > m_CorrectILs
override void OnUpdate(float delta_time)
void PluginInventoryRepair()
Plugin interface for controlling of agent pool system.
proto bool Read(void value_in)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext