Skip to content

Commit

Permalink
fixed whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdatiger committed Nov 13, 2024
1 parent bce1240 commit 420e942
Showing 1 changed file with 49 additions and 84 deletions.
133 changes: 49 additions & 84 deletions addons/miscFixes/patchGM/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,90 +3,55 @@
if !(hasInterface) exitWith {};
// Modified from ace_grenades_fnc_addChangeFuseItemContextMenuOptions by Cyruz
{
_x params ["_concusion", "_frag"];
[
_concusion,
"CONTAINER",
"Attach frag jacket",
[],
"\a3\ui_f\data\igui\cfg\simpletasks\types\destroy_ca.paa",
[
{true},
{
params ["", "", "_item", "", "_grenadeType"];

_item == _grenadeType#0
}
],
{
params ["_unit", "", "", "_slot", "_grenadeType"];

private _container = switch (_slot) do {
case "UNIFORM_CONTAINER": {
"uniform"
};
case "VEST_CONTAINER": {
"vest"
};
case "BACKPACK_CONTAINER": {
"backpack"
};
default {
""
};
};

if (_container != "") then {
[_unit, _grenadeType#1, _container] call ACEFUNC(common,addToInventory);
};

false
},
true,
[_concusion, _frag]
] call CBA_fnc_addItemContextMenuOption;

[
_frag,
"CONTAINER",
"Remove frag jacket",
[],
"\a3\ui_f\data\igui\cfg\simpletasks\types\destroy_ca.paa",
[
{true},
{
params ["", "", "_item", "", "_grenadeType"];

_item == _grenadeType#1
}
],
{
params ["_unit", "", "", "_slot", "_grenadeType"];

private _container = switch (_slot) do {
case "UNIFORM_CONTAINER": {
"uniform"
};
case "VEST_CONTAINER": {
"vest"
};
case "BACKPACK_CONTAINER": {
"backpack"
};
default {
""
};
};

if (_container != "") then {
[_unit, _grenadeType#0, _container] call ACEFUNC(common,addToInventory);
};

false
},
true,
[_concusion, _frag]
] call CBA_fnc_addItemContextMenuOption;
_x params ["_concusion", "_frag"];
[
_concusion, "CONTAINER", "Attach frag jacket", [],
"\a3\ui_f\data\igui\cfg\simpletasks\types\destroy_ca.paa",
[{true}, {
params ["", "", "_item", "", "_grenadeType"];
_item == _grenadeType#0
}], {
params ["_unit", "", "", "_slot", "_grenadeType"];

private _container = switch (_slot) do {
case "UNIFORM_CONTAINER": {"uniform"};
case "VEST_CONTAINER": {"vest"};
case "BACKPACK_CONTAINER": {"backpack"};
default {""};
};

if (_container != "") then {
[_unit, _grenadeType#1, _container] call ACEFUNC(common,addToInventory);
};

false
}, true, [_concusion, _frag]
] call CBA_fnc_addItemContextMenuOption;

[
_frag, "CONTAINER", "Remove frag jacket", [],
"\a3\ui_f\data\igui\cfg\simpletasks\types\destroy_ca.paa",
[{true}, {
params ["", "", "_item", "", "_grenadeType"];
_item == _grenadeType#1
}],
{
params ["_unit", "", "", "_slot", "_grenadeType"];

private _container = switch (_slot) do {
case "UNIFORM_CONTAINER": {"uniform"};
case "VEST_CONTAINER": {"vest"};
case "BACKPACK_CONTAINER": {"backpack"};
default {""};
};

if (_container != "") then {
[_unit, _grenadeType#0, _container] call ACEFUNC(common,addToInventory);
};

false
}, true, [_concusion, _frag]
] call CBA_fnc_addItemContextMenuOption;
} forEach [
["gm_handgrenade_conc_dm51a1", "gm_handgrenade_frag_dm51a1"],
["gm_handgrenade_conc_dm51", "gm_handgrenade_frag_dm51"],
Expand Down

0 comments on commit 420e942

Please sign in to comment.