From 994c19366f897a8c28042fcfe1bbaa7ce1df8aba Mon Sep 17 00:00:00 2001 From: rudzik8 Date: Thu, 26 Aug 2021 17:34:17 +0700 Subject: [PATCH] Initial commit --- .gitattributes | 2 + LICENSE | 24 +++++ README.md | 2 + init.lua | 111 ++++++++++++++++++++++ mod.conf | 4 + textures/mcl_morefood_cheese.png | Bin 0 -> 318 bytes textures/mcl_morefood_chocolate_bar.png | Bin 0 -> 261 bytes textures/mcl_morefood_fried_egg.png | Bin 0 -> 253 bytes textures/mcl_morefood_sandwich.png | Bin 0 -> 370 bytes textures/mcl_morefood_sweet_berry_pie.png | Bin 0 -> 274 bytes 10 files changed, 143 insertions(+) create mode 100644 .gitattributes create mode 100644 LICENSE create mode 100644 README.md create mode 100644 init.lua create mode 100644 mod.conf create mode 100644 textures/mcl_morefood_cheese.png create mode 100644 textures/mcl_morefood_chocolate_bar.png create mode 100644 textures/mcl_morefood_fried_egg.png create mode 100644 textures/mcl_morefood_sandwich.png create mode 100644 textures/mcl_morefood_sweet_berry_pie.png 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 0000000000000000000000000000000000000000..d31e649cc6d3e9c3162ed54e82ba294b1ac5cb96 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}x0G|-o71I=+Tq(SF%J1c!_ScVQKEGM_@Lc51^=W4n>F5)f9&UDcWAEHpQ~)2I_{TlS-UFRey!8h zlAe{*IvnEo4DP?1E^y-ci~C=+oiCm1V{kgnxg^o5O}d70ZgA~F8O5g6JgXaK2CAJD tU3~DMgjhX;gG%~OjdeMP7uEQ<9N}%x<}47q-3NS%G}f0G|+7HGT$PIi?JC#(I55a}fr62}Yny&dJ^JK#IL2$S?Rm7%)hAGrIwW zI14-?iy0XB4uLSEsD@VqP%zEY#W6%9IJWqX=}_6GR`~g3@a(uc)ud<(`!l)=1y|@!yHR)K ti>}#nzxX7ci#GbAF>)X4Zr%OMcr%+h;^JGsUqBlfJYD@<);T3K0RSpEPt^bb literal 0 HcmV?d00001 diff --git a/textures/mcl_morefood_fried_egg.png b/textures/mcl_morefood_fried_egg.png new file mode 100644 index 0000000000000000000000000000000000000000..25a9674291f602cd61d44363f9d11b9d72ea844b GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|s0G|-o*RNmy{Q2|$|NlRiG5lZ4@PCu!|J_DF$qpq;Ss=wx666;Qlm!8X zd(C?zfnuBm9+AZi419+{nDKc2iWHz=l&6bhh(>T}Um)KB1s%3%xiN?A*#B*vgZlY&Dbrg>*+rrp^NG35on4wtw!buJHWF ms&nzQF@J_>{ef$YM)`J8EWs=b(?fu^FnGH9xvXNS%LhJ0G|-o;y{sx7^&JQ@eD74%5bUvblK7n(R@GQd4=-5X)ywpUK-S`ung(hbybS42cO7^5mduxc~`Uq8rOL!|w0u9a%`EdkD$&>{7 z1^>ql7{oU{x(-ywS>O>_%)r2R2!t6$HM|;tg7uy*jv*SsvHiD&4jFK;9@Lt2Yl-2# zr~m(7c0QEhey{B2Oo2`NZ*m;UVG%Tb|3bUr@)r9OhAbP^uKrXxEpTLIzt=ma>Msr_ zkFsulwd>r;olXT`ir5w(xcB=3Tj9^IOCR!ayl;+O@yfKS{-RG_`F(q<@0aJVSDpU- i!N=)guV0*f!#w@JfS!BQLK~n{7(8A5T-G@yGywpI^p;Wp literal 0 HcmV?d00001 diff --git a/textures/mcl_morefood_sweet_berry_pie.png b/textures/mcl_morefood_sweet_berry_pie.png new file mode 100644 index 0000000000000000000000000000000000000000..be8a7a13a15173ffd2f516fa6741e68b08bd1fb5 GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}@0G|-o?Y0ijI~&hMgsnBTd!VR(L&|)%mc=d!#}+Y@nR1q^H0^6-^?_thZ&1_FO%-49Wdw!GNoM!zU0W)3;mWi+1GnKO