diff options
author | Rubenwardy <anjayward@gmail.com> | 2013-09-16 19:21:22 +0100 |
---|---|---|
committer | Rubenwardy <anjayward@gmail.com> | 2013-09-16 19:21:22 +0100 |
commit | b17c3c6ed423752a55072180076718b9c36eab3d (patch) | |
tree | 5230edd3f59b75d4ee413478ed7fb7e0410a2aae | |
parent | c40055af83fb46ff2e00d8a0c0b76c494c9c3a97 (diff) |
Juices, potato, meat and more
-rw-r--r-- | README.md | 15 | ||||
-rw-r--r-- | depends.txt | 1 | ||||
-rw-r--r-- | init.lua | 113 | ||||
-rw-r--r-- | textures/food_apple_juice.png | bin | 0 -> 729 bytes | |||
-rw-r--r-- | textures/food_baked_potato.png | bin | 0 -> 321 bytes | |||
-rw-r--r-- | textures/food_cactus_juice.png | bin | 0 -> 867 bytes | |||
-rw-r--r-- | textures/food_meat.png | bin | 0 -> 624 bytes | |||
-rw-r--r-- | textures/food_meat_raw.png | bin | 0 -> 426 bytes | |||
-rw-r--r-- | textures/food_potato.png | bin | 0 -> 252 bytes | |||
-rw-r--r-- | textures/food_rainbow_juice.png | bin | 0 -> 396 bytes |
10 files changed, 118 insertions, 11 deletions
@@ -21,17 +21,22 @@ Other mods There are expansion mods avaliable. Just install them in a mod folder, and everything should be fine. -* Modern food (Needs updating) -* English food (Coming Soon) -* Asian food (Coming Soon) +* Modern food (Needs updating) - burgers, soft drinks, pop corn, coffee, etc +* English food (Coming Soon) - breakfast, pastries, pasties, buns, muffins, teas, cheese +* Asian food (Coming Soon) - indian, chinese, thai Licensing --------- -This mod, its code, images and nodeboxes, are licensed under: +The code, textures and nodeboxes in this mod are, unless otherwise notified, licensed under CC BY SA. ANDREW "RUBENWARDY" WARD Creative Commons BY-SA 3.0 (or similar) -http://creativecommons.org/licenses/by-sa/3.0/
\ No newline at end of file +http://creativecommons.org/licenses/by-sa/3.0/ + +Baked potato texture by Doc, WTFPL +Dough, flour and wheat textures from default farming mod, WTFPL +Egg and milk textures from Mobf, CC BY SA +Have I missed out credit? Please tell me.
\ No newline at end of file diff --git a/depends.txt b/depends.txt index 928e6b7..dc26709 100644 --- a/depends.txt +++ b/depends.txt @@ -6,3 +6,4 @@ docfarming? animalmaterials? my_mobs? hud? +vessels? @@ -7,10 +7,17 @@ -- basic foods -- ===================================== -food = { supported={} } +food = { + supported={}, + atsup={}, + df={}, + debug=true +} + function food.support(group,mod,item) + food.atsup[group] = true if not minetest.get_modpath(mod) then - print("'"..mod.."' is not installed") + print("mod '"..mod.."' is not installed") return end @@ -23,7 +30,7 @@ function food.support(group,mod,item) local data = minetest.registered_items[item] if not data then - print(item.." not found") + print("item '",item.."' not found") return end @@ -34,9 +41,10 @@ function food.support(group,mod,item) else minetest.register_node(":"..item,data) end - food.supported[group] = true + food.supported[group] = true end function food.asupport(group,add) + food.df[group] = true if food.supported[group] then return end @@ -60,9 +68,29 @@ function food.item_eat(amt) end end +-- Debug to check all supports have inbuilt +if food.debug then +minetest.after(0, function() + for name, val in pairs(food.atsup) do + if not food.df[name] then + print("[FOOD DEBUG] Ingredient "..name.." has no built in equiv") + + end + end + + for name, val in pairs(food.df) do + if not food.atsup[name] then + print("[FOOD DEBUG] Inbuilt ingredient "..name.." has no supported external equiv") + + end + end +end) +end + -- Add support for other mods food.support("wheat","farming","farming:wheat") food.support("flour","farming","farming:flour") +food.support("potato","docfarming","docfarming:potato") food.support("tomato","farming_plus","farming_plus:tomato_item") food.support("tomato","plantlib","plantlib:tomato") food.support("strawberry","farming_plus","farming_plus:strawberry_item") @@ -77,6 +105,8 @@ food.support("egg","animalmaterials","animalmaterials:egg") --food.support("meat_raw","mobs","mobs:meat_raw") food.support("meat_raw","animalmaterials","animalmaterials:meat_raw") food.support("meat","mobs","mobs:meat") +food.support("cup","vessels","vessels:drinking_glass") +food.support("cup","animalmaterials","animalmaterials:glass") -- Default inbuilt ingrediants food.asupport("wheat",function() @@ -114,6 +144,20 @@ food.asupport("flour",function() } }) end) +food.asupport("potato",function() + minetest.register_craftitem("food:potato", { + description = "Potato", + inventory_image = "food_potato.png", + }) + minetest.register_craft({ + output = "food:potato", + recipe = { + {"default:dirt"}, + {"default:apple"} + + } + }) +end) food.asupport("tomato",function() minetest.register_craftitem("food:tomato", { description = "Tomato", @@ -220,7 +264,7 @@ food.asupport("meat_raw",function() } }) end) -food.asupport("food:meat",function() +food.asupport("meat",function() minetest.register_craftitem("food:meat", { description = "Venison", inventory_image = "food_meat.png", @@ -235,6 +279,16 @@ food.asupport("food:meat",function() }) end) +if minetest.get_modpath("animalmaterials") then + minetest.register_craft({ + type = "cooking", + output = "group:food_meat", + recipe = "group:food_meat_raw", + cooktime = 30 + }) + +end + -- Register sugar minetest.register_craftitem("food:sugar", { description = "Sugar", @@ -342,6 +396,18 @@ minetest.register_craft({ } }) +-- Register baked potato +minetest.register_craftitem("food:baked_potato", { + description = "Baked Potato", + inventory_image = "food_baked_potato.png", + on_use = food.item_eat(6), +}) +minetest.register_craft({ + type = "cooking", + output = "food:baked_potato", + recipe = "group:food_potato", +}) + -- Register pasta bake minetest.register_craftitem("food:pasta_bake",{ description = "Pasta Bake", @@ -367,7 +433,7 @@ minetest.register_craft({ } }) --- Soups +-- Register Soups local soups = {"tomato","chicken"} for i=1, #soups do local flav = soups[i] @@ -398,6 +464,41 @@ for i=1, #soups do }) end +-- Juices +local juices = {"apple","cactus"} +for i=1, #juices do + local flav = juices[i] + minetest.register_craftitem("food:"..flav.."_juice", { + description = flav.." Juice", + inventory_image = "food_"..flav.."_juice.png", + on_use = minetest.item_eat(2), + }) + + minetest.register_craft({ + output = "food:"..flav.."_juice 4", + recipe = { + {"","",""}, + {"","default:"..flav,""}, + {"","group:food_cup",""}, + } + }) +end + +minetest.register_craftitem("food:rainbow_juice", { + description = "Rainbow Juice", + inventory_image = "food_rainbow_juice.png", + on_use = minetest.item_eat(20), +}) + +minetest.register_craft({ + output = "food:rainbow_juice 99", + recipe = { + {"","",""}, + {"","default:nyancat_rainbow",""}, + {"","group:food_cup",""}, + } +}) + -- Register cakes minetest.register_node("food:cake", { description = "Cake", diff --git a/textures/food_apple_juice.png b/textures/food_apple_juice.png Binary files differnew file mode 100644 index 0000000..fc2b8ef --- /dev/null +++ b/textures/food_apple_juice.png diff --git a/textures/food_baked_potato.png b/textures/food_baked_potato.png Binary files differnew file mode 100644 index 0000000..425c4ae --- /dev/null +++ b/textures/food_baked_potato.png diff --git a/textures/food_cactus_juice.png b/textures/food_cactus_juice.png Binary files differnew file mode 100644 index 0000000..6180eed --- /dev/null +++ b/textures/food_cactus_juice.png diff --git a/textures/food_meat.png b/textures/food_meat.png Binary files differnew file mode 100644 index 0000000..d4e4abb --- /dev/null +++ b/textures/food_meat.png diff --git a/textures/food_meat_raw.png b/textures/food_meat_raw.png Binary files differnew file mode 100644 index 0000000..0dea4ec --- /dev/null +++ b/textures/food_meat_raw.png diff --git a/textures/food_potato.png b/textures/food_potato.png Binary files differnew file mode 100644 index 0000000..6e91d6a --- /dev/null +++ b/textures/food_potato.png diff --git a/textures/food_rainbow_juice.png b/textures/food_rainbow_juice.png Binary files differnew file mode 100644 index 0000000..7eb97cf --- /dev/null +++ b/textures/food_rainbow_juice.png |