From 14e92dfb7f3d8073258c8bcf57a35e51b82b9766 Mon Sep 17 00:00:00 2001 From: Dystopian Date: Sat, 29 Jul 2023 07:53:05 +0300 Subject: [PATCH] Repair - Add enable setting (#8070) * Add enable setting * Optimize eden expressions Co-authored-by: Filip Maciejewski * Add debug * Update addons/repair/functions/fnc_addRepairActions.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Fix strange indent * Optimize bool to number conversion Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Prevent run before setting is ready * Move postInit to EH * remove all transportRepair = 0 * remove requiredAddons --------- Co-authored-by: Filip Maciejewski Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: LinkIsGrim --- addons/repair/CfgActions.hpp | 9 -- addons/repair/CfgEden.hpp | 7 +- addons/repair/CfgVehicles.hpp | 70 -------------- addons/repair/XEH_postInit.sqf | 92 ++++++++++++++++--- addons/repair/XEH_preInit.sqf | 35 ------- addons/repair/config.cpp | 1 - .../repair/functions/fnc_addRepairActions.sqf | 6 +- .../functions/fnc_isInRepairFacility.sqf | 28 ++++-- .../repair/functions/fnc_isRepairVehicle.sqf | 9 +- addons/repair/initSettings.sqf | 10 ++ optionals/compat_gm/CfgVehicles.hpp | 16 ---- optionals/compat_gm/config.cpp | 2 +- optionals/compat_rhs_afrf3/CfgVehicles.hpp | 11 +-- optionals/compat_rhs_afrf3/config.cpp | 2 +- optionals/compat_rhs_usf3/CfgVehicles.hpp | 17 ---- optionals/compat_rhs_usf3/config.cpp | 2 +- optionals/compat_sog/CfgVehicles/wheeled.hpp | 9 -- 17 files changed, 129 insertions(+), 197 deletions(-) delete mode 100644 addons/repair/CfgActions.hpp diff --git a/addons/repair/CfgActions.hpp b/addons/repair/CfgActions.hpp deleted file mode 100644 index 5dbd0ca7a6..0000000000 --- a/addons/repair/CfgActions.hpp +++ /dev/null @@ -1,9 +0,0 @@ -class CfgActions { - class None; - class Repair: None { - show = 0; - }; - class RepairVehicle: None { - show = 0; - }; -}; diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index d9df86a036..2cd1ed9e2e 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -1,7 +1,8 @@ +#define VANILLA_ISREPAIRVEHICLE (parseNumber (getRepairCargo _this > 0)) #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer')) -#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configOf _this >> QQGVAR(canRepair),0) +#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configOf _this >> QQGVAR(canRepair),VANILLA_ISREPAIRVEHICLE) class ctrlToolbox; @@ -69,7 +70,7 @@ class Cfg3DEN { property = QGVAR(editorLoadedTracks); control = "Edit"; expression = "_this setVariable ['%s',_value];"; - defaultValue = "[0,1] select (_this isKindOf 'Tank')"; // must match pre init script + defaultValue = "parseNumber (_this isKindOf 'Tank')"; // must match post init script validate = "number"; condition = "objectHasInventoryCargo"; typeName = "NUMBER"; @@ -78,7 +79,7 @@ class Cfg3DEN { displayName = CSTRING(editorLoadedWheels); tooltip = CSTRING(editorLoadedWheels_tooltip); property = QGVAR(editorLoadedWheels); - defaultValue = "[0,1] select (_this isKindOf 'Car')"; // must match pre init script + defaultValue = "parseNumber (_this isKindOf 'Car')"; // must match post init script }; }; }; diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index 71ac5ea750..6a58e07a6f 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -3,10 +3,6 @@ class ACE_MainActions { \ class GVAR(Repair) { \ displayName = CSTRING(Repair); \ - condition = "true"; \ - statement = ""; \ - runOnHover = 1; \ - showDisabled = 0; \ icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \ distance = 4; \ exceptions[] = {"isNotSwimming", "isNotOnLadder"}; \ @@ -418,37 +414,6 @@ class CfgVehicles { }; }; - // disable vanilla repair - // "getNumber (_x >> ""transportRepair"") > 0" configClasses (configFile >> "CfgVehicles") - class ReammoBox_F; - class Land_RepairDepot_01_base_F: ReammoBox_F { // TanksDLC - Repair Depo Thing - GVAR(canRepair) = 1; - transportRepair = 0; - }; - class Van_02_base_F; - class Van_02_service_base_F: Van_02_base_F { // OrangeDLC - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class Slingload_01_Base_F; - class B_Slingload_01_Repair_F: Slingload_01_Base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class Heli_Transport_04_base_F; - class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class Pod_Heli_Transport_04_base_F; - class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - class Heli_Transport_02_base_F; class I_Heli_Transport_02_F: Heli_Transport_02_base_F { GVAR(hitpointPositions)[] = {{"HitVRotor", {-1,-9.4,1.8}}, {"HitHRotor", {0,1.8,1.3}}}; @@ -460,41 +425,10 @@ class CfgVehicles { }; class B_APC_Tracked_01_base_F; - class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { GVAR(hitpointPositions)[] = {{"HitTurret", {0,-2,0}}}; }; - class Offroad_01_base_F; - class Offroad_01_repair_base_F: Offroad_01_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class B_Truck_01_mover_F; - class B_Truck_01_Repair_F: B_Truck_01_mover_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class B_Truck_01_fuel_F: B_Truck_01_mover_F { // the fuel hemet apparently can repair. GJ BI - transportRepair = 0; - }; - - class Truck_02_base_F; - class Truck_02_box_base_F: Truck_02_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class Truck_02_medical_base_F: Truck_02_box_base_F { - GVAR(canRepair) = 0; - }; - class Car_F: Car { class HitPoints; }; @@ -514,10 +448,6 @@ class CfgVehicles { }; }; }; - class O_Truck_03_repair_F: Truck_03_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; class Quadbike_01_base_F: Car_F { GVAR(hitpointPositions)[] = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} }; diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 2cbbd8c3e1..f717e56651 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -1,20 +1,86 @@ #include "script_component.hpp" -[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; -[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; +["CBA_settingsInitialized", { -// wheels -[QGVAR(setWheelHitPointDamage), { - params ["_object", "_hitPoint", "_damage"]; - private _damageDisabled = !isDamageAllowed _object; + if !GVAR(enabled) exitWith {}; - if (_damageDisabled) then { - _object allowDamage true; + [QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; + [QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; + [QGVAR(setWheelHitPointDamage), { + params ["_object", "_hitPoint", "_damage"]; + private _damageDisabled = !isDamageAllowed _object; + + if (_damageDisabled) then { + _object allowDamage true; + }; + + _object setHitPointDamage [_hitPoint, _damage]; + + if (_damageDisabled) then { + _object allowDamage false; + }; + }] call CBA_fnc_addEventHandler; + + + // placed in editor static objects don't trigger init + { + if (local _x && {getRepairCargo _x > 0}) then { + _x setRepairCargo 0; + TRACE_3("setRepairCargo static",_x,typeOf _x,getRepairCargo _x); + }; + } forEach allMissionObjects "Static"; + + ["All", "InitPost", { + params ["_vehicle"]; + if !(local _vehicle && {getRepairCargo _vehicle > 0}) exitWith {}; + _vehicle setRepairCargo 0; + TRACE_3("setRepairCargo vehicle",_vehicle,typeOf _vehicle,getRepairCargo _vehicle); + }, true, ["Man"], true] call CBA_fnc_addClassEventHandler; + + ["CAManBase", "InitPost", { + params ["_unit"]; + if !(local _unit && {_unit getUnitTrait "engineer"}) exitWith {}; + _unit setUnitTrait ["engineer", false]; + if (_unit getVariable ["ACE_IsEngineer", -1] isEqualTo -1) then { + _unit setVariable ["ACE_IsEngineer", true, true]; + }; + TRACE_3("setUnitTrait",_unit,typeOf _unit,_unit getUnitTrait "engineer"); + }, true, [], true] call CBA_fnc_addClassEventHandler; + + + GVAR(allToolKits) = call (uiNamespace getVariable QGVAR(allToolKits)); + + ["ACE_RepairItem_Base", "killed", { + params ["_object"]; + + [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; + }, true, [], true] call CBA_fnc_addClassEventHandler; + + // load tracks and wheels + if (isServer) then { + private _fnc_addSpareItems = { + if (!GVAR(addSpareParts)) exitWith {}; + params ["_vehicle"]; + + private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); + if (isNil "_spareTracks") then { + _spareTracks = parseNumber (_vehicle isKindOf "Tank"); // must match eden attribute default + }; + if (_spareTracks > 0) then { + [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); + }; + + private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); + if (isNil "_spareWheels") then { + _spareWheels = parseNumber (_vehicle isKindOf "Car"); // must match eden attribute default + }; + if (_spareWheels > 0) then { + [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); + }; + }; + + ["Tank", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; + ["Car", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; }; - _object setHitPointDamage [_hitPoint, _damage]; - - if (_damageDisabled) then { - _object allowDamage false; - }; }] call CBA_fnc_addEventHandler; diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf index 2fd97fbf01..9361d05015 100644 --- a/addons/repair/XEH_preInit.sqf +++ b/addons/repair/XEH_preInit.sqf @@ -8,39 +8,4 @@ PREP_RECOMPILE_END; #include "initSettings.sqf" -GVAR(allToolKits) = call (uiNamespace getVariable QGVAR(allToolKits)); - -["ACE_RepairItem_Base", "killed", { - params ["_object"]; - - [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; -}] call CBA_fnc_addClassEventHandler; - -// load tracks and wheels -if (isServer) then { - private _fnc_addSpareItems = { - if (!GVAR(addSpareParts)) exitWith {}; - params ["_vehicle"]; - - private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); - if (isNil "_spareTracks") then { - _spareTracks = [0, 1] select (_vehicle isKindOf "Tank"); // must match eden attribute default - }; - if (_spareTracks > 0) then { - [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); - }; - - private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); - if (isNil "_spareWheels") then { - _spareWheels = [0, 1] select (_vehicle isKindOf "Car"); // must match eden attribute default - }; - if (_spareWheels > 0) then { - [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); - }; - }; - - ["Tank", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler; - ["Car", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler; -}; - ADDON = true; diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index 1dbe9b46b1..05ee4bac01 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -16,7 +16,6 @@ class CfgPatches { #include "ACE_Repair.hpp" #include "ACE_Settings.hpp" -#include "CfgActions.hpp" #include "CfgEden.hpp" #include "CfgEventHandlers.hpp" #include "CfgMoves.hpp" diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 20607ca940..0eeedcd9ff 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -15,7 +15,11 @@ * Public: No */ -if (!hasInterface) exitWith {}; +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addRepairActions), _this]; +}; + +if !(hasInterface && {GVAR(enabled)}) exitWith {}; params ["_vehicle"]; private _type = typeOf _vehicle; diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index a0a1615cd9..788845f11d 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -10,20 +10,32 @@ * Is inside a repair facility * * Example: - * [unit] call ace_repair_fnc_isInRepairFacility + * player call ace_repair_fnc_isInRepairFacility * * Public: Yes */ -#define CHECK_OBJECTS(var) ((var) findIf {(_x getVariable ["ACE_isRepairFacility", getNumber (configOf _x >> QGVAR(canRepair))] > 0) && {!(_x isKindOf "AllVehicles")} && {alive _x}} != -1) +#define CHECK_OBJECTS(var) ((var) findIf _checkObject != -1) -params [["_object", objNull, [objNull]]]; -TRACE_1("params",_object); +params [["_unit", objNull, [objNull]]]; +TRACE_1("params",_unit); +private _checkObject = { + private _config = configOf _x; + private _canRepair = getNumber (_config >> QGVAR(canRepair)); + if (_canRepair == 0) then { + _canRepair = getNumber (_config >> "transportRepair"); + }; -private _fnc_check = { - private _position = _object modelToWorldVisual [0, 0, eyePos _object select 2]; - CHECK_OBJECTS(lineIntersectsWith [ARR_3(_position, _position vectorAdd [ARR_3(0, 0, 10)], _object)]) || {CHECK_OBJECTS(_object nearObjects 7.5)} + _x getVariable ["ACE_isRepairFacility", _canRepair > 0] in [1, true] // can be integer or boolean + && {!(_x isKindOf "AllVehicles")} // check if it's not repair vehicle + && {alive _x} }; -[[], _fnc_check, _object, QGVAR(inRepairFacilityCache), IN_REPAIR_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall); +private _fnc_check = { + private _position = _unit modelToWorldVisual [0, 0, eyePos _unit select 2]; + CHECK_OBJECTS(lineIntersectsWith [ARR_3(_position, _position vectorAdd [ARR_3(0, 0, 10)], _unit)]) + || {CHECK_OBJECTS(_unit nearObjects 7.5)} +}; + +[[], _fnc_check, _unit, QGVAR(inRepairFacilityCache), IN_REPAIR_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall); diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index dd2f69f34c..dd2b1329a2 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -10,7 +10,7 @@ * Is engineering vehicle * * Example: - * [vehicle] call ace_repair_fnc_isRepairVehicle + * cursorObject call ace_repair_fnc_isRepairVehicle * * Public: Yes */ @@ -20,6 +20,11 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; +private _config = configOf _vehicle; +private _canRepair = getNumber (_config >> QGVAR(canRepair)); +if (_canRepair == 0) then { + _canRepair = getNumber (_config >> "transportRepair"); +}; // Value can be integer or boolean -private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configOf _vehicle >> QGVAR(canRepair))]; +private _value = _vehicle getVariable ["ACE_isRepairVehicle", _canRepair > 0]; _value in [1, true] // return diff --git a/addons/repair/initSettings.sqf b/addons/repair/initSettings.sqf index 066e944a50..3ba13e9ee6 100644 --- a/addons/repair/initSettings.sqf +++ b/addons/repair/initSettings.sqf @@ -1,5 +1,15 @@ private _category = format ["ACE %1", LLSTRING(Repair)]; +[ + QGVAR(enabled), "CHECKBOX", + ELSTRING(common,Enabled), + _category, + true, + true, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + [ QGVAR(displayTextOnRepair), "CHECKBOX", [LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)], diff --git a/optionals/compat_gm/CfgVehicles.hpp b/optionals/compat_gm/CfgVehicles.hpp index 3f8d8bf941..61ec9081eb 100644 --- a/optionals/compat_gm/CfgVehicles.hpp +++ b/optionals/compat_gm/CfgVehicles.hpp @@ -173,11 +173,6 @@ class CfgVehicles { EGVAR(medical,medicClass) = 1; }; - class gm_ural4320_repair_base: gm_ural4320_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - // WEST @@ -222,12 +217,6 @@ class CfgVehicles { EGVAR(refuel,fuelCapacity) = 390; }; - class gm_fuchsa0_base; - class gm_fuchsa0_engineer_base: gm_fuchsa0_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - class gm_luchs_base: gm_wheeled_APC_base { EGVAR(refuel,fuelCapacity) = 500; EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch", "commanderturret_hatch"}; @@ -315,11 +304,6 @@ class CfgVehicles { }; class gm_m113a1dk_base; - class gm_m113a1dk_engineer_base: gm_m113a1dk_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - class gm_m113a1dk_medic_base: gm_m113a1dk_base { EGVAR(medical,medicClass) = 1; }; diff --git a/optionals/compat_gm/config.cpp b/optionals/compat_gm/config.cpp index 6083886949..4e1883a641 100644 --- a/optionals/compat_gm/config.cpp +++ b/optionals/compat_gm/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_csw", "ace_explosives", "ace_refuel", "ace_repair", "gm_core"}; + requiredAddons[] = {"ace_csw", "ace_explosives", "ace_refuel", "gm_core"}; author = ECSTRING(common,ACETeam); authors[] = {"sancron", "nomisum"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp index 124dc86696..b59694de6e 100644 --- a/optionals/compat_rhs_afrf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp @@ -156,10 +156,6 @@ class CfgVehicles { EGVAR(refuel,hooks)[] = {{-0.05,-3.6,-0.45}}; EGVAR(refuel,fuelCargo) = 10000; }; - class RHS_Ural_Repair_MSV_01: RHS_Ural_Support_MSV_Base_01 { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; class RHS_Ural_Ammo_Base: RHS_Ural_Base { EGVAR(rearm,defaultSupply) = 1200; }; @@ -175,12 +171,7 @@ class CfgVehicles { EGVAR(refuel,fuelCapacity) = 210; }; - class rhs_gaz66_vmf: rhs_truck {}; - class rhs_gaz66_repair_base: rhs_gaz66_vmf { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - + class rhs_gaz66_vmf; class rhs_gaz66_ammo_base: rhs_gaz66_vmf { EGVAR(rearm,defaultSupply) = 1200; }; diff --git a/optionals/compat_rhs_afrf3/config.cpp b/optionals/compat_rhs_afrf3/config.cpp index 3f781a4423..ae9491f232 100644 --- a/optionals/compat_rhs_afrf3/config.cpp +++ b/optionals/compat_rhs_afrf3/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { units[] = {}; weapons[] = {QGVAR(2b14_carry), QGVAR(nsv_carry), QGVAR(kord_carry), QGVAR(ags30_carry), QGVAR(spg9_carry), QGVAR(spg9m_carry), QGVAR(metis_carry), QGVAR(kornet_carry)}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "ace_csw", "ace_refuel", "ace_repair", "rhs_main_loadorder"}; + requiredAddons[] = {"ace_explosives", "ace_csw", "ace_refuel", "rhs_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index 36d96c8c65..bad6493465 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -202,8 +202,6 @@ class CfgVehicles { transportFuel = 0; EGVAR(refuel,hooks)[] = {{1.1,0.9,-1.2}}; EGVAR(refuel,fuelCargo) = 900; // 45 jerrycans - transportRepair = 0; - EGVAR(repair,canRepair) = 1; }; class rhsusf_HEMTT_A4_base: Truck_01_base_F {}; @@ -234,21 +232,6 @@ class CfgVehicles { EGVAR(refuel,fuelCargo) = 10000; }; - class rhsusf_M977A4_REPAIR_usarmy_wd: rhsusf_M977A4_usarmy_wd { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - - class rhsusf_M977A4_REPAIR_BKIT_usarmy_wd: rhsusf_M977A4_BKIT_usarmy_wd { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - - class rhsusf_M977A4_REPAIR_BKIT_M2_usarmy_wd: rhsusf_M977A4_BKIT_M2_usarmy_wd { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - class APC_Tracked_02_base_F: Tank_F {}; class rhsusf_m113tank_base: APC_Tracked_02_base_F { EGVAR(map,vehicleLightColor)[] = {0,1,0,0.1}; diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index 1daab4a14c..8b6fbf9ecd 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { units[] = {}; weapons[] = {QGVAR(m252_carry), QGVAR(m2_carry), QGVAR(mk19_carry), QGVAR(tow_carry)}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "ace_javelin", "ace_refuel", "ace_repair", "ace_csw", "rhsusf_main_loadorder"}; + requiredAddons[] = {"ace_explosives", "ace_javelin", "ace_refuel", "ace_csw", "rhsusf_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "Fyuran"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_sog/CfgVehicles/wheeled.hpp b/optionals/compat_sog/CfgVehicles/wheeled.hpp index 14ebcaf339..3525328d3f 100644 --- a/optionals/compat_sog/CfgVehicles/wheeled.hpp +++ b/optionals/compat_sog/CfgVehicles/wheeled.hpp @@ -9,11 +9,6 @@ class vn_wheeled_m54_fuel_base: vn_wheeled_m54_cab_base { EGVAR(refuel,hooks)[] = {{-1.15, -2.3, 0.28}}; EGVAR(refuel,fuelCargo) = 4542; }; -class vn_wheeled_m54_03_base; -class vn_wheeled_m54_repair_base: vn_wheeled_m54_03_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; -}; class vn_wheeled_m54_01_base; class vn_wheeled_m54_ammo_base: vn_wheeled_m54_01_base { EGVAR(rearm,defaultSupply) = 1200; @@ -34,10 +29,6 @@ class vn_wheeled_z157_fuel_base: vn_wheeled_z157_base { EGVAR(refuel,hooks)[] = {{-1.36, -3.575, -0.4}}; EGVAR(refuel,fuelCargo) = 4000; }; -class vn_wheeled_z157_repair_base: vn_wheeled_z157_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; -}; class vn_wheeled_z157_01_base; class vn_wheeled_z157_ammo_base: vn_wheeled_z157_01_base { EGVAR(rearm,defaultSupply) = 1200;