Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_LatestSaveStruct.c
Go to the documentation of this file.
2 {
3  ref array<ref SCR_LatestSaveEntryStruct> m_aEntries = {};
4 
5  //----------------------------------------------------------------------------------------
11  void SetFileName(string missionFileName, string saveFileName)
12  {
14  foreach (SCR_LatestSaveEntryStruct entryCandidate: m_aEntries)
15  {
16  if (entryCandidate.wFn == missionFileName)
17  {
18  entry = entryCandidate;
19  break;
20  }
21  }
22  if (!entry)
23  {
24  entry = new SCR_LatestSaveEntryStruct();
25  entry.wFn = missionFileName;
26  m_aEntries.Insert(entry);
27  }
28  entry.sFn = saveFileName;
29  }
30 
31  //----------------------------------------------------------------------------------------
36  void RemoveFileName(string missionFileName)
37  {
38  for (int i = m_aEntries.Count() - 1; i >= 0; i--)
39  {
40  if (m_aEntries[i].wFn == missionFileName)
41  {
42  m_aEntries.Remove(i);
43  break;
44  }
45  }
46  }
47 
48  //----------------------------------------------------------------------------------------
55  bool FindFileName(string missionFileName, out string outSaveFileName)
56  {
57  for (int i = m_aEntries.Count() - 1; i >= 0; i--)
58  {
59  if (m_aEntries[i].wFn == missionFileName)
60  {
61  outSaveFileName = m_aEntries[i].sFn;
62  return true;
63  }
64  }
65  return false;
66  }
67 
68  //----------------------------------------------------------------------------------------
72  void Log()
73  {
74  int count = m_aEntries.Count();
75  PrintFormat("Latest saves: %1", count);
76  for (int i = count - 1; i >= 0; i--)
77  {
78  PrintFormat(" %1: %2", m_aEntries[i].wFn, m_aEntries[i].sFn);
79  }
80  }
81 
82  //----------------------------------------------------------------------------------------
84  {
85  RegV("m_aEntries");
86  }
87 }
89 {
90  string wFn; //--- World file name
91  string sFn; //--- Save file name
92 
94  {
95  RegAll();
96  }
97 }
SCR_LatestSaveEntryStruct
void SCR_LatestSaveEntryStruct()
Definition: SCR_LatestSaveStruct.c:93
JsonApiStruct
Parameters for joining server.
Definition: FeedbackDialogUI.c:2
wFn
SCR_LatestSaveStruct wFn
sFn
string sFn
Definition: SCR_LatestSaveStruct.c:91
m_aEntries
protected ref array< ref SCR_TextsTaskManagerEntry > m_aEntries
Definition: SCR_TextsTaskManagerComponent.c:3
SCR_LatestSaveStruct
Definition: SCR_LatestSaveStruct.c:1