1
0
mirror of https://github.com/rubenwardy/food.git synced 2024-11-18 08:00:38 +01:00
food/support.lua

185 lines
4.4 KiB
Lua
Raw Normal View History

-- RUBENFOOD MOD
-- A mod written by rubenwardy that adds
-- food to the minetest game
-- ======================================
-- >> rubenfood/support.lua
-- adds support for other mods
-- ======================================
-- [support]
-- ======================================
2012-12-04 18:36:26 +01:00
print "Food [Support] - Initialising"
function node_implement(modname,n_ext,n_int,resultfunc)
if not minetest.get_modpath(modname) then
resultfunc()
else
minetest.register_alias(n_int,n_ext)
end
end
2012-12-04 18:36:26 +01:00
print "Food [Support] - Farming Mod"
2012-08-31 16:37:02 +02:00
node_implement("farming","farming:flour","food:flour",function()
minetest.register_craftitem("food:flour", {
description = "Flour",
inventory_image = "farming_flour.png",
})
end)
2012-08-31 16:37:02 +02:00
node_implement("farming","farming:bread","food:bread",function()
minetest.register_craftitem("food:bread", {
description = "Bread",
2012-09-20 18:20:40 +02:00
inventory_image = "food_bread.png",
2012-08-31 16:37:02 +02:00
stack_max = 1,
2012-10-02 18:38:10 +02:00
on_use = minetest.item_eat(10),
groups={food=2},
2012-08-31 16:37:02 +02:00
})
minetest.register_craft({
output = "food:dough",
type = "shapeless",
recipe = {"food:flour", "food:flour", "food:flour", "food:flour", "bucket:bucket_water"},
2012-10-02 18:38:10 +02:00
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
2012-08-31 16:37:02 +02:00
})
minetest.register_craft({
type = "cooking",
output = "food:bread",
recipe = "food:dough",
2012-10-02 18:38:10 +02:00
cooktime = 10,
2012-08-31 16:37:02 +02:00
})
end)
node_implement("farming","farming:cake_mix","food:dough",function()
minetest.register_craftitem("food:dough", {
description = "Cake Mix",
inventory_image = "farming_cake_mix.png",
})
end)
2012-12-04 18:36:26 +01:00
print "Food [Support] - Farming_Plus Mod"
2012-09-29 19:46:54 +02:00
node_implement("farming_plus","farming_plus:strawberry_item","food:strawberry",function()
minetest.register_craftitem("food:strawberry", {
description = "Strawberry",
2012-12-04 18:36:26 +01:00
inventory_image = "farming_strawberry.png",
2012-09-29 19:46:54 +02:00
on_use = minetest.item_eat(2),
})
end)
node_implement("farming_plus","farming_plus:carrot_item","food:carrot",function()
2012-10-02 21:09:37 +02:00
minetest.register_craftitem("food:carrot", {
2012-09-29 19:46:54 +02:00
description = "Carrot",
inventory_image = "farming_carrot.png",
on_use = minetest.item_eat(3),
})
end)
node_implement("farming_plus","farming_plus:rhubarb_item","food:rhubarb",function()
minetest.register_craftitem("food:rhubarb", {
description = "Rhubarb",
inventory_image = "farming_rhubarb.png",
})
end)
node_implement("farming_plus","farming_plus:cocoa_bean","food:cocoa",function()
minetest.register_craftitem("food:cocoa", {
description = "Cocoa Bean",
inventory_image = "farming_cocoa_bean.png",
})
end)
2012-10-02 18:58:50 +02:00
node_implement("farming_plus","farming_plus:banana","food:banana",function()
2012-10-04 18:21:08 +02:00
minetest.register_node("food:banana", {
2012-10-02 18:58:50 +02:00
description = "Banana",
tiles = {"farming_banana.png"},
inventory_image = "farming_banana.png",
wield_image = "farming_banana.png",
drawtype = "torchlike",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {fleshy=3,dig_immediate=3,flammable=2},
sounds = default.node_sound_defaults(),
on_use = minetest.item_eat(6),
})
end)
2012-12-04 18:36:26 +01:00
node_implement("farming_plus","farming_plus:tomato_item","food:tomato",function()
minetest.register_craftitem("food:tomato", {
description = "Tomato",
inventory_image = "farming_strawberry.png",
on_use = minetest.item_eat(2),
})
end)
2012-09-29 19:46:54 +02:00
2012-12-04 18:36:26 +01:00
print "Food [Support] - Animal Mod"
node_implement("animalmaterials","animalmaterials:meat_raw","food:meat_raw",function()
minetest.register_craftitem("food:meat_raw", {
description = "Raw meat",
image = "animalmaterials_meat_raw.png",
on_use = minetest.item_eat(1),
groups = { meat=1, eatable=1 },
stack_max=25
})
end)
2012-08-31 16:37:02 +02:00
node_implement("animalmaterials","animalmaterials:egg","food:egg",function()
minetest.register_craftitem("food:egg", {
description = "Egg",
image = "animalmaterials_egg.png",
stack_max=10
})
end)
2012-08-31 16:37:02 +02:00
node_implement("animalmaterials","animalmaterials:milk","food:milk",function()
minetest.register_craftitem("food:milk", {
description = "Milk",
image = "animalmaterials_milk.png",
on_use = minetest.item_eat(1),
groups = { eatable=1 },
stack_max=10
})
end)
2012-12-04 18:36:26 +01:00
print "Food [Support] - Vessels Mod"
node_implement("vessels","vessels:drinking_glass","food:cup",function()
node_implement("animalmaterials","animalmaterials:glass","food:cup",function()
minetest.register_craftitem("food:cup",{
description = "Glass",
tiles = {"food_cup.png"},
inventory_image = "food_cup.png",
})
end)
end)