From 3f7ba60bcc59a3609fc74cc1dac56cc2967e263f Mon Sep 17 00:00:00 2001
From: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Date: Wed, 16 Oct 2024 01:50:20 -0300
Subject: [PATCH] Cargo - Add setting for Check Size interaction (#10425)
* Cargo - Add setting for Check Size interaction
* missing ()
* fix translation key
---
addons/cargo/XEH_postInit.sqf | 11 ++++++-----
addons/cargo/initSettings.inc.sqf | 7 +++++++
addons/cargo/stringtable.xml | 3 +++
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf
index 2a6875d5441..833acf4a7b1 100644
--- a/addons/cargo/XEH_postInit.sqf
+++ b/addons/cargo/XEH_postInit.sqf
@@ -114,11 +114,12 @@ GVAR(objectActions) = [
},
{
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
- GVAR(enable) &&
- {alive _target} &&
- {_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad)) == 1]} &&
- {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
- {[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew)}
+ (GVAR(enable) && GVAR(checkSizeInteraction)) && {
+ {alive _target} &&
+ {_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad)) == 1]} &&
+ {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
+ {[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew)}
+ }
}
] call EFUNC(interact_menu,createAction),
[QGVAR(load), LLSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa",
diff --git a/addons/cargo/initSettings.inc.sqf b/addons/cargo/initSettings.inc.sqf
index 4f92934d46a..7e482670272 100644
--- a/addons/cargo/initSettings.inc.sqf
+++ b/addons/cargo/initSettings.inc.sqf
@@ -59,3 +59,10 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
_category,
true
] call CBA_fnc_addSetting;
+
+[
+ QGVAR(checkSizeInteraction),
+ "CHECKBOX",
+ LSTRING(checkSizeInteraction),
+ _category
+] call CBA_fnc_addSetting;
diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml
index 7a9cdf56a37..1ee1d4d1cc3 100644
--- a/addons/cargo/stringtable.xml
+++ b/addons/cargo/stringtable.xml
@@ -609,5 +609,8 @@
Steuert, ob Frachtgegenstände über die Aufbaumethode entladen werden können.
Controla si los objetos de la carga pueden ser descargados mediante el método de despliegue.
+
+ Show Check Cargo Size Interaction
+