From 913d550199e1929dd5c06411144b260b67287252 Mon Sep 17 00:00:00 2001 From: Drofseh Date: Tue, 8 Oct 2024 07:46:49 -0700 Subject: [PATCH] Cargo - Add an action to check size of cargo object (#10367) * Add action to check size of cargo object * forgot FUNC macro * Fix bad comma * actually output something * switch to displayTextStructured --- 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..84597b1c216 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 FUNC(getSizeItem)], 3] call EFUNC(common,displayTextStructured); + }, + { + //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