Compare commits

...

3 Commits

3 changed files with 15 additions and 5 deletions

View File

@ -21,7 +21,7 @@
if minetest.get_modpath("unified_inventory") and unified_inventory.register_craft_type then
unified_inventory.register_craft_type("pickling", {
description = "Dark room, wooden shelf",
description = "place in a dark room",
icon = "canned_food_pickling_icon.png",
width = 1,
height = 1,
@ -290,6 +290,15 @@ local canned_food_definitions = {
sugar = false,
transforms = "Pickled beetroot"
},
canned_cabbage = {
proper_name = "Canned cabbage",
found_in = "farming",
obj_name = "farming:cabbage",
orig_nutritional_value = 1,
amount = 5,
sugar = false,
transforms = "Sauerkraut"
},
}
local lbm_list = {}
@ -348,9 +357,7 @@ for product, def in pairs(canned_food_definitions) do
nodetable.on_timer = function(pos)
-- if light level is 11 or less, and wood is nearby, there is 1 in 10 chance...
if minetest.get_node_light(pos) > 11 or
not minetest.find_node_near(pos, 1, {"group:wood"})
or math.random() > 0.1 then
if minetest.get_node_light(pos) > 11 or math.random() > 0.1 then
return true
else
minetest.set_node(pos, {name = "canned_food:" .. product .."_plus"})
@ -381,7 +388,7 @@ for product, def in pairs(canned_food_definitions) do
vessel = 1,
dig_immediate = 3,
attached_node = 1,
not_in_creative_inventory = 1 },
},
-- the reward for putting the food in a cellar is even greater
-- than for merely canning it.
on_use = minetest.item_eat(

3
mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = canned_food
depends = default, vessels, flowers
optional_depends = ethereal, farming, unified_inventory

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB