diff --git a/.github/nativefuncs.json b/.github/natives.json similarity index 98% rename from .github/nativefuncs.json rename to .github/natives.json index 059c0302..59aecd85 100644 --- a/.github/nativefuncs.json +++ b/.github/natives.json @@ -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":"" } ] -} \ No newline at end of file +} diff --git a/.github/workflows/compile-check.yml b/.github/workflows/compile-check.yml index c0fe8687..ea7f1743 100644 --- a/.github/workflows/compile-check.yml +++ b/.github/workflows/compile-check.yml @@ -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" diff --git a/Northstar.Client/mod.json b/Northstar.Client/mod.json index da39d3e8..642e8646 100644 --- a/Northstar.Client/mod.json +++ b/Northstar.Client/mod.json @@ -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": [ diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut index afba8a70..b02515bd 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut @@ -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 ) + } diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json index 69432f49..a6f8c640 100644 --- a/Northstar.Custom/mod.json +++ b/Northstar.Custom/mod.json @@ -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": [ diff --git a/Northstar.CustomServers/mod.json b/Northstar.CustomServers/mod.json index 6735306e..4022e1c0 100644 --- a/Northstar.CustomServers/mod.json +++ b/Northstar.CustomServers/mod.json @@ -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": [ {