we are allowed to read the file, so we replace the default data with data from json
См. определение в файле CfgGameplayHandler.c строка 44
45 {
47 {
50 m_Path =
string.Format(
"dz/worlds/%1/ce/cfggameplay.json",
m_Path);
51 }
52
54
55 #ifdef DIAG_DEVELOPER
56 if (!
GetGame().IsDedicatedServer())
57 {
58 cfgGameplayFileEnabled = true;
59 }
60 #endif
61
63 {
67 return false;
68 }
69
70 string errorMessage;
71 if (!JsonFileLoader<CfgGameplayJson>.LoadFile(
m_Path,
m_Data, errorMessage))
73
76
77 return true;
78 }
proto void GetWorldName(out string world_name)
proto native int ServerConfigGetInt(string name)
Server config parsing. Returns 0 if not found.
static ref CfgGameplayJson m_Data
static void ValidateItems()
proto native CGame GetGame()
proto bool FileExist(string name)
Check existence of file.
Перекрестные ссылки ErrorEx, FileExist(), GetGame(), CGame::GetWorldName(), InitData(), m_Data, m_Path, OnLoaded(), CGame::ServerConfigGetInt() и ValidateItems().
Используется в MissionBase::OnInit().