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

◆ GenerateRecipeCache()

void PluginRecipesManagerBase::GenerateRecipeCache ( )
inlineprotected

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

174 {
175 GetGame().ProfilerStart("m_RecipeCache");
176
177 //m_CacheBasesMap.Clear();
178 m_CachedItems.Clear();
179 PluginRecipesManager.m_RecipeCache.Clear();
180
181 TStringArray all_config_paths = new TStringArray;
182
183 all_config_paths.Insert(CFG_VEHICLESPATH);
184 all_config_paths.Insert(CFG_WEAPONSPATH);
185 all_config_paths.Insert(CFG_MAGAZINESPATH);
186 //Debug.Log("Got here 0","caching");
187 string config_path;
188 string child_name;
189 int scope;
190 TStringArray full_path = new TStringArray;
191 WalkRecipes();
192 for (int i = 0; i < all_config_paths.Count(); i++)
193 {
194 config_path = all_config_paths.Get(i);
195 int children_count = GetGame().ConfigGetChildrenCount(config_path);
196
197 for (int x = 0; x < children_count; x++)
198 {
199 GetGame().ConfigGetChildName(config_path, x, child_name);
200 scope = GetGame().ConfigGetInt( config_path + " " + child_name + " scope" );
201
202 if ( scope == 2 )
203 {
204 GetGame().ConfigGetFullPath(config_path +" "+ child_name,/*out*/ full_path);
205 MatchItems(full_path);
206 }
207 }
208 }
209 GetGame().ProfilerStop("m_RecipeCache");
210 }
Icon x
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native void ConfigGetFullPath(string path, out TStringArray full_path)
proto native void ProfilerStop(string name)
Use for profiling code from start to stop, they must match have same name, look wiki pages for more i...
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native void ProfilerStart(string name)
Use for profiling code from start to stop, they must match have same name, look wiki pages for more i...
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
void PluginRecipesManager()
Определения PluginRecipesManager.c:52
ref array< string > m_CachedItems
Определения PluginRecipesManager.c:40
void MatchItems(TStringArray full_path)
Определения PluginRecipesManager.c:256
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685
const string CFG_VEHICLESPATH
Определения constants.c:220
const string CFG_WEAPONSPATH
Определения constants.c:221
const string CFG_MAGAZINESPATH
Определения constants.c:222

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetFullPath(), CGame::ConfigGetInt(), GetGame(), m_CachedItems, MatchItems(), PluginRecipesManager(), CGame::ProfilerStart(), CGame::ProfilerStop(), WalkRecipes() и x.

Используется в CallbackGenerateCache() и PluginRecipesManager().