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

◆ UpdateConstructionParts()

void UpdateConstructionParts ( )
protected

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

236 {
237 m_ConstructionParts.Clear();
238
239 string construction_path = "cfgVehicles" + " " + GetParent().GetType() + " " + "Construction";
240
241 if ( g_Game.ConfigIsExisting( construction_path ) )
242 {
243 //main parts
244 for ( int i = 0; i < g_Game.ConfigGetChildrenCount( construction_path ); ++i )
245 {
246 string main_part_name;
247 g_Game.ConfigGetChildName( construction_path, i, main_part_name );
248 string part_path = construction_path + " " + main_part_name;
249
250 //parts
251 for ( int j = 0; j < g_Game.ConfigGetChildrenCount( part_path ); ++j )
252 {
253 string part_name;
254 g_Game.ConfigGetChildName( part_path, j, part_name );
255
256 string name;
257 g_Game.ConfigGetTextRaw( part_path + " " + part_name + " " + "name", name ); //name
258 g_Game.FormatRawConfigStringKeys(name);
259 bool show_on_init = g_Game.ConfigGetInt( part_path + " " + part_name + " " + "show_on_init" ); //show on init
260 int id = g_Game.ConfigGetInt( part_path + " " + part_name + " " + "id" ); //part id
261 bool is_base = g_Game.ConfigGetInt( part_path + " " + part_name + " " + "is_base" ); //is base (part)
262 bool is_gate = g_Game.ConfigGetInt( part_path + " " + part_name + " " + "is_gate" ); //is gate (part)
263
264 m_ConstructionParts.Insert( part_name, new ConstructionPart( name, part_name, main_part_name, id, show_on_init, is_base, is_gate, GetRequiredParts(part_name,main_part_name) ) );
265
266 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] Construction name=" + name + " part_name=" + part_name + " show=" + show_on_init + " base=" + is_base + " gate=" + is_gate);
267 }
268 }
269 }
270 }
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
Определения BaseBuildingBase.c:1312
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
array< string > GetRequiredParts(string part_name, string main_part_name)
Определения Construction.c:546
ref map< string, ref ConstructionPart > m_ConstructionParts
Определения Construction.c:15
DayZGame g_Game
Определения DayZGame.c:3942
static bool IsBaseBuildingLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:796
BaseBuildingBase GetParent()
Get parent of the Effect.
Определения Construction.c:40

Перекрестные ссылки bsbDebugPrint(), g_Game, GetParent(), GetRequiredParts(), LogManager::IsBaseBuildingLogEnable(), m_ConstructionParts и name.

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