7 protected ref array<string> ad = {};
10 bool IsVersionCompatible(out
string versionName =
string.Empty)
13 versionName =
GetGame().GetBuildVersion();
15 return bV.StartsWith(versionName);
19 string GetHeaderResource()
25 void GetDateAndTime(out
int year, out
int month, out
int day, out
int hour, out
int minute)
31 bool AreAddonsCompatible()
33 array<string> currentAddons = {};
34 GameProject.GetLoadedAddons(currentAddons);
36 foreach (
string addon: ad)
38 if (!currentAddons.Contains(addon))
47 return cT != 0 && !bV.IsEmpty() && !hR.IsEmpty();
51 override bool Serialize()
54 bV =
GetGame().GetBuildVersion();
57 int y, m, d, hh, mm, ss;
58 System.GetYearMonthDay(y, m, d);
59 System.GetHourMinuteSecond(hh, mm, ss);
66 else if (SCR_SaveLoadComponent.GetInstance())
67 hR =
SCR_ConfigHelper.GetGUID(SCR_SaveLoadComponent.GetInstance().GetDebugHeaderResourceName());
70 GameProject.GetLoadedAddons(ad);
76 override bool Deserialize()
82 override void ClearCache()
96 Print(
"--- SCR_MetaStruct --------------------------");
97 PrintFormat(
"Build version = %1", bV);
98 PrintFormat(
"Creation time = %1",
SCR_FormatHelper.FormatDateTime(y, m, d, hh, mm, 0));
99 PrintFormat(
"Header resource GUID = %1", hR);
101 foreach (
string guid: ad)
103 string addonTitle = GameProject.GetAddonTitle(guid);
104 if (addonTitle.IsEmpty())
105 addonTitle =
string.Format(
"Unknown addon (%1)", guid);
106 Print(
" " + addonTitle);
108 Print(
"---------------------------------------------");