25 repairIl.SetTemporary(player, itemToRepair);
26 itemToRepair.GetInventory().GetCurrentInventoryLocation(currentIl);
32 player.OnItemInHandsChanged();
44 if (!ctx.Read(itemCount))
47 for (
int i = 0; i < itemCount; i++)
50 if (!il.ReadFromContext(ctx) )
63 EntityAI parent = ilCorrect.GetParent();
64 item.GetInventory().GetCurrentInventoryLocation(ilTemp);
66 switch(ilCorrect.GetType())
70 CargoBase cargo = parent.GetInventory().GetCargo();
71 for(
int i = cargo.GetItemCount() - 1; i >= 0 ; --i)
73 EntityAI itemInCargo = cargo.GetItem(i);
74 if (itemInCargo != item)
76 itemInCargo.GetInventory().GetCurrentInventoryLocation(ilCargoItem);
77 if (ilCorrect.CollidesWith(ilCargoItem))
88 EntityAI entityInAttachment = parent.GetInventory().FindAttachment(ilCorrect.GetSlot());
90 if(entityInAttachment)
100 EntityAI entityInHands = player.GetItemInHands();
represents base for cargo storage for entities
script counterpart to engine's class Inventory
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...
Plugin interface for controlling of agent pool system.
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()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
InventoryLocationType
types of Inventory Location