Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_InventoryConfig.c
Go to the documentation of this file.
3 {
4  [Attribute("Name", desc: "")]
5  protected string m_sName;
6 
7  [Attribute( defvalue: "", uiwidget: UIWidgets.Object, desc: "Area type" )]
8  ref LoadoutAreaType m_LoadoutArea;
9 
10  [Attribute( defvalue: "0", uiwidget: UIWidgets.ComboBox, desc: "Area", enums: ParamEnumArray.FromEnum( ECommonItemType ) )]
11  ECommonItemType m_eCommonType;
12 
13  [Attribute( defvalue: "1", uiwidget: UIWidgets.EditBox, desc: "Row in inventory list" )]
14  private int m_iRow;
15 
16  [Attribute( defvalue: "", desc: "Icon for the Area", params: "edds" )]
17  ResourceName m_sIcon;
18 
19 };
20 
21 [BaseContainerProps(configRoot: true)]
23 {
24  [Attribute( desc: "Loadout Areas" )]
25  protected ref array<ref SCR_LoadoutArea> m_aLoadoutAreas;
26 
27  //------------------------------------------------------------------------
28  int GetLoadoutAreaCount()
29  {
30  return m_aLoadoutAreas.Count();
31  }
32 
33  int GetRowByArea( LoadoutAreaType pArea )
34  {
35  if (!pArea)
36  return -1;
37 
38  foreach ( int iIndex , SCR_LoadoutArea pAreaEntry : m_aLoadoutAreas )
39  if ( pAreaEntry.m_LoadoutArea && pAreaEntry.m_LoadoutArea.IsInherited(pArea.Type()) )
40  return iIndex;
41  return -1;
42  }
43 
44  int GetRowByCommonItemType( ECommonItemType pItemType )
45  {
46  foreach ( int iIndex , SCR_LoadoutArea pAreaEntry : m_aLoadoutAreas )
47  if ( pAreaEntry.m_eCommonType == pItemType )
48  return iIndex;
49  return -1;
50  }
51 
52  ResourceName GetIcon( LoadoutAreaType pArea )
53  {
54  if (!pArea)
55  return ResourceName.Empty;
56 
57  foreach ( int iIndex , SCR_LoadoutArea pAreaEntry : m_aLoadoutAreas )
58  if ( pAreaEntry.m_LoadoutArea && pAreaEntry.m_LoadoutArea.IsInherited(pArea.Type()) )
59  return pAreaEntry.m_sIcon;
60  return ResourceName.Empty;
61  }
62 
63  ResourceName GetIconByRow( int iIndex )
64  {
65  if ( iIndex > m_aLoadoutAreas.Count() -1 )
66  return ResourceName.Empty;
67  return m_aLoadoutAreas[ iIndex ].m_sIcon;
68  }
69 
70  LoadoutAreaType GetAreaByRow( int iIndex )
71  {
72  if (!m_aLoadoutAreas.IsIndexValid(iIndex))
73  return null;
74  return m_aLoadoutAreas[iIndex].m_LoadoutArea;
75  }
76 
77  void ~SCR_InventoryConfig()
78  {
79  m_aLoadoutAreas = null;
80  }
81 };
82 
SCR_BaseContainerCustomTitleResourceName
SCR_CampaignMilitaryBaseComponent SCR_MilitaryBaseComponent SCR_BaseContainerCustomTitleResourceName("m_sBaseName", true)
Definition: SCR_CampaignMilitaryBaseComponent.c:2522
SCR_LoadoutArea
Definition: SCR_InventoryConfig.c:2
ECommonItemType
ECommonItemType
Definition: InventoryConstants.c:30
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
LoadoutAreaType
Definition: LoadoutAreaType.c:12
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_InventoryConfig
Definition: SCR_InventoryConfig.c:22
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468