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
53 bool cfgGameplayFileEnabled =
g_Game.ServerConfigGetInt(
"enableCfgGameplayFile" );
54
55 #ifdef DIAG_DEVELOPER
56 if (!
g_Game.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 }
static ref CfgGameplayJson m_Data
static void ValidateItems()
proto bool FileExist(string name)
Check existence of file.
Перекрестные ссылки ErrorEx, FileExist(), g_Game, InitData(), m_Data, m_Path, OnLoaded() и ValidateItems().
Используется в MissionBase::OnInit().