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

◆ MaterialIsRuined()

bool MaterialIsRuined ( string part_name)
protected

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

307 {
308 string main_part_name = GetConstructionPart( part_name ).GetMainPartName();
309 string cfg_path = "cfgVehicles" + " " + GetParent().GetType() + " "+ "Construction" + " " + main_part_name + " " + part_name + " " + "Materials";
310
311 if ( g_Game.ConfigIsExisting( cfg_path ) )
312 {
313 int child_count = g_Game.ConfigGetChildrenCount( cfg_path );
314
315 for ( int i = 0; i < child_count; i++ )
316 {
317 string child_name;
318 g_Game.ConfigGetChildName( cfg_path, i, child_name );
319
320 //get type, quantity from material
321 string config_path;
322 string slot_name;
323 config_path = cfg_path + " " + child_name + " " + "slot_name";
324 g_Game.ConfigGetText( config_path, slot_name );
325 config_path = cfg_path + " " + child_name + " " + "quantity";
326 float quantity = g_Game.ConfigGetFloat( config_path );
327 config_path = cfg_path + " " + child_name + " " + "lockable";
328 bool lockable = g_Game.ConfigGetInt( config_path );
329
330 ItemBase attachment = ItemBase.Cast( GetParent().FindAttachmentBySlotName( slot_name ) );
331 if (attachment.IsRuined())
332 return true;
333 }
334 }
335 return false;
336 }
ConstructionPart GetConstructionPart(string part_name)
Определения Construction.c:280
DayZGame g_Game
Определения DayZGame.c:3942
string GetMainPartName()
Определения ConstructionPart.c:35
BaseBuildingBase GetParent()
Get parent of the Effect.
Определения Construction.c:40

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

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