avoid crash due to comparing the wrong thing
This commit is contained in:
parent
08588a6823
commit
366cbfe52a
@ -11,8 +11,9 @@ balanced_diet.diet_hud = futil.define_hud("balanced_diet:diet", {
|
|||||||
|
|
||||||
for item, remaining in pairs(eaten) do
|
for item, remaining in pairs(eaten) do
|
||||||
local description = futil.get_safe_short_description(item)
|
local description = futil.get_safe_short_description(item)
|
||||||
|
description = f("%s: %.0f", description, remaining)
|
||||||
|
lines[#lines + 1] = description
|
||||||
item_name_by_description[description] = item:match("^[^:]:(.*)$") or item
|
item_name_by_description[description] = item:match("^[^:]:(.*)$") or item
|
||||||
lines[#lines + 1] = f("%s: %.0f", description, remaining)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
table.sort(lines, function(a, b)
|
table.sort(lines, function(a, b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user