From f06e3c362f44a2338785098bb95b4e718a86c375 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 23 Jul 2016 11:47:50 +0200 Subject: [PATCH] 1.4.1: Fix bug in hb.change_hudbar being a no-op --- API.md | 2 +- README.md | 2 +- changelog.txt | 4 ++++ init.lua | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index 47b685b..8dd8f0e 100644 --- a/API.md +++ b/API.md @@ -1,4 +1,4 @@ -API documentation for the HUD bars mod 1.4.0 +API documentation for the HUD bars mod 1.4.1 ============================================ ## Introduction diff --git a/README.md b/README.md index 0edef3d..8fac884 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ this mod will place them accordingly. position should be displayed correctly on every screen size. ## Current version -The current version is 1.4.0. +The current version is 1.4.1. This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer standard. diff --git a/changelog.txt b/changelog.txt index 84d0552..8edab4e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -77,3 +77,7 @@ as of version 2.0.0 of the standard . ----- - Allow to change HUD bar images and label after it has been registered - Minor API.md correction + +1.4.1 +----- +- Fix bug in hb.change_hudbar being a no-op if new_value and new_max value are nil diff --git a/init.lua b/init.lua index 7421156..300778a 100644 --- a/init.lua +++ b/init.lua @@ -282,7 +282,7 @@ function hb.init_hudbar(player, identifier, start_value, start_max, start_hidden end function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color) - if new_value == nil and new_max_value == nil then + if new_value == nil and new_max_value == nil and new_icon == nil and new_bgicon == nil and new_bar == nil and new_label == nil and new_text_color == nil then return end