Skip to content

Commit

Permalink
Cargo - Add an action to check size of cargo object (acemod#10367)
Browse files Browse the repository at this point in the history
* Add action to check size of cargo object

* forgot FUNC macro

* Fix bad comma

* actually output something

* switch to displayTextStructured
  • Loading branch information
Drofseh authored Oct 8, 2024
1 parent 5995043 commit 913d550
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions addons/cargo/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
3 changes: 3 additions & 0 deletions addons/cargo/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@
<Russian>Не может быть выгружен</Russian>
<Spanish>No puede ser descargado</Spanish>
</Key>
<Key ID="STR_ACE_Cargo_checkSize">
<English>Check Cargo Size</English>
</Key>
<Key ID="STR_ACE_Cargo_SizeMenu">
<English>Cargo Size: %1</English>
<German>Frachtgröße: %1</German>
Expand Down

0 comments on commit 913d550

Please sign in to comment.