diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b9916c..9edd6d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -# v1.4.3 *[Patch]* +# v1.4.4 *[Patch]* +- Fix fetching and showing latest update changes even on latest version +## v1.4.3 *[Patch]* - Use the new [CYNHUD Update Agent API](https://cynhud.api.frothywifi.cc) - Aesthetical changes (basically just update style) ## v1.4.2 *[Patch]* @@ -12,7 +14,7 @@ - Added automatic update checking! ## v1.3 - Added control messages to confirm that your changes have been noticed by the mod -- Commandds +- Commands ## v1.2.1 - Added a new logo ## v1.2 diff --git a/manifest.json b/manifest.json index 7c2a7a4..db1cfe7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "CYNHUD", - "version_number": "1.4.3", + "version_number": "1.4.4", "website_url": "https://github.com/frothy-wifi/CYNHUD", "description": "Adds an easily customizable (through Mod Settings) message to your HUD and useful game commands.", "dependencies": [] diff --git a/mods/FrothyWiFi.CYNHUD/mod.json b/mods/FrothyWiFi.CYNHUD/mod.json index b669a22..0f232ea 100755 --- a/mods/FrothyWiFi.CYNHUD/mod.json +++ b/mods/FrothyWiFi.CYNHUD/mod.json @@ -3,7 +3,7 @@ "Description": "Adds an easily customizable (through Mod Settings) message to your HUD and useful game commands.", "LoadPriority": 2, "RequiredOnClient": false, - "Version": "1.4.3", + "Version": "1.4.4", "ConVars": [ { "Name": "ch_hud_message", diff --git a/mods/FrothyWiFi.CYNHUD/mod/scripts/vscripts/cynhud.nut b/mods/FrothyWiFi.CYNHUD/mod/scripts/vscripts/cynhud.nut index b00deac..54eb26d 100755 --- a/mods/FrothyWiFi.CYNHUD/mod/scripts/vscripts/cynhud.nut +++ b/mods/FrothyWiFi.CYNHUD/mod/scripts/vscripts/cynhud.nut @@ -5,13 +5,14 @@ var rui = null; string mapName = ""; string message = ""; string messagePos = ""; -string version = "1.4.3"; +string version = "1.4.4"; bool reloadRequest = false; bool shouldShowWelcomeText = true; // Threading required (use `thread`) void function CynHud_CheckForUpdates() { Assert(IsNewThread(), "CynHud_CheckForUpdates method requires threading"); + FlagInit("CynHudFetchUpdateChanges"); FlagInit("CynHudUpdateCheckP1Success"); FlagInit("CynHudUpdateCheckP2Done"); FlagInit("CynHudUpdateCheckP1Failed"); @@ -20,10 +21,13 @@ void function CynHud_CheckForUpdates() { string webVersion = response.body; if (version[0] < webVersion[0]) { CynHud_WriteChatMessage("\x1b[113mNew major update!\x1b[0m Update using your \x1b[111mmod manager\x1b[0m, \x1b[111mThunderstore\x1b[0m, or \x1b[111mGitHub\x1b[0m. (v" + webVersion + ")"); + FlagSet("CynHudFetchUpdateChanges"); } else if (version[2] < webVersion[2]) { CynHud_WriteChatMessage("\x1b[113mNew update:\x1b[0m Update using your \x1b[111mmod manager\x1b[0m, \x1b[111mThunderstore\x1b[0m, or \x1b[111mGitHub\x1b[0m. (v" + webVersion + ")"); + FlagSet("CynHudFetchUpdateChanges"); } else if (version[4] < webVersion[4]) { CynHud_WriteChatMessage("\x1b[113mNew patch:\x1b[0m Update using your \x1b[111mmod manager\x1b[0m, \x1b[111mThunderstore\x1b[0m, or \x1b[111mGitHub\x1b[0m. (v" + webVersion + ")"); + FlagSet("CynHudFetchUpdateChanges"); } FlagSet("CynHudUpdateCheckP1Success"); } @@ -47,7 +51,7 @@ void function CynHud_CheckForUpdates() { } FlagWait("CynHudUpdateCheckP1Success"); - if (Flag("CynHudUpdateCheckP1Success")) { + if (Flag("CynHudUpdateCheckP1Success") && Flag("CynHudFetchUpdateChanges")) { onSuccess = void function(HttpRequestResponse response) { CynHud_WriteChatMessage("\x1b[113mChanges/fixes:\x1b[0m " + response.body); FlagSet("CynHudUpdateCheckP2Done");