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

◆ CanUseToolToDismantlePart()

bool CanUseToolToDismantlePart ( string part_name,
ItemBase tool )
protected

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

983 {
984 ConstructionPart construction_part = GetConstructionPart( part_name );
985 string part_cfg_path = "cfgVehicles" + " " + GetParent().GetType() + " "+ "Construction" + " " + construction_part.GetMainPartName() + " " + construction_part.GetPartName() + " " + "dismantle_action_type";
986 if ( GetGame().ConfigIsExisting( part_cfg_path ) )
987 {
988 int part_dismantle_action_type = GetGame().ConfigGetInt( part_cfg_path );
989 string tool_cfg_path = "cfgVehicles" + " " + tool.GetType() + " " + "dismantle_action_type";
990
991 if ( GetGame().ConfigIsExisting( tool_cfg_path ) )
992 {
993 int tool_dismantle_action_type = GetGame().ConfigGetInt( tool_cfg_path );
994
995 if ( ( part_dismantle_action_type & tool_dismantle_action_type ) > 0 )
996 {
997 return true;
998 }
999 }
1000 }
1001
1002 return false;
1003 }
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().

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