From 04f8a9559f4cd9b7b598753119bb8a2b38d268bd Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Fri, 24 Mar 2017 00:45:06 -0600 Subject: [PATCH] add myriad recipies for cooking --- init.lua | 1 + plants.lua | 2 +- plants/cave_wheat.lua | 2 +- plants/cooking.lua | 52 +++++++++++++++++++++++++++++++++ plants/plump_helmet.lua | 10 +++---- plants/quarry_bush.lua | 1 + plants/sweet_pod.lua | 1 + textures/dfcaverns_biscuit.png | Bin 0 -> 602 bytes textures/dfcaverns_roast.png | Bin 0 -> 775 bytes textures/dfcaverns_stew.png | Bin 0 -> 622 bytes 10 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 plants/cooking.lua create mode 100644 textures/dfcaverns_biscuit.png create mode 100644 textures/dfcaverns_roast.png create mode 100644 textures/dfcaverns_stew.png diff --git a/init.lua b/init.lua index be05310..2aa8140 100644 --- a/init.lua +++ b/init.lua @@ -17,6 +17,7 @@ dofile(modpath.."/plants/pig_tail.lua") dofile(modpath.."/plants/plump_helmet.lua") dofile(modpath.."/plants/quarry_bush.lua") dofile(modpath.."/plants/sweet_pod.lua") +dofile(modpath.."/plants/cooking.lua") -- Trees dofile(modpath.."/trees/blood_thorn.lua") diff --git a/plants.lua b/plants.lua index 5f24cc7..64951b8 100644 --- a/plants.lua +++ b/plants.lua @@ -110,7 +110,7 @@ dfcaverns.register_seed = function(name, description, image, stage_one) wield_image = image, drawtype = "signlike", 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, paramtype = "light", walkable = false, diff --git a/plants/cave_wheat.lua b/plants/cave_wheat.lua index 0678a44..b6b10ab 100644 --- a/plants/cave_wheat.lua +++ b/plants/cave_wheat.lua @@ -67,7 +67,7 @@ minetest.register_craft({ minetest.register_craftitem("dfcaverns:cave_flour", { description = S("Cave Wheat Flour"), inventory_image = "dfcaverns_flour.png", - groups = {flammable = 1}, + groups = {flammable = 1, dfcaverns_cookable = 1}, }) minetest.register_craftitem("dfcaverns:cave_bread", { diff --git a/plants/cooking.lua b/plants/cooking.lua new file mode 100644 index 0000000..329d389 --- /dev/null +++ b/plants/cooking.lua @@ -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"}}) diff --git a/plants/plump_helmet.lua b/plants/plump_helmet.lua index 333ba07..068325b 100644 --- a/plants/plump_helmet.lua +++ b/plants/plump_helmet.lua @@ -59,7 +59,7 @@ minetest.register_node("dfcaverns:plump_helmet_spawn", { tiles = { "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", drawtype = "nodebox", paramtype = "light", @@ -83,7 +83,7 @@ minetest.register_node("dfcaverns:plump_helmet_1", { "dfcaverns_plump_helmet_cap.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", drawtype = "nodebox", paramtype = "light", @@ -112,7 +112,7 @@ minetest.register_node("dfcaverns:plump_helmet_2", { "dfcaverns_plump_helmet_cap.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", drawtype = "nodebox", paramtype = "light", @@ -153,7 +153,7 @@ minetest.register_node("dfcaverns:plump_helmet_3", { "dfcaverns_plump_helmet_cap.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", drawtype = "nodebox", paramtype = "light", @@ -193,7 +193,7 @@ minetest.register_node("dfcaverns:plump_helmet_4", { "dfcaverns_plump_helmet_cap.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", paramtype = "light", paramtype2 = "facedir", diff --git a/plants/quarry_bush.lua b/plants/quarry_bush.lua index 54667ae..a12771a 100644 --- a/plants/quarry_bush.lua +++ b/plants/quarry_bush.lua @@ -57,6 +57,7 @@ dfcaverns.register_grow_abm(quarry_names, dfcaverns.config.plant_growth_timer * minetest.register_craftitem("dfcaverns:quarry_bush_leaves", { description = S("Quarry Bush Leaves"), inventory_image = "dfcaverns_quarry_bush_leaves.png", + groups = {dfcaverns_cookable = 1}, stack_max = 99, }) minetest.register_craft({ diff --git a/plants/sweet_pod.lua b/plants/sweet_pod.lua index 6bf5da2..e576c2e 100644 --- a/plants/sweet_pod.lua +++ b/plants/sweet_pod.lua @@ -69,6 +69,7 @@ minetest.register_craft({ minetest.register_craftitem("dfcaverns:sugar", { description = S("Sweet Pod Sugar"), inventory_image = "dfcaverns_sugar.png", + groups = {dfcaverns_cookable = 1}, }) if minetest.get_modpath("cottages") then diff --git a/textures/dfcaverns_biscuit.png b/textures/dfcaverns_biscuit.png new file mode 100644 index 0000000000000000000000000000000000000000..734d2545cb8c99ad48a2ec6373c14b319efbef2a GIT binary patch literal 602 zcmV-g0;TWFU8GbZ8()Nlj2>E@cM*00F*9L_t(I%k7f8YZCzg zhrfF!F?W~b(zJ;f>zg38Lr@V!>LeB1vIx#jx;lss1<^qq+}zw86~tl?baN2v(jb(I z)k0!k&ExLcTpss`vyVTa-}oE8<@dop!r#O5`!}x5W+J!DjDFIH5SrrPm#iqEC&-&W zTmI*Z%f+&A@Mh~D!T0xf3v&tO#ddAC==R!FHac85UqBmnnOF_N**twe&WYn`((~qu zXnPNZ(|3Fs;O(QU>2as|q&+c;b4e9RjbW-OJaNKm#X-?>oXaKfLy2Z>2mH}WGM}-5 zrxHNv($O<|M0~vdwa(glm(U;J1p%6_axAZtPDpH39X2+b$Zj1?k2A1_+eR;2mI0~_ zD^SHL17`wLg;Z(={1J9{mjelnwJ$XmPNi8|&SBL;3?(2K+rfkK>re)0)_Ys=i1hMM zHd)GPGJ(}$5{gX2J%-}}3x}iRlM>>dOUf`%gRy1xcUJ)Hq)$ literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_roast.png b/textures/dfcaverns_roast.png new file mode 100644 index 0000000000000000000000000000000000000000..381231d21d81243c1e85bfaeb08b69c0c122d7e5 GIT binary patch literal 775 zcmV+i1Ni)jP)WFU8GbZ8()Nlj2>E@cM*00L`CL_t(I%f*sCOcQYc z#ox8pYkR%BrqJ3-X-_LuzDb(^2_b4yG|FTkE`}%zadGM9VwhPROk9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