diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index ce4e0d13191..1a907529f9e 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -1,7 +1,17 @@ #include "script_component.hpp" ["ace_addCargo", {_this call FUNC(addCargoItem)}] call CBA_fnc_addEventHandler; -[QGVAR(paradropItem), {_this call FUNC(paradropItem)}] call CBA_fnc_addEventHandler; +[QGVAR(paradropItem), { + params ["_item", "_vehicle"]; + + private _unloaded = [_item, _vehicle] call FUNC(paradropItem); + + if (_unloaded && {GVAR(openAfterUnload) in [2, 3]}) then { + GVAR(interactionVehicle) = _vehicle; + GVAR(interactionParadrop) = true; + createDialog QGVAR(menu); + }; +}] call CBA_fnc_addEventHandler; ["ace_loadCargo", { params ["_item", "_vehicle"]; @@ -37,6 +47,11 @@ [[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured); + if (_unloaded && {GVAR(openAfterUnload) in [1, 3]}) then { + GVAR(interactionVehicle) = _vehicle; + GVAR(interactionParadrop) = false; + createDialog QGVAR(menu); + }; // TOOO maybe drag/carry the unloaded item? }] call CBA_fnc_addEventHandler; diff --git a/addons/cargo/initSettings.sqf b/addons/cargo/initSettings.sqf index 83bc2d6b317..2a4c5f4825a 100644 --- a/addons/cargo/initSettings.sqf +++ b/addons/cargo/initSettings.sqf @@ -24,3 +24,12 @@ true, {[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)} ] call CBA_fnc_addSetting; + +[ + QGVAR(openAfterUnload), "LIST", + [LSTRING(openAfterUnload), LSTRING(openAfterUnload_description)], + [LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)], + [[0, 1, 2, 3], [ELSTRING(common,never), LSTRING(unloadObject), LSTRING(paradropButton), ELSTRING(common,both)], 0], + false, + {[QGVAR(openAfterUnload), _this, true] call EFUNC(common,cbaSettings_settingChanged)} +] call CBA_fnc_addSetting; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 9e6e708e39f..b6fcfbfbb89 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -387,5 +387,13 @@ Upravuje jak dlouho nakládají/vykládání trvá.\nVýsledkem je čas v sekundách - velikost objektu vynásobená touto hodnotou. Modifica el tiempo de carga/descarga de objetos.\n El Tiempo en segundos, es el tamño del objeto multiplicado por este valor. + + Reopen Cargo Menu + Kargo Menüsünü Tekrar Aç + + + Reopen the Cargo Menu after successful unload. + Başarılı bir yük indirmeden sonra Kargo Menüsünü tekrar göster. + diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 3a8c086ee32..a494f6501da 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1464,5 +1464,9 @@ Показывать действие в меню взаимодействия с собой. Kendi etkileşimim menüsünde animasyonları göster + + Both + İkisi de +