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

◆ CanUseToolToBuildPart()

bool CanUseToolToBuildPart ( string part_name,
ItemBase tool )
protected

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

960 {
961 ConstructionPart construction_part = GetConstructionPart( part_name );
962 string part_cfg_path = "cfgVehicles" + " " + GetParent().GetType() + " "+ "Construction" + " " + construction_part.GetMainPartName() + " " + construction_part.GetPartName() + " " + "build_action_type";
963 if ( GetGame().ConfigIsExisting( part_cfg_path ) )
964 {
965 int part_build_action_type = GetGame().ConfigGetInt( part_cfg_path );
966 string tool_cfg_path = "cfgVehicles" + " " + tool.GetType() + " " + "build_action_type";
967
968 if ( GetGame().ConfigIsExisting( tool_cfg_path ) )
969 {
970 int tool_build_action_type = GetGame().ConfigGetInt( tool_cfg_path );
971
972 if ( ( part_build_action_type & tool_build_action_type ) > 0 )
973 {
974 return true;
975 }
976 }
977 }
978
979 return false;
980 }
ConstructionPart GetConstructionPart(string part_name)
Определения Construction.c:280
proto native int ConfigGetInt(string path)
Get int value from config on path.
string GetPartName()
Определения ConstructionPart.c:30
string GetMainPartName()
Определения ConstructionPart.c:35
proto native CGame GetGame()
BaseBuildingBase GetParent()
Get parent of the Effect.
Определения Construction.c:40

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

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