revert(client/main): Go back to table.insert for GetStatusData

Not even sure why I did it as size+1 and not i; but doesn't seem to work with index anyway.
Fixes nil value after dying
This commit is contained in:
Linden
2021-06-07 11:14:54 +10:00
committed by GitHub
parent 6aed226671
commit acb264c027
+4 -4
View File
@@ -13,19 +13,19 @@ function GetStatusData(minimal)
for i=1, #Status, 1 do
if minimal then
status[#status+1] = {
table.insert(status, {
name = Status[i].name,
val = Status[i].val,
percent = (Status[i].val / Config.StatusMax) * 100
}
})
else
status[#status+1] {
table.insert(status, {
name = Status[i].name,
val = Status[i].val,
color = Status[i].color,
visible = Status[i].visible(Status[i]),
percent = (Status[i].val / Config.StatusMax) * 100
}
})
end
end