Skip to content

Commit

Permalink
Merge pull request #3364 from jaj22/fix-CDLC-unix-detection
Browse files Browse the repository at this point in the history
Workaround Arma bug with CDLC detection and arma3.cfg mod loading method
  • Loading branch information
Bob-Murphy authored Aug 10, 2024
2 parents 3f842e3 + 525054c commit 7137bac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 6 additions & 4 deletions A3A/addons/core/functions/init/fn_initVarServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,12 @@ FIX_LINE_NUMBERS()
//////////////////////////////////////
Info("Setting up faction and DLC equipment flags");

// Arma bug: Need to hardcode CDLC because arma3.cfg mod loading method doesn't register CDLC as "official"
private _loadedDLC = getLoadedModsInfo select { (_x#2) and !(_x#1 in ["A3","curator","argo","tacops"]) };
_loadedDLC append (getLoadedModsInfo select { tolower (_x#1) in ["gm", "rf", "spe", "vn", "ws"] });
_loadedDLC = _loadedDLC apply { tolower (_x#1) };

// Set enabled & disabled DLC/CDLC arrays for faction/equipment modification
private _loadedDLC = getLoadedModsInfo select {
(_x#3) and {!(_x#1 in ["A3","curator","argo","tacops"])}
} apply {tolower (_x#1)};
A3A_enabledDLC = (_saveData get "DLC") apply {tolower _x}; // should be pre-checked against _loadedDLC
{
A3A_enabledDLC insert [0, getArray (configFile/"A3A"/"Templates"/_x/"forceDLC"), true]; // add unique elements only
Expand All @@ -276,7 +278,7 @@ A3A_disabledMods = A3A_disabledDLC; // Split to allow CUP civili
// Everything that counts as vanilla: Official DLC plus various junk tags
A3A_vanillaMods = (getLoadedModsInfo select {_x#2 and _x#3} apply {tolower (_x#1)}) + ["", "officialmod"];

Debug_3("DLC enabled: %1 Disabled: %2 Vanilla: %3", A3A_enabledDLC, A3A_disabledDLC, A3A_vanillaMods);
Debug_4("DLC loaded: %1 Enabled: %2 Disabled: %3 Vanilla: %4", _loadedDLC, A3A_enabledDLC, A3A_disabledDLC, A3A_vanillaMods);

// TODO: fix all allowDLCxxx and A3A_hasxxx references in templates
// for the moment just fudge the ones that we're using
Expand Down
7 changes: 3 additions & 4 deletions A3A/addons/core/functions/init/fn_setupMonitor.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ private _addonVics = "true" configClasses (configFile/"A3A"/"AddonVics");

// Ignore DLC without equipment and vehicles
// Need the true names from here, so pass it all in
private _loadedDLC = getLoadedModsInfo select {
(_x#3) and {!(_x#1 in ["A3","curator","argo","tacops"])}
};

// Arma bug: Need to hardcode CDLC because arma3.cfg mod loading method doesn't register CDLC as "official"
private _loadedDLC = getLoadedModsInfo select { (_x#2) and !(_x#1 in ["A3","curator","argo","tacops"]) };
_loadedDLC append (getLoadedModsInfo select { tolower (_x#1) in ["gm", "rf", "spe", "vn", "ws"] });

private _autoLoadTime = "autoLoadLastGame" call BIS_fnc_getParamValue;
private _autoLoadData = nil;
Expand Down

0 comments on commit 7137bac

Please sign in to comment.