From bacbbc9acf4be47f90a4cf53663741aee2ff82e2 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 13 Dec 2012 19:39:22 +0000 Subject: [PATCH] support for pilzadams mob mod --- .gitignore | 163 ++++++++++++++++++++++++++++++++++++++++++ food/meats.lua | 4 ++ food/meats.lua~ | 30 ++++++++ support.lua | 4 +- support.lua~ | 186 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 386 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 food/meats.lua~ create mode 100644 support.lua~ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ebd21a --- /dev/null +++ b/.gitignore @@ -0,0 +1,163 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +.builds +*.dotCover + +## TODO: If you have NuGet Package Restore enabled, uncomment this +#packages/ + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# ReSharper is a .NET coding add-in +_ReSharper* + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Others +[Bb]in +[Oo]bj +sql +TestResults +*.Cache +ClientBin +stylecop.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + + + +############ +## Windows +############ + +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +# Mac crap +.DS_Store diff --git a/food/meats.lua b/food/meats.lua index a4e67e8..094ab19 100644 --- a/food/meats.lua +++ b/food/meats.lua @@ -9,6 +9,8 @@ -- [craft] Meat -- ====================================== +if not minetest.get_modpath("mobs") then + minetest.register_craftitem("food:meat", { description = "Venison", inventory_image = "food_meat.png", @@ -21,6 +23,8 @@ minetest.register_craft({ cooktime = 20 }) +end + diff --git a/food/meats.lua~ b/food/meats.lua~ new file mode 100644 index 0000000..62aa5f2 --- /dev/null +++ b/food/meats.lua~ @@ -0,0 +1,30 @@ +-- RUBENFOOD MOD +-- A mod written by rubenwardy that adds +-- food to the minetest game +-- ====================================== +-- >> rubenfood/food/meats.lua +-- adds meat products +-- ====================================== +-- [regis-food] Meat +-- [craft] Meat +-- ====================================== + +if not minetest.get_modpath(modname) then + +minetest.register_craftitem("food:meat", { + description = "Venison", + inventory_image = "food_meat.png", +}) + +minetest.register_craft({ + type = "cooking", + output = "food:meat", + recipe = "food:meat_raw", + cooktime = 20 +}) + +end + + + + diff --git a/support.lua b/support.lua index dea19ea..24b2fbb 100644 --- a/support.lua +++ b/support.lua @@ -130,8 +130,9 @@ end) -print "Food [Support] - Animal Mod" +print "Food [Support] - Animal Mods" +node_implement("mobs","mobs:meat_raw","food:meat_raw",function() node_implement("animalmaterials","animalmaterials:meat_raw","food:meat_raw",function() minetest.register_craftitem("food:meat_raw", { description = "Raw meat", @@ -141,6 +142,7 @@ minetest.register_craftitem("food:meat_raw", { stack_max=25 }) end) +end) node_implement("animalmaterials","animalmaterials:egg","food:egg",function() minetest.register_craftitem("food:egg", { diff --git a/support.lua~ b/support.lua~ new file mode 100644 index 0000000..36948ee --- /dev/null +++ b/support.lua~ @@ -0,0 +1,186 @@ +-- RUBENFOOD MOD +-- A mod written by rubenwardy that adds +-- food to the minetest game +-- ====================================== +-- >> rubenfood/support.lua +-- adds support for other mods +-- ====================================== +-- [support] +-- ====================================== + +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 + + + + + + + +print "Food [Support] - Farming Mod" +node_implement("farming","farming:flour","food:flour",function() + minetest.register_craftitem("food:flour", { + description = "Flour", + inventory_image = "farming_flour.png", +}) +end) + +node_implement("farming","farming:bread","food:bread",function() + + + +minetest.register_craftitem("food:bread", { + description = "Bread", + inventory_image = "food_bread.png", + stack_max = 1, + on_use = minetest.item_eat(10), + groups={food=2}, +}) +minetest.register_craft({ + output = "food:dough", + type = "shapeless", + recipe = {"food:flour", "food:flour", "food:flour", "food:flour", "bucket:bucket_water"}, + replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}, +}) +minetest.register_craft({ + type = "cooking", + output = "food:bread", + recipe = "food:dough", + cooktime = 10, +}) + + + + +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) + + + +print "Food [Support] - Farming_Plus Mod" + +node_implement("farming_plus","farming_plus:strawberry_item","food:strawberry",function() +minetest.register_craftitem("food:strawberry", { + description = "Strawberry", + inventory_image = "farming_strawberry.png", + on_use = minetest.item_eat(2), +}) +end) + +node_implement("farming_plus","farming_plus:carrot_item","food:carrot",function() +minetest.register_craftitem("food:carrot", { + 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) + +node_implement("farming_plus","farming_plus:banana","food:banana",function() +minetest.register_node("food:banana", { + 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) + +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) + + + + + +print "Food [Support] - Animal Mods" + +node_implement("mobs","mobs:meat_raw","food:meat_raw",function() +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) +end} + +node_implement("animalmaterials","animalmaterials:egg","food:egg",function() + minetest.register_craftitem("food:egg", { + description = "Egg", + image = "animalmaterials_egg.png", + stack_max=10 +}) +end) + +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) + +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) + + + + + + + + + + +