1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2024-11-10 20:30:31 +01:00

better mineclone support

This commit is contained in:
tenplus1 2024-08-12 08:02:50 +01:00
parent f3a7e9350f
commit 09b06ea72a
5 changed files with 54 additions and 37 deletions

View File

@ -12,7 +12,7 @@ local S = minetest.get_translator("farming")
farming = { farming = {
mod = "redo", mod = "redo",
version = "20240811", version = "20240812",
path = minetest.get_modpath("farming"), path = minetest.get_modpath("farming"),
select = { select = {
type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5} type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
@ -735,7 +735,7 @@ end
-- recipe item list and alternatives -- recipe item list and alternatives
dofile(farming.path .. "/items_list.lua") dofile(farming.path .. "/item_list.lua")
-- important items -- important items
@ -816,8 +816,8 @@ ddoo("ginger.lua", farming.ginger)
-- register food items, non-food items, recipes and stairs -- register food items, non-food items, recipes and stairs
dofile(farming.path .. "/items_non_food.lua") dofile(farming.path .. "/item_non_food.lua")
dofile(farming.path .. "/items_food.lua") dofile(farming.path .. "/item_food.lua")
dofile(farming.path .. "/item_recipes.lua") dofile(farming.path .. "/item_recipes.lua")
dofile(farming.path .. "/item_stairs.lua") dofile(farming.path .. "/item_stairs.lua")

View File

@ -3,6 +3,7 @@ local S = minetest.get_translator("farming")
local a = farming.recipe_items local a = farming.recipe_items
-- Flour -- Flour
minetest.register_craftitem("farming:flour", { minetest.register_craftitem("farming:flour", {
description = S("Flour"), description = S("Flour"),
inventory_image = "farming_flour.png", inventory_image = "farming_flour.png",
@ -10,14 +11,18 @@ minetest.register_craftitem("farming:flour", {
}) })
-- Bread -- Bread
minetest.register_craftitem("farming:bread", {
description = S("Bread"),
inventory_image = "farming_bread.png",
on_use = minetest.item_eat(5),
groups = {food_bread = 1}
})
farming.add_eatable("farming:bread", 5) if not farming.mcl then
minetest.register_craftitem("farming:bread", {
description = S("Bread"),
inventory_image = "farming_bread.png",
on_use = minetest.item_eat(5),
groups = {food_bread = 1}
})
farming.add_eatable("farming:bread", 5)
end
-- Garlic bulb -- Garlic bulb
@ -124,13 +129,16 @@ end
-- Chocolate cookie -- Chocolate cookie
minetest.register_craftitem("farming:cookie", { if not farming.mcl then
description = S("Cookie"),
inventory_image = "farming_cookie.png",
on_use = minetest.item_eat(2)
})
farming.add_eatable("farming:cookie", 2) minetest.register_craftitem("farming:cookie", {
description = S("Cookie"),
inventory_image = "farming_cookie.png",
on_use = minetest.item_eat(2)
})
farming.add_eatable("farming:cookie", 2)
end
-- Bar of of dark chocolate (thx to Ice Pandora for her deviantart.com chocolate tutorial) -- Bar of of dark chocolate (thx to Ice Pandora for her deviantart.com chocolate tutorial)
minetest.register_craftitem("farming:chocolate_dark", { minetest.register_craftitem("farming:chocolate_dark", {

View File

@ -3,14 +3,17 @@ local a = farming.recipe_items
-- flour recipes -- flour recipes
minetest.register_craft({ if not farming.mcl then
output = "farming:flour",
recipe = { minetest.register_craft({
{"farming:wheat", "farming:wheat", "farming:wheat"}, output = "farming:flour",
{"farming:wheat", a.mortar_pestle, ""} recipe = {
}, {"farming:wheat", "farming:wheat", "farming:wheat"},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} {"farming:wheat", a.mortar_pestle, ""}
}) },
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})
end
minetest.register_craft({ minetest.register_craft({
output = "farming:flour", output = "farming:flour",
@ -62,12 +65,15 @@ minetest.register_craft({
-- bread -- bread
minetest.register_craft({ if not farming.mcl then
type = "cooking",
cooktime = 15, minetest.register_craft({
output = "farming:bread", type = "cooking",
recipe = "farming:flour" cooktime = 15,
}) output = "farming:bread",
recipe = "farming:flour"
})
end
-- sliced bread -- sliced bread
@ -213,12 +219,15 @@ minetest.register_craft( {
-- chocolate cookie -- chocolate cookie
minetest.register_craft( { if not farming.mcl then
output = "farming:cookie 8",
recipe = { minetest.register_craft( {
{"group:food_wheat", "group:food_cocoa", "group:food_wheat" } output = "farming:cookie 8",
} recipe = {
}) {"group:food_wheat", "group:food_cocoa", "group:food_wheat" }
}
})
end
-- chocolate block -- chocolate block