Skip to content

Commit 6b09ed3

Browse files
Merge branch 'main' into leech-change-team
2 parents 6bae3ba + 06fd34d commit 6b09ed3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+589
-87
lines changed

.gitattributes

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
/Northstar.Client/mod/resource/northstar_client_localisation_*.txt text diff working-tree-encoding=UTF-16LE-BOM
1+
/Northstar.Client/mod/resource/northstar_client_localisation_*.txt text diff working-tree-encoding=UTF-16LE-BOM
2+
3+
# Highlight `.gnut` like `.nut` files
4+
*.gnut linguist-language=Squirrel

.github/nativefuncs.json

+20-13
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,7 @@
421421
"helpText":"Returns whether or not a given path leads to a folder.",
422422
"returnTypeString":"bool",
423423
"argTypes":"string path"
424-
},
425-
{
426-
"name":"NSPushGameStateData",
427-
"helpText":"",
428-
"returnTypeString":"void",
429-
"argTypes":"struct gamestate"
430-
}
424+
}
431425
],
432426
"UI":[
433427
{
@@ -508,6 +502,25 @@
508502
"returnTypeString":"array<string>",
509503
"argTypes":"string modName"
510504
},
505+
{
506+
"name": "NSIsModDownloadable",
507+
"helpText": "checks whether a mod is verified and can be auto-downloaded",
508+
"returnTypeString": "bool",
509+
"argTypes": "string name, string version"
510+
511+
},
512+
{
513+
"name": "NSDownloadMod",
514+
"helpText": "downloads a given mod from distant API to local game profile",
515+
"returnTypeString": "void",
516+
"argTypes": "string name, string version"
517+
},
518+
{
519+
"name": "NSGetModInstallState",
520+
"helpText": "get status of the mod currently being installed",
521+
"returnTypeString": "ModInstallState",
522+
"argTypes": ""
523+
},
511524
{
512525
"name":"NSReloadMods",
513526
"helpText":"",
@@ -724,12 +737,6 @@
724737
"returnTypeString":"bool",
725738
"argTypes":"string path"
726739
},
727-
{
728-
"name":"NSPushUIPresence",
729-
"helpText":"",
730-
"returnTypeString":"void",
731-
"argTypes":"struct presence"
732-
},
733740
{
734741
"name":"NSGetMasterServerAuthResult",
735742
"helpText":"",

.github/workflows/add-to-project.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
issues:
55
types:
66
- opened
7+
pull_request_target:
8+
types:
9+
- opened
710

811
jobs:
912
add-to-project:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Merge Conflict Auto Label
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
triage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: mschilde/auto-label-merge-conflicts@master
12+
with:
13+
CONFLICT_LABEL_NAME: "merge conflicts"
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
MAX_RETRIES: 5
16+
WAIT_MS: 5000

Northstar.Client/mod.json

+8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"LoadPriority": 0,
66
"InitScript": "cl_northstar_client_init.nut",
77
"ConVars": [
8+
{
9+
"Name": "allow_mod_auto_download",
10+
"DefaultValue": "0"
11+
},
812
{
913
"Name": "filter_hide_empty",
1014
"DefaultValue": "0"
@@ -82,6 +86,10 @@
8286
"After": "NSUpdateGameStateClientStart"
8387
}
8488
},
89+
{
90+
"Path": "ui/menu_ns_moddownload.nut",
91+
"RunOn": "UI"
92+
},
8593
{
8694
"Path": "ui/menu_ns_serverbrowser.nut",
8795
"RunOn": "UI",

Northstar.Client/mod/resource/northstar_client_localisation_english.txt

+22
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
304304
"SHOW_ONLY_DISABLED" "Only Disabled"
305305
"SHOW_ONLY_NOT_REQUIRED" "Only Optional Mods"
306306
"SHOW_ONLY_REQUIRED" "Only Required Mods"
307+
"MOD_REQUIRED_WARNING" " : This mod may get (un)loaded when joining a server"
307308

308309
// Maps menu
309310
"HIDE_LOCKED" "Hide locked"
@@ -366,5 +367,26 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
366367
"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."
367368

368369
"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."
370+
371+
// Mod downloading
372+
"MISSING_MOD" "Missing mod \"%s1\" v%s2"
373+
"WRONG_MOD_VERSION" "Server has mod \"%s1\" v%s2 while you have v%s3"
374+
"MOD_NOT_VERIFIED" "(mod is not verified, and couldn't be downloaded automatically)"
375+
"MOD_DL_DISABLED" "(automatic mod downloading is disabled)"
376+
"DOWNLOADING_MOD_TITLE" "Downloading mod"
377+
"DOWNLOADING_MOD_TITLE_W_PROGRESS" "Downloading mod (%s1%)"
378+
"DOWNLOADING_MOD_TEXT" "Downloading %s1 v%s2..."
379+
"DOWNLOADING_MOD_TEXT_W_PROGRESS" "Downloading %s1 v%s2...\n(%s3/%s4 MB)"
380+
"CHECKSUMING_TITLE" "Checksuming mod"
381+
"CHECKSUMING_TEXT" "Verifying contents of %s1 v%s2..."
382+
"EXTRACTING_MOD_TITLE" "Extracting mod (%s1%)"
383+
"EXTRACTING_MOD_TEXT" "Extracting %s1 v%s2...\n(%s3/%s4 MB)"
384+
"FAILED_DOWNLOADING" "Failed downloading mod"
385+
"FAILED_READING_ARCHIVE" "An error occurred while reading mod archive."
386+
"FAILED_WRITING_TO_DISK" "An error occurred while extracting mod files to the filesystem."
387+
"MOD_FETCHING_FAILED" "Mod archive could not be downloaded from Thunderstore."
388+
"MOD_CORRUPTED" "Downloaded archive checksum does not match verified signature."
389+
"NO_DISK_SPACE_AVAILABLE" "There is not enough space on your disk."
390+
"MOD_FETCHING_FAILED_GENERAL" "Mod extraction failed. Check logs for more details."
369391
}
370392
}

Northstar.Client/mod/resource/northstar_client_localisation_french.txt

+4
Original file line numberDiff line numberDiff line change
@@ -353,5 +353,9 @@ Choisissez Oui si vous êtes d'accord. Ce choix peut être modifié à tout inst
353353
"TOGGLE_PROGRESSION" "Activer la progression"
354354
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Activer la progression"
355355
"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."
356+
"AUTHENTICATION_FAILED_HEADER" "Échec de l'authentification"
357+
"AUTHENTICATION_FAILED_HELP" "Aide"
358+
"AUTHENTICATION_FAILED_ERROR_CODE" "Code d'erreur : ^DB6F2C00%s1^"
359+
"AUTHENTICATION_FAILED_BODY" "L'authentification avec Atlas a échoué."
356360
}
357361
}

Northstar.Client/mod/resource/northstar_client_localisation_mspanish.txt

+30
Original file line numberDiff line numberDiff line change
@@ -319,5 +319,35 @@ Si estas de acuerdo con esto, presiona SI. Esta decision puede ser cambiada en e
319319
"INVALID_MASTERSERVER_TOKEN" "Token de jugador expirado o invalido"
320320
"JSON_PARSE_ERROR" "Error procesando respuesta json"
321321
"UNSUPPORTED_VERSION" "La versión que estas usando ya no esta soportada"
322+
"SHOW_ONLY_REQUIRED" "Solo Mods requeridos"
323+
"player_force_respawn" "Reaparición Forzada"
324+
"TOGGLE_PROGRESSION" "Alternar Progreso"
325+
"PROGRESSION_TOGGLE_ENABLED_HEADER" "Desactivar Progreso?"
326+
"NO_RESULTS" "No hay resultados."
327+
"NO_MODS" "No hay configuraciones disponibles! Instala mas mods en: ^5588FF00northstar.thunderstore.io^0."
328+
"AUTHENTICATION_FAILED_HEADER" "Verificacion fallida"
329+
"AUTHENTICATION_FAILED_BODY" "Autenticación fallada con Atlas!"
330+
"AUTHENTICATION_FAILED_ERROR_CODE" "Codigo de error: ^DB6F2C00%s1^"
331+
"AUTHENTICATION_FAILED_HELP" "Ayuda"
332+
"WILL_RESET_ALL_SETTINGS" "Esto reiniciará TODAS las configuraciones de categoría\nEsto no es reversible"
333+
"WILL_RESET_SETTING" "Esto revertirá %s1 a la configuracion por defecto. \n \nEsto no es revertible."
334+
"MOD_SETTINGS_SERVER" "Servidor"
335+
"MOD_SETTINGS_RESET" "Reiniciar"
336+
"MOD_SETTINGS_RESET_ALL" "Reiniciar todo"
337+
"MOD_REQUIRED_WARNING" " Este mod puede ser deshabilitado al entrar a un servidor"
338+
"MOD_SETTINGS" "Configuracion de Mods"
339+
"NORTHSTAR_BASE_SETTINGS" "Configuracion base de Northstar"
340+
"ONLY_HOST_MATCH_SETTINGS" "Solo el Host puede cambiar ajustes de partida"
341+
"ONLY_HOST_CAN_START_MATCH" "Solo el host puede iniciar la partida"
342+
"MATCH_COUNTDOWN_LENGTH" "Cuenta Atrás de partida privada"
343+
"LOG_UNKNOWN_CLIENTCOMMANDS" "Registro desconocido de comandos de cliente"
344+
"DISALLOWED_TACTICALS" "Tactica Prohibida"
345+
"TACTICAL_REPLACEMENT" "Reemplazo de Tactica"
346+
"DISALLOWED_WEAPONS" "Arma Prohibida"
347+
"REPLACEMENT_WEAPON" "Arma de Reemplazo"
348+
"SHOULD_RETURN_TO_LOBBY" "Volver al lobby al finalizar partida"
349+
"ARE_YOU_SURE" "Seguro?"
350+
"Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Alternar Progreso"
351+
"SHOW_ONLY_NOT_REQUIRED" "Solo Mods Opcionales"
322352
}
323353
}

Northstar.Client/mod/resource/ui/menus/modlist.menu

+2-2
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ resource/ui/menus/modlist.menu
488488
{
489489
ControlName Label
490490

491-
labelText " : This mod gets (un)loaded automatically"
492-
wide 500
491+
labelText "#MOD_REQUIRED_WARNING"
492+
auto_wide_tocontents 1
493493
tall 50
494494
visible 0
495495

Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
global enum eDiscordGameState
2+
{
3+
LOADING = 0
4+
MAINMENU
5+
LOBBY
6+
INGAME
7+
}
8+
19
global struct GameStateStruct {
210

311
string map
@@ -15,10 +23,7 @@ global struct GameStateStruct {
1523
}
1624

1725
global struct UIPresenceStruct {
18-
bool isLoading
19-
bool isLobby
20-
string loadingLevel
21-
string loadedLevel
26+
int gameState
2227
}
2328

2429
global struct RequiredModInfo
@@ -48,3 +53,11 @@ global struct MasterServerAuthResult
4853
string errorCode
4954
string errorMessage
5055
}
56+
57+
global struct ModInstallState
58+
{
59+
int status
60+
int progress
61+
int total
62+
float ratio
63+
}

Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
untyped
22
globalize_all_functions
33

4-
void function NorthstarCodeCallback_GenerateGameState() {
5-
6-
GameStateStruct gs
7-
4+
GameStateStruct function DiscordRPC_GenerateGameState( GameStateStruct gs )
5+
{
86
int highestScore = 0
97
int secondHighest = 0
108

@@ -40,6 +38,5 @@ void function NorthstarCodeCallback_GenerateGameState() {
4038
gs.timeEnd = expect float(level.nv.roundEndTime - Time())
4139
else
4240
gs.timeEnd = expect float(level.nv.gameEndTime - Time())
43-
44-
NSPushGameStateData(gs)
45-
}
41+
return gs
42+
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
untyped
22
globalize_all_functions
33

4-
void function NorthstarCodeCallback_GenerateUIPresence() {
5-
UIPresenceStruct uis
4+
UIPresenceStruct function DiscordRPC_GenerateUIPresence( UIPresenceStruct uis )
5+
{
6+
if ( uiGlobal.isLoading )
7+
uis.gameState = eDiscordGameState.LOADING;
8+
else if ( uiGlobal.loadedLevel == "" )
9+
uis.gameState = eDiscordGameState.MAINMENU;
10+
else if ( IsLobby() || uiGlobal.loadedLevel == "mp_lobby" )
11+
uis.gameState = eDiscordGameState.LOBBY;
12+
else
13+
uis.gameState = eDiscordGameState.INGAME;
614

7-
uis.isLoading = uiGlobal.isLoading
8-
uis.isLobby = IsLobby()
9-
uis.loadingLevel = uiGlobal.loadingLevel
10-
uis.loadedLevel = uiGlobal.loadedLevel
11-
NSPushUIPresence(uis)
12-
}
15+
return uis
16+
}

Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ void function ConnectWithPassword( var button )
5656
if ( GetTopNonDialogMenu() == file.menu )
5757
{
5858
TriggerConnectToServerCallbacks()
59-
thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( file.menu, "EnterPasswordBox" ) ) )
59+
thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( file.menu, "EnterPasswordBox" ) ), true )
6060
}
6161
}

0 commit comments

Comments
 (0)