Skip to content

Commit

Permalink
allow force Removing Googles, Headgear, Uniform, Vests and Backpacks …
Browse files Browse the repository at this point in the history
…in Loadouts
  • Loading branch information
jokoho48 committed Apr 25, 2024
1 parent 6bbbc52 commit 2e31613
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/CLib/Gear/Loadout/CfgCLibLoadouts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class CfgCLibLoadoutsClassBase {
removeAllWeapons = 1;
removeAllItems = 1;
removeAllAssignedItems = 1;
forceRemoveGoggle = 1;
forceRemoveHeadgear = 1;
forceRemoveUniform = 0;
forceRemoveVest = 0;
forceRemoveBackpack = 0;
};

class CfgCLibLoadouts {
Expand Down
17 changes: 17 additions & 0 deletions addons/CLib/Gear/Loadout/fn_applyLoadout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,23 @@ private _fnc_do = {
if (_this isEqualTo 1) then {removeAllAssignedItems _unit};
}, false] call _fnc_do;

// Force Remove Actions
["forceRemoveGoggle", {
if (_this isEqualTo 1) then {removeGoggles _unit};
}, false] call _fnc_do;
["forceRemoveHeadgear", {
if (_this isEqualTo 1) then {removeHeadgear _unit};
}, false] call _fnc_do;
["forceRemoveUniform", {
if (_this isEqualTo 1) then {removeUniform _unit};
}] call _fnc_do;
["forceRemoveVest", {
if (_this isEqualTo 1) then {removeVest _unit};
}] call _fnc_do;
["forceRemoveBackpack", {
if (_this isEqualTo 1) then {removeBackpack _unit};
}] call _fnc_do;

// Uniform
["uniform", {
[_unit, _this, 0] call CFUNC(addContainer);
Expand Down

0 comments on commit 2e31613

Please sign in to comment.