aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2023-10-10 16:41:48 +0100
committerGitHub <noreply@github.com>2023-10-10 17:41:48 +0200
commitadd7305318b6fc1fe74389c60c352a19bddd7748 (patch)
tree2926817f4733bfd2a2c8b9694895c035cd03bb48 /Northstar.Client/mod/scripts/vscripts
parent70c599a345bf5be16ae76d98de2943ee388e6d07 (diff)
downloadNorthstarMods-add7305318b6fc1fe74389c60c352a19bddd7748.tar.gz
NorthstarMods-add7305318b6fc1fe74389c60c352a19bddd7748.zip
Remove unnecessary convars (#530)v1.19.6-rc2v1.19.6
Removes some convars we don't need at all
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut45
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut18
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut19
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut5
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut2
5 files changed, 22 insertions, 67 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
index e4cc5687..23dae99d 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
@@ -288,44 +288,21 @@ void function SetupComboButtonTest( var menu )
int buttonIndex = 0
file.playHeader = AddComboButtonHeader( comboStruct, headerIndex, "#MENU_HEADER_PLAY" )
- bool isModded = IsNorthstarServer()
-
-
- // this will be the server browser
- if ( isModded )
- {
- file.findGameButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_SERVER_BROWSER" )
- file.lobbyButtons.append( file.findGameButton )
- Hud_SetLocked( file.findGameButton, true )
- Hud_AddEventHandler( file.findGameButton, UIE_CLICK, OpenServerBrowser )
- }
- else
- {
- file.findGameButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_FIND_GAME" )
- file.lobbyButtons.append( file.findGameButton )
- Hud_AddEventHandler( file.findGameButton, UIE_CLICK, BigPlayButton1_Activate )
- }
+ // server browser
+ file.findGameButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_SERVER_BROWSER" )
+ file.lobbyButtons.append( file.findGameButton )
+ Hud_SetLocked( file.findGameButton, true )
+ Hud_AddEventHandler( file.findGameButton, UIE_CLICK, OpenServerBrowser )
- // this is used for launching private matches now
- if ( isModded )
- {
- file.inviteRoomButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#PRIVATE_MATCH" )
- Hud_AddEventHandler( file.inviteRoomButton, UIE_CLICK, StartPrivateMatch )
- }
- else
- {
- file.inviteRoomButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_INVITE_ROOM" )
- Hud_AddEventHandler( file.inviteRoomButton, UIE_CLICK, DoRoomInviteIfAllowed )
- }
+ // private match
+ file.inviteRoomButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#PRIVATE_MATCH" )
+ Hud_AddEventHandler( file.inviteRoomButton, UIE_CLICK, StartPrivateMatch )
file.inviteFriendsButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_INVITE_FRIENDS" )
Hud_AddEventHandler( file.inviteFriendsButton, UIE_CLICK, InviteFriendsIfAllowed )
-
- if ( isModded )
- {
- Hud_SetEnabled( file.inviteFriendsButton, false )
- Hud_SetVisible( file.inviteFriendsButton, false )
- }
+
+ Hud_SetEnabled( file.inviteFriendsButton, false )
+ Hud_SetVisible( file.inviteFriendsButton, false )
// file.toggleMenuModeButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_LOBBY_SWITCH_FD" )
// Hud_AddEventHandler( file.toggleMenuModeButton, UIE_CLICK, ToggleLobbyMode )
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut
index 52a99b6f..605af383 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut
@@ -18,8 +18,8 @@ void function InitModesMenu()
AddMenuFooterOption( menu, BUTTON_A, "#A_BUTTON_SELECT" )
AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
- AddMenuFooterOption( menu, BUTTON_SHOULDER_LEFT, "#PRIVATE_MATCH_PAGE_PREV", "#PRIVATE_MATCH_PAGE_PREV", CycleModesBack, IsNorthstarServer )
- AddMenuFooterOption( menu, BUTTON_SHOULDER_RIGHT, "#PRIVATE_MATCH_PAGE_NEXT", "#PRIVATE_MATCH_PAGE_NEXT", CycleModesForward, IsNorthstarServer )
+ AddMenuFooterOption( menu, BUTTON_SHOULDER_LEFT, "#PRIVATE_MATCH_PAGE_PREV", "#PRIVATE_MATCH_PAGE_PREV", CycleModesBack )
+ AddMenuFooterOption( menu, BUTTON_SHOULDER_RIGHT, "#PRIVATE_MATCH_PAGE_NEXT", "#PRIVATE_MATCH_PAGE_NEXT", CycleModesForward )
}
void function OnOpenModesMenu()
@@ -56,13 +56,7 @@ void function UpdateVisibleModes()
if ( !ModeSettings_RequiresAI( modesArray[ modeIndex ] ) || modesArray[ modeIndex ] == "aitdm" || modesArray[ modeIndex ] == "at" )
Hud_SetLocked( buttons[ i ], false )
else
- Hud_SetLocked( buttons[ i ], true )
-
- if ( !PrivateMatch_IsValidMapModeCombo( PrivateMatch_GetSelectedMap(), modesArray[ modeIndex ] ) && !IsNorthstarServer() )
- {
- Hud_SetLocked( buttons[ i ], true )
- SetButtonRuiText( buttons[ i ], Localize( "#PRIVATE_MATCH_UNAVAILABLE", Localize( GetGameModeDisplayName( modesArray[ modeIndex ] ) ) ) )
- }
+ Hud_SetLocked( buttons[ i ], true )
}
}
@@ -90,9 +84,7 @@ void function ModeButton_GetFocus( var button )
string mapName = PrivateMatch_GetSelectedMap()
bool mapSupportsMode = PrivateMatch_IsValidMapModeCombo( mapName, modeName )
- if ( !mapSupportsMode && !IsNorthstarServer() )
- Hud_SetText( nextModeDesc, Localize( "#PRIVATE_MATCH_MODE_NO_MAP_SUPPORT", Localize( GetGameModeDisplayName( modeName ) ), Localize( GetMapDisplayName( mapName ) ) ) )
- else if ( IsFDMode( modeName ) ) // HACK!
+ if ( IsFDMode( modeName ) ) // HACK!
Hud_SetText( nextModeDesc, Localize( "#FD_PLAYERS_DESC", Localize( GetGameModeDisplayHint( modeName ) ) ) )
else
Hud_SetText( nextModeDesc, GetGameModeDisplayHint( modeName ) )
@@ -114,7 +106,7 @@ void function ModeButton_Click( var button )
// on modded servers set us to the first map for that mode automatically
// need this for coliseum mainly which is literally impossible to select without this
- if ( IsNorthstarServer() && !PrivateMatch_IsValidMapModeCombo( PrivateMatch_GetSelectedMap(), modesArray[ modeID ] ) )
+ if ( !PrivateMatch_IsValidMapModeCombo( PrivateMatch_GetSelectedMap(), modesArray[ modeID ] ) )
ClientCommand( "SetCustomMap " + GetPrivateMatchMapsForMode( modeName )[ 0 ] )
// set it
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut
index d7c7442f..e3c1f268 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut
@@ -247,10 +247,7 @@ void function OnSelectMatchSettings_Activate( var button )
if ( Hud_IsLocked( button ) )
return
- if ( !IsNorthstarServer() )
- AdvanceMenu( GetMenu( "MatchSettingsMenu" ) )
- else
- AdvanceMenu( GetMenu( "CustomMatchSettingsCategoryMenu" ) )
+ AdvanceMenu( GetMenu( "CustomMatchSettingsCategoryMenu" ) )
}
void function SetupComboButtons( var menu, var navUpButton, var navDownButton )
@@ -274,13 +271,6 @@ void function SetupComboButtons( var menu, var navUpButton, var navDownButton )
file.matchSettingsButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_MATCH_SETTINGS" )
Hud_AddEventHandler( file.matchSettingsButton, UIE_CLICK, OnSelectMatchSettings_Activate )
- if ( !IsNorthstarServer() )
- {
- var friendsButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_INVITE_FRIENDS" )
- file.inviteFriendsButton = friendsButton
- Hud_AddEventHandler( friendsButton, UIE_CLICK, InviteFriendsIfAllowed )
- }
-
headerIndex++
buttonIndex = 0
file.customizeHeader = AddComboButtonHeader( comboStruct, headerIndex, "#MENU_HEADER_LOADOUTS" )
@@ -575,17 +565,12 @@ function UpdatePrivateMatchButtons()
Hud_SetLocked( file.selectMapButton, true )
Hud_SetLocked( file.selectModeButton, true )
Hud_SetLocked( file.matchSettingsButton, true )
-
- if ( !IsNorthstarServer() )
- Hud_SetLocked( file.inviteFriendsButton, true )
}
else
{
RHud_SetText( file.startMatchButton, "#START_MATCH" )
Hud_SetLocked( file.selectMapButton, false )
Hud_SetLocked( file.selectModeButton, false )
- if ( !IsNorthstarServer() )
- Hud_SetLocked( file.inviteFriendsButton, false )
string modeName = PrivateMatch_GetSelectedMode()
bool settingsLocked = IsFDMode( modeName )
@@ -648,7 +633,7 @@ function UpdateLobby()
{
float varOrigVal = float( GetCurrentPlaylistGamemodeByIndexVar( gamemodeIdx, varName, false ) )
float varOverrideVal = float( GetCurrentPlaylistGamemodeByIndexVar( gamemodeIdx, varName, true ) )
- if ( varOrigVal == varOverrideVal && !IsNorthstarServer() ) // stuff seems to break outside of northstar servers since we dont always use private_match playlist
+ if ( varOrigVal == varOverrideVal ) // stuff seems to break outside of northstar servers since we dont always use private_match playlist
continue
string label = Localize( MatchSettings_PlaylistVarLabels[varName] ) + ": "
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut b/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut
index 4b3d0f55..f91231b6 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut
@@ -202,7 +202,10 @@ void function UpdateOpenInvite_Thread()
void function UICodeCallback_OpenInviteUpdated()
{
- if ( file.openInviteVisible || IsNorthstarServer() )
+ // don't support on northstar
+ return
+
+ if ( file.openInviteVisible )
return
int currentPartySize = GetPartySize()
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
index eef19b5e..c97c8cdc 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
@@ -531,7 +531,6 @@ void function OnPlayFDButton_Activate( var button ) // repurposed for launching
{
if ( !Hud_IsLocked( button ) )
{
- SetConVarBool( "ns_is_modded_server", true )
SetConVarString( "communities_hostname", "" ) // disable communities due to crash exploits that are still possible through it
NSTryAuthWithLocalServer()
thread TryAuthWithLocalServer()
@@ -601,7 +600,6 @@ void function OnPlayMPButton_Activate( var button )
{
Lobby_SetAutoFDOpen( false )
// Lobby_SetFDMode( false )
- SetConVarBool( "ns_is_modded_server", false )
thread file.mpButtonActivateFunc()
}
}