Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_InventoryAvailableCondition.c
Go to the documentation of this file.
3 {
4  [Attribute("4")]
5  protected int m_iMaxShowCount;
6  protected static int s_iShowCounter;
7 
8  [Attribute("1")]
9  protected bool m_bPersistent;
10 
11  override bool IsAvailable(SCR_AvailableActionsConditionData data)
12  {
13  if (s_iShowCounter >= m_iMaxShowCount)
14  return false;
15 
16  return GetReturnResult(data.IsInventoryOpen());
17  }
18 
19  static void IncrementCounter()
20  {
21  s_iShowCounter++;
22  }
23 
25  {
26  if (!m_bPersistent)
27  {
28  s_iShowCounter = 0;
29  return;
30  }
31 
32  UserSettings userSettings = GetGame().GetGameUserSettings();
33  if (!userSettings)
34  return;
35 
36  BaseContainer container = userSettings.GetModule("SCR_InventoryHintSettings");
37  if (container)
38  container.Get("m_iInventoryOpenCount", s_iShowCounter)
39  }
40 
42  {
43  if (!m_bPersistent)
44  return;
45 
46  UserSettings userSettings = GetGame().GetGameUserSettings();
47  if (!userSettings)
48  return;
49 
50  BaseContainer container = userSettings.GetModule("SCR_InventoryHintSettings");
51  if (!container)
52  return;
53 
54  container.Set("m_iInventoryOpenCount", s_iShowCounter);
55  GetGame().UserSettingsChanged();
56  }
57 };
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_InventoryAvailableCondition
Definition: SCR_InventoryAvailableCondition.c:2
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
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