3 SCR_InventoryStorageManagerComponent inventoryManager;
6 protected override bool TestFunction(AIAgent agent, IEntity controlled)
8 if (!inventoryManager && !weapon)
13 inventoryManager = SCR_InventoryStorageManagerComponent.Cast(entity.FindComponent(SCR_InventoryStorageManagerComponent));
14 if ( !inventoryManager )
16 BaseWeaponManagerComponent weaponManager = BaseWeaponManagerComponent.Cast(entity.FindComponent(BaseWeaponManagerComponent));
19 weapon = weaponManager.GetCurrent();
23 int ammo = inventoryManager.GetMagazineCountByWeapon(weapon);