Skip to content

Commit

Permalink
Merge branch 'main' into weapon-drop-callback
Browse files Browse the repository at this point in the history
  • Loading branch information
NoCatt authored Oct 22, 2023
2 parents 086f462 + 640d391 commit 433bf19
Show file tree
Hide file tree
Showing 32 changed files with 15,025 additions and 164 deletions.
6 changes: 6 additions & 0 deletions .github/nativefuncs.json
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,12 @@
"helpText":"",
"returnTypeString":"void",
"argTypes":"struct presence"
},
{
"name":"NSGetMasterServerAuthResult",
"helpText":"",
"returnTypeString":"MasterServerAuthResult",
"argTypes":""
}
]
}
19 changes: 19 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: add-to-project

on:
issues:
types:
- opened
pull_request_target:
types:
- opened

jobs:
add-to-project:
name: Add to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: "https://github.com/orgs/R2Northstar/projects/3"
github-token: "${{ secrets.ADD_TO_PROJECT_PAT }}"
13 changes: 10 additions & 3 deletions Northstar.Client/mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Name": "Northstar.Client",
"Description": "Various ui and client changes to fix bugs and add better support for mods",
"Version": "1.16.0",
"Version": "1.19.0",
"LoadPriority": 0,
"InitScript": "cl_northstar_client_init.nut",
"ConVars": [
Expand Down 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 Expand Up @@ -128,6 +128,13 @@
{
"Path": "ui/ui_mouse_capture.nut",
"RunOn": "UI"
},
{
"Path": "ui/atlas_auth.nut",
"RunOn": "UI",
"UICallback": {
"After": "AtlasAuthDialog"
}
}
],
"Localisation": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
"INVALID_MASTERSERVER_TOKEN" "Invalid or expired masterserver token"
"JSON_PARSE_ERROR" "Error parsing json response"
"UNSUPPORTED_VERSION" "The version you are using is no longer supported"

"AUTHENTICATION_FAILED_HEADER" "Authentication Failed"
"AUTHENTICATION_FAILED_BODY" "Failed to authenticate with Atlas!"
"AUTHENTICATION_FAILED_ERROR_CODE" "Error code: ^DB6F2C00%s1^"
"AUTHENTICATION_FAILED_HELP" "Help"

// Mod Settings
"MOD_SETTINGS" "Mod Settings"
Expand All @@ -346,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
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ global struct ServerInfo
string region
array< RequiredModInfo > requiredMods
}

global struct MasterServerAuthResult
{
bool success
string errorCode
string errorMessage
}
56 changes: 56 additions & 0 deletions Northstar.Client/mod/scripts/vscripts/ui/atlas_auth.nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
global function AtlasAuthDialog

void function AtlasAuthDialog()
{
thread AtlasAuthDialog_Threaded()
}

void function AtlasAuthDialog_Threaded()
{
// wait at least 1 frame so that the main menu can be loaded first
WaitFrame()

while ( !NSIsMasterServerAuthenticated() || GetConVarBool( "ns_auth_allow_insecure" ) )
WaitFrame()

if ( GetConVarBool( "ns_auth_allow_insecure" ) )
return

MasterServerAuthResult res = NSGetMasterServerAuthResult()

// do nothing on successful authentication
if ( res.success )
return

EmitUISound( "blackmarket_purchase_fail" )

DialogData dialogData
dialogData.image = $"ui/menu/common/dialog_error"
dialogData.header = Localize( "#AUTHENTICATION_FAILED_HEADER" )

// if we got a special error message from Atlas, display it
if ( res.errorMessage != "" )
dialogData.message = res.errorMessage
else
dialogData.message = Localize( "#AUTHENTICATION_FAILED_BODY" )

if ( res.errorCode != "" )
dialogData.message += format( "\n\n%s", Localize( "#AUTHENTICATION_FAILED_ERROR_CODE", res.errorCode ) )

string link = "https://r2northstar.gitbook.io/r2northstar-wiki/installing-northstar/troubleshooting"
// link to generic troubleshooting page if we don't have an error code from Atlas
if ( res.errorCode != "" )
link = format( "%s#%s", link, res.errorCode )

CloseAllDialogs()
AddDialogButton( dialogData, "#OK" )
AddDialogButton( dialogData, Localize( "#AUTHENTICATION_FAILED_HELP" ), void function() : ( dialogData, link )
{
// todo: get MS to redirect, so i can use an MS link or something?
LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_FORCEEXTERNAL )
// keep the dialog open
OpenDialog( dialogData )
} )

OpenDialog( dialogData )
}
Loading

0 comments on commit 433bf19

Please sign in to comment.