Did support.lua - dynamic external mod support
|
@ -3,12 +3,8 @@
|
|||
-- food to the minetest game
|
||||
-- ======================================
|
||||
-- >> rubenfood/support.lua
|
||||
-- adds support for other mods
|
||||
-- adds items and aliases that are needed
|
||||
-- adds diary products
|
||||
-- ======================================
|
||||
-- [regis-item] Flour
|
||||
-- [regis-item] Milk
|
||||
-- [regis-item] Egg
|
||||
-- [regis-food] Cheese
|
||||
-- [craft] Cheese
|
||||
-- [regis-item] Butter
|
|
@ -13,6 +13,7 @@
|
|||
print ("RubenFood: Loading mainframe: [Master]")
|
||||
|
||||
----------------------Load Files-----------------------------
|
||||
dofile(minetest.get_modpath("rubenfood").."/support.lua")
|
||||
dofile(minetest.get_modpath("rubenfood").."/dairy.lua")
|
||||
|
||||
dofile(minetest.get_modpath("rubenfood").."/baking.lua")
|
||||
|
@ -24,12 +25,6 @@ dofile(minetest.get_modpath("rubenfood").."/fruits.lua")
|
|||
|
||||
|
||||
----------------------------Cup------------------------------
|
||||
minetest.register_alias("rubenfood:cup","animalmaterials:glass")
|
||||
minetest.register_craftitem(":animalmaterials:glass",{
|
||||
description = "Cup",
|
||||
tiles = {"ruben_cup.png"},
|
||||
inventory_image = "ruben_cup.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("rubenfood:mug",{
|
||||
description = "Mug",
|
|
@ -1,2 +0,0 @@
|
|||
minetest.register_alias("rubenfood:milk","animalmaterials:milk")
|
||||
minetest.register_alias("rubenfood:egg","animalmaterials:egg")
|
|
@ -1 +0,0 @@
|
|||
minetest.register_alias("rubenfood:flour","farming:flour")
|
81
support.lua
Normal file
|
@ -0,0 +1,81 @@
|
|||
-- RUBENFOOD MOD
|
||||
-- A mod written by rubenwardy that adds
|
||||
-- food to the minetest game
|
||||
-- ======================================
|
||||
-- >> rubenfood/support.lua
|
||||
-- adds support for other mods
|
||||
-- adds items and aliases that are needed
|
||||
-- ======================================
|
||||
-- [support]
|
||||
-- ======================================
|
||||
|
||||
print "RubenFood [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print "RubenFood [Support] - Farming Mod"
|
||||
node_implement("farming","farming:flour","rubenfood:flour",function()
|
||||
minetest.register_craftitem("rubenfood:flour", {
|
||||
description = "Flour",
|
||||
inventory_image = "farming_flour.png",
|
||||
})
|
||||
end)
|
||||
|
||||
node_implement("farming","farming:strawberry_item","rubenfood:strawberry",function()
|
||||
minetest.register_craftitem("rubenfood:strawberry", {
|
||||
description = "Strawberry",
|
||||
inventory_image = "farming_strawberry.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print "RubenFood [Support] - Animal Mod"
|
||||
node_implement("animalmaterials","animalmaterials:glass","rubenfood:cup",function()
|
||||
minetest.register_craftitem("rubenfood:cup",{
|
||||
description = "Glass",
|
||||
tiles = {"ruben_cup.png"},
|
||||
inventory_image = "ruben_cup.png",
|
||||
})
|
||||
end)
|
||||
|
||||
node_implement("animalmaterials","animalmaterials:egg","rubenfood:egg",function()
|
||||
minetest.register_craftitem("rubenfood:egg", {
|
||||
description = "Egg",
|
||||
image = "animalmaterials_egg.png",
|
||||
stack_max=10
|
||||
})
|
||||
end)
|
||||
|
||||
node_implement("animalmaterials","animalmaterials:milk","rubenfood:milk",function()
|
||||
minetest.register_craftitem("rubenfood:milk", {
|
||||
description = "Milk",
|
||||
image = "animalmaterials_milk.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { eatable=1 },
|
||||
stack_max=10
|
||||
})
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 559 B |
BIN
textures/farming_cake_mix.png
Normal file
After Width: | Height: | Size: 343 B |
BIN
textures/farming_flour.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
textures/farming_strawberry.png
Normal file
After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 918 B After Width: | Height: | Size: 918 B |
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 908 B |
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 942 B |
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 895 B |
Before Width: | Height: | Size: 873 B After Width: | Height: | Size: 873 B |
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 729 B |
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 780 B |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 842 B |
Before Width: | Height: | Size: 854 B After Width: | Height: | Size: 854 B |