618 {
620 string cfg_path =
"cfgVehicles" +
" " +
GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
621
622 if (
GetGame().ConfigIsExisting( cfg_path ) )
623 {
625
626 for ( int i = 0; i < child_count; i++ )
627 {
628 string child_name;
630
631
632 string material_path;
633 string slot_name;
634 float quantity;
635 material_path = cfg_path + " " + child_name + " " + "slot_name";
637 material_path = cfg_path + " " + child_name + " " + "quantity";
639
640 if (repairing)
641 {
644 }
645
646
648 {
649 return false;
650 }
651 }
652 }
653
654 return true;
655 }
ConstructionPart GetConstructionPart(string part_name)
enum ConstructionMaterialType REPAIR_MATERIAL_PERCENTAGE
bool HasMaterialWithQuantityAttached(string slot_name, float quantity)
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 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.
proto native CGame GetGame()
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Floor(float f)
Returns floor of value.