diff --git a/README.txt b/README.txt index 54abfdc..165de15 100644 --- a/README.txt +++ b/README.txt @@ -33,8 +33,9 @@ http://creativecommons.org/licenses/by-sa/4.0/ Authors of textures: -------------------- -Derived from textures by rubenwardy (CC BY-SA): - cake_bottom.png - cake_inner.png - cake_side.png - cake_top.png +rubenwardy (CC-BY-SA): + cake_bottom.png, derivative + cake_inner.png, derivative + cake_side.png, derivative + cake_sugar.png + cake_top.png, derivative diff --git a/init.lua b/init.lua index a3b8ecd..2c8edd4 100644 --- a/init.lua +++ b/init.lua @@ -49,8 +49,24 @@ for i, size in ipairs(sizes) do }) end +if minetest.get_modpath("food") == nil then + minetest.register_craftitem("cake:sugar", { + description = "Sugar", + inventory_image = "cake_sugar.png", + groups = {food_sugar=1} + }) + + minetest.register_craft({ + type = "shapeless", + output = "cake:sugar", + recipe = {"default:papyrus"} + }) +else + minetest.register_alias("cake:sugar", "food:sugar") +end + minetest.register_craft({ type = "shapeless", output = "cake:cake", - recipe = {"farming:flour", "farming:flour", "group:water_bucket"} + recipe = {"farming:flour", "group:water_bucket", "group:food_sugar", "group:food_sugar"} }) diff --git a/textures/cake_sugar.png b/textures/cake_sugar.png new file mode 100644 index 0000000..10ecf70 Binary files /dev/null and b/textures/cake_sugar.png differ