Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VehicleInventoryStorageManagerComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/UI/Inventory")]
3 {
4 }
5 
6 class SCR_VehicleInventoryStorageManagerComponent : ScriptedInventoryStorageManagerComponent
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  SlotManagerComponent slotManager = SlotManagerComponent.Cast(GetOwner().FindComponent(SlotManagerComponent));
17  if (!slotManager)
18  return;
19 
20  array<EntitySlotInfo> slots = {};
21  slotManager.GetSlotInfos(slots);
22 
23  foreach (EntitySlotInfo info : slots)
24  {
25  IEntity ent = info.GetAttachedEntity();
26  if (!ent)
27  continue;
28 
29  BaseInventoryStorageComponent invComp = BaseInventoryStorageComponent.Cast(ent.FindComponent(BaseInventoryStorageComponent));
30  if (invComp)
31  {
32  storagesToAdd.Insert(invComp);
33  }
34  }
35  }
36 }
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
EntitySlotInfo
Adds ability to attach an object to a slot.
Definition: EntitySlotInfo.c:8
ScriptedInventoryStorageManagerComponentClass
Definition: ScriptedInventoryStorageManagerComponent.c:1
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
SCR_VehicleInventoryStorageManagerComponentClass
Definition: SCR_VehicleInventoryStorageManagerComponent.c:2
FillInitialStorages
SCR_VehicleInventoryStorageManagerComponentClass ScriptedInventoryStorageManagerComponentClass FillInitialStorages(out array< BaseInventoryStorageComponent > storagesToAdd)
Definition: SCR_VehicleInventoryStorageManagerComponent.c:9
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180