DayZ 1.27
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 ( GetGame().ConfigIsExisting( cfg_path ) )
312 {
313 int child_count = GetGame().ConfigGetChildrenCount( cfg_path );
314
315 for ( int i = 0; i < child_count; i++ )
316 {
317 string child_name;
318 GetGame().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 GetGame().ConfigGetText( config_path, slot_name );
325 config_path = cfg_path + " " + child_name + " " + "quantity";
326 float quantity = GetGame().ConfigGetFloat( config_path );
327 config_path = cfg_path + " " + child_name + " " + "lockable";
328 bool lockable = GetGame().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
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
string GetMainPartName()
Определения ConstructionPart.c:35
Определения InventoryItem.c:731
proto native CGame GetGame()
BaseBuildingBase GetParent()
Get parent of the Effect.
Определения Construction.c:40

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetFloat(), CGame::ConfigGetInt(), CGame::ConfigGetText(), GetConstructionPart(), GetGame(), ConstructionPart::GetMainPartName() и GetParent().

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