1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2025-06-29 14:50:52 +02:00

tidy code

This commit is contained in:
tenplus1
2024-07-27 08:23:46 +01:00
parent 75e3f9fb42
commit b61998217d
39 changed files with 59 additions and 62 deletions

View File

@ -7,7 +7,7 @@
farming = {
mod = "redo",
version = "20240726",
version = "20240727",
path = minetest.get_modpath("farming"),
select = {
type = "fixed",
@ -777,11 +777,13 @@ function farming.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})