diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index e9ca5258ba..4bbf932d54 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -118,7 +118,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); class Arguments { class EnableList { - displayName = CSTRING(AssignEngineerRole_EnableList_DisplayName); + displayName = CSTRING(EnableList_DisplayName); description = CSTRING(AssignEngineerRole_EnableList_Description); defaultValue = ""; typeName = "STRING"; @@ -162,7 +162,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); class Arguments { class EnableList { - displayName = CSTRING(AssignRepairVehicle_EnableList_DisplayName); + displayName = CSTRING(EnableList_DisplayName); description = CSTRING(AssignRepairVehicle_EnableList_Description); defaultValue = ""; typeName = "STRING"; @@ -194,7 +194,7 @@ class CfgVehicles { function = QFUNC(moduleAssignRepairFacility); class Arguments { class EnableList { - displayName = CSTRING(AssignRepairFacility_EnableList_DisplayName); + displayName = CSTRING(EnableList_DisplayName); description = CSTRING(AssignRepairFacility_EnableList_Description); defaultValue = ""; typeName = "STRING"; @@ -234,7 +234,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); class Arguments { class List { - displayName = CSTRING(AddSpareParts_List_DisplayName); + displayName = CSTRING(EnableList_DisplayName); description = CSTRING(AddSpareParts_List_Description); defaultValue = ""; typeName = "STRING"; diff --git a/addons/repair/README.md b/addons/repair/README.md index 180ae38128..5cf5e8f89a 100644 --- a/addons/repair/README.md +++ b/addons/repair/README.md @@ -10,3 +10,4 @@ The people responsible for merging changes to this component or answering potent - [commy2](https://github.com/commy2) - [Glowbal](https://github.com/Glowbal) +- [Jonpas](https://github.com/jonpas) diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index c7015f4650..2e991b54a6 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2", "Glowbal"}; + author[] = {"commy2", "Glowbal", "Jonpas"}; authorUrl = "https://ace3mod.com"; VERSION_CONFIG; }; diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index b76f027bb0..c3588b688f 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -18,7 +18,7 @@ params ["_vehicle"]; TRACE_1("params", _vehicle); -private ["_type", "_initializedClasses"]; +private ["_type", "_initializedClasses", "_condition", "_statement", "_action"]; _type = typeOf _vehicle; @@ -44,28 +44,25 @@ _hitPointsAddedAmount = []; if (_x in _wheelHitPoints) then { // add wheel repair action - private ["_icon", "_selection"]; + private ["_icon", "_selection", "_name", "_text"]; _icon = QUOTE(PATHTOF(ui\tire_ca.paa)); _icon = "A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; // textDefault = ""; _selection = _wheelHitPointSelections select (_wheelHitPoints find _x); - private ["_name", "_text", "_condition", "_statement"]; - // remove wheel action - _name = format ["Remove_%1", _x]; + _name = format ["Remove_%1", _x]; _text = localize LSTRING(RemoveWheel); _condition = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(canRepair)}; _statement = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(repair)}; - private "_action"; _action = [_name, _text, _icon, _statement, _condition, {}, [_x], _selection, 2] call EFUNC(interact_menu,createAction); [_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass); // replace wheel action - _name = format ["Replace_%1", _x]; + _name = format ["Replace_%1", _x]; _text = localize LSTRING(ReplaceWheel); _condition = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(canRepair)}; @@ -102,7 +99,7 @@ _hitPointsAddedAmount = []; if (isText (configFile >> "CfgVehicles" >> _type >> "HitPoints" >> _x >> "depends")) exitWith {}; // add misc repair action - private ["_name", "_icon", "_selection", "_condition", "_statement"]; + private ["_name", "_icon", "_selection", "_customSelectionsConfig"]; _name = format ["Repair_%1", _x]; @@ -150,11 +147,9 @@ _hitPointsAddedAmount = []; } else { _selection = [1.75, 0, -1.75]; }; - private "_action"; _action = [_name, _text, _icon, _statement, _condition, {}, [_x, "RepairTrack"], _selection, 4] call EFUNC(interact_menu,createAction); [_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass); } else { - private "_action"; _action = [_name, _text, _icon, _statement, _condition, {}, [_x, "MiscRepair"], _selection, 4] call EFUNC(interact_menu,createAction); // Put inside main actions if no other position was found above if (_selection isEqualTo [0, 0, 0]) then { @@ -166,8 +161,6 @@ _hitPointsAddedAmount = []; }; } forEach _hitPoints; -private ["_action", "_condition", "_statement"]; - _condition = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(canRepair)}; _statement = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(repair)}; _action = [QGVAR(fullRepair), localize LSTRING(fullRepair), "A3\ui_f\data\igui\cfg\actions\repair_ca.paa", _statement, _condition, {}, ["", "fullRepair"], "", 4] call EFUNC(interact_menu,createAction); diff --git a/addons/repair/functions/fnc_canMiscRepair.sqf b/addons/repair/functions/fnc_canMiscRepair.sqf index c60e59c840..40cace1bfc 100644 --- a/addons/repair/functions/fnc_canMiscRepair.sqf +++ b/addons/repair/functions/fnc_canMiscRepair.sqf @@ -47,8 +47,4 @@ _return = false; }; } forEach _hitpointGroup; -if (typeOf _target == "B_MRAP_01_F") then { - diag_log format ["%1 - %2", _hitPoint, _hitpointGroup]; -}; - _return diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index 77687ae9cc..915210fdfe 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -735,7 +735,7 @@ Назначить инженером Přiřadit Inženýra - + List Lista Lista @@ -793,13 +793,6 @@ Defina veículo de reparo Назначить ремонтный транспорт - - List - Lista - Lista - Список - Seznam - List of vehicles that will be classified as repair vehicle, separated by commas. Lista nazw pojazdów, które są sklasyfikowane jako pojazdy naprawcze, oddzielone przecinkami. @@ -830,13 +823,6 @@ Definir instalação de reparo Назначить ремонтное сооружение - - List - Lista - Lista - Список - Seznam - List of objects that will be classified as repair Facility, separated by commas. Lista nazw budynków, które są sklasyfikowane jako budynki naprawcze, oddzielone przecinkami. @@ -871,11 +857,6 @@ Dodaj części zamienne do jednego lub wielu obiektów. Adicionar partes sobressalentes para um ou mais objetos - - List - Lista - Lista - List of objects that will get spare parts added, separated by commas. Lista obiektów, które otrzymają części zamienne, oddzielone przecinkiem.