Mods in den Spieleordner reingeschoben. So richtig tief.
This commit is contained in:
parent
b4b6c08f4f
commit
f7bc25a670
1674 changed files with 56056 additions and 530 deletions
25
mods/tt_food/init.lua
Normal file
25
mods/tt_food/init.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local path = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
dofile(path .. "/redistribution.lua")
|
||||
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
local desc
|
||||
local eatable = def.groups.eatable
|
||||
|
||||
if eatable and def.on_use then
|
||||
local prefix = ""
|
||||
|
||||
if eatable > 0 then
|
||||
prefix = "+"
|
||||
end
|
||||
|
||||
desc = S("Food item")
|
||||
local msg = prefix .. S("@1 food points", eatable)
|
||||
desc = desc .. "\n" .. msg
|
||||
end
|
||||
|
||||
return desc
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue