Adds logic so levels without a gamemode defined at all are treated as wildcarded to any given gamemode selected

This commit is contained in:
JeffR 2024-10-04 00:22:12 -05:00
parent e4d07c7e8d
commit 020bd03cf9

View file

@ -156,6 +156,14 @@ function refreshLevelsList()
//filter for selected gamemode //filter for selected gamemode
%levelGameModes = %levelAsset.gameModesNames; %levelGameModes = %levelAsset.gameModesNames;
//If the level has no gamemodes defined, we just assume the default case of it being a wildcard to whatever gamemode
//is available
if(%levelGameModes $= "")
{
%foundGameModeMatch = true;
}
else
{
%foundGameModeMatch = false; %foundGameModeMatch = false;
for(%gm = 0; %gm < getTokenCount(%levelGameModes, ";"); %gm++) for(%gm = 0; %gm < getTokenCount(%levelGameModes, ";"); %gm++)
{ {
@ -177,6 +185,7 @@ function refreshLevelsList()
if(%foundGameModeMatch) if(%foundGameModeMatch)
break; break;
} }
}
if(!%foundGameModeMatch) if(!%foundGameModeMatch)
continue; continue;