DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetData()

static JsonUndergroundTriggers UndergroundAreaLoader::GetData ( )
inlinestaticprivate

См. определение в файле UndergroundAreaLoader.c строка 57

58 {
59 if (!FileExist(m_Path))
60 {
61 // We fallback to check in data and notify user file was not found in mission
62 PrintToRPT("[WARNING] :: [UndergroundAreaLoader GetData()] :: file not found in MISSION folder, your path is " + m_Path + " Attempting DATA folder");
63
64 string worldName;
65 GetGame().GetWorldName(worldName);
66 m_Path = string.Format("dz/worlds/%1/ce/cfgundergroundtriggers.json", worldName);
67
68 if (!FileExist(m_Path))
69 {
70 PrintToRPT("[WARNING] :: [UndergroundAreaLoader GetData()] ::file not found in DATA folder, your path is " + m_Path);
71 return null; // Nothing could be read, just end here
72 }
73 }
74
75 string errorMessage;
76 JsonUndergroundTriggers data;
77 if (!JsonFileLoader<JsonUndergroundTriggers>.LoadFile(m_Path, data, errorMessage))
78 ErrorEx(errorMessage);
79
80 return data;
81 }
proto void GetWorldName(out string world_name)
static string m_Path
Определения UndergroundAreaLoader.c:52
proto native CGame GetGame()
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
enum ShapeType ErrorEx
proto bool FileExist(string name)
Check existence of file.

Перекрестные ссылки ErrorEx, FileExist(), GetGame(), CGame::GetWorldName(), m_Path и PrintToRPT().

Используется в SpawnAllTriggerCarriers().