Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Stable v1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
frothy-wifi committed Apr 17, 2024
1 parent 67b0ee4 commit a0d1b61
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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]*
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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": []
Expand Down
2 changes: 1 addition & 1 deletion mods/FrothyWiFi.CYNHUD/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 6 additions & 2 deletions mods/FrothyWiFi.CYNHUD/mod/scripts/vscripts/cynhud.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
}
Expand All @@ -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");
Expand Down

0 comments on commit a0d1b61

Please sign in to comment.