Skip to content

Commit

Permalink
Merge branch 'main' into invalid-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
GeckoEidechse authored Oct 12, 2023
2 parents 0b90370 + bdb2fa3 commit 63f1ed8
Show file tree
Hide file tree
Showing 17 changed files with 243 additions and 94 deletions.
4 changes: 2 additions & 2 deletions Northstar.Client/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
{
"Name": "modlist_show_convars",
"DefaultValue": "0",
"Flags": 16777216
"Flags": "ARCHIVE_PLAYERPROFILE"
},
{
"Name": "modlist_reverse",
"DefaultValue": "0",
"Flags": 16777216
"Flags": "ARCHIVE_PLAYERPROFILE"
}
],
"Scripts": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a

// Toggleable progression
"TOGGLE_PROGRESSION" "Toggle Progression"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON]% Toggle Progression"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Toggle Progression"

"PROGRESSION_TOGGLE_ENABLED_HEADER" "Disable Progression?"
"PROGRESSION_TOGGLE_ENABLED_BODY" "Titans, Weapons, Factions, Skins, etc. will all be unlocked and usable at any time.\n\nThis can be changed at any time in the multiplayer lobby."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ Choisissez Oui si vous êtes d'accord. Ce choix peut être modifié à tout inst
"PROGRESSION_TOGGLE_DISABLED_BODY" "Les Titans, Armes, Factions, Skins et autres seront débloqués par la monté en niveau ou par leur achats en mérites.\n\nPeut être changé à n'importe que moment dans le salon multijoueurs.\n\n^CC000000Warning : Si vous équiper des objets que vous n'avez pas encore débloqués, ils seront déséquipés !"
"PROGRESSION_ENABLED_BODY" "^CCCC0000La progression a été activée.^\n\nLes Titans, Armes, Factions, Skins et autres seront débloqués par la monté en niveau ou par leur achats en mérites.\n\nPeut être changé à n'importe que moment dans le salon multijoueurs."
"TOGGLE_PROGRESSION" "Activer la progression"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON]% Activer la progression"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Activer la progression"
"PROGRESSION_ANNOUNCEMENT_BODY" "^CCCC0000Le système de progression peut être activé !^\n\nNorthstar supporte désormais le système de progression du jeu original, vous permettant de choisir si vous souhaitez débloquer les armes, skins, titans etc. en gagnant des niveaux et en complétant des défis.\n\nVous pouvez activer la progression en utilisant le bouton en bas de l'écran d'accueil.\n\nCeci peut être changé à tout moment."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
"sns_reset_pulse_blade_cooldown_on_pulse_blade_kill" "Сброс перезарядки пульс. клинка при убийстве им"
"gg_assist_reward" "Множитель награды за помощь в убийстве"
"TOGGLE_PROGRESSION" "Вкл/выкл прогресс"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON]% Вкл/выкл прогресс"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Вкл/выкл прогресс"
"PROGRESSION_TOGGLE_DISABLED_HEADER" "Включить прогресс?"
"PROGRESSION_ENABLED_HEADER" "Прогресс включён!"
"PROGRESSION_ENABLED_BODY" "^CCCC0000Прогресс включён.^\n\nНедоступных титанов, оружие, фракции, раскраски, и т.п. теперь нужно разблокировать, или купить за Заслуги.\n\nЭту настройку всегда можно изменить в лобби сетевой игры."
Expand All @@ -341,5 +341,9 @@
"PROGRESSION_TOGGLE_ENABLED_BODY" "Все титаны, оружие, фракции, раскраски, и т.п. станут разблокированы.\n\nЭту настройку всегда можно изменить в лобби сетевой игры."
"PROGRESSION_TOGGLE_DISABLED_BODY" "Будут доступны только разблокированные или купленные вами титаны, оружие, фракции, раскраски, и т.п.\n\nЭту настройку всегда можно изменить в лобби сетевой игры.\n\n^CC000000Внимание: недоступные предметы в экипировке будут заменены на доступные!"
"PROGRESSION_ANNOUNCEMENT_BODY" "^CCCC0000Прогресс!^\n\nВ Northstar теперь работает оригинальная система прогресса разблокировок. Титанов, оружие, фракции, раскраски, и т.п. теперь можно разблокировать через получение новых уровней и прохождение испытаний.\n\nПрогресс можно включить с помощью кнопки внизу меню лобби.\n\nЭту настройку всегда можно изменить."
"AUTHENTICATION_FAILED_BODY" "Не удалось войти в Atlas!"
"AUTHENTICATION_FAILED_ERROR_CODE" "Код ошибки: ^DB6F2C00%s1^"
"AUTHENTICATION_FAILED_HELP" "Справка"
"AUTHENTICATION_FAILED_HEADER" "Ошибка аутентификации"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Presiona Sí al estar de acuerdo. Esta opcion se puede cambiar en el menú de mo
"PROGRESSION_ENABLED_HEADER" "¡Progreso habilitado!"
"PROGRESSION_DISABLED_HEADER" "¡Progreso deshabilitado!"
"TOGGLE_PROGRESSION" "Cambiar modo de progresión"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON]% Cambiar modo de progresión"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Cambiar modo de progresión"
"PROGRESSION_TOGGLE_DISABLED_BODY" "Titanes, Armas, Facciones, Aspectos y otros serán desbloqueados sólo al subir de nivel, o a través de Logros.\n\nÉsta opción puede ser cambiada cuando quieras en la sala de espera.\n\n^CC000000Advertencia: ¡Cualquier equipamiento o utensilio será reiniciado si no lo tienes desbloqueado!"
"MOD_SETTINGS_SERVER" "Servidor"
"MOD_SETTINGS_RESET_ALL" "Reiniciar completamente"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
"PROGRESSION_TOGGLE_DISABLED_BODY" "泰坦,武器, 陣營,皮膚以及其他一切需要解鎖的物品將通過升級或是使用點數購買來進行解鎖。.\n\n您可以隨時在多人大廳中更改此項。\n\n^CC000000警告:如果您已經裝備了尚未解鎖的物品,它們將會被重置!"
"PROGRESSION_TOGGLE_ENABLED_BODY" "泰坦,武器,陣營,皮膚及所有其他一切需要解鎖的物品都將隨時可以進行解鎖並使用。\n\n您可以隨時在多人大廳中更改此項。"
"TOGGLE_PROGRESSION" "遊戲進度"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON]% 遊戲進度"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% 遊戲進度"
"PROGRESSION_TOGGLE_ENABLED_HEADER" "停用個人進度?"
"PROGRESSION_DISABLED_HEADER" "個人進度已關閉!"
"PROGRESSION_DISABLED_BODY" "^CCCC0000個人進度已停用^\n\n泰坦,武器,陣營,皮膚及所有其他一切需要解鎖的物品將隨時可以進行解鎖並使用。\n\n您可以隨時在多人大廳中更改此項。"
Expand Down
45 changes: 11 additions & 34 deletions Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
18 changes: 5 additions & 13 deletions Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 )
}
}

Expand Down Expand Up @@ -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 ) )
Expand All @@ -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
Expand Down
19 changes: 2 additions & 17 deletions Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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" )
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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] ) + ": "
Expand Down
5 changes: 4 additions & 1 deletion Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ BurnReward function BurnReward_GetRandom()
string ref = burn.allowedCards.getrandom().ref

#if SERVER || CLIENT
if ( !EarnMeterMP_IsTitanEarnGametype() )
if ( Riff_TitanAvailability() == eTitanAvailability.Never )
ref = BurnMeter_GetNoTitansReplacement( ref )

if ( GetCurrentPlaylistVarInt( "featured_mode_all_ticks", 0 ) >= 1 )
Expand All @@ -211,7 +211,7 @@ string function GetSelectedBurnCardRef( entity player )
#endif

#if SERVER || CLIENT
if ( !EarnMeterMP_IsTitanEarnGametype() )
if ( Riff_TitanAvailability() == eTitanAvailability.Never )
ref = BurnMeter_GetNoTitansReplacement( ref )

if ( GetCurrentPlaylistVarInt( "featured_mode_all_ticks", 0 ) >= 1 )
Expand Down
11 changes: 1 addition & 10 deletions Northstar.CustomServers/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,14 @@
"Version": "1.19.0",
"LoadPriority": 0,
"ConVars": [
{
"Name": "ns_lobby_type",
"DefaultValue": "0"
},
{
"Name": "ns_is_modded_server",
"DefaultValue": "1",
"Flags": 8192
},
{
"Name": "ns_should_return_to_lobby",
"DefaultValue": "1"
},
{
"Name": "ns_allow_spectators",
"DefaultValue": "0",
"Flags": 8192
"Flags": "REPLICATED"
},
{
"Name": "ns_private_match_last_mode",
Expand Down
12 changes: 12 additions & 0 deletions Northstar.CustomServers/mod/scripts/vscripts/_items.nut
Original file line number Diff line number Diff line change
Expand Up @@ -5700,6 +5700,12 @@ bool function IsSubItemLocked( entity player, string ref, string parentRef )
{
if ( DevEverythingUnlocked( player ) )
return false

if ( IsItemPurchasableEntitlement( ref, parentRef ) )
return false

if ( GetItemType( ref ) == eItemTypes.PRIME_TITAN || GetSubitemType( parentRef, ref ) == eItemTypes.PRIME_TITAN )
return false

if ( IsItemInEntitlementUnlock( ref, parentRef ) )
{
Expand Down Expand Up @@ -5819,6 +5825,12 @@ bool function IsItemLocked( entity player, string ref )
{
if ( DevEverythingUnlocked( player ) )
return false

if ( IsItemPurchasableEntitlement( ref ) )
return false

if ( GetItemType( ref ) == eItemTypes.PRIME_TITAN )
return false

if ( IsItemInEntitlementUnlock( ref ) )
{
Expand Down
Loading

0 comments on commit 63f1ed8

Please sign in to comment.