Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TurretInventoryStorageManagerComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/UI/Inventory")]
3 {
4 }
5 
6 class SCR_TurretInventoryStorageManagerComponent : SCR_InventoryStorageManagerComponent
7 {
8  //------------------------------------------------------------------------------------------------
9  protected override void FillInitialStorages(out array<BaseInventoryStorageComponent> storagesToAdd)
10  {
11  super.FillInitialStorages(storagesToAdd);
12 
13  if (!GetGame().InPlayMode())
14  return;
15 
16  array<Managed> outComponents = {};
17  GetOwner().FindComponents(WeaponSlotComponent, outComponents);
18 
19  foreach (Managed outComponent : outComponents)
20  {
21  WeaponSlotComponent weaponSlotComponent = WeaponSlotComponent.Cast(outComponent);
22  IEntity ent = weaponSlotComponent.GetWeaponEntity();
23  if (!ent)
24  continue;
25 
26  BaseInventoryStorageComponent invComp = BaseInventoryStorageComponent.Cast(ent.FindComponent(BaseInventoryStorageComponent));
27  if (invComp)
28  storagesToAdd.Insert(invComp);
29  }
30  }
31 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
WeaponSlotComponent
Definition: WeaponSlotComponent.c:12
SCR_TurretInventoryStorageManagerComponentClass
Definition: SCR_TurretInventoryStorageManagerComponent.c:2
FillInitialStorages
SCR_TurretInventoryStorageManagerComponentClass SCR_InventoryStorageManagerComponentClass FillInitialStorages(out array< BaseInventoryStorageComponent > storagesToAdd)
Definition: SCR_TurretInventoryStorageManagerComponent.c:9
SCR_InventoryStorageManagerComponentClass
Definition: SCR_InventoryStorageManagerComponent.c:2
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180