diff options
author | Rubenwardy <anjayward@gmail.com> | 2012-08-31 14:09:41 +0100 |
---|---|---|
committer | Rubenwardy <anjayward@gmail.com> | 2012-08-31 14:09:41 +0100 |
commit | ba2dbaf4665a88d4c58b73a79bd774ed423fe318 (patch) | |
tree | 54b8792c8e2bb4130c1f3413e7bda666ffd62c22 | |
parent | 39b6184a874bbb69af88a2013eb7596770dc8bb9 (diff) |
Did support.lua - dynamic external mod support
-rw-r--r-- | baking.lua (renamed from rubenfood/baking.lua) | 0 | ||||
-rw-r--r-- | cakes.lua (renamed from rubenfood/cakes.lua) | 0 | ||||
-rw-r--r-- | dairy.lua (renamed from rubenfood/dairy.lua) | 6 | ||||
-rw-r--r-- | depends.txt (renamed from rubenfood/depends.txt) | 0 | ||||
-rw-r--r-- | drinks.lua (renamed from rubenfood/drinks.lua) | 0 | ||||
-rw-r--r-- | fruits.lua (renamed from rubenfood/fruits.lua) | 0 | ||||
-rw-r--r-- | init.lua (renamed from rubenfood/init.lua) | 7 | ||||
-rw-r--r-- | modpack.txt | 0 | ||||
-rw-r--r-- | rubenfood_animals/init.lua | 2 | ||||
-rw-r--r-- | rubenfood_farming/init.lua | 1 | ||||
-rw-r--r-- | support.lua | 81 | ||||
-rw-r--r-- | textures/animalmaterials_egg.png (renamed from rubenfood/textures/animalmaterials_egg.png) | bin | 672 -> 672 bytes | |||
-rw-r--r-- | textures/animalmaterials_milk.png (renamed from rubenfood/textures/animalmaterials_milk.png) | bin | 559 -> 559 bytes | |||
-rw-r--r-- | textures/farming_cake_mix.png | bin | 0 -> 343 bytes | |||
-rw-r--r-- | textures/farming_flour.png | bin | 0 -> 344 bytes | |||
-rw-r--r-- | textures/farming_strawberry.png | bin | 0 -> 250 bytes | |||
-rw-r--r-- | textures/ruben_bread.png (renamed from rubenfood/textures/ruben_bread.png) | bin | 918 -> 918 bytes | |||
-rw-r--r-- | textures/ruben_cake.png (renamed from rubenfood/textures/ruben_cake.png) | bin | 908 -> 908 bytes | |||
-rw-r--r-- | textures/ruben_cake_choco.png (renamed from rubenfood/textures/ruben_cake_choco.png) | bin | 942 -> 942 bytes | |||
-rw-r--r-- | textures/ruben_cigar.png (renamed from rubenfood/textures/ruben_cigar.png) | bin | 693 -> 693 bytes | |||
-rw-r--r-- | textures/ruben_coffee.png (renamed from rubenfood/textures/ruben_coffee.png) | bin | 1399 -> 1399 bytes | |||
-rw-r--r-- | textures/ruben_coffee_cooked.png (renamed from rubenfood/textures/ruben_coffee_cooked.png) | bin | 895 -> 895 bytes | |||
-rw-r--r-- | textures/ruben_coffee_cup.png (renamed from rubenfood/textures/ruben_coffee_cup.png) | bin | 873 -> 873 bytes | |||
-rw-r--r-- | textures/ruben_cup.png (renamed from rubenfood/textures/ruben_cup.png) | bin | 564 -> 564 bytes | |||
-rw-r--r-- | textures/ruben_juice_apple.png (renamed from rubenfood/textures/ruben_juice_apple.png) | bin | 729 -> 729 bytes | |||
-rw-r--r-- | textures/ruben_mug.png (renamed from rubenfood/textures/ruben_mug.png) | bin | 780 -> 780 bytes | |||
-rw-r--r-- | textures/ruben_pastry.png (renamed from rubenfood/textures/ruben_pastry.png) | bin | 842 -> 842 bytes | |||
-rw-r--r-- | textures/ruben_pastry_choco.png (renamed from rubenfood/textures/ruben_pastry_choco.png) | bin | 854 -> 854 bytes |
28 files changed, 83 insertions, 14 deletions
diff --git a/rubenfood/baking.lua b/baking.lua index 98da7ad..98da7ad 100644 --- a/rubenfood/baking.lua +++ b/baking.lua diff --git a/rubenfood/cakes.lua b/cakes.lua index 09d1042..09d1042 100644 --- a/rubenfood/cakes.lua +++ b/cakes.lua diff --git a/rubenfood/dairy.lua b/dairy.lua index c0388a4..c2ca2dd 100644 --- a/rubenfood/dairy.lua +++ b/dairy.lua @@ -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
diff --git a/rubenfood/depends.txt b/depends.txt index a916278..a916278 100644 --- a/rubenfood/depends.txt +++ b/depends.txt diff --git a/rubenfood/drinks.lua b/drinks.lua index 04d0ba5..04d0ba5 100644 --- a/rubenfood/drinks.lua +++ b/drinks.lua diff --git a/rubenfood/fruits.lua b/fruits.lua index ff7a2b0..ff7a2b0 100644 --- a/rubenfood/fruits.lua +++ b/fruits.lua diff --git a/rubenfood/init.lua b/init.lua index ce0a043..a0f3b02 100644 --- a/rubenfood/init.lua +++ b/init.lua @@ -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",
diff --git a/modpack.txt b/modpack.txt deleted file mode 100644 index e69de29..0000000 --- a/modpack.txt +++ /dev/null diff --git a/rubenfood_animals/init.lua b/rubenfood_animals/init.lua deleted file mode 100644 index aa3cdf2..0000000 --- a/rubenfood_animals/init.lua +++ /dev/null @@ -1,2 +0,0 @@ -minetest.register_alias("rubenfood:milk","animalmaterials:milk")
-minetest.register_alias("rubenfood:egg","animalmaterials:egg")
\ No newline at end of file diff --git a/rubenfood_farming/init.lua b/rubenfood_farming/init.lua deleted file mode 100644 index ab5e489..0000000 --- a/rubenfood_farming/init.lua +++ /dev/null @@ -1 +0,0 @@ -minetest.register_alias("rubenfood:flour","farming:flour")
\ No newline at end of file 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)
+
+
+
+
+
+
+
+
+
diff --git a/rubenfood/textures/animalmaterials_egg.png b/textures/animalmaterials_egg.png Binary files differindex 50010de..50010de 100644 --- a/rubenfood/textures/animalmaterials_egg.png +++ b/textures/animalmaterials_egg.png diff --git a/rubenfood/textures/animalmaterials_milk.png b/textures/animalmaterials_milk.png Binary files differindex e535264..e535264 100644 --- a/rubenfood/textures/animalmaterials_milk.png +++ b/textures/animalmaterials_milk.png diff --git a/textures/farming_cake_mix.png b/textures/farming_cake_mix.png Binary files differnew file mode 100644 index 0000000..5c4b197 --- /dev/null +++ b/textures/farming_cake_mix.png diff --git a/textures/farming_flour.png b/textures/farming_flour.png Binary files differnew file mode 100644 index 0000000..7c302bf --- /dev/null +++ b/textures/farming_flour.png diff --git a/textures/farming_strawberry.png b/textures/farming_strawberry.png Binary files differnew file mode 100644 index 0000000..0a80f45 --- /dev/null +++ b/textures/farming_strawberry.png diff --git a/rubenfood/textures/ruben_bread.png b/textures/ruben_bread.png Binary files differindex 6dca983..6dca983 100644 --- a/rubenfood/textures/ruben_bread.png +++ b/textures/ruben_bread.png diff --git a/rubenfood/textures/ruben_cake.png b/textures/ruben_cake.png Binary files differindex 250303b..250303b 100644 --- a/rubenfood/textures/ruben_cake.png +++ b/textures/ruben_cake.png diff --git a/rubenfood/textures/ruben_cake_choco.png b/textures/ruben_cake_choco.png Binary files differindex b75f8ed..b75f8ed 100644 --- a/rubenfood/textures/ruben_cake_choco.png +++ b/textures/ruben_cake_choco.png diff --git a/rubenfood/textures/ruben_cigar.png b/textures/ruben_cigar.png Binary files differindex f2275ec..f2275ec 100644 --- a/rubenfood/textures/ruben_cigar.png +++ b/textures/ruben_cigar.png diff --git a/rubenfood/textures/ruben_coffee.png b/textures/ruben_coffee.png Binary files differindex 944fd73..944fd73 100644 --- a/rubenfood/textures/ruben_coffee.png +++ b/textures/ruben_coffee.png diff --git a/rubenfood/textures/ruben_coffee_cooked.png b/textures/ruben_coffee_cooked.png Binary files differindex 8f75897..8f75897 100644 --- a/rubenfood/textures/ruben_coffee_cooked.png +++ b/textures/ruben_coffee_cooked.png diff --git a/rubenfood/textures/ruben_coffee_cup.png b/textures/ruben_coffee_cup.png Binary files differindex 272299a..272299a 100644 --- a/rubenfood/textures/ruben_coffee_cup.png +++ b/textures/ruben_coffee_cup.png diff --git a/rubenfood/textures/ruben_cup.png b/textures/ruben_cup.png Binary files differindex 9fadc0d..9fadc0d 100644 --- a/rubenfood/textures/ruben_cup.png +++ b/textures/ruben_cup.png diff --git a/rubenfood/textures/ruben_juice_apple.png b/textures/ruben_juice_apple.png Binary files differindex fc2b8ef..fc2b8ef 100644 --- a/rubenfood/textures/ruben_juice_apple.png +++ b/textures/ruben_juice_apple.png diff --git a/rubenfood/textures/ruben_mug.png b/textures/ruben_mug.png Binary files differindex f68173b..f68173b 100644 --- a/rubenfood/textures/ruben_mug.png +++ b/textures/ruben_mug.png diff --git a/rubenfood/textures/ruben_pastry.png b/textures/ruben_pastry.png Binary files differindex 2df203b..2df203b 100644 --- a/rubenfood/textures/ruben_pastry.png +++ b/textures/ruben_pastry.png diff --git a/rubenfood/textures/ruben_pastry_choco.png b/textures/ruben_pastry_choco.png Binary files differindex 578637b..578637b 100644 --- a/rubenfood/textures/ruben_pastry_choco.png +++ b/textures/ruben_pastry_choco.png |