Enforce stricter type compliance for HUD elements (#602)

This commit is contained in:
LoneWolfHT 2020-05-05 10:07:37 -07:00 committed by GitHub
parent 266fdd5a07
commit 8cf0a1648b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 14 deletions

View file

@ -27,7 +27,7 @@ local function update(name)
for i, def in ipairs(temp) do
-- If not the top-most element, prefix with "+ "
local text = def.value
local text = tostring(def.value)
if i > 1 then
text = "+ " .. text
end
@ -41,7 +41,7 @@ local function update(name)
alignment = {x = 0, y = 0},
position = {x = 0.5, y = 0.6},
offset = {x = 0, y = i * 20},
number = def.color,
number = tonumber(def.color),
text = text
})
end