diff --git a/depends.txt b/depends.txt index 3af08de..c333993 100644 --- a/depends.txt +++ b/depends.txt @@ -7,4 +7,5 @@ dynamic_liquid? wool? magma_conduits? intllib? -doc? \ No newline at end of file +doc? +simplecrafting_lib? \ No newline at end of file diff --git a/ground_cover.lua b/ground_cover.lua index 4954756..b663862 100644 --- a/ground_cover.lua +++ b/ground_cover.lua @@ -55,7 +55,7 @@ minetest.register_node("dfcaverns:cobble_with_floor_fungus", { tiles = {"default_cobble.png^dfcaverns_floor_fungus.png", "default_cobble.png", "default_cobble.png^dfcaverns_floor_fungus_side.png"}, drops = "default:cobble", is_ground_content = true, - groups = {cracky = 3, stone = 2, light_sensitive_fungus = 11}, + groups = {cracky = 3, stone = 2, slippery = 1, light_sensitive_fungus = 11}, _dfcaverns_dead_node = "default:cobble", sounds = default.node_sound_stone_defaults({ footstep = {name = "dfcaverns_squish", gain = 0.25}, diff --git a/plants/cave_wheat.lua b/plants/cave_wheat.lua index db1b734..1603c6d 100644 --- a/plants/cave_wheat.lua +++ b/plants/cave_wheat.lua @@ -92,7 +92,7 @@ minetest.register_craftitem("dfcaverns:cave_bread", { _doc_items_usagehelp = dfcaverns.doc.cave_bread_usage, inventory_image = "dfcaverns_bread.png", on_use = minetest.item_eat(5), - groups = {flammable = 2}, + groups = {flammable = 2, food = 5}, }) if minetest.get_modpath("cottages") then diff --git a/plants/cooking.lua b/plants/cooking.lua index 91f1b43..dbdaf73 100644 --- a/plants/cooking.lua +++ b/plants/cooking.lua @@ -9,6 +9,7 @@ local register_cooking_recipes = function(prefix, item, name, returns) _doc_items_usagehelp = dfcaverns.doc.biscuit_usage, inventory_image = "dfcaverns_biscuit.png", on_use = minetest.item_eat(4), + groups = {food = 4}, }) minetest.register_craftitem("dfcaverns:"..item.."_stew", { description = S("@1 Stew", name), @@ -16,6 +17,7 @@ local register_cooking_recipes = function(prefix, item, name, returns) _doc_items_usagehelp = dfcaverns.doc.stew_usage, inventory_image = "dfcaverns_stew.png", on_use = minetest.item_eat(6), + groups = {food = 6}, }) minetest.register_craftitem("dfcaverns:"..item.."_roast", { description = S("@1 Roast", name), @@ -23,6 +25,7 @@ local register_cooking_recipes = function(prefix, item, name, returns) _doc_items_usagehelp = dfcaverns.doc.roast_usage, inventory_image = "dfcaverns_roast.png", on_use = minetest.item_eat(8), + groups = {food = 8}, }) minetest.register_craft({ @@ -43,6 +46,39 @@ local register_cooking_recipes = function(prefix, item, name, returns) recipe = {"group:dfcaverns_cookable", "group:dfcaverns_cookable", "group:dfcaverns_cookable", prefix..":"..item}, replacements = returns }) + + if minetest.get_modpath("simplecrafting_lib") then + simplecrafting_lib.register("cooking", { + input = { + ["group:dfcaverns_cookable"] = 1, + [prefix..":"..item] = 1, + }, + output = { + ["dfcaverns:"..item.."_biscuit"] = 1, + }, + cooktime = 5.0, + }) + simplecrafting_lib.register("cooking", { + input = { + ["group:dfcaverns_cookable"] = 2, + [prefix..":"..item] = 1, + }, + output = { + ["dfcaverns:"..item.."_stew"] = 1, + }, + cooktime = 10.0, + }) + simplecrafting_lib.register("cooking", { + input = { + ["group:dfcaverns_cookable"] = 3, + [prefix..":"..item] = 1, + }, + output = { + ["dfcaverns:"..item.."_roast"] = 1, + }, + cooktime = 15.0, + }) + end end register_cooking_recipes("dfcaverns", "cave_flour", S("Cave Wheat Flour")) diff --git a/plants/plump_helmet.lua b/plants/plump_helmet.lua index e291b03..1c82ad3 100644 --- a/plants/plump_helmet.lua +++ b/plants/plump_helmet.lua @@ -96,7 +96,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, dfcaverns_cookable = 1, plump_helmet = 1}, + 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, food = 1}, _dfcaverns_next_stage = "dfcaverns:plump_helmet_2", _dfcaverns_next_stage_time = plump_helmet_grow_time, drawtype = "nodebox", @@ -132,7 +132,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, dfcaverns_cookable = 1, plump_helmet = 1}, + 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, food = 2}, _dfcaverns_next_stage = "dfcaverns:plump_helmet_3", _dfcaverns_next_stage_time = plump_helmet_grow_time, drawtype = "nodebox", @@ -166,7 +166,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, dfcaverns_cookable = 1, plump_helmet = 1}, + 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, food = 3}, _dfcaverns_next_stage = "dfcaverns:plump_helmet_4", _dfcaverns_next_stage_time = plump_helmet_grow_time, drawtype = "nodebox", @@ -200,7 +200,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, dfcaverns_cookable = 1, plump_helmet = 1}, + 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, food = 4}, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", @@ -251,7 +251,7 @@ minetest.register_node("dfcaverns:plump_helmet_4_picked", { "dfcaverns_plump_helmet_cap.png", "dfcaverns_plump_helmet_cap.png^[lowpart:40:dfcaverns_plump_helmet_stem.png", }, - groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1}, + groups = {snappy = 3, flammable = 2, plant = 1, attached_node = 1, light_sensitive_fungus = 11, dfcaverns_cookable = 1, plump_helmet = 1, food = 4}, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir",