Skip to content

Commit

Permalink
add SMA support
Browse files Browse the repository at this point in the history
  • Loading branch information
tbox1911 committed Oct 12, 2024
1 parent 5ebba4e commit a0edf3c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core.liberation/addons/LARs/mod/filter_SMA.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Add Specialist Military Arms Weapons
GRLIB_MOD_signature = GRLIB_MOD_signature + ["SMA_"];

// Weapons + Equipements (uniforme, etc..)
(
"
((configName _x) select [0,4]) == 'SMA_' &&
getNumber (_x >> 'scope') > 1 &&
([(configName _x)] call is_allowed_item)
"
configClasses (configfile >> "CfgWeapons" )
) apply { GRLIB_whitelisted_from_arsenal pushback (configName _x) } ;
15 changes: 15 additions & 0 deletions core.liberation/addons/LARs/mod/filter_init_west.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if (GRLIB_TFR_enabled) then {
if (GRLIB_ACE_enabled) then {
[] call compileFinal preprocessFileLineNumbers "addons\LARs\mod\filter_ACE.sqf";
};
// Add SMA Weapons
if (GRLIB_SMA_enabled) then {
[] call compileFinal preprocessFileLineNumbers "addons\LARs\mod\filter_SMA.sqf";
};
// Add ArmA3 Weapons
if (["A3_", GRLIB_mod_west, true] call F_startsWith) then {
[] call compileFinal preprocessFileLineNumbers "addons\LARs\mod\filter_A3.sqf";
Expand Down Expand Up @@ -84,3 +88,14 @@ if (["SPE_", GRLIB_mod_west, true] call F_startsWith) then {
if (["UFP_BLU", GRLIB_mod_west, true] call F_startsWith) then {
[] call compileFinal preprocessFileLineNumbers "addons\LARs\mod\filter_UFP.sqf";
};

// Magazines (common to All)
(
"
getNumber (_x >> 'scope') > 1 &&
(getNumber (_x >> 'type') == 256 || (getText (_x >> 'type') find '256') >= 0) &&
tolower (configName _x) find '_tracer' < 0 &&
([(configName _x)] call is_allowed_item)
"
configClasses (configfile >> "CfgMagazines")
) apply { GRLIB_whitelisted_from_arsenal pushBackUnique (configName _x)} ;
1 change: 1 addition & 0 deletions core.liberation/scripts/shared/fetch_params.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ GRLIB_TFR_enabled = isClass(configfile >> "CfgPatches" >> "task_force_radio"); /
GRLIB_UNS_enabled = isClass(configFile >> "CfgPatches" >> "uns_main"); // Returns true if Unsung is enabled
GRLIB_WS_enabled = isClass(configFile >> "CfgPatches" >> "data_f_lxWS"); // Returns true if WS is enabled
GRLIB_ASZ_enabled = isClass(configFile >> "CfgPatches" >> "mas_itl_lite_weapons"); // Returns true if Italian ASZ is enabled
GRLIB_SMA_enabled = isClass(configFile >> "CfgPatches" >> "SMA_CMORE"); // Returns true if Specialist Military Arms (SMA) is enabled

// Classename MOD source
[] call compileFinal preprocessFileLineNumbers "mod_template\mod_init.sqf";
Expand Down

0 comments on commit a0edf3c

Please sign in to comment.