diff options
author | rubenwardy <rubenwardy@gmail.com> | 2016-08-01 21:04:00 +0100 |
---|---|---|
committer | rubenwardy <rubenwardy@gmail.com> | 2016-08-01 21:04:00 +0100 |
commit | f6515c12b8f042a27763d7542656ad3be1cffb9a (patch) | |
tree | 415d05300aa3c5e542dd51d0e4e714409e394537 | |
parent | 00eeeb3eef3d5f57f6d01d2adf655f539c1a3f8e (diff) |
Stop progress bars going out of bounds
Fixes #21
-rw-r--r-- | api.lua | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -335,6 +335,9 @@ function awards.getFormspec(name, to, sid) label = res.label end if perc then + if perc > 1 then + perc = 1 + end formspec = formspec .. "background[0,4.80;" .. barwidth ..",0.25;awards_progress_gray.png]" formspec = formspec .. "background[0,4.80;" .. (barwidth * perc) ..",0.25;awards_progress_green.png]" if label then |