commit 994c19366f897a8c28042fcfe1bbaa7ce1df8aba Author: rudzik8 Date: Thu Aug 26 17:34:17 2021 +0700 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cf1ab25 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.md b/README.md new file mode 100644 index 0000000..b46f6e8 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# mcl_morefood + This mod adds five more food items to the Mineclone 2 (5) game! diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..66b777d --- /dev/null +++ b/init.lua @@ -0,0 +1,111 @@ +-- Mineclone 2 (5) MoreFood mod +-- by rudzik8 +-- Licensed under Unlicense + +local S = minetest.get_translator(minetest.get_current_modname()) +local mofood_longdesc = S("This is a food item which can be eaten.") + +minetest.register_craftitem("mcl_morefood:sandwich", { + description = S("Sandwich"), + _doc_items_longdesc = mofood_longdesc, + inventory_image = "mcl_morefood_sandwich.png", + groups = {food=2, eatable=14}, + _mcl_saturation = 10.5, + on_place = minetest.item_eat(14), + on_secondary_use = minetest.item_eat(14), +}) + +minetest.register_craftitem("mcl_morefood:chocolate_bar", { + description = S("Chocolate bar"), + _doc_items_longdesc = mofood_longdesc, + inventory_image = "mcl_morefood_chocolate_bar.png", + groups = {food=2, eatable=6}, + _mcl_saturation = 4.0, + on_place = minetest.item_eat(6), + on_secondary_use = minetest.item_eat(6), +}) + +minetest.register_craftitem("mcl_morefood:fried_egg", { + description = S("Fried egg"), + _doc_items_longdesc = mofood_longdesc, + inventory_image = "mcl_morefood_fried_egg.png", + groups = {food=2, eatable=8}, + _mcl_saturation = 10.0, + on_place = minetest.item_eat(8), + on_secondary_use = minetest.item_eat(8), +}) +minetest.register_craftitem("mcl_morefood:cheese", { + description = S("Cheese"), + _doc_items_longdesc = mofood_longdesc, + inventory_image = "mcl_morefood_cheese.png", + groups = {food=2, eatable=9}, + _mcl_saturation = 8.6, + on_place = minetest.item_eat(9), + on_secondary_use = minetest.item_eat(9), +}) +minetest.register_craftitem("mcl_morefood:sweet_berry_pie", { + description = S("Sweet Berry Pie"), + _doc_items_longdesc = S("A sweet berry pie is a tasty food item which can be eaten."), + inventory_image = "mcl_morefood_sweet_berry_pie.png", + groups = {food = 2, eatable = 6}, + _mcl_saturation = 3.6, + on_place = minetest.item_eat(6), + on_secondary_use = minetest.item_eat(6), +}) + +-- Crafts +minetest.register_craft({ + type = "shapeless", + output = "mcl_morefood:sandwich", + recipe = {"mcl_farming:bread", "mcl_mobitems:cooked_beef"}, +}) +minetest.register_craft({ + type = "shapeless", + output = "mcl_morefood:sandwich", + recipe = {"mcl_farming:bread", "mcl_mobitems:cooked_mutton"}, +}) +minetest.register_craft({ + type = "shapeless", + output = "mcl_morefood:sandwich", + recipe = {"mcl_farming:bread", "mcl_mobitems:cooked_chicken"}, +}) +minetest.register_craft({ + type = "shapeless", + output = "mcl_morefood:sandwich", + recipe = {"mcl_farming:bread", "mcl_mobitems:cooked_porkchop"}, +}) +minetest.register_craft({ + type = "shapeless", + output = "mcl_morefood:sandwich", + recipe = {"mcl_farming:bread", "mcl_mobitems:cooked_rabbit"}, +}) +minetest.register_craft({ + output = "mcl_morefood:chocolate_bar", + recipe = { + {"mcl_dye:brown", "mcl_core:sugar", "mcl_dye:brown"}, + {"mcl_dye:brown", "mcl_mobitems:milk_bucket", "mcl_dye:brown"}, + }, + replacements = { + {"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"}, + }, +}) +minetest.register_craft({ + type = "shapeless", + output = "mcl_morefood:sweet_berry_pie", + recipe = {"mcl_farming:sweet_berry", "mcl_core:sugar", "mcl_throwing:egg"}, +}) +minetest.register_craft({ + type = "cooking", + output = "mcl_morefood:fried_egg", + recipe = "mcl_throwing:egg", + cooktime = 10, +}) +minetest.register_craft({ + type = "cooking", + output = "mcl_morefood:cheese", + recipe = "mcl_mobitems:milk_bucket", + replacements = { + {"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"}, + }, + cooktime = 12, +}) \ No newline at end of file diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..befee1e --- /dev/null +++ b/mod.conf @@ -0,0 +1,4 @@ +name = mcl_morefood +author = rudzik8 +depends = mcl_core, mcl_farming, mcl_buckets, mcl_dye, mcl_mobitems, mcl_throwing +description = This mod adds five more food items to the Mineclone 2 (5) game! \ No newline at end of file diff --git a/textures/mcl_morefood_cheese.png b/textures/mcl_morefood_cheese.png new file mode 100644 index 0000000..d31e649 Binary files /dev/null and b/textures/mcl_morefood_cheese.png differ diff --git a/textures/mcl_morefood_chocolate_bar.png b/textures/mcl_morefood_chocolate_bar.png new file mode 100644 index 0000000..12fb4c8 Binary files /dev/null and b/textures/mcl_morefood_chocolate_bar.png differ diff --git a/textures/mcl_morefood_fried_egg.png b/textures/mcl_morefood_fried_egg.png new file mode 100644 index 0000000..25a9674 Binary files /dev/null and b/textures/mcl_morefood_fried_egg.png differ diff --git a/textures/mcl_morefood_sandwich.png b/textures/mcl_morefood_sandwich.png new file mode 100644 index 0000000..d3689ae Binary files /dev/null and b/textures/mcl_morefood_sandwich.png differ diff --git a/textures/mcl_morefood_sweet_berry_pie.png b/textures/mcl_morefood_sweet_berry_pie.png new file mode 100644 index 0000000..be8a7a1 Binary files /dev/null and b/textures/mcl_morefood_sweet_berry_pie.png differ