diff options
author | Emma Miler <27428383+emma-miler@users.noreply.github.com> | 2022-06-16 01:36:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-16 01:36:36 +0200 |
commit | bdf8e684550ee4763e7eb93ae9e561ddc0dbde9a (patch) | |
tree | 3ba766949efad5cdaf88c494e0e05faa2ffe9da5 /Northstar.Client/mod/scripts/vscripts/ui | |
parent | 1a80df50db26c2752d869726cddba3460dd6daaa (diff) | |
download | NorthstarMods-bdf8e684550ee4763e7eb93ae9e561ddc0dbde9a.tar.gz NorthstarMods-bdf8e684550ee4763e7eb93ae9e561ddc0dbde9a.zip |
Localize masterserver errors (#333)
* Dependent commit
* Add english localization
* Update northstar_client_localisation_mspanish.txt
* Add more localizations
* Update northstar_client_localisation_spanish.txt
* Adhere to code style
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/ui')
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index 171ee7dc..95b7bdae 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -559,15 +559,28 @@ void function TryAuthWithLocalServer() if ( NSWasAuthSuccessful() ) { NSCompleteAuthWithLocalServer() + if ( GetConVarString( "mp_gamemode" ) == "solo" ) + SetConVarString( "mp_gamemode", "tdm" ) + + CloseAllDialogs() + + ClientCommand( "setplaylist tdm" ) + ClientCommand( "map mp_lobby" ) } + else + { + CloseAllDialogs() - if ( GetConVarString( "mp_gamemode" ) == "solo" ) - SetConVarString( "mp_gamemode", "tdm" ) + var reason = NSGetAuthFailReason() - CloseAllDialogs() + DialogData dialogData + dialogData.image = $"ui/menu/common/dialog_error" + dialogData.header = "#ERROR" + dialogData.message = Localize("#NS_SERVERBROWSER_CONNECTIONFAILED") + "\nERROR: " + reason + "\n" + Localize("#" + reason) - ClientCommand( "setplaylist tdm" ) - ClientCommand( "map mp_lobby" ) + AddDialogButton( dialogData, "#OK", null ) + OpenDialog( dialogData ) + } } void function CancelNSLocalAuth() |