aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Client')
-rw-r--r--Northstar.Client/mod.json5
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_english.txtbin20116 -> 10737 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_german.txtbin9760 -> 19418 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_japanese.txtbin16304 -> 17396 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txtbin9389 -> 18936 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txtbin0 -> 15824 bytes
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut63
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut5
8 files changed, 41 insertions, 32 deletions
diff --git a/Northstar.Client/mod.json b/Northstar.Client/mod.json
index 4842755bc..fbaf12039 100644
--- a/Northstar.Client/mod.json
+++ b/Northstar.Client/mod.json
@@ -25,14 +25,13 @@
"DefaultValue": "0"
}
],
- // ui inits need to happen before so our init callbacks get called
"Scripts": [
{
"Path": "ui/menu_ns_modmenu.nut",
"RunOn": "UI",
"UICallback": {
"Before": "AddNorthstarModMenu",
- "After": "AddNorthstarModMenu_MainMenuFooter" // need to do this after, so we add footer after mainmenu init
+ "After": "AddNorthstarModMenu_MainMenuFooter"
}
},
@@ -72,4 +71,4 @@
"Localisation": [
"resource/northstar_client_localisation_%language%.txt"
]
-} \ No newline at end of file
+}
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
index 49ec746cf..4cb793541 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
index fdea511eb..3d7a75510 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt
index e4ac2680c..58abc5498 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt
index 332d25f84..0db15c43b 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt
new file mode 100644
index 000000000..cd8cf977d
--- /dev/null
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt
Binary files differ
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
index bca14f055..7254f1990 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -91,6 +91,36 @@ void function AddNorthstarServerBrowserMenu()
AddMenu( "ServerBrowserMenu", $"resource/ui/menus/server_browser.menu", InitServerBrowserMenu, "#MENU_SERVER_BROWSER" )
}
+void function UpdatePrivateMatchModesAndMaps()
+{
+ array<string> realMaps = [ "mp_lobby" ]
+ realMaps.extend( GetPrivateMatchMaps() )
+
+ foreach ( int enum_, string map in realMaps )
+ {
+ if ( filterArguments.filterMaps.find( map ) != -1 )
+ continue
+
+ filterArguments.filterMaps.append( map )
+
+ string localized = GetMapDisplayName( map )
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ) , localized, string( enum_ + 1 ) )
+ }
+
+ array<string> realModes = [ "private_match" ]
+ realModes.extend( GetPrivateMatchModes() )
+
+ foreach( int enum_, string mode in realModes )
+ {
+ string localized = GetGameModeDisplayName( mode )
+ if ( filterArguments.filterGamemodes.find( localized ) != -1 )
+ continue
+
+ filterArguments.filterGamemodes.append( localized )
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ) , localized, string( enum_ + 1 ) )
+ }
+}
+
void function InitServerBrowserMenu()
{
file.menu = GetMenu( "ServerBrowserMenu" )
@@ -104,28 +134,14 @@ void function InitServerBrowserMenu()
file.serversGamemode = GetElementsByClassname( file.menu, "ServerGamemode" )
file.serversLatency = GetElementsByClassname( file.menu, "ServerLatency" )
- // Create filter arrays
- filterArguments.filterMaps.extend(GetPrivateMatchMaps())
- filterArguments.filterMaps.insert(0, "SWITCH_ANY")
- filterArguments.filterMaps.append("mp_lobby")
-
- foreach ( int enum_, string map in filterArguments.filterMaps )
- Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ) , map, string( enum_ ) )
-
-
- filterArguments.filterGamemodes = clone GetPrivateMatchModes()
- filterArguments.filterGamemodes.insert(0, "SWITCH_ANY")
-
- // GetGameModeDisplayName( mode ) requires server talk even if it can be entirely client side
- foreach ( int enum_, string mode in filterArguments.filterGamemodes )
- Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ) , mode, string( enum_ ) )
-
+ filterArguments.filterMaps = [ "SWITCH_ANY" ]
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ), "SWITCH_ANY", "0" )
+
+ filterArguments.filterGamemodes = [ "SWITCH_ANY" ]
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ), "SWITCH_ANY", "0" )
// Event handlers
AddMenuEventHandler( file.menu, eUIEvent.MENU_CLOSE, OnCloseServerBrowserMenu )
-
-
-
AddMenuEventHandler( file.menu, eUIEvent.MENU_OPEN, OnServerBrowserMenuOpened )
AddMenuFooterOption( file.menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
AddMenuFooterOption( file.menu, BUTTON_Y, "#Y_REFRESH_SERVERS", "#REFRESH_SERVERS", RefreshServers )
@@ -375,6 +391,7 @@ void function OnCloseServerBrowserMenu()
void function OnServerBrowserMenuOpened()
{
+ UpdatePrivateMatchModesAndMaps()
Hud_SetText( Hud_GetChild( file.menu, "Title" ), "#MENU_TITLE_SERVER_BROWSER" )
UI_SetPresentationType( ePresentationType.KNOWLEDGEBASE_MAIN )
@@ -696,14 +713,6 @@ void function FilterServerList()
}
}
-
- printt("Better.Serverbrowser:------------------------")
- printt("Server count: ", NSGetServerCount())
- printt("Filtered count: ", file.serversArrayFiltered.len())
- printt("Total players: ", totalPlayers)
- printt("This message gets shown only on full refresh")
- printt("---------------------------------------------")
-
Hud_SetText( Hud_GetChild( file.menu, "InGamePlayerCount" ), string( totalPlayers ) )
Hud_SetText( Hud_GetChild( file.menu, "TotalServerCount" ), string( NSGetServerCount() ) )
}
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
index ecb34d471..e59e0e59a 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
@@ -502,9 +502,10 @@ void function TryUnlockNorthstarButton()
// unlock "Launch Northstar" button until you're authed with masterserver, are allowing insecure auth, or 7.5 seconds have passed
float time = Time()
- while ( GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN )
+ while ( GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN || time + 10.0 > Time() )
{
- if ( ( NSIsMasterServerAuthenticated() && IsStryderAllowingMP() ) || GetConVarBool( "ns_auth_allow_insecure" ) )
+ Hud_SetLocked( file.fdButton, true )
+ if ( ( NSIsMasterServerAuthenticated() && IsStryderAuthenticated() ) || GetConVarBool( "ns_auth_allow_insecure" ) )
break
WaitFrame()