Skip to content

Commit

Permalink
Cargo - Add setting for Check Size interaction (acemod#10425)
Browse files Browse the repository at this point in the history
* Cargo - Add setting for Check Size interaction

* missing ()

* fix translation key
  • Loading branch information
LinkIsGrim authored Oct 16, 2024
1 parent ccbbc3f commit 3f7ba60
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
11 changes: 6 additions & 5 deletions addons/cargo/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions addons/cargo/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
3 changes: 3 additions & 0 deletions addons/cargo/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -609,5 +609,8 @@
<German>Steuert, ob Frachtgegenstände über die Aufbaumethode entladen werden können.</German>
<Spanish>Controla si los objetos de la carga pueden ser descargados mediante el método de despliegue.</Spanish>
</Key>
<Key ID="STR_ACE_Cargo_checkSizeInteraction">
<English>Show Check Cargo Size Interaction</English>
</Key>
</Package>
</Project>

0 comments on commit 3f7ba60

Please sign in to comment.