Corrected wrong push
							
								
								
									
										163
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -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 | ||||||
							
								
								
									
										48
									
								
								IDEAS.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,48 @@ | |||||||
|  | Recipes coming on release of this mod. | ||||||
|  | Read Code to find recipes before then | ||||||
|  |  | ||||||
|  | Items | ||||||
|  | * Cup / Glass | ||||||
|  | * Mug | ||||||
|  | * Oven | ||||||
|  |  | ||||||
|  | Diary | ||||||
|  | * Butter | ||||||
|  | * Cheese | ||||||
|  |  | ||||||
|  | Sandwiches | ||||||
|  | * Venison Sandwich | ||||||
|  | * Cheese Sandwich | ||||||
|  | * Burger | ||||||
|  |  | ||||||
|  | Baking | ||||||
|  | * Bread | ||||||
|  | * Bread Slices | ||||||
|  | * Buns | ||||||
|  |  | ||||||
|  | Cakes | ||||||
|  | * Plain Cake | ||||||
|  | * Chocolate Cake | ||||||
|  | * Carrot Cake | ||||||
|  |  | ||||||
|  | Tarts | ||||||
|  | * Strawberry Tart | ||||||
|  | - Chocolate Tart | ||||||
|  |  | ||||||
|  | Crumbles | ||||||
|  | * Rhubarb Crumble | ||||||
|  |  | ||||||
|  | Drinks | ||||||
|  | * Apple Juice | ||||||
|  | * Cactus Juice | ||||||
|  | * Coffee | ||||||
|  | * Coffee Beans | ||||||
|  | * Hot Chocolate | ||||||
|  | - Chocolate Milk Shake | ||||||
|  | - Banana Milk Shake | ||||||
|  | - Strawberry Milk Shake | ||||||
|  |  | ||||||
|  | Misc | ||||||
|  | * Cigerettes (takes 1 life away) | ||||||
|  | * Cooked Meat | ||||||
|  | * Sugar | ||||||
							
								
								
									
										99
									
								
								dairy.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,99 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ====================================== | ||||||
|  | -- >> rubenfood/diary.lua | ||||||
|  | -- adds diary products | ||||||
|  | -- ====================================== | ||||||
|  | -- [regis-food] Cheese | ||||||
|  | -- [craft] Cheese | ||||||
|  | -- [regis-item] Butter | ||||||
|  | -- [craft] Butter | ||||||
|  | -- ====================================== | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:butter", { | ||||||
|  | 	description = "Butter", | ||||||
|  | 	inventory_image = "food_butter.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:cheese", { | ||||||
|  | 	description = "Cheese", | ||||||
|  | 	inventory_image = "food_cheese.png", | ||||||
|  | 	on_use = minetest.item_eat(4), | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:butter" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	         {'"food:milk"','"food:milk"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:cheese" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	         {'"food:butter"','"food:butter"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | -- | ||||||
|  | -- | ||||||
|  | -- CHOCOLATE | ||||||
|  | -- | ||||||
|  | -- | ||||||
|  |  | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:chocolate_dark", { | ||||||
|  | 	description = "Dark Chocolate", | ||||||
|  | 	inventory_image = "food_choco_dark.png", | ||||||
|  | 	on_use = minetest.item_eat(2), | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:chocolate_milk", { | ||||||
|  | 	description = "Milk Chocolate", | ||||||
|  | 	inventory_image = "food_choco_milk.png", | ||||||
|  | 	on_use = minetest.item_eat(3), | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:chocolate_powder", { | ||||||
|  | 	description = "Chocolate Powder", | ||||||
|  | 	inventory_image = "food_choco_powder.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:chocolate_dark" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	         {'"food:cocoa"','"food:cocoa"','"food:cocoa"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:chocolate_powder" 1', | ||||||
|  | 	recipe = { | ||||||
|  |                  {"food:cocoa","food:cocoa","food:cocoa"}, | ||||||
|  | 	         {"food:cocoa","food:cocoa","food:cocoa"}, | ||||||
|  | 	         {"food:cocoa","food:cocoa","food:cocoa"}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:chocolate_milk" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	         {"","food:milk",""}, | ||||||
|  | 	         {"food:cocoa","food:cocoa","food:cocoa"}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:chocolate_milk" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	         {"","food:milk","food:chocolate_dark"}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -1,2 +1 @@ | |||||||
| default | default | ||||||
| food |  | ||||||
|   | |||||||
| @@ -11,24 +11,49 @@ | |||||||
| -- [craft] Hot Chocolate | -- [craft] Hot Chocolate | ||||||
| -- ===================================== | -- ===================================== | ||||||
|  |  | ||||||
| print ("Food [Modern] - Loading Hot") | print ("RubenFood [Master] - Loading Hot") | ||||||
|  |  | ||||||
|  | -----------------------------Coffee----------------------------- | ||||||
|  |  | ||||||
| -------------------------Hot Chocolate-------------------------- | minetest.register_craftitem("food:coffeebean",{ | ||||||
|  | 	description = "Raw Coffee Bean", | ||||||
|  | 	tiles = {"food_coffee.png"}, | ||||||
|  | 	inventory_image = "food_coffee.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:hotchoco", { | minetest.register_craftitem("food:coffeebean_cooked",{ | ||||||
| 	description = "Hot Chocolate", | 	description = "Cooked Coffee Bean", | ||||||
| 	inventory_image = "food_hotchoco.png", | 	tiles = {"food_coffee_cooked.png"}, | ||||||
| 	on_use = minetest.item_eat(4), | 	inventory_image = "food_coffee_cooked.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:coffee", { | ||||||
|  | 	description = "Coffee", | ||||||
|  | 	inventory_image = "food_coffee_cup.png", | ||||||
|  | 	on_use = minetest.item_eat(10), | ||||||
|  | 	groups={food=1}, | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_craft({ | minetest.register_craft({ | ||||||
| output = '"food_modern:hotchoco" 1 ', | 	output = '"food:coffeebean" 1', | ||||||
| recipe = { | 	recipe = { | ||||||
| {"food:chocolate_powder"}, | 		{'""','"default:dry_shrub"','""'}, | ||||||
| {"food:milk"}, | 		{'""','"default:dry_shrub"','""'}, | ||||||
| {"food:mug"}, | 		{'""','"default:dry_shrub"','""'}, | ||||||
| }, | 	} | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:coffee" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 		{'""','"food:coffeebean_cooked"','""'}, | ||||||
|  | 		{'""','"food:coffeebean_cooked"','""'}, | ||||||
|  | 		{'""','"food:cup"','""'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:coffeebean_cooked", | ||||||
|  | 	recipe = "food:coffeebean", | ||||||
|  | }) | ||||||
|   | |||||||
							
								
								
									
										50
									
								
								drinks/juice.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,50 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ===================================== | ||||||
|  | -- >> rubenfood/drinks/juice.lua | ||||||
|  | -- adds juices | ||||||
|  | -- ===================================== | ||||||
|  | -- [regis-food] Apple Juice | ||||||
|  | -- [craft] Cactus Juice | ||||||
|  | -- [regis-food] Cactus Juice | ||||||
|  | -- [craft] Cactus Juice | ||||||
|  | -- ===================================== | ||||||
|  |  | ||||||
|  | print ("RubenFood [Master] - Loading Juices") | ||||||
|  |  | ||||||
|  | --------------------------Apple Juice-------------------------- | ||||||
|  | minetest.register_craftitem("food:apple_juice", { | ||||||
|  | 	description = "Apple Juice", | ||||||
|  | 	inventory_image = "food_juice_apple.png", | ||||||
|  | 	on_use = minetest.item_eat(2) | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:apple_juice" 4', | ||||||
|  | 	recipe = { | ||||||
|  | 		{"","",""}, | ||||||
|  | 		{"","default:apple",""}, | ||||||
|  | 		{"","food:cup",""}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ----------------------cactus juice---------------------------- | ||||||
|  | minetest.register_craftitem("food:cactus_juice", { | ||||||
|  | 	description = "Cactuz Juice", | ||||||
|  | 	inventory_image = "food_juice_cactus.png", | ||||||
|  | 	on_use = minetest.item_eat(2), | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:cactus_juice" 4', | ||||||
|  | 	recipe = { | ||||||
|  | 		{'""','""','""'}, | ||||||
|  | 		{'""','"default:cactus"','""'}, | ||||||
|  | 		{'""','"food:cup"','""'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
| @@ -1,53 +0,0 @@ | |||||||
| -- RUBENFOOD MOD |  | ||||||
| -- A mod written by rubenwardy that adds |  | ||||||
| -- food to the minetest game |  | ||||||
| -- ===================================== |  | ||||||
| -- >> rubenfood/drinks/milkshakes.lua |  | ||||||
| -- adds drinks |  | ||||||
| -- ===================================== |  | ||||||
| -- |  | ||||||
| -- ===================================== |  | ||||||
|  |  | ||||||
| print ("Food [Modern] - Loading Milk Shakes") |  | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:ms_chocolate", { |  | ||||||
| 	description = "Chocolate Milkshake", |  | ||||||
| 	inventory_image = "food_ms_chocolate.png", |  | ||||||
| 	on_use = minetest.item_eat(4) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craft({ |  | ||||||
| 	output = "food_modern:ms_chocolate", |  | ||||||
| 	recipe = { |  | ||||||
| 		{"food:chocolate_milk"}, |  | ||||||
| 		{"food:cup"},	 |  | ||||||
| 	}, |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:ms_strawberry", { |  | ||||||
| 	description = "Strawberry Milkshake", |  | ||||||
| 	inventory_image = "food_ms_strawberry.png", |  | ||||||
| 	on_use = minetest.item_eat(4) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craft({ |  | ||||||
| 	output = "food_modern:ms_strawberry", |  | ||||||
| 	recipe = { |  | ||||||
| 		{"food:strawberry"}, |  | ||||||
| 		{"food:cup"},	 |  | ||||||
| 	}, |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:ms_banana", { |  | ||||||
| 	description = "Banana Milkshake", |  | ||||||
| 	inventory_image = "food_ms_banana.png", |  | ||||||
| 	on_use = minetest.item_eat(4) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craft({ |  | ||||||
| 	output = "food_modern:ms_banana", |  | ||||||
| 	recipe = { |  | ||||||
| 		{"food:banana"}, |  | ||||||
| 		{"food:cup"},	 |  | ||||||
| 	}, |  | ||||||
| }) |  | ||||||
							
								
								
									
										69
									
								
								food/baking.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,69 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ===================================== | ||||||
|  | -- >> rubenfood/food/baking.lua | ||||||
|  | -- adds bread and pies | ||||||
|  | -- ===================================== | ||||||
|  | -- [regis-food] Bread | ||||||
|  | -- [regis-food] Bread Slice | ||||||
|  | -- [craft] Bread Slice | ||||||
|  | -- [regis-food] Bun | ||||||
|  | -- [craft] Bun | ||||||
|  | -- [regis-item] Bun Dough | ||||||
|  | -- [craft] Bun Dough | ||||||
|  | -- ===================================== | ||||||
|  |  | ||||||
|  | print "RubenFood [Master] - Loading Bread" | ||||||
|  | -- doughs | ||||||
|  | if not minetest.get_modpath("farming") then | ||||||
|  |  | ||||||
|  | else | ||||||
|  | minetest.register_craftitem(":farming:cake_mix", { | ||||||
|  | 	description = "Dough", | ||||||
|  | 	inventory_image = "farming_cake_mix.png", | ||||||
|  | }) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:bread_slice" 10', | ||||||
|  | 	recipe = { | ||||||
|  | 		{'"food:bread"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:bread_slice", { | ||||||
|  | 	description = "Bread Slice", | ||||||
|  | 	inventory_image = "food_bread_slice.png", | ||||||
|  | 	on_use = minetest.item_eat(2), | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | print "RubenFood [Master] - Loading Buns" | ||||||
|  | minetest.register_craftitem("food:bun_mix", { | ||||||
|  | 	description = "Bun Mix", | ||||||
|  | 	inventory_image = "food_bun_mix.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:bun", { | ||||||
|  | 	description = "Bun", | ||||||
|  | 	inventory_image = "food_bun.png", | ||||||
|  | 	on_use = minetest.item_eat(4), | ||||||
|  | 	groups={food=2}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:bun", | ||||||
|  | 	recipe = "food:bun_mix", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:bun_mix" 5', | ||||||
|  | 	recipe = { | ||||||
|  |         {"food:flour", "food:flour", "bucket:bucket_water"}, | ||||||
|  |         }, | ||||||
|  | 	replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}} | ||||||
|  | }) | ||||||
							
								
								
									
										11
									
								
								food/meats.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,11 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ====================================== | ||||||
|  | -- >> rubenfood/food/meats.lua | ||||||
|  | -- adds meat products | ||||||
|  | -- ====================================== | ||||||
|  | -- Nothing here yet | ||||||
|  | -- ====================================== | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -13,20 +13,36 @@ | |||||||
| -- [craft] Burger | -- [craft] Burger | ||||||
| -- ====================================== | -- ====================================== | ||||||
|  |  | ||||||
| print "Food [Modern] - Loading Burgers" | print "RubenFood [Master] - Loading Sandwiches" | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:burger", { | minetest.register_craftitem("food:sw_meat", { | ||||||
| 	description = "Burger", | 	description = "Venison Sandwich", | ||||||
| 	inventory_image = "food_burger.png", | 	inventory_image = "food_sw_meat.png", | ||||||
| 	on_use = minetest.item_eat(10), | 	on_use = minetest.item_eat(10), | ||||||
| 	groups={food=2}, | 	groups={food=2}, | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:sw_cheese", { | ||||||
|  | 	description = "Cheese Sandwich", | ||||||
|  | 	inventory_image = "food_sw_cheese.png", | ||||||
|  | 	on_use = minetest.item_eat(8), | ||||||
|  | 	groups={food=2}, | ||||||
|  | }) | ||||||
|  |  | ||||||
| minetest.register_craft({ | minetest.register_craft({ | ||||||
| 	output = '"food_modern:burger" 1', | 	output = '"food:sw_meat" 1', | ||||||
| 	recipe = { | 	recipe = { | ||||||
|                  {"",'"food:bun"',""}, |                  {"",'"food:bread_slice"',""}, | ||||||
| 		{"food:butter","food:meat",'"food:butter"'}, | 		{"food:butter","food:meat",'"food:butter"'}, | ||||||
| 		{"",'"food:bun"',""}, | 		{"",'"food:bread_slice"',""}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:sw_cheese" 1', | ||||||
|  | 	recipe = { | ||||||
|  |                  {"",'"food:bread_slice"',""}, | ||||||
|  | 		{"food:butter","food:cheese",'"food:butter"'}, | ||||||
|  | 		{"",'"food:bread_slice"',""}, | ||||||
| 	} | 	} | ||||||
| }) | }) | ||||||
|   | |||||||
							
								
								
									
										72
									
								
								food/soup.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,72 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ===================================== | ||||||
|  | -- >> rubenfood/food/soup.lua | ||||||
|  | -- adds soup and stews | ||||||
|  | -- ===================================== | ||||||
|  | --  | ||||||
|  | -- ===================================== | ||||||
|  |  | ||||||
|  | print "Food [Master] - Loading Soups and Stews" | ||||||
|  |  | ||||||
|  | ----------------------Tomato----------------------------- | ||||||
|  | minetest.register_craftitem("food:soup_tomato", { | ||||||
|  | 	description = "Tomato Soup", | ||||||
|  | 	inventory_image = "food_soup_tomato.png", | ||||||
|  | 	on_use = minetest.item_eat(4), | ||||||
|  | 	groups={food=2}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:soup_tomato_raw", { | ||||||
|  | 	description = "Raw Tomato Soup", | ||||||
|  | 	inventory_image = "food_soup_tomato_raw.png", | ||||||
|  | 	groups={food=2}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:soup_tomato", | ||||||
|  | 	recipe = "food:soup_tomato_raw", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:soup_tomato_raw" 1', | ||||||
|  | 	recipe = { | ||||||
|  |         	{"", "", ""}, | ||||||
|  |         	{"bucket:bucket_water", "food:tomato", "bucket:bucket_water"}, | ||||||
|  | 		{"", "food:bowl", ""}, | ||||||
|  |         }, | ||||||
|  | 	replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ----------------------Chicken----------------------------- | ||||||
|  | minetest.register_craftitem("food:soup_chicken", { | ||||||
|  | 	description = "Chicken Soup", | ||||||
|  | 	inventory_image = "food_soup_chicken.png", | ||||||
|  | 	on_use = minetest.item_eat(4), | ||||||
|  | 	groups={food=2}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:soup_chicken_raw", { | ||||||
|  | 	description = "Raw Chicken Soup", | ||||||
|  | 	inventory_image = "food_soup_chicken_raw.png", | ||||||
|  | 	groups={food=2}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:soup_chicken", | ||||||
|  | 	recipe = "food:soup_chicken_raw", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:soup_chicken_raw" 1', | ||||||
|  | 	recipe = { | ||||||
|  |         	{"", "", ""}, | ||||||
|  |         	{"bucket:bucket_water", "food:meat", "bucket:bucket_water"}, | ||||||
|  | 		{"", "food:bowl", ""}, | ||||||
|  |         }, | ||||||
|  | 	replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}} | ||||||
|  | }) | ||||||
							
								
								
									
										84
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						| @@ -10,16 +10,88 @@ | |||||||
| -- [regis-food] Cigerette (-4) | -- [regis-food] Cigerette (-4) | ||||||
| -- ===================================== | -- ===================================== | ||||||
|  |  | ||||||
| print ("Food: Loading extension: [Modern]") | print ("Food: Loading mainframe: [Master]") | ||||||
|  |  | ||||||
| ----------------------Load Files----------------------------- | ----------------------Load Files----------------------------- | ||||||
|  | dofile(minetest.get_modpath("food").."/support.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/tools/oven.lua") | ||||||
|  |  | ||||||
|  | dofile(minetest.get_modpath("food").."/dairy.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/food/meats.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/food/sandwich.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/food/baking.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/food/soup.lua") | ||||||
|  |  | ||||||
|  | dofile(minetest.get_modpath("food").."/snacks/crumbles.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/snacks/cakes.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/snacks/tarts.lua") | ||||||
|  |  | ||||||
|  | dofile(minetest.get_modpath("food").."/drinks/juice.lua") | ||||||
|  | dofile(minetest.get_modpath("food").."/drinks/hot.lua") | ||||||
|  |  | ||||||
|  |  | ||||||
| dofile(minetest.get_modpath("food_modern").."/food/sandwich.lua") |  | ||||||
|  |  | ||||||
| dofile(minetest.get_modpath("food_modern").."/snacks/misc.lua") | ----------------------------Cup------------------------------ | ||||||
|  |  | ||||||
| dofile(minetest.get_modpath("food_modern").."/drinks/hot.lua") | minetest.register_craftitem("food:mug",{ | ||||||
| dofile(minetest.get_modpath("food_modern").."/drinks/milkshakes.lua") | 	description = "Mug", | ||||||
|  | 	inventory_image = "food_mug.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
| print("Food: food_modern extension loaded") | minetest.register_craftitem("food:clay_mug",{ | ||||||
|  | 	description = "Clay Mug", | ||||||
|  | 	inventory_image = "food_clay_mug.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:clay_mug" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 		{"default:clay_lump","","default:clay_lump"}, | ||||||
|  | 		{"default:clay_lump","","default:clay_lump"}, | ||||||
|  | 		{"default:clay_lump","default:clay_lump","default:clay_lump"}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:mug", | ||||||
|  | 	recipe = "food:clay_mug", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | -----------------------------Bowl------------------------------- | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:bowl",{ | ||||||
|  | 	description = "Bowl", | ||||||
|  | 	inventory_image = "food_bowl.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | -----------------------------Sugar------------------------------ | ||||||
|  | minetest.register_craftitem("food:sugar", { | ||||||
|  | 	description = "Sugar", | ||||||
|  | 	inventory_image = "food_sugar.png", | ||||||
|  | }) | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:sugar" 20', | ||||||
|  | 	recipe = { | ||||||
|  | 		{'"default:papyrus"'}, | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | ----------------------------Cigerete---------------------------- | ||||||
|  | minetest.register_craftitem("food:cigarette", { | ||||||
|  | 	description = "Cigarette", | ||||||
|  | 	inventory_image = "food_cigar.png", | ||||||
|  | 	on_use = minetest.item_eat(-4), | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:cigarette" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 		{'"default:dry_shrub"','"default:dry_shrub"','"default:dry_shrub"'}, | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | print("food: Mainframe loaded") | ||||||
|   | |||||||
							
								
								
									
										101
									
								
								snacks/cakes.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,101 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ===================================== | ||||||
|  | -- >> rubenfood/snacks/cakes.lua | ||||||
|  | -- adds cakes | ||||||
|  | -- ===================================== | ||||||
|  | -- [regis-food] Plain Cake | ||||||
|  | -- [craft] Plain Cake | ||||||
|  | -- [regis-food] Chocolate Cake | ||||||
|  | -- [craft] Chocolate Cake | ||||||
|  | -- [regis-food] Carrot Cake | ||||||
|  | -- [craft] Chocolate Cake | ||||||
|  | -- ===================================== | ||||||
|  | print("RubenFood [Master] - Loading Cakes") | ||||||
|  |  | ||||||
|  | --------------------------Cakes------------------------- | ||||||
|  | minetest.register_craftitem("food:cakemix_plain",{ | ||||||
|  | 	description = "Cake Mix", | ||||||
|  | 	inventory_image = "food_pastry.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:cakemix_choco",{ | ||||||
|  | 	description = "Chocolate Cake Mix", | ||||||
|  | 	inventory_image = "food_pastry_choco.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:cakemix_carrot",{ | ||||||
|  | 	description = "Carrot Cake Mix", | ||||||
|  | 	inventory_image = "food_pastry_carrot.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:cake", | ||||||
|  | 	recipe = "food:cakemix_plain", | ||||||
|  | 	cooktime = 10, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:cake_chocolate", | ||||||
|  | 	recipe = "food:cakemix_choco", | ||||||
|  | 	cooktime = 10, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:cake_carrot", | ||||||
|  | 	recipe = "food:cakemix_carrot", | ||||||
|  | 	cooktime = 10, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:cake", { | ||||||
|  | 	description = "Cake", | ||||||
|  | 	inventory_image = "food_cake.png", | ||||||
|  | 	on_use = minetest.item_eat(30), | ||||||
|  | 	groups={food=3}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:cake_chocolate", { | ||||||
|  | 	description = "Chocolate Cake", | ||||||
|  | 	inventory_image = "food_cake_choco.png", | ||||||
|  | 	on_use = minetest.item_eat(40), | ||||||
|  | 	groups={food=3}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:cake_carrot", { | ||||||
|  | 	description = "Carrot Cake", | ||||||
|  | 	inventory_image = "food_cake_carrot.png", | ||||||
|  | 	on_use = minetest.item_eat(40), | ||||||
|  | 	groups={food=3}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ----------------------------- Cake Pastry ---------------------------- | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:cakemix_plain" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 		{'"food:flour"','"food:sugar"','"food:egg"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:cakemix_choco" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	{'""','"default:dirt"','""'},	{'"food:flour"','"food:sugar"','"food:egg"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:cakemix_carrot" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	{'""','"food:carrot"','""'},	{'"food:flour"','"food:sugar"','"food:egg"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
							
								
								
									
										37
									
								
								snacks/crumbles.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,37 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ===================================== | ||||||
|  | -- >> rubenfood/snacks/crumbles.lua | ||||||
|  | -- adds crumbles | ||||||
|  | -- ===================================== | ||||||
|  | -- [regis-food] Rhubarb Crumble | ||||||
|  | -- ===================================== | ||||||
|  |  | ||||||
|  | print "RubenFood [Master] - Loading Crumbles" | ||||||
|  | --Crumbles | ||||||
|  | minetest.register_craftitem("food:crumble_rhubarb", { | ||||||
|  | 	description = "Rhubarb Crumble", | ||||||
|  | 	inventory_image = "food_crumble_rhubarb.png", | ||||||
|  | 	on_use = minetest.item_eat(30), | ||||||
|  | 	groups={food=3}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:crumble_rhubarb_raw", { | ||||||
|  | 	description = "Raw Rhubarb Crumble", | ||||||
|  | 	inventory_image = "food_crumble_rhubarb_raw.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:crumble_rhubarb_raw" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	{'"food:sugar"',"",""}, | ||||||
|  | 		{'"food:flour"','"food:rhubarb"','"food:butter"'} | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:crumble_rhubarb", | ||||||
|  | 	recipe = "food:crumble_rhubarb_raw", | ||||||
|  | }) | ||||||
| @@ -1,58 +0,0 @@ | |||||||
| -- RUBENFOOD MOD |  | ||||||
| -- A mod written by rubenwardy that adds |  | ||||||
| -- food to the minetest game |  | ||||||
| -- ===================================== |  | ||||||
| -- >> rubenfood/snacks/crumbles.lua |  | ||||||
| -- adds crumbles |  | ||||||
| -- ===================================== |  | ||||||
| -- [regis-food] Rhubarb Crumble |  | ||||||
| -- ===================================== |  | ||||||
|  |  | ||||||
| print "Food [Master] - Loading Splits" |  | ||||||
|  |  | ||||||
| -- Banana Split |  | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:banana_split_raw", { |  | ||||||
| 	description = "Banana Split Raw", |  | ||||||
| 	inventory_image = "food_banana_split_raw.png", |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:banana_split", { |  | ||||||
| 	description = "Banana Split", |  | ||||||
| 	inventory_image = "food_banana_split.png", |  | ||||||
| 	groups={food=1}, |  | ||||||
| 	on_use = minetest.item_eat(3), |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:popcorn", { |  | ||||||
| 	description = "Popcorn", |  | ||||||
| 	inventory_image = "food_popcorn.png", |  | ||||||
| 	groups={food=1}, |  | ||||||
| 	on_use = minetest.item_eat(1), |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craftitem("food_modern:corn_seed", { |  | ||||||
| 	description = "Corn Pips", |  | ||||||
| 	inventory_image = "food_corn_pip.png", |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craft({ |  | ||||||
| 	type = "cooking", |  | ||||||
| 	output = "food_modern:popcorn", |  | ||||||
| 	recipe = "food_modern:corn_seed", |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craft({ |  | ||||||
| 	output = "food_modern:corn_seed", |  | ||||||
| 	recipe = {{"farming:wheat_seed"}}, |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| minetest.register_craft({ |  | ||||||
| 	output = "food_modern:banana_split_raw", |  | ||||||
| 	recipe = {{"food:chocolate_milk"},{"food:banana"}}, |  | ||||||
| }) |  | ||||||
| minetest.register_craft({ |  | ||||||
| 	type = "cooking", |  | ||||||
| 	output = "food_modern:banana_split", |  | ||||||
| 	recipe = "food_modern:banana_split_raw", |  | ||||||
| }) |  | ||||||
							
								
								
									
										53
									
								
								snacks/tarts.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,53 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ====================================== | ||||||
|  | -- >> rubenfood/snacks/tarts.lua | ||||||
|  | -- adds diary products | ||||||
|  | -- ====================================== | ||||||
|  | -- [regis-food] Strawberry Tart | ||||||
|  | -- ====================================== | ||||||
|  |  | ||||||
|  | print "RubenFood [Master] - Loading Tarts" | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:tart_strawberry", { | ||||||
|  | 	description = "Strawberry Tart", | ||||||
|  | 	inventory_image = "food_tart_strawberry.png", | ||||||
|  | 	on_use = minetest.item_eat(30), | ||||||
|  | 	groups={food=3}, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:tart_base", { | ||||||
|  | 	description = "Tart Base", | ||||||
|  | 	inventory_image = "food_tart_base.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craftitem("food:tart_base_raw", { | ||||||
|  | 	description = "Raw Tart Base", | ||||||
|  | 	inventory_image = "food_tart_base_raw.png", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	type = "cooking", | ||||||
|  | 	output = "food:tart_base", | ||||||
|  | 	recipe = "food:tart_base_raw", | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:tart_strawberry" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	         {'"food:strawberry"'},{'"food:tart_base"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_craft({ | ||||||
|  | 	output = '"food:tart_base_raw" 1', | ||||||
|  | 	recipe = { | ||||||
|  | 	         {'"food:flour"','"food:milk"','"food:egg"'}, | ||||||
|  | 	} | ||||||
|  | }) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
							
								
								
									
										200
									
								
								support.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,200 @@ | |||||||
|  | -- 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("mobs","mobs:meat","food:meat",function() | ||||||
|  | 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) | ||||||
|  |  | ||||||
|  | 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) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								textures/animalmaterials_egg.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 672 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/animalmaterials_meat_raw.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 426 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/animalmaterials_milk.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 559 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/farming_banana.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 515 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/farming_cake_mix.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 343 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/farming_carrot.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 575 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/farming_cocoa_bean.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 184 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/farming_flour.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 344 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/farming_rhubarb.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 502 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/farming_strawberry.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 250 B | 
| Before Width: | Height: | Size: 264 B | 
| Before Width: | Height: | Size: 297 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_bowl.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 338 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_bread.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 918 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_bread_slice.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 519 B | 
| Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 457 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_bun_mix.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 474 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_butter.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 506 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_cake.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 908 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_cake_carrot.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 782 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_cake_choco.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 942 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_cheese.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 518 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_choco_dark.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 480 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_choco_milk.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 479 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_choco_powder.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 510 B | 
| Before Width: | Height: | Size: 730 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_clay_mug.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 596 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_coffee.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_coffee_cooked.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 895 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_coffee_cup.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 873 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_crumble_rhubarb.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 523 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_crumble_rhubarb_raw.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 500 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_cup.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 564 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_juice_apple.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 729 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_juice_cactus.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 867 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_meat.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 624 B | 
| Before Width: | Height: | Size: 283 B | 
| Before Width: | Height: | Size: 301 B | 
| Before Width: | Height: | Size: 300 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_mug.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 780 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_oven_bottom.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 731 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_oven_front.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 250 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_oven_front_active.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 293 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_oven_side.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 731 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_oven_top.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 731 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_pastry.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 842 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_pastry_carrot.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 846 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_pastry_choco.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 854 B | 
| Before Width: | Height: | Size: 368 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_soup_chicken _raw.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 356 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_soup_chicken.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 355 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_soup_tomato.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_soup_tomato_raw.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 321 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_sugar.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 4.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_sw_cheese.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 545 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_sw_meat.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 549 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_tart_base.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 521 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_tart_base_raw.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 521 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/food_tart_strawberry.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 548 B | 
							
								
								
									
										197
									
								
								tools/oven.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,197 @@ | |||||||
|  | -- RUBENFOOD MOD | ||||||
|  | -- A mod written by rubenwardy that adds | ||||||
|  | -- food to the minetest game | ||||||
|  | -- ====================================== | ||||||
|  | -- >> rubenfood/tools/oven.lua | ||||||
|  | -- adds diary products | ||||||
|  | -- ====================================== | ||||||
|  | -- todo [regis-furnace] Rings | ||||||
|  | -- [regis-furnace] Oven | ||||||
|  | -- ====================================== | ||||||
|  |  | ||||||
|  | local oven_inactive_formspec = | ||||||
|  | 	"invsize[8,9;]".. | ||||||
|  | 	"image[2,2;1,1;default_furnace_fire_bg.png]".. | ||||||
|  | 	"list[current_name;fuel;2,3;1,1;]".. | ||||||
|  | 	"list[current_name;src;2,1;1,1;]".. | ||||||
|  | 	"list[current_name;dst;5,1;2,2;]".. | ||||||
|  | 	"list[current_player;main;0,5;8,4;]" | ||||||
|  |  | ||||||
|  | minetest.register_node("food:oven", { | ||||||
|  | 	description = "Oven", | ||||||
|  | 	tiles = {"food_oven_top.png", "food_oven_bottom.png", "food_oven_side.png", | ||||||
|  | 		"food_oven_side.png", "food_oven_side.png", "food_oven_front.png"}, | ||||||
|  | 	paramtype2 = "facedir", | ||||||
|  | 	groups = {cracky=2}, | ||||||
|  | 	legacy_facedir_simple = true, | ||||||
|  | 	sounds = default.node_sound_stone_defaults(), | ||||||
|  | 	on_construct = function(pos) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("formspec", oven_inactive_formspec) | ||||||
|  | 		meta:set_string("infotext", "Oven") | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		inv:set_size("fuel", 1) | ||||||
|  | 		inv:set_size("src", 1) | ||||||
|  | 		inv:set_size("dst", 4) | ||||||
|  | 	end, | ||||||
|  | 	can_dig = function(pos,player) | ||||||
|  | 		local meta = minetest.env:get_meta(pos); | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		if not inv:is_empty("fuel") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("dst") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("src") then | ||||||
|  | 			return false | ||||||
|  | 		end | ||||||
|  | 		return true | ||||||
|  | 	end, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_node("food:oven_active", { | ||||||
|  | 	description = "Oven", | ||||||
|  | 	tiles = {"food_oven_top.png", "food_oven_bottom.png", "food_oven_side.png", | ||||||
|  | 		"food_oven_side.png", "food_oven_side.png", "food_oven_front_active.png"}, | ||||||
|  | 	paramtype2 = "facedir", | ||||||
|  | 	light_source = 8, | ||||||
|  | 	drop = "food:furnace", | ||||||
|  | 	groups = {cracky=2, not_in_creative_inventory=1}, | ||||||
|  | 	legacy_facedir_simple = true, | ||||||
|  | 	sounds = default.node_sound_stone_defaults(), | ||||||
|  | 	on_construct = function(pos) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("formspec", oven_inactive_formspec) | ||||||
|  | 		meta:set_string("infotext", "Oven"); | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		inv:set_size("fuel", 1) | ||||||
|  | 		inv:set_size("src", 1) | ||||||
|  | 		inv:set_size("dst", 4) | ||||||
|  | 	end, | ||||||
|  | 	can_dig = function(pos,player) | ||||||
|  | 		local meta = minetest.env:get_meta(pos); | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		if not inv:is_empty("fuel") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("dst") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("src") then | ||||||
|  | 			return false | ||||||
|  | 		end | ||||||
|  | 		return true | ||||||
|  | 	end, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | function hacky_swap_node(pos,name) | ||||||
|  | 	local node = minetest.env:get_node(pos) | ||||||
|  | 	local meta = minetest.env:get_meta(pos) | ||||||
|  | 	local meta0 = meta:to_table() | ||||||
|  | 	if node.name == name then | ||||||
|  | 		return | ||||||
|  | 	end | ||||||
|  | 	node.name = name | ||||||
|  | 	local meta0 = meta:to_table() | ||||||
|  | 	minetest.env:set_node(pos,node) | ||||||
|  | 	meta = minetest.env:get_meta(pos) | ||||||
|  | 	meta:from_table(meta0) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | minetest.register_abm({ | ||||||
|  | 	nodenames = {"food:oven","food:oven_active"}, | ||||||
|  | 	interval = 1.0, | ||||||
|  | 	chance = 1, | ||||||
|  | 	action = function(pos, node, active_object_count, active_object_count_wider) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		for i, name in ipairs({ | ||||||
|  | 				"fuel_totaltime", | ||||||
|  | 				"fuel_time", | ||||||
|  | 				"src_totaltime", | ||||||
|  | 				"src_time" | ||||||
|  | 		}) do | ||||||
|  | 			if meta:get_string(name) == "" then | ||||||
|  | 				meta:set_float(name, 0.0) | ||||||
|  | 			end | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  |  | ||||||
|  | 		local srclist = inv:get_list("src") | ||||||
|  | 		local cooked = nil | ||||||
|  | 		 | ||||||
|  | 		if srclist then | ||||||
|  | 			cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) | ||||||
|  | 		end | ||||||
|  | 		 | ||||||
|  | 		local was_active = false | ||||||
|  | 		 | ||||||
|  | 		if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then | ||||||
|  | 			was_active = true | ||||||
|  | 			meta:set_float("fuel_time", meta:get_float("fuel_time") + 1) | ||||||
|  | 			meta:set_float("src_time", meta:get_float("src_time") + 1) | ||||||
|  | 			if cooked and cooked.item and meta:get_float("src_time") >= cooked.time then | ||||||
|  | 				-- check if there's room for output in "dst" list | ||||||
|  | 				if inv:room_for_item("dst",cooked.item) then | ||||||
|  | 					-- Put result in "dst" list | ||||||
|  | 					inv:add_item("dst", cooked.item) | ||||||
|  | 					-- take stuff from "src" list | ||||||
|  | 					srcstack = inv:get_stack("src", 1) | ||||||
|  | 					srcstack:take_item() | ||||||
|  | 					inv:set_stack("src", 1, srcstack) | ||||||
|  | 				else | ||||||
|  | 					--print("Could not insert '"..cooked.item.."'") | ||||||
|  | 				end | ||||||
|  | 				meta:set_string("src_time", 0) | ||||||
|  | 			end | ||||||
|  | 		end | ||||||
|  | 		 | ||||||
|  | 		if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then | ||||||
|  | 			local percent = math.floor(meta:get_float("fuel_time") / | ||||||
|  | 					meta:get_float("fuel_totaltime") * 100) | ||||||
|  | 			meta:set_string("infotext","Oven active: "..percent.."%") | ||||||
|  | 			hacky_swap_node(pos,"food:oven_active") | ||||||
|  | 			meta:set_string("formspec", | ||||||
|  | 				"invsize[8,9;]".. | ||||||
|  | 				"image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:".. | ||||||
|  | 						(100-percent)..":default_furnace_fire_fg.png]".. | ||||||
|  | 				"list[current_name;fuel;2,3;1,1;]".. | ||||||
|  | 				"list[current_name;src;2,1;1,1;]".. | ||||||
|  | 				"list[current_name;dst;5,1;2,2;]".. | ||||||
|  | 				"list[current_player;main;0,5;8,4;]") | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		local fuel = nil | ||||||
|  | 		local cooked = nil | ||||||
|  | 		local fuellist = inv:get_list("fuel") | ||||||
|  | 		local srclist = inv:get_list("src") | ||||||
|  | 		 | ||||||
|  | 		if srclist then | ||||||
|  | 			cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) | ||||||
|  | 		end | ||||||
|  | 		if fuellist then | ||||||
|  | 			fuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		if fuel.time <= 0 then | ||||||
|  | 			meta:set_string("infotext","Oven is out of fuel") | ||||||
|  | 			hacky_swap_node(pos,"food:oven") | ||||||
|  | 			meta:set_string("formspec", oven_inactive_formspec) | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		if cooked.item:is_empty() then | ||||||
|  | 			if was_active then | ||||||
|  | 				meta:set_string("infotext","Oven is empty") | ||||||
|  | 				hacky_swap_node(pos,"food:oven") | ||||||
|  | 				meta:set_string("formspec", oven_inactive_formspec) | ||||||
|  | 			end | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		meta:set_string("fuel_totaltime", fuel.time) | ||||||
|  | 		meta:set_string("fuel_time", 0) | ||||||
|  | 		 | ||||||
|  | 		local stack = inv:get_stack("fuel", 1) | ||||||
|  | 		stack:take_item() | ||||||
|  | 		inv:set_stack("fuel", 1, stack) | ||||||
|  | 	end, | ||||||
|  | }) | ||||||