From 79c85e0551b3dfeeceddcd7ddd8623413398fdde Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 27 Jul 2024 08:33:22 +0100 Subject: [PATCH] code tidy --- crafts.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crafts.lua b/crafts.lua index d243107..f6b6c80 100644 --- a/crafts.lua +++ b/crafts.lua @@ -13,11 +13,13 @@ function mobs.add_eatable(item, hp) if def then local grps = def.groups or {} + local txt = " (" ; if hp > 0 then txt = txt .. "+" end + txt = txt .. hp .. " HP)" grps.eatable = hp ; grps.flammable = 2 if mod_tt_base == nil then - def.description = def.description .. " (♥" .. hp .. ")" + def.description = def.description .. txt end minetest.override_item(item, {description = def.description, groups = grps})