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

◆ GetConstructionPartsToBuild()

void GetConstructionPartsToBuild ( string main_part_name,
out array< ConstructionPart > construction_parts,
ItemBase tool,
out string real_constructionTarget,
bool use_tool )
protected

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

340 {
341 construction_parts.Clear();
342 string part_name;
343 ConstructionPart value;
344 string key;
345
346 for ( int i = 0; i < m_ConstructionParts.Count(); ++i )
347 {
348 key = m_ConstructionParts.GetKey( i );
349 value = m_ConstructionParts.Get( key );
350
351 if ( main_part_name == value.GetMainPartName() && CanBuildPart( value.GetPartName(), tool, use_tool ) )
352 {
353 construction_parts.Insert( value );
354 }
355
356 if ( main_part_name == value.GetPartName() )
357 {
358 part_name = value.GetMainPartName();
359 }
360 }
361
362 if( construction_parts.Count() == 0 && part_name )
363 {
364 for ( i = 0; i < m_ConstructionParts.Count(); ++i )
365 {
366 key = m_ConstructionParts.GetKey( i );
367 value = m_ConstructionParts.Get( key );
368
369 if ( part_name == value.GetMainPartName() && CanBuildPart( value.GetPartName(), tool, use_tool ) )
370 {
371 construction_parts.Insert( value );
372 }
373 }
374 }
375 }
bool CanBuildPart(string part_name, ItemBase tool, bool use_tool)
Определения Construction.c:296
ref map< string, ref ConstructionPart > m_ConstructionParts
Определения Construction.c:15
string GetPartName()
Определения ConstructionPart.c:30
string GetMainPartName()
Определения ConstructionPart.c:35

Перекрестные ссылки CanBuildPart(), ConstructionPart::GetMainPartName(), ConstructionPart::GetPartName() и m_ConstructionParts.