diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp index c6fa4c6819..f5dd29da0e 100644 --- a/addons/cargo/CfgEventHandlers.hpp +++ b/addons/cargo/CfgEventHandlers.hpp @@ -17,6 +17,7 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(initObject)); }; }; + class ReammoBox_F { class ADDON { init = QUOTE(_this call DFUNC(initObject)); @@ -28,17 +29,25 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); }; }; + class CargoNet_01_box_F { class ADDON { init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); }; }; + class Land_CargoBox_V1_F { class ADDON { init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); }; }; + class Land_PaperBox_closed_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + class Car { class ADDON { init = QUOTE(_this call DFUNC(initVehicle)); diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 767c414361..d8df9e7da9 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class ACE_moduleCargoSettings: ACE_Module { scope = 2; displayName = CSTRING(SettingsModule_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Cargo_ca.paa)); category = "ACE"; function = QUOTE(DFUNC(moduleSettings)); functionPriority = 1; @@ -96,6 +96,26 @@ class CfgVehicles { GVAR(size) = 2; // 1 = small, 2 = large GVAR(canLoad) = 1; }; + + class Scrapyard_base_F; + class Land_PaperBox_closed_F: Scrapyard_base_F { + GVAR(space) = 10; + GVAR(hasCargo) = 1; + GVAR(size) = 11; + GVAR(canLoad) = 1; + XEH_ENABLED; + class ACE_Actions { + class ACE_MainActions { + displayName = ECSTRING(interaction,MainAction); + distance = 5; + condition = QUOTE(true); + statement = ""; + icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa"; + selection = ""; + }; + }; + }; + class Cargo_base_F: ThingX { GVAR(space) = 4; GVAR(hasCargo) = 1; diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp index 3f1438a2f2..2972e8ef1b 100644 --- a/addons/cargo/config.cpp +++ b/addons/cargo/config.cpp @@ -14,4 +14,5 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" -#include "menu.hpp" \ No newline at end of file +#include "menu.hpp" +#include "ACE_Settings.hpp" diff --git a/addons/cargo/functions/fnc_canLoad.sqf b/addons/cargo/functions/fnc_canLoad.sqf index 8c96663d04..88391e80da 100644 --- a/addons/cargo/functions/fnc_canLoad.sqf +++ b/addons/cargo/functions/fnc_canLoad.sqf @@ -23,7 +23,7 @@ if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then { { if ([_object, _x] call FUNC(canLoadItemIn)) exitwith {_nearestVehicle = _x}; - }foreach (nearestObjects [_player, ["Cargo_base_F"], MAX_LOAD_DISTANCE]); + }foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); }; if (isNull _nearestVehicle) exitwith {false}; diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf index 07131da341..c834bcf7b0 100644 --- a/addons/cargo/functions/fnc_initObject.sqf +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -24,5 +24,5 @@ _type = typeOf _object; if (_type in GVAR(initializedItemClasses)) exitWith {}; GVAR(initializedItemClasses) pushBack _type; -_action = [QGVAR(load), localize LSTRING(loadObject), QUOTE(PATHTOF(UI\Icon_load.paa)), {[_player, _target] call FUNC(startLoadIn)}, {GVAR(enable) && {[_player, _target] call FUNC(canLoad)}] call EFUNC(interact_menu,createAction); +_action = [QGVAR(load), localize LSTRING(loadObject), QUOTE(PATHTOF(UI\Icon_load.paa)), {[_player, _target] call FUNC(startLoadIn)}, {GVAR(enable) && {[_player, _target] call FUNC(canLoad)}}] call EFUNC(interact_menu,createAction); [_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index acef2a91b5..0da44ba04c 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -22,7 +22,7 @@ if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then { { if ([_object, _x] call FUNC(canLoadItemIn)) exitwith {_nearestVehicle = _x}; - }foreach (nearestObjects [_player, ["Cargo_base_F"], MAX_LOAD_DISTANCE]); + }foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); }; if (isNull _nearestVehicle) exitwith {false};