summaryrefslogtreecommitdiff
path: root/support.lua
diff options
context:
space:
mode:
authorRubenwardy <anjayward@gmail.com>2012-08-31 14:09:41 +0100
committerRubenwardy <anjayward@gmail.com>2012-08-31 14:09:41 +0100
commitba2dbaf4665a88d4c58b73a79bd774ed423fe318 (patch)
tree54b8792c8e2bb4130c1f3413e7bda666ffd62c22 /support.lua
parent39b6184a874bbb69af88a2013eb7596770dc8bb9 (diff)
Did support.lua - dynamic external mod support
Diffstat (limited to 'support.lua')
-rw-r--r--support.lua81
1 files changed, 81 insertions, 0 deletions
diff --git a/support.lua b/support.lua
new file mode 100644
index 0000000..41d23fe
--- /dev/null
+++ b/support.lua
@@ -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)
+
+
+
+
+
+
+
+
+