diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-10-14 21:01:40 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-10-14 21:01:40 +0100 |
commit | 9a2778eabc7ba968968e41dda9f03525d6c5383d (patch) | |
tree | 6d1c5dc64754d542d68a7f47742a701a4eec9308 /Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_lobby.gnut | |
parent | c0a0c7e502f2bc99185d79a485b965f63de7a203 (diff) | |
download | NorthstarMods-9a2778eabc7ba968968e41dda9f03525d6c5383d.tar.gz NorthstarMods-9a2778eabc7ba968968e41dda9f03525d6c5383d.zip |
oh fuck i forgot to commit for a while
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_lobby.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_lobby.gnut | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_lobby.gnut index 2c02ebdc2..605b23fd9 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_lobby.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_lobby.gnut @@ -189,11 +189,32 @@ void function AddPrivateMatchModeSettingEnumEx( string category, string playlist #endif } -array< string > function GetPrivateMatchSettingCategories() +array< string > function GetPrivateMatchSettingCategories( bool uiAllowAllModeCategories = false ) { array< string > categories foreach ( string k, v in file.customMatchSettingsByCategory ) + { + // can only do this in ui because it relies on GetUIVar + #if UI + bool gamemode = k.find( "#GAMEMODE_" ) == 0 + if ( !uiAllowAllModeCategories && ( gamemode || k.find( "#PL_" ) == 0 ) ) + { + if ( gamemode ) + { + if ( k.slice( 10 ) != PrivateMatch_GetSelectedMode() ) + { + continue + } + } + else if ( k.slice( 4 ) != PrivateMatch_GetSelectedMode() ) + { + continue + } + } + #endif + categories.append( k ) + } return categories } |