mirror of
https://github.com/R2Northstar/NorthstarMods
synced 2026-08-25 12:29:17 -04:00
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:
parent
5b6675b0a0
commit
d15a117eb3
6 changed files with 46 additions and 25 deletions
28
.github/nativefuncs.json → .github/natives.json
vendored
28
.github/nativefuncs.json → .github/natives.json
vendored
|
|
@ -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":[
|
"SERVER":[
|
||||||
{
|
{
|
||||||
"name":"NSGetModNames",
|
"name":"NSGetModNames",
|
||||||
|
|
@ -649,4 +675,4 @@
|
||||||
"argTypes":""
|
"argTypes":""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
20
.github/workflows/compile-check.yml
vendored
20
.github/workflows/compile-check.yml
vendored
|
|
@ -16,15 +16,7 @@ jobs:
|
||||||
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
|
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
|
||||||
with:
|
with:
|
||||||
mods-directory: "${{ github.workspace }}/mods"
|
mods-directory: "${{ github.workspace }}/mods"
|
||||||
native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json"
|
native-json: "${{ github.workspace }}/mods/.github/natives.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
|
|
||||||
|
|
||||||
# It's important that scripts compile when Northstar.Custom isn't enabled/installed, so run again without it
|
# It's important that scripts compile when Northstar.Custom isn't enabled/installed, so run again without it
|
||||||
- name: Remove Northstar.Custom
|
- name: Remove Northstar.Custom
|
||||||
|
|
@ -35,12 +27,4 @@ jobs:
|
||||||
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
|
uses: ASpoonPlaysGames/squirrel-re-compiler@v3
|
||||||
with:
|
with:
|
||||||
mods-directory: "${{ github.workspace }}/mods"
|
mods-directory: "${{ github.workspace }}/mods"
|
||||||
native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json"
|
native-json: "${{ github.workspace }}/mods/.github/natives.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
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"Name": "Northstar.Client",
|
"Name": "Northstar.Client",
|
||||||
"Description": "Various ui and client changes to fix bugs and add better support for mods",
|
"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,
|
"LoadPriority": 0,
|
||||||
"InitScript": "cl_northstar_client_init.nut",
|
"InitScript": "cl_northstar_client_init.nut",
|
||||||
"ConVars": [
|
"ConVars": [
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,19 @@ global function NS_SetVersionLabel
|
||||||
|
|
||||||
void function NS_SetVersionLabel()
|
void function NS_SetVersionLabel()
|
||||||
{
|
{
|
||||||
var mainMenu = GetMenu( "MainMenu" ) //Gets main menu element
|
var mainMenu = GetMenu( "MainMenu" )
|
||||||
var versionLabel = GetElementsByClassname( mainMenu, "nsVersionClass" )[0] //Gets the label from the mainMenu element.
|
var versionLabel = GetElementsByClassname( mainMenu, "nsVersionClass" )[0]
|
||||||
Hud_SetText( versionLabel, "v" + NSGetModInformation( "Northstar.Client" )[0].version ) //Sets the label text (Getting Northstar version from Northstar.Client)
|
// 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 )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"Name": "Northstar.Custom",
|
"Name": "Northstar.Custom",
|
||||||
"Description": "Custom content for Northstar: extra weapons, gamemodes, etc.",
|
"Description": "Custom content for Northstar: extra weapons, gamemodes, etc.",
|
||||||
"Version": "1.19.0",
|
"Version": "0.0.0.1+dev",
|
||||||
"LoadPriority": 1,
|
"LoadPriority": 1,
|
||||||
"RequiredOnClient": true,
|
"RequiredOnClient": true,
|
||||||
"ConVars": [
|
"ConVars": [
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"Name": "Northstar.CustomServers",
|
"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",
|
"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,
|
"LoadPriority": 0,
|
||||||
"ConVars": [
|
"ConVars": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue