3 private static const string REPORT_FILE_NAME_TEMPLATE =
"$mission:Autotest_%1.xml";
4 private static const string DATETIME_FORMAT =
"%1%2%3T%4%5%6Z";
6 private static string m_WorldName;
8 static bool SaveXMLReport(
string data, out
string errorMessage)
10 int year, month, day, hour, minute, second;
13 string datetimeUTC =
string.Format(DATETIME_FORMAT, year, month.ToStringLen(2), day.ToStringLen(2), hour.ToStringLen(2), minute.ToStringLen(2), second.ToStringLen(2));
14 string filename =
string.Format(REPORT_FILE_NAME_TEMPLATE, datetimeUTC);
19 errorMessage =
string.Format(
"Cannot open file \"%1\" for writing", filename);
35 static void SetWorldName()
37 string worldName =
"empty";
38 GetGame().GetWorldName(worldName);
41 m_WorldName = worldName;
44 static string GetWorldName()
49 static void LogRPT(
string message)
51 PrintToRPT(
string.Format(
"[Autotest] %1", message));