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

◆ HasRequiredPart()

bool HasRequiredPart ( string part_name)
protected

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

413 {
414 string main_part_name = GetConstructionPart( part_name ).GetMainPartName();
415 string cfg_path = "cfgVehicles" + " " + GetParent().GetType() + " "+ "Construction" + " " + main_part_name + " " + part_name + " " + "required_parts";
416
417 ref array<string> required_parts = new array<string>;
418 g_Game.ConfigGetTextArray( cfg_path, required_parts );
419
420 //check if parts are already built
421 for ( int i = 0; i < required_parts.Count(); ++i )
422 {
423 if ( !IsPartConstructed( required_parts.Get( i ) ) )
424 {
425 return false;
426 }
427 //hack - gate
428 /*else if (part_name == "wall_gate" && (IsPartConstructed("wall_base_down") || IsPartConstructed("wall_base_up")))
429 {
430 return true;
431 }*/
432 }
433
434 return true;
435 }
ConstructionPart GetConstructionPart(string part_name)
Определения Construction.c:280
bool IsPartConstructed(string part_name)
Определения Construction.c:602
DayZGame g_Game
Определения DayZGame.c:3942
string GetMainPartName()
Определения ConstructionPart.c:35
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
BaseBuildingBase GetParent()
Get parent of the Effect.
Определения Construction.c:40

Перекрестные ссылки g_Game, GetConstructionPart(), ConstructionPart::GetMainPartName(), GetParent() и IsPartConstructed().

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