Version display changes (#931)

* Add separate text for main menu version if versions don't match

* move mods over to dev version strings, surely this wont break the release pipeline :clueless:

* Change wording of menu text a little

* Rename nativefuncs.json to natives.json

* Update native JSON file path in compile-check.yml

* Add constants

* Remove vanilla compile steps as they didn't work anyway

---------

Co-authored-by: Rémy Raes <contact@remyraes.com>
This commit is contained in:
Jack 2025-11-28 19:04:31 +00:00 committed by GitHub
parent 5b6675b0a0
commit d15a117eb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 46 additions and 25 deletions

View file

@ -1,4 +1,30 @@
{
"CONSTS":[
{
"name": "VANILLA",
"value": 0
},
{
"name": "MAX_FOLDER_SIZE",
"value": 1024
},
{
"name": "NS_VERSION_MAJOR",
"value": 0
},
{
"name": "NS_VERSION_MINOR",
"value": 0
},
{
"name": "NS_VERSION_PATCH",
"value": 0
},
{
"name": "NS_VERSION_DEV",
"value": 1
}
],
"SERVER":[
{
"name":"NSGetModNames",
@ -649,4 +675,4 @@
"argTypes":""
}
]
}
}

View file

@ -16,15 +16,7 @@ jobs:
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
with:
mods-directory: "${{ github.workspace }}/mods"
native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json"
vanilla: false
- name: Compile Scripts (Vanilla)
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
with:
mods-directory: "${{ github.workspace }}/mods"
native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json"
vanilla: true
native-json: "${{ github.workspace }}/mods/.github/natives.json"
# It's important that scripts compile when Northstar.Custom isn't enabled/installed, so run again without it
- name: Remove Northstar.Custom
@ -35,12 +27,4 @@ jobs:
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
with:
mods-directory: "${{ github.workspace }}/mods"
native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json"
vanilla: false
- name: Compile Scripts (Vanilla, No Northstar.Custom)
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
with:
mods-directory: "${{ github.workspace }}/mods"
native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json"
vanilla: true
native-json: "${{ github.workspace }}/mods/.github/natives.json"

View file

@ -1,7 +1,7 @@
{
"Name": "Northstar.Client",
"Description": "Various ui and client changes to fix bugs and add better support for mods",
"Version": "1.19.0",
"Version": "0.0.0.1+dev",
"LoadPriority": 0,
"InitScript": "cl_northstar_client_init.nut",
"ConVars": [

View file

@ -3,8 +3,19 @@ global function NS_SetVersionLabel
void function NS_SetVersionLabel()
{
var mainMenu = GetMenu( "MainMenu" ) //Gets main menu element
var versionLabel = GetElementsByClassname( mainMenu, "nsVersionClass" )[0] //Gets the label from the mainMenu element.
Hud_SetText( versionLabel, "v" + NSGetModInformation( "Northstar.Client" )[0].version ) //Sets the label text (Getting Northstar version from Northstar.Client)
var mainMenu = GetMenu( "MainMenu" )
var versionLabel = GetElementsByClassname( mainMenu, "nsVersionClass" )[0]
// construct first version string from Northstar.Client version
string modsVersionString = "v" + NSGetModInformation( "Northstar.Client" )[0].version
// construct second version string from constants given by native
string nativeVersionString = "v" + NS_VERSION_MAJOR + "." + NS_VERSION_MINOR + "." + NS_VERSION_PATCH
if ( NS_VERSION_DEV > 0 )
nativeVersionString += "." + NS_VERSION_DEV + "+dev"
if ( nativeVersionString != modsVersionString )
Hud_SetText( versionLabel, "Core: " + modsVersionString + "\nLauncher: " + nativeVersionString )
else
Hud_SetText( versionLabel, modsVersionString )
}

View file

@ -1,7 +1,7 @@
{
"Name": "Northstar.Custom",
"Description": "Custom content for Northstar: extra weapons, gamemodes, etc.",
"Version": "1.19.0",
"Version": "0.0.0.1+dev",
"LoadPriority": 1,
"RequiredOnClient": true,
"ConVars": [

View file

@ -1,7 +1,7 @@
{
"Name": "Northstar.CustomServers",
"Description": "Attempts to recreate the behaviour of vanilla Titanfall 2 servers, as well as changing some scripts to allow better support for mods",
"Version": "1.19.0",
"Version": "0.0.0.1+dev",
"LoadPriority": 0,
"ConVars": [
{