Move crafting, cooking and fuel recipes into corresponding files

This commit is contained in:
An0n3m0us 2020-01-01 01:38:06 +00:00 committed by Paramat
parent 1082466796
commit 6e32287a42
6 changed files with 416 additions and 406 deletions

@ -318,3 +318,39 @@ default.chest.register_chest("chest_locked", {
groups = {choppy = 2, oddly_breakable_by_hand = 2},
protected = true,
})
minetest.register_craft({
output = "default:chest",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
minetest.register_craft({
output = "default:chest_locked",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "default:steel_ingot", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
minetest.register_craft( {
type = "shapeless",
output = "default:chest_locked",
recipe = {"default:chest", "default:steel_ingot"},
})
minetest.register_craft({
type = "fuel",
recipe = "default:chest",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "default:chest_locked",
burntime = 30,
})

@ -56,13 +56,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:stick 4",
recipe = {
{"group:wood"},
}
})
minetest.register_craft({
output = "default:sign_wall_steel 3",
recipe = {
@ -81,55 +74,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:torch 4",
recipe = {
{"default:coal_lump"},
{"group:stick"},
}
})
minetest.register_craft({
output = "default:skeleton_key",
recipe = {
{"default:gold_ingot"},
}
})
minetest.register_craft({
output = "default:chest",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
minetest.register_craft({
output = "default:chest_locked",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "default:steel_ingot", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
minetest.register_craft( {
type = "shapeless",
output = "default:chest_locked",
recipe = {"default:chest", "default:steel_ingot"},
})
minetest.register_craft({
output = "default:furnace",
recipe = {
{"group:stone", "group:stone", "group:stone"},
{"group:stone", "", "group:stone"},
{"group:stone", "group:stone", "group:stone"},
}
})
minetest.register_craft({
output = "default:coalblock",
recipe = {
@ -139,13 +83,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:coal_lump 9",
recipe = {
{"default:coalblock"},
}
})
minetest.register_craft({
output = "default:steelblock",
recipe = {
@ -155,13 +92,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:steel_ingot 9",
recipe = {
{"default:steelblock"},
}
})
minetest.register_craft({
output = "default:copperblock",
recipe = {
@ -171,13 +101,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:copper_ingot 9",
recipe = {
{"default:copperblock"},
}
})
minetest.register_craft({
output = "default:tinblock",
recipe = {
@ -187,22 +110,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:tin_ingot 9",
recipe = {
{"default:tinblock"},
}
})
minetest.register_craft({
output = "default:bronze_ingot 9",
recipe = {
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
}
})
minetest.register_craft({
output = "default:bronzeblock",
recipe = {
@ -228,13 +135,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:gold_ingot 9",
recipe = {
{"default:goldblock"},
}
})
minetest.register_craft({
output = "default:diamondblock",
recipe = {
@ -244,13 +144,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:diamond 9",
recipe = {
{"default:diamondblock"},
}
})
minetest.register_craft({
output = "default:sandstone",
recipe = {
@ -355,13 +248,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:clay_lump 4",
recipe = {
{"default:clay"},
}
})
minetest.register_craft({
output = "default:brick",
recipe = {
@ -370,29 +256,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:clay_brick 4",
recipe = {
{"default:brick"},
}
})
minetest.register_craft({
output = "default:paper",
recipe = {
{"default:papyrus", "default:papyrus", "default:papyrus"},
}
})
minetest.register_craft({
output = "default:book",
recipe = {
{"default:paper"},
{"default:paper"},
{"default:paper"},
}
})
minetest.register_craft({
output = "default:bookshelf",
recipe = {
@ -429,29 +292,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:mese_crystal 9",
recipe = {
{"default:mese"},
}
})
minetest.register_craft({
output = "default:mese_crystal_fragment 9",
recipe = {
{"default:mese_crystal"},
}
})
minetest.register_craft({
output = "default:mese_crystal",
recipe = {
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
}
})
minetest.register_craft({
output = "default:meselamp",
recipe = {
@ -469,13 +309,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:obsidian_shard 9",
recipe = {
{"default:obsidian"}
}
})
minetest.register_craft({
output = "default:obsidian",
recipe = {
@ -615,50 +448,6 @@ minetest.register_craft({
recipe = "default:desert_cobble",
})
minetest.register_craft({
type = "cooking",
output = "default:steel_ingot",
recipe = "default:iron_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:copper_ingot",
recipe = "default:copper_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:tin_ingot",
recipe = "default:tin_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:gold_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:clay_brick",
recipe = "default:clay_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:skeleton_key",
cooktime = 5,
})
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:key",
cooktime = 5,
})
--
-- Fuels
@ -787,7 +576,6 @@ minetest.register_craft({
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "default:fence_aspen_wood",
@ -849,7 +637,6 @@ minetest.register_craft({
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "default:bush_stem",
@ -916,36 +703,12 @@ minetest.register_craft({
burntime = 60,
})
minetest.register_craft({
type = "fuel",
recipe = "default:torch",
burntime = 4,
})
minetest.register_craft({
type = "fuel",
recipe = "default:sign_wall_wood",
burntime = 10,
})
minetest.register_craft({
type = "fuel",
recipe = "default:chest",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "default:chest_locked",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "default:coal_lump",
burntime = 40,
})
minetest.register_craft({
type = "fuel",
recipe = "default:coalblock",
@ -976,57 +739,8 @@ minetest.register_craft({
burntime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "default:paper",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "default:book",
burntime = 3,
})
minetest.register_craft({
type = "fuel",
recipe = "default:book_written",
burntime = 3,
})
minetest.register_craft({
type = "fuel",
recipe = "default:dry_shrub",
burntime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "group:stick",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "default:pick_wood",
burntime = 6,
})
minetest.register_craft({
type = "fuel",
recipe = "default:shovel_wood",
burntime = 4,
})
minetest.register_craft({
type = "fuel",
recipe = "default:axe_wood",
burntime = 6,
})
minetest.register_craft({
type = "fuel",
recipe = "default:sword_wood",
burntime = 5,
})

@ -3,19 +3,6 @@
-- support for MT game translation.
local S = default.get_translator
minetest.register_craftitem("default:stick", {
description = S("Stick"),
inventory_image = "default_stick.png",
groups = {stick = 1, flammable = 2},
})
minetest.register_craftitem("default:paper", {
description = S("Paper"),
inventory_image = "default_paper.png",
groups = {flammable = 3},
})
local lpp = 14 -- Lines per book's page
local function book_on_use(itemstack, user)
local player_name = user:get_player_name()
@ -158,27 +145,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
player:set_wielded_item(stack)
end)
minetest.register_craftitem("default:book", {
description = S("Book"),
inventory_image = "default_book.png",
groups = {book = 1, flammable = 3},
on_use = book_on_use,
})
minetest.register_craftitem("default:book_written", {
description = S("Book with Text"),
inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1,
on_use = book_on_use,
})
minetest.register_craft({
type = "shapeless",
output = "default:book_written",
recipe = {"default:book", "default:book_written"}
})
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
if itemstack:get_name() ~= "default:book_written" then
return
@ -258,91 +224,9 @@ minetest.register_craftitem("default:skeleton_key", {
end
})
minetest.register_craftitem("default:coal_lump", {
description = S("Coal Lump"),
inventory_image = "default_coal_lump.png",
groups = {coal = 1, flammable = 1}
})
minetest.register_craftitem("default:iron_lump", {
description = S("Iron Lump"),
inventory_image = "default_iron_lump.png"
})
minetest.register_craftitem("default:copper_lump", {
description = S("Copper Lump"),
inventory_image = "default_copper_lump.png"
})
minetest.register_craftitem("default:tin_lump", {
description = S("Tin Lump"),
inventory_image = "default_tin_lump.png"
})
minetest.register_craftitem("default:mese_crystal", {
description = S("Mese Crystal"),
inventory_image = "default_mese_crystal.png",
})
minetest.register_craftitem("default:gold_lump", {
description = S("Gold Lump"),
inventory_image = "default_gold_lump.png"
})
minetest.register_craftitem("default:diamond", {
description = S("Diamond"),
inventory_image = "default_diamond.png",
})
minetest.register_craftitem("default:clay_lump", {
description = S("Clay Lump"),
inventory_image = "default_clay_lump.png",
})
minetest.register_craftitem("default:steel_ingot", {
description = S("Steel Ingot"),
inventory_image = "default_steel_ingot.png"
})
minetest.register_craftitem("default:copper_ingot", {
description = S("Copper Ingot"),
inventory_image = "default_copper_ingot.png"
})
minetest.register_craftitem("default:tin_ingot", {
description = S("Tin Ingot"),
inventory_image = "default_tin_ingot.png"
})
minetest.register_craftitem("default:bronze_ingot", {
description = S("Bronze Ingot"),
inventory_image = "default_bronze_ingot.png"
})
minetest.register_craftitem("default:gold_ingot", {
description = S("Gold Ingot"),
inventory_image = "default_gold_ingot.png"
})
minetest.register_craftitem("default:mese_crystal_fragment", {
description = S("Mese Crystal Fragment"),
inventory_image = "default_mese_crystal_fragment.png",
})
minetest.register_craftitem("default:clay_brick", {
description = S("Clay Brick"),
inventory_image = "default_clay_brick.png",
})
minetest.register_craftitem("default:obsidian_shard", {
description = S("Obsidian Shard"),
inventory_image = "default_obsidian_shard.png",
})
minetest.register_craftitem("default:flint", {
description = S("Flint"),
inventory_image = "default_flint.png"
})
--
-- Craftitem registry
--
minetest.register_craftitem("default:blueberries", {
description = S("Blueberries"),
@ -350,3 +234,333 @@ minetest.register_craftitem("default:blueberries", {
groups = {food_blueberries = 1, food_berry = 1},
on_use = minetest.item_eat(2),
})
minetest.register_craftitem("default:book", {
description = S("Book"),
inventory_image = "default_book.png",
groups = {book = 1, flammable = 3},
on_use = book_on_use,
})
minetest.register_craftitem("default:book_written", {
description = S("Book with Text"),
inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1,
on_use = book_on_use,
})
minetest.register_craftitem("default:bronze_ingot", {
description = S("Bronze Ingot"),
inventory_image = "default_bronze_ingot.png"
})
minetest.register_craftitem("default:clay_brick", {
description = S("Clay Brick"),
inventory_image = "default_clay_brick.png",
})
minetest.register_craftitem("default:clay_lump", {
description = S("Clay Lump"),
inventory_image = "default_clay_lump.png",
})
minetest.register_craftitem("default:coal_lump", {
description = S("Coal Lump"),
inventory_image = "default_coal_lump.png",
groups = {coal = 1, flammable = 1}
})
minetest.register_craftitem("default:copper_ingot", {
description = S("Copper Ingot"),
inventory_image = "default_copper_ingot.png"
})
minetest.register_craftitem("default:copper_lump", {
description = S("Copper Lump"),
inventory_image = "default_copper_lump.png"
})
minetest.register_craftitem("default:diamond", {
description = S("Diamond"),
inventory_image = "default_diamond.png",
})
minetest.register_craftitem("default:flint", {
description = S("Flint"),
inventory_image = "default_flint.png"
})
minetest.register_craftitem("default:gold_ingot", {
description = S("Gold Ingot"),
inventory_image = "default_gold_ingot.png"
})
minetest.register_craftitem("default:gold_lump", {
description = S("Gold Lump"),
inventory_image = "default_gold_lump.png"
})
minetest.register_craftitem("default:iron_lump", {
description = S("Iron Lump"),
inventory_image = "default_iron_lump.png"
})
minetest.register_craftitem("default:mese_crystal", {
description = S("Mese Crystal"),
inventory_image = "default_mese_crystal.png",
})
minetest.register_craftitem("default:mese_crystal_fragment", {
description = S("Mese Crystal Fragment"),
inventory_image = "default_mese_crystal_fragment.png",
})
minetest.register_craftitem("default:obsidian_shard", {
description = S("Obsidian Shard"),
inventory_image = "default_obsidian_shard.png",
})
minetest.register_craftitem("default:paper", {
description = S("Paper"),
inventory_image = "default_paper.png",
groups = {flammable = 3},
})
minetest.register_craftitem("default:steel_ingot", {
description = S("Steel Ingot"),
inventory_image = "default_steel_ingot.png"
})
minetest.register_craftitem("default:stick", {
description = S("Stick"),
inventory_image = "default_stick.png",
groups = {stick = 1, flammable = 2},
})
minetest.register_craftitem("default:tin_ingot", {
description = S("Tin Ingot"),
inventory_image = "default_tin_ingot.png"
})
minetest.register_craftitem("default:tin_lump", {
description = S("Tin Lump"),
inventory_image = "default_tin_lump.png"
})
--
-- Crafting recipes
--
minetest.register_craft({
output = "default:book",
recipe = {
{"default:paper"},
{"default:paper"},
{"default:paper"},
}
})
minetest.register_craft({
type = "shapeless",
output = "default:book_written",
recipe = {"default:book", "default:book_written"}
})
minetest.register_craft({
output = "default:bronze_ingot 9",
recipe = {
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
}
})
minetest.register_craft({
output = "default:clay_brick 4",
recipe = {
{"default:brick"},
}
})
minetest.register_craft({
output = "default:clay_lump 4",
recipe = {
{"default:clay"},
}
})
minetest.register_craft({
output = "default:coal_lump 9",
recipe = {
{"default:coalblock"},
}
})
minetest.register_craft({
output = "default:copper_ingot 9",
recipe = {
{"default:copperblock"},
}
})
minetest.register_craft({
output = "default:diamond 9",
recipe = {
{"default:diamondblock"},
}
})
minetest.register_craft({
output = "default:gold_ingot 9",
recipe = {
{"default:goldblock"},
}
})
minetest.register_craft({
output = "default:mese_crystal",
recipe = {
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
}
})
minetest.register_craft({
output = "default:mese_crystal 9",
recipe = {
{"default:mese"},
}
})
minetest.register_craft({
output = "default:mese_crystal_fragment 9",
recipe = {
{"default:mese_crystal"},
}
})
minetest.register_craft({
output = "default:obsidian_shard 9",
recipe = {
{"default:obsidian"}
}
})
minetest.register_craft({
output = "default:paper",
recipe = {
{"default:papyrus", "default:papyrus", "default:papyrus"},
}
})
minetest.register_craft({
output = "default:skeleton_key",
recipe = {
{"default:gold_ingot"},
}
})
minetest.register_craft({
output = "default:steel_ingot 9",
recipe = {
{"default:steelblock"},
}
})
minetest.register_craft({
output = "default:stick 4",
recipe = {
{"group:wood"},
}
})
minetest.register_craft({
output = "default:tin_ingot 9",
recipe = {
{"default:tinblock"},
}
})
--
-- Cooking recipes
--
minetest.register_craft({
type = "cooking",
output = "default:clay_brick",
recipe = "default:clay_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:copper_ingot",
recipe = "default:copper_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:gold_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:key",
cooktime = 5,
})
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:skeleton_key",
cooktime = 5,
})
minetest.register_craft({
type = "cooking",
output = "default:steel_ingot",
recipe = "default:iron_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:tin_ingot",
recipe = "default:tin_lump",
})
--
-- Fuels
--
minetest.register_craft({
type = "fuel",
recipe = "default:book",
burntime = 3,
})
minetest.register_craft({
type = "fuel",
recipe = "default:book_written",
burntime = 3,
})
minetest.register_craft({
type = "fuel",
recipe = "default:coal_lump",
burntime = 40,
})
minetest.register_craft({
type = "fuel",
recipe = "default:paper",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "group:stick",
burntime = 1,
})

@ -352,3 +352,12 @@ minetest.register_node("default:furnace_active", {
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
})
minetest.register_craft({
output = "default:furnace",
recipe = {
{"group:stone", "group:stone", "group:stone"},
{"group:stone", "", "group:stone"},
{"group:stone", "group:stone", "group:stone"},
}
})

@ -453,7 +453,6 @@ for name, mat in pairs(craft_ingreds) do
})
end
minetest.register_tool("default:key", {
description = S("Key"),
inventory_image = "default_key.png",
@ -493,3 +492,27 @@ minetest.register_tool("default:key", {
return nil
end
})
minetest.register_craft({
type = "fuel",
recipe = "default:pick_wood",
burntime = 6,
})
minetest.register_craft({
type = "fuel",
recipe = "default:shovel_wood",
burntime = 4,
})
minetest.register_craft({
type = "fuel",
recipe = "default:axe_wood",
burntime = 6,
})
minetest.register_craft({
type = "fuel",
recipe = "default:sword_wood",
burntime = 5,
})

@ -134,3 +134,17 @@ minetest.register_lbm({
end
end
})
minetest.register_craft({
output = "default:torch 4",
recipe = {
{"default:coal_lump"},
{"group:stick"},
}
})
minetest.register_craft({
type = "fuel",
recipe = "default:torch",
burntime = 4,
})