From 62f9ee5d993b6209c9600c4da66fa9a0af13ecce Mon Sep 17 00:00:00 2001 From: Drofseh Date: Sun, 6 Oct 2024 10:15:34 -0700 Subject: [PATCH 1/5] Add action to check size of cargo object --- addons/cargo/XEH_postInit.sqf | 14 ++++++++++++++ addons/cargo/stringtable.xml | 3 +++ 2 files changed, 17 insertions(+) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 45c1b9601a6..7097de6166a 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -111,6 +111,20 @@ GVAR(objectActions) = [ {[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew)} } ] call EFUNC(interact_menu,createAction), + [QGVAR(checkSize), LLSTRING(checkSize), "\a3\ui_f\data\igui\cfg\simpletasks\types\box_ca.paa", + { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; + format [LLSTRING(SizeMenu), _target call ace_cargo_fnc_getSizeItem], + }, + { + //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)} + } + ] call EFUNC(interact_menu,createAction), [QGVAR(load), LLSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa", { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 8e16f500901..43f707a19d8 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -343,6 +343,9 @@ Не может быть выгружен No puede ser descargado + + Check Cargo Size + Cargo Size: %1 Frachtgröße: %1 From 6551c17b12aebafc05c7d32b9c2dfc7df2b9d171 Mon Sep 17 00:00:00 2001 From: Drofseh Date: Sun, 6 Oct 2024 10:17:44 -0700 Subject: [PATCH 2/5] forgot FUNC macro --- addons/cargo/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 7097de6166a..5eeaec18770 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -114,7 +114,7 @@ GVAR(objectActions) = [ [QGVAR(checkSize), LLSTRING(checkSize), "\a3\ui_f\data\igui\cfg\simpletasks\types\box_ca.paa", { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; - format [LLSTRING(SizeMenu), _target call ace_cargo_fnc_getSizeItem], + format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)], }, { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; From 88a157439c70430cfb951618b4ce50f5376d8969 Mon Sep 17 00:00:00 2001 From: Drofseh Date: Sun, 6 Oct 2024 19:00:40 -0700 Subject: [PATCH 3/5] Fix bad comma --- addons/cargo/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 5eeaec18770..7df4a66ef9c 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -114,7 +114,7 @@ GVAR(objectActions) = [ [QGVAR(checkSize), LLSTRING(checkSize), "\a3\ui_f\data\igui\cfg\simpletasks\types\box_ca.paa", { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; - format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)], + format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)]; }, { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; From 71d687995a1ac729745c7349d45b428f343b8734 Mon Sep 17 00:00:00 2001 From: Drofseh Date: Mon, 7 Oct 2024 19:43:21 -0700 Subject: [PATCH 4/5] actually output something --- addons/cargo/XEH_postInit.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 7df4a66ef9c..68ebc06820c 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -114,7 +114,10 @@ GVAR(objectActions) = [ [QGVAR(checkSize), LLSTRING(checkSize), "\a3\ui_f\data\igui\cfg\simpletasks\types\box_ca.paa", { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; - format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)]; + [ + [format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)]], + true + ] call CBA_fnc_notify; }, { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; From a73fbc5c939ec8660927c2f38dec3211b33e1a38 Mon Sep 17 00:00:00 2001 From: Drofseh Date: Mon, 7 Oct 2024 22:38:01 -0700 Subject: [PATCH 5/5] switch to displayTextStructured --- addons/cargo/XEH_postInit.sqf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 68ebc06820c..84597b1c216 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -114,10 +114,7 @@ GVAR(objectActions) = [ [QGVAR(checkSize), LLSTRING(checkSize), "\a3\ui_f\data\igui\cfg\simpletasks\types\box_ca.paa", { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; - [ - [format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)]], - true - ] call CBA_fnc_notify; + [format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)], 3] call EFUNC(common,displayTextStructured); }, { //IGNORE_PRIVATE_WARNING ["_target", "_player"];