Skip to content

Commit

Permalink
Merge branch 'main' into mfd-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
GeckoEidechse authored Jan 15, 2024
2 parents 452cf3a + 0e5bf9e commit f444c75
Show file tree
Hide file tree
Showing 61 changed files with 1,350 additions and 231 deletions.
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/Northstar.Client/mod/resource/northstar_client_localisation_*.txt text diff working-tree-encoding=UTF-16LE-BOM
/Northstar.Client/mod/resource/northstar_client_localisation_*.txt text diff working-tree-encoding=UTF-16LE-BOM

# Highlight `.gnut` like `.nut` files
*.gnut linguist-language=Squirrel
33 changes: 20 additions & 13 deletions .github/nativefuncs.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,7 @@
"helpText":"Returns whether or not a given path leads to a folder.",
"returnTypeString":"bool",
"argTypes":"string path"
},
{
"name":"NSPushGameStateData",
"helpText":"",
"returnTypeString":"void",
"argTypes":"struct gamestate"
}
}
],
"UI":[
{
Expand Down Expand Up @@ -508,6 +502,25 @@
"returnTypeString":"array<string>",
"argTypes":"string modName"
},
{
"name": "NSIsModDownloadable",
"helpText": "checks whether a mod is verified and can be auto-downloaded",
"returnTypeString": "bool",
"argTypes": "string name, string version"

},
{
"name": "NSDownloadMod",
"helpText": "downloads a given mod from distant API to local game profile",
"returnTypeString": "void",
"argTypes": "string name, string version"
},
{
"name": "NSGetModInstallState",
"helpText": "get status of the mod currently being installed",
"returnTypeString": "ModInstallState",
"argTypes": ""
},
{
"name":"NSReloadMods",
"helpText":"",
Expand Down Expand Up @@ -724,12 +737,6 @@
"returnTypeString":"bool",
"argTypes":"string path"
},
{
"name":"NSPushUIPresence",
"helpText":"",
"returnTypeString":"void",
"argTypes":"struct presence"
},
{
"name":"NSGetMasterServerAuthResult",
"helpText":"",
Expand Down
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/add-to-project@v0.5.0
with:
project-url: "https://github.com/orgs/R2Northstar/projects/3"
github-token: "${{ secrets.ADD_TO_PROJECT_PAT }}"
16 changes: 16 additions & 0 deletions .github/workflows/merge-conflict-auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Merge Conflict Auto Label
on:
push:
branches:
- main

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: mschilde/auto-label-merge-conflicts@master
with:
CONFLICT_LABEL_NAME: "merge conflicts"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RETRIES: 5
WAIT_MS: 5000
12 changes: 10 additions & 2 deletions Northstar.Client/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"LoadPriority": 0,
"InitScript": "cl_northstar_client_init.nut",
"ConVars": [
{
"Name": "allow_mod_auto_download",
"DefaultValue": "1"
},
{
"Name": "filter_hide_empty",
"DefaultValue": "0"
Expand Down Expand Up @@ -36,12 +40,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 @@ -82,6 +86,10 @@
"After": "NSUpdateGameStateClientStart"
}
},
{
"Path": "ui/menu_ns_moddownload.nut",
"RunOn": "UI"
},
{
"Path": "ui/menu_ns_serverbrowser.nut",
"RunOn": "UI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
"SHOW_ONLY_DISABLED" "Only Disabled"
"SHOW_ONLY_NOT_REQUIRED" "Only Optional Mods"
"SHOW_ONLY_REQUIRED" "Only Required Mods"
"MOD_REQUIRED_WARNING" " : This mod may get (un)loaded when joining a server"

// Maps menu
"HIDE_LOCKED" "Hide locked"
Expand Down Expand Up @@ -351,7 +352,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 All @@ -366,5 +367,26 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
"PROGRESSION_DISABLED_BODY" "^CCCC0000Progression has been disabled.^\n\nTitans, 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."

"PROGRESSION_ANNOUNCEMENT_BODY" "^CCCC0000Progression can now be enabled!^\n\nNorthstar now supports vanilla progression, meaning you can choose to unlock Weapons, Skins, Titans, etc. through levelling up and completing challenges.\n\nYou can enable progression using the button at the bottom of the lobby screen.\n\nThis can be changed at any time."

// Mod downloading
"MISSING_MOD" "Missing mod \"%s1\" v%s2"
"WRONG_MOD_VERSION" "Server has mod \"%s1\" v%s2 while you have v%s3"
"MOD_NOT_VERIFIED" "(mod is not verified, and couldn't be downloaded automatically)"
"MOD_DL_DISABLED" "(automatic mod downloading is disabled)"
"DOWNLOADING_MOD_TITLE" "Downloading mod"
"DOWNLOADING_MOD_TITLE_W_PROGRESS" "Downloading mod (%s1%)"
"DOWNLOADING_MOD_TEXT" "Downloading %s1 v%s2..."
"DOWNLOADING_MOD_TEXT_W_PROGRESS" "Downloading %s1 v%s2...\n(%s3/%s4 MB)"
"CHECKSUMING_TITLE" "Checksuming mod"
"CHECKSUMING_TEXT" "Verifying contents of %s1 v%s2..."
"EXTRACTING_MOD_TITLE" "Extracting mod (%s1%)"
"EXTRACTING_MOD_TEXT" "Extracting %s1 v%s2...\n(%s3/%s4 MB)"
"FAILED_DOWNLOADING" "Failed downloading mod"
"FAILED_READING_ARCHIVE" "An error occurred while reading mod archive."
"FAILED_WRITING_TO_DISK" "An error occurred while extracting mod files to the filesystem."
"MOD_FETCHING_FAILED" "Mod archive could not be downloaded from Thunderstore."
"MOD_CORRUPTED" "Downloaded archive checksum does not match verified signature."
"NO_DISK_SPACE_AVAILABLE" "There is not enough space on your disk."
"MOD_FETCHING_FAILED_GENERAL" "Mod extraction failed. Check logs for more details."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,11 @@ 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."
"AUTHENTICATION_FAILED_HEADER" "Échec de l'authentification"
"AUTHENTICATION_FAILED_HELP" "Aide"
"AUTHENTICATION_FAILED_ERROR_CODE" "Code d'erreur : ^DB6F2C00%s1^"
"AUTHENTICATION_FAILED_BODY" "L'authentification avec Atlas a échoué."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,35 @@ Si estas de acuerdo con esto, presiona SI. Esta decision puede ser cambiada en e
"INVALID_MASTERSERVER_TOKEN" "Token de jugador expirado o invalido"
"JSON_PARSE_ERROR" "Error procesando respuesta json"
"UNSUPPORTED_VERSION" "La versión que estas usando ya no esta soportada"
"SHOW_ONLY_REQUIRED" "Solo Mods requeridos"
"player_force_respawn" "Reaparición Forzada"
"TOGGLE_PROGRESSION" "Alternar Progreso"
"PROGRESSION_TOGGLE_ENABLED_HEADER" "Desactivar Progreso?"
"NO_RESULTS" "No hay resultados."
"NO_MODS" "No hay configuraciones disponibles! Instala mas mods en: ^5588FF00northstar.thunderstore.io^0."
"AUTHENTICATION_FAILED_HEADER" "Verificacion fallida"
"AUTHENTICATION_FAILED_BODY" "Autenticación fallada con Atlas!"
"AUTHENTICATION_FAILED_ERROR_CODE" "Codigo de error: ^DB6F2C00%s1^"
"AUTHENTICATION_FAILED_HELP" "Ayuda"
"WILL_RESET_ALL_SETTINGS" "Esto reiniciará TODAS las configuraciones de categoría\nEsto no es reversible"
"WILL_RESET_SETTING" "Esto revertirá %s1 a la configuracion por defecto. \n \nEsto no es revertible."
"MOD_SETTINGS_SERVER" "Servidor"
"MOD_SETTINGS_RESET" "Reiniciar"
"MOD_SETTINGS_RESET_ALL" "Reiniciar todo"
"MOD_REQUIRED_WARNING" " Este mod puede ser deshabilitado al entrar a un servidor"
"MOD_SETTINGS" "Configuracion de Mods"
"NORTHSTAR_BASE_SETTINGS" "Configuracion base de Northstar"
"ONLY_HOST_MATCH_SETTINGS" "Solo el Host puede cambiar ajustes de partida"
"ONLY_HOST_CAN_START_MATCH" "Solo el host puede iniciar la partida"
"MATCH_COUNTDOWN_LENGTH" "Cuenta Atrás de partida privada"
"LOG_UNKNOWN_CLIENTCOMMANDS" "Registro desconocido de comandos de cliente"
"DISALLOWED_TACTICALS" "Tactica Prohibida"
"TACTICAL_REPLACEMENT" "Reemplazo de Tactica"
"DISALLOWED_WEAPONS" "Arma Prohibida"
"REPLACEMENT_WEAPON" "Arma de Reemplazo"
"SHOULD_RETURN_TO_LOBBY" "Volver al lobby al finalizar partida"
"ARE_YOU_SURE" "Seguro?"
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Alternar Progreso"
"SHOW_ONLY_NOT_REQUIRED" "Solo Mods Opcionales"
}
}
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
4 changes: 2 additions & 2 deletions Northstar.Client/mod/resource/ui/menus/modlist.menu
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ resource/ui/menus/modlist.menu
{
ControlName Label

labelText " : This mod gets (un)loaded automatically"
wide 500
labelText "#MOD_REQUIRED_WARNING"
auto_wide_tocontents 1
tall 50
visible 0

Expand Down
21 changes: 17 additions & 4 deletions Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
global enum eDiscordGameState
{
LOADING = 0
MAINMENU
LOBBY
INGAME
}

global struct GameStateStruct {

string map
Expand All @@ -15,10 +23,7 @@ global struct GameStateStruct {
}

global struct UIPresenceStruct {
bool isLoading
bool isLobby
string loadingLevel
string loadedLevel
int gameState
}

global struct RequiredModInfo
Expand Down Expand Up @@ -48,3 +53,11 @@ global struct MasterServerAuthResult
string errorCode
string errorMessage
}

global struct ModInstallState
{
int status
int progress
int total
float ratio
}
11 changes: 4 additions & 7 deletions Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
untyped
globalize_all_functions

void function NorthstarCodeCallback_GenerateGameState() {

GameStateStruct gs

GameStateStruct function DiscordRPC_GenerateGameState( GameStateStruct gs )
{
int highestScore = 0
int secondHighest = 0

Expand Down Expand Up @@ -40,6 +38,5 @@ void function NorthstarCodeCallback_GenerateGameState() {
gs.timeEnd = expect float(level.nv.roundEndTime - Time())
else
gs.timeEnd = expect float(level.nv.gameEndTime - Time())

NSPushGameStateData(gs)
}
return gs
}
20 changes: 12 additions & 8 deletions Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
untyped
globalize_all_functions

void function NorthstarCodeCallback_GenerateUIPresence() {
UIPresenceStruct uis
UIPresenceStruct function DiscordRPC_GenerateUIPresence( UIPresenceStruct uis )
{
if ( uiGlobal.isLoading )
uis.gameState = eDiscordGameState.LOADING;
else if ( uiGlobal.loadedLevel == "" )
uis.gameState = eDiscordGameState.MAINMENU;
else if ( IsLobby() || uiGlobal.loadedLevel == "mp_lobby" )
uis.gameState = eDiscordGameState.LOBBY;
else
uis.gameState = eDiscordGameState.INGAME;

uis.isLoading = uiGlobal.isLoading
uis.isLobby = IsLobby()
uis.loadingLevel = uiGlobal.loadingLevel
uis.loadedLevel = uiGlobal.loadedLevel
NSPushUIPresence(uis)
}
return uis
}
Loading

0 comments on commit f444c75

Please sign in to comment.