8class CachedEquipmentItemAttribute
33 return string.Format(
"entity:%1(%2 - %3), parent:%4, inventoryDepth:%5",
42 return string.
Format(
"entity:%1(%2), parent:%3 , inventoryDepth:%4",
77 bool placementMatched =
false;
78 bool inventoryDepthMatched =
false;
81 placementMatched =
true;
84 inventoryDepthMatched =
true;
86 if (placementMatched && inventoryDepthMatched)
87 entities.Insert(itemAttributes.m_Entity);
108 entities.Insert(itemAttributes.m_Entity);
124 if (itemAttributes.m_Entity == entity)
152 if (attributeToRemove.m_Entity == entity)
153 toRemove.Insert(attributeToRemove);
156 foreach (CachedEquipmentItemAttribute attribute : toRemove)
162 #ifdef DIAG_DEVELOPER
169 Print(itemAttributes.Debug());
178 Print(
"--------------------------");
179 Print(
"Equipped Items Cache Stats");
185 PrintCachedEntitiesByCategory(category);
187 Print(
"--------------------------");
class CachedEquipmentStorageQuery m_SlotIndex
ECachedEquipmentPlacement m_InventoryPlacement
ECachedEquipmentItemCategory
ECachedEquipmentPlacement
void OnItemCargoOut(notnull Entity entity)
bool IsStored(Entity entity, ECachedEquipmentItemCategory category)
void OnItemAttached(notnull Entity entity, int slotId, notnull Entity parent)
array< Entity > GetEntitiesByCategory(CachedEquipmentStorageQuery query)
List of entities matching the CachedEquipmentStorageQuery query.
ref map< ECachedEquipmentItemCategory, ref array< ref CachedEquipmentItemAttribute > > m_ItemsCacheByCategory
void Insert(ECachedEquipmentItemCategory category, CachedEquipmentItemAttribute attributes)
void CachedEquipmentStorageBase()
void OnItemDetached(notnull Entity entity, int slotId, notnull Entity parent)
void OnItemCargoIn(notnull Entity entity)
void Remove(ECachedEquipmentItemCategory category, Entity entity)
array< Entity > GetEntitiesByCategory(ECachedEquipmentItemCategory category, ECachedEquipmentPlacement placement=ECachedEquipmentPlacement.ANY)
List of entities matching the category and inventory placement.
ECachedEquipmentItemCategory m_Category
ECachedEquipmentPlacement m_Placement
static proto native owned string GetSlotName(int id)
converts slot_id to string
provides access to slot configuration
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto void Print(void var)
Prints content of variable to console/log.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.