mcl_soy: create blocks of tofu

create nodes that are made from compressing tofu (for both the raw and
cooked version). also create cooking recipe between them.
This commit is contained in:
trans_soup 2023-07-17 14:02:30 +02:00
parent 754f902359
commit 2270ce3bc3
4 changed files with 44 additions and 1 deletions

View file

@ -2,6 +2,9 @@ local modname = minetest.get_current_modname()
local soy = modname .. ":soy"
local tofu_raw = modname .. ":tofu_raw"
local tofu_cooked = modname .. ":tofu_cooked"
local tofu_block_raw = modname .. ":tofu_block_raw"
local tofu_block_cooked = modname .. ":tofu_block_cooked"
minetest.register_craft({
output = tofu_raw,
@ -13,7 +16,17 @@ minetest.register_craft({
minetest.register_craft({
type = "cooking",
output = modname .. ":tofu_cooked",
output = tofu_cooked,
recipe = tofu_raw,
cooktime = 10,
})
mcl_vegan.register_compress_recipe(tofu_raw, tofu_block_raw)
mcl_vegan.register_compress_recipe(tofu_cooked, tofu_block_cooked)
minetest.register_craft({
type = "cooking",
output = tofu_block_cooked,
recipe = tofu_block_raw,
cooktime = 80,
})

View file

@ -21,3 +21,33 @@ mcl_vegan.register_basic_plant(modname, "soy", {
growth_chance = 20,
can_forage = true,
})
local function reg_tofu_block (name, desc, def)
bouncy = def.bouncy or 40
minetest.register_node(modname .. ":" .. name, {
description = desc,
paramtype = "none",
walkable = true,
drawtype = "normal",
tiles = { "mcl_soy_" .. name .. ".png" },
groups = {
dig_immediate = 2,
bouncy = bouncy,
fall_damage_add_percent = -80,
deco_block = 1,
},
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})
end
reg_tofu_block("tofu_block_raw", "Block of Raw Tofu", {
bouncy = 40,
})
reg_tofu_block("tofu_block_cooked", "Block of Tofu", {
bouncy = 60,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B