diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-26 04:51:26 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-26 04:51:26 +0000 |
commit | 97f17ec3d74787cfdee851bb961f76de90fd60a9 (patch) | |
tree | 0dd0d0065743607e49038f2ee0380e25f5010c6c /Northstar.Client | |
parent | dc60309beafb22e34d91593417b09d84e9442089 (diff) | |
download | NorthstarMods-97f17ec3d74787cfdee851bb961f76de90fd60a9.tar.gz NorthstarMods-97f17ec3d74787cfdee851bb961f76de90fd60a9.zip |
restrict non-vanilla players from accessing official servers
Diffstat (limited to 'Northstar.Client')
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index 7c81149c..25097c6f 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -278,12 +278,6 @@ void function UpdatePlayButton( var button ) message = "#CONTACTING_RESPAWN_SERVERS" file.mpButtonActivateFunc = null } - - bool hasNonVanillaMods = false - if ( hasNonVanillaMods ) - { - // todo: make this disable non-vanilla mods - } else file.mpButtonActivateFunc = LaunchMP @@ -422,7 +416,21 @@ void function UpdatePlayButton( var button ) } else { - file.mpButtonActivateFunc = LaunchMP + // restrict non-vanilla players from accessing official servers + bool hasNonVanillaMods = false + foreach ( string modName in NSGetModNames() ) + { + if ( NSIsModEnabled( modName ) && NSIsModRequiredOnClient( modName ) ) + { + hasNonVanillaMods = true + break + } + } + + if ( hasNonVanillaMods ) + file.mpButtonActivateFunc = null + else + file.mpButtonActivateFunc = LaunchMP } isLocked = file.mpButtonActivateFunc == null ? true : false |