add myriad recipies for cooking

This commit is contained in:
FaceDeer 2017-03-24 00:45:06 -06:00
parent 808b80698b
commit 04f8a9559f
10 changed files with 62 additions and 7 deletions

View File

@ -17,6 +17,7 @@ dofile(modpath.."/plants/pig_tail.lua")
dofile(modpath.."/plants/plump_helmet.lua") dofile(modpath.."/plants/plump_helmet.lua")
dofile(modpath.."/plants/quarry_bush.lua") dofile(modpath.."/plants/quarry_bush.lua")
dofile(modpath.."/plants/sweet_pod.lua") dofile(modpath.."/plants/sweet_pod.lua")
dofile(modpath.."/plants/cooking.lua")
-- Trees -- Trees
dofile(modpath.."/trees/blood_thorn.lua") dofile(modpath.."/trees/blood_thorn.lua")

View File

@ -110,7 +110,7 @@ dfcaverns.register_seed = function(name, description, image, stage_one)
wield_image = image, wield_image = image,
drawtype = "signlike", drawtype = "signlike",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 2}, groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 2, dfcaverns_cookable = 1},
_dfcaverns_next_stage = stage_one, _dfcaverns_next_stage = stage_one,
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,

View File

@ -67,7 +67,7 @@ minetest.register_craft({
minetest.register_craftitem("dfcaverns:cave_flour", { minetest.register_craftitem("dfcaverns:cave_flour", {
description = S("Cave Wheat Flour"), description = S("Cave Wheat Flour"),
inventory_image = "dfcaverns_flour.png", inventory_image = "dfcaverns_flour.png",
groups = {flammable = 1}, groups = {flammable = 1, dfcaverns_cookable = 1},
}) })
minetest.register_craftitem("dfcaverns:cave_bread", { minetest.register_craftitem("dfcaverns:cave_bread", {

52
plants/cooking.lua Normal file
View File

@ -0,0 +1,52 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local register_cooking_recipes = function(prefix, item, name, returns)
minetest.register_craftitem("dfcaverns:"..item.."_biscuit", {
description = S("@1 Biscuit", name),
inventory_image = "dfcaverns_biscuit.png",
on_use = minetest.item_eat(4),
})
minetest.register_craftitem("dfcaverns:"..item.."_stew", {
description = S("@1 Stew", name),
inventory_image = "dfcaverns_stew.png",
on_use = minetest.item_eat(6),
})
minetest.register_craftitem("dfcaverns:"..item.."_roast", {
description = S("@1 Roast", name),
inventory_image = "dfcaverns_roast.png",
on_use = minetest.item_eat(8),
})
minetest.register_craft({
type = "shapeless",
output = "dfcaverns:"..item.."_biscuit",
recipe = {"group:dfcaverns_cookable", prefix..":"..item},
replacements = returns
})
minetest.register_craft({
type = "shapeless",
output = "dfcaverns:"..item.."_stew",
recipe = {"group:dfcaverns_cookable", "group:dfcaverns_cookable", prefix..":"..item},
replacements = returns
})
minetest.register_craft({
type = "shapeless",
output = "dfcaverns:"..item.."_roast",
recipe = {"group:dfcaverns_cookable", "group:dfcaverns_cookable", "group:dfcaverns_cookable", prefix..":"..item},
replacements = returns
})
end
register_cooking_recipes("dfcaverns", "cave_flour", S("Cave Wheat Flour"))
register_cooking_recipes("dfcaverns", "cave_wheat_seed", S("Cave Wheat Seed"))
register_cooking_recipes("dfcaverns", "sweet_pod_seed", S("Sweet Pod Spore"))
register_cooking_recipes("dfcaverns", "sugar", S("Sweet Pod Sugar"))
register_cooking_recipes("group", "plump_helmet", S("Plump Helmet"))
register_cooking_recipes("dfcaverns", "plump_helmet_seed", S("Plump Helmet Spawn"))
register_cooking_recipes("dfcaverns", "quarry_bush_leaves", S("Quarry Bush Leaf"))
register_cooking_recipes("dfcaverns", "quarry_bush_seed", S("Rock Nut"))
register_cooking_recipes("dfcaverns", "dimple_cup_seed", S("Dimple Cup Spore"))
register_cooking_recipes("dfcaverns", "pig_tail_seed", S("Pig Tail Spore"))
register_cooking_recipes("dfcaverns", "dwarven_syrup_bucket", S("Dwarven Syrup"), {{"dfcaverns:dwarven_syrup_bucket", "bucket:bucket_empty"}})

View File

@ -59,7 +59,7 @@ minetest.register_node("dfcaverns:plump_helmet_spawn", {
tiles = { tiles = {
"dfcaverns_plump_helmet_cap.png", "dfcaverns_plump_helmet_cap.png",
}, },
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11}, groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1},
_dfcaverns_next_stage = "dfcaverns:plump_helmet_1", _dfcaverns_next_stage = "dfcaverns:plump_helmet_1",
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
@ -83,7 +83,7 @@ minetest.register_node("dfcaverns:plump_helmet_1", {
"dfcaverns_plump_helmet_cap.png", "dfcaverns_plump_helmet_cap.png",
"dfcaverns_plump_helmet_cap.png^[lowpart:5:dfcaverns_plump_helmet_stem.png", "dfcaverns_plump_helmet_cap.png^[lowpart:5:dfcaverns_plump_helmet_stem.png",
}, },
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11}, groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1},
_dfcaverns_next_stage = "dfcaverns:plump_helmet_2", _dfcaverns_next_stage = "dfcaverns:plump_helmet_2",
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
@ -112,7 +112,7 @@ minetest.register_node("dfcaverns:plump_helmet_2", {
"dfcaverns_plump_helmet_cap.png", "dfcaverns_plump_helmet_cap.png",
"dfcaverns_plump_helmet_cap.png^[lowpart:15:dfcaverns_plump_helmet_stem.png", "dfcaverns_plump_helmet_cap.png^[lowpart:15:dfcaverns_plump_helmet_stem.png",
}, },
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11}, groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1},
_dfcaverns_next_stage = "dfcaverns:plump_helmet_3", _dfcaverns_next_stage = "dfcaverns:plump_helmet_3",
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
@ -153,7 +153,7 @@ minetest.register_node("dfcaverns:plump_helmet_3", {
"dfcaverns_plump_helmet_cap.png", "dfcaverns_plump_helmet_cap.png",
"dfcaverns_plump_helmet_cap.png^[lowpart:35:dfcaverns_plump_helmet_stem.png", "dfcaverns_plump_helmet_cap.png^[lowpart:35:dfcaverns_plump_helmet_stem.png",
}, },
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11}, groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1},
_dfcaverns_next_stage = "dfcaverns:plump_helmet_4", _dfcaverns_next_stage = "dfcaverns:plump_helmet_4",
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
@ -193,7 +193,7 @@ minetest.register_node("dfcaverns:plump_helmet_4", {
"dfcaverns_plump_helmet_cap.png", "dfcaverns_plump_helmet_cap.png",
"dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png", "dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png",
}, },
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11}, groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1},
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",

View File

@ -57,6 +57,7 @@ dfcaverns.register_grow_abm(quarry_names, dfcaverns.config.plant_growth_timer *
minetest.register_craftitem("dfcaverns:quarry_bush_leaves", { minetest.register_craftitem("dfcaverns:quarry_bush_leaves", {
description = S("Quarry Bush Leaves"), description = S("Quarry Bush Leaves"),
inventory_image = "dfcaverns_quarry_bush_leaves.png", inventory_image = "dfcaverns_quarry_bush_leaves.png",
groups = {dfcaverns_cookable = 1},
stack_max = 99, stack_max = 99,
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -69,6 +69,7 @@ minetest.register_craft({
minetest.register_craftitem("dfcaverns:sugar", { minetest.register_craftitem("dfcaverns:sugar", {
description = S("Sweet Pod Sugar"), description = S("Sweet Pod Sugar"),
inventory_image = "dfcaverns_sugar.png", inventory_image = "dfcaverns_sugar.png",
groups = {dfcaverns_cookable = 1},
}) })
if minetest.get_modpath("cottages") then if minetest.get_modpath("cottages") then

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

BIN
textures/dfcaverns_stew.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B