code tidy
This commit is contained in:
parent
191d4acb90
commit
9aa9fb2d58
4
init.lua
4
init.lua
@ -80,11 +80,13 @@ function wine.add_eatable(item, hp)
|
|||||||
if def then
|
if def then
|
||||||
|
|
||||||
local grps = def.groups or {}
|
local grps = def.groups or {}
|
||||||
|
local txt = " (" ; if hp > 0 then txt = txt .. "+" end
|
||||||
|
txt = txt .. hp .. " HP)"
|
||||||
|
|
||||||
grps.eatable = hp ; grps.flammable = 2
|
grps.eatable = hp ; grps.flammable = 2
|
||||||
|
|
||||||
if mod_tt_base == nil then
|
if mod_tt_base == nil then
|
||||||
def.description = def.description .. " (♥" .. hp .. ")"
|
def.description = def.description .. txt
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.override_item(item, {description = def.description, groups = grps})
|
minetest.override_item(item, {description = def.description, groups = grps})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user