Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ResourceStoragePolicyBase.c
Go to the documentation of this file.
1 class SCR_ResourceStorageTypeTitle: BaseContainerCustomTitle
2 {
3  override bool _WB_GetCustomTitle(BaseContainer source, out string title)
4  {
6 
7  source.Get("m_eStorageType", storageType);
8 
9  title = SCR_Enum.GetEnumName(EResourceContainerStorageType, storageType);
10  string firstLetter = title[0];
11 
12  title.Replace("_", " ");
13  title.ToLower();
14  firstLetter.ToUpper();
15 
16  title = string.Format("%2%3 - %1", source.GetClassName(), firstLetter, title.Substring(1, title.Length() - 1));
17 
18  return true;
19  }
20 };
21 
23 class SCR_ResourceStoragePolicyBase<Class ResourceActorType> : Managed
24 {
25  [Attribute(uiwidget: UIWidgets.Object)]
26  protected ref SCR_ResourceContainerStorageQueue<ResourceActorType> m_StorageQueue;
27 
28  //------------------------------------------------------------------------------------------------
29  SCR_ResourceContainerStorageQueue<ResourceActorType> GetStorageQueue()
30  {
31  return m_StorageQueue;
32  }
33 
34  //------------------------------------------------------------------------------------------------
35  bool IsStorageTypeValid(EResourceContainerStorageType storageType)
36  {
37  return false;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  void SetStorageQueue(notnull SCR_ResourceContainerStorageQueue<ResourceActorType> queue)
42  {
43  m_StorageQueue = queue;
44  }
45 
46  //------------------------------------------------------------------------------------------------
47  void ResetStorageQueue()
48  {
49  #ifdef WORKBENCH
50  if (m_StorageQueue)
51  m_StorageQueue.Reset();
52  else
53  Debug.Error2("SCR_ResourceStoragePolicyBase::m_StorageQueue is null.", "A resource container storage queue has to be present.");
54  #else
55  m_StorageQueue.Reset();
56  #endif
57  }
58 }
SCR_Enum
Definition: SCR_Enum.c:1
EResourceContainerStorageType
EResourceContainerStorageType
Definition: SCR_ResourceContainer.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_ResourceStorageTypeTitle
Definition: SCR_ResourceStoragePolicyBase.c:1
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