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

◆ CanUseToolToBuildPart()

bool CanUseToolToBuildPart ( string part_name,
ItemBase tool )
protected

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

1405 {
1406 #ifdef DIAG_DEVELOPER
1407 if (g_Game.IsClient() || !g_Game.IsMultiplayer())
1408 {
1409 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
1410 if (player)
1411 {
1412 if (player.GetConstructionActionData().GetFastConstructionMode())
1413 return true;
1414 }
1415 }
1416 #endif
1417
1418 ConstructionPart part = GetConstructionPart(part_name);
1419 int actionMask = part.GetBuildActionTypeMask();
1420 if (actionMask != EConstructionTools.TOOL_NO_ACTION)
1421 {
1422 if (tool)
1423 {
1424 string toolCfgPath = "cfgVehicles" + " " + tool.GetType() + " " + "build_action_type";
1425 if (g_Game.ConfigIsExisting(toolCfgPath))
1426 {
1427 int toolActionType = g_Game.ConfigGetInt(toolCfgPath);
1428 if ((actionMask & toolActionType) > 0)
1429 {
1430 return true;
1431 }
1432 }
1433 }
1434 else if (actionMask & EConstructionTools.TOOL_HANDS)
1435 {
1436 return true;
1437 }
1438 }
1439
1440 return false;
1441 }
ConstructionPart GetConstructionPart()
Определения ActionPartInfo.c:235
DayZGame g_Game
Определения DayZGame.c:4074
int GetBuildActionTypeMask()
Определения ConstructionPart.c:331
Instanced construction part data classes for dynamic data, statics now stored on EntityType level in ...
Определения ConstructionPart.c:4
Определения PlayerBaseClient.c:2

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

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