diff options
3 files changed, 30 insertions, 6 deletions
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 63377f9f..de4a663e 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut @@ -15,9 +15,13 @@ void function AddNorthstarServerBrowserMenu() void function InitServerBrowserMenu() { - AddMenuEventHandler( GetMenu( "ServerBrowserMenu" ), eUIEvent.MENU_OPEN, OnServerBrowserMenuOpened ) - AddMenuFooterOption( GetMenu( "ServerBrowserMenu" ), BUTTON_B, "#B_BUTTON_BACK", "#BACK" ) - AddMenuFooterOption( GetMenu( "ServerBrowserMenu" ), BUTTON_Y, "#Y_REFRESH_SERVERS", "#REFRESH_SERVERS", RefreshServers ) + var menu = GetMenu( "ServerBrowserMenu" ) + + AddMenuEventHandler( menu, eUIEvent.MENU_OPEN, OnServerBrowserMenuOpened ) + AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" ) + AddMenuFooterOption( menu, BUTTON_Y, "#Y_REFRESH_SERVERS", "#REFRESH_SERVERS", RefreshServers ) + AddMenuFooterOption( menu, BUTTON_SHOULDER_LEFT, "#PRIVATE_MATCH_PAGE_PREV", "#PRIVATE_MATCH_PAGE_PREV", CycleServersBack ) + AddMenuFooterOption( menu, BUTTON_SHOULDER_RIGHT, "#PRIVATE_MATCH_PAGE_NEXT", "#PRIVATE_MATCH_PAGE_NEXT", CycleServersForward ) foreach ( var button in GetElementsByClassname( GetMenu( "ServerBrowserMenu" ), "ServerButton" ) ) { @@ -47,12 +51,31 @@ void function RefreshServers( var button ) if ( NSIsRequestingServerList() ) return + file.page = 0 NSClearRecievedServerList() NSRequestServerList() thread WaitForServerListRequest() } +void function CycleServersBack( var button ) +{ + if ( file.page == 0 ) + return + + file.page-- + UpdateShownPage() +} + +void function CycleServersForward( var button ) +{ + if ( ( file.page + 1 ) * BUTTONS_PER_PAGE >= NSGetServerCount() ) + return + + file.page++ + UpdateShownPage() +} + void function WaitForServerListRequest() { var menu = GetMenu( "ServerBrowserMenu" ) @@ -104,9 +127,9 @@ void function UpdateShownPage() Hud_SetVisible( Hud_GetChild( menu, "NextModeIcon" ), false ) Hud_SetVisible( Hud_GetChild( menu, "NextGameModeName" ), false ) - for ( int i = 0; i < NSGetServerCount() && i < serverButtons.len(); i++ ) + for ( int i = 0; ( file.page * BUTTONS_PER_PAGE ) + i < NSGetServerCount() - 1 && i < serverButtons.len(); i++ ) { - int serverIndex = file.page * BUTTONS_PER_PAGE + i + int serverIndex = ( file.page * BUTTONS_PER_PAGE ) + i Hud_SetEnabled( serverButtons[ i ], true ) Hud_SetVisible( serverButtons[ i ], true ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut index 2926b773..4be04643 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut @@ -239,6 +239,7 @@ void function PlayerUsesAmpedWeaponsBurncardThreaded( entity player ) //weapons.extend( player.GetOffhandWeapons() ) // idk? unsure of vanilla behaviour here foreach ( entity weapon in weapons ) { + weapon.RemoveMod( "silencer" ) // both this and the burnmod will override firing fx, if a second one overrides this we crash foreach ( string mod in GetWeaponBurnMods( weapon.GetWeaponClassName() ) ) weapon.AddMod( mod ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut index 52560074..68d6a5d7 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut @@ -22,7 +22,7 @@ void function PrivateMatchModesInit() AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_TITAN", "infinite_doomed_state", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" ) AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_TITAN", "titan_shield_regen", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" ) - AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "riff_floorislava", [ "#SETTING_DEFAULT", "#SETTING_ENABLED", "#SETTING_DISABLED" ], "0" ) + AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "riff_floorislava", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" ) AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "featured_mode_all_holopilot", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" ) AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "featured_mode_all_grapple", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" ) AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "featured_mode_all_phase", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" ) |