From 13e36c3b48c377f74b07d72d2b7764a49850b2aa Mon Sep 17 00:00:00 2001 From: Vdauphin Date: Sun, 8 Nov 2020 14:13:35 +0100 Subject: [PATCH] Add setting for the type of cargo This allow player to select the cargo type fitting their current game play periode of history --- addons/cargo/functions/fnc_loadItem.sqf | 2 +- addons/cargo/initSettings.sqf | 9 +++++++++ addons/cargo/stringtable.xml | 12 ++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index 88d9e9047c..f3c6340f4f 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -37,7 +37,7 @@ if (_item isEqualType objNull) then { detach _item; if !(_vehicle setVehicleCargo _item) then { private _itemsCargo = _loaded arrayIntersect getVehicleCargo _vehicle; - private _cargoNet = createVehicle ["CargoNet_01_box_F", [0, 0, 0], [], 0, "CAN_COLLIDE"]; + private _cargoNet = createVehicle [GVAR(cargoNetType), [0, 0, 0], [], 0, "CAN_COLLIDE"]; if ([_vehicle, _cargoNet, _itemsCargo] call FUNC(canItemCargo)) then { while {!(_vehicle setVehicleCargo _cargoNet)} do { // Move ViV cargo to ACE Cargo if (_itemsCargo isEqualTo []) exitWith {deleteVehicle _cargoNet; /*Should not happen*/}; diff --git a/addons/cargo/initSettings.sqf b/addons/cargo/initSettings.sqf index cbf0a121e5..a026e2986b 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_settings_fnc_init; + +[ + QGVAR(cargoNetType), "LIST", + [LSTRING(cargoNetType), LSTRING(cargoNetType_description)], + [LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)], + [["CargoNet_01_box_F", "Land_WoodenBox_02_F"], [LSTRING(cargoNetType_modernStyle), LSTRING(cargoNetType_ww2)], 0], + true, + {[QGVAR(cargoNetType), _this, true] call EFUNC(common,cbaSettings_settingChanged)} +] call CBA_settings_fnc_init; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 9e6e708e39..194da895ca 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -387,5 +387,17 @@ 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. + + Type of cargo + + + Choose which cargo type will fit the period of history you are playing. + + + Modern style + + + World War 2 +