diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..3ccd8c3 --- /dev/null +++ b/README.txt @@ -0,0 +1,37 @@ +Minetest Game mod: farming +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +webdesigner97 (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +Created by PilzAdam (CC BY 3.0): + farming_bread.png + farming_soil.png + farming_soil_wet.png + farming_soil_wet_side.png + farming_string.png + +Created by BlockMen (CC BY 3.0): + farming_tool_diamondhoe.png + farming_tool_mesehoe.png + farming_tool_bronzehoe.png + farming_tool_steelhoe.png + farming_tool_stonehoe.png + farming_tool_woodhoe.png + +Created by MasterGollum (CC BY 3.0): + farming_straw.png + +Created by Gambit (CC BY 3.0): + farming_wheat.png + farming_wheat_*.png + farming_cotton_*.png + farming_flour.png + farming_cotton_seed.png + farming_wheat_seed.png diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..2ced593 --- /dev/null +++ b/depends.txt @@ -0,0 +1,2 @@ +default +farming \ No newline at end of file diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..bc68048 --- /dev/null +++ b/init.lua @@ -0,0 +1,202 @@ +minetest.override_item("farming:bread", { + description = "Wheat Bread", +}) + +minetest.override_item("farming:flour", { + description = "Wheat Flour", +}) + +-- RYE + +farming.register_plant("grains:rye", { + description = "Rye seed", + paramtype2 = "meshoptions", + inventory_image = "farming_rye_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {flammable = 4}, + place_param2 = 3, +}) + +minetest.register_craftitem("grains:rye_bread", { + description = "Rye Bread", + inventory_image = "farming_rye_bread.png", + on_use = minetest.item_eat(5), + groups = {flammable = 2}, +}) + +minetest.register_craftitem("grains:rye_flour", { + description = "Rye Flour", + inventory_image = "farming_rye_flour.png", + groups = {flammable = 1}, +}) + +-- OAT + +farming.register_plant("grains:oat", { + description = "Oat seed", + paramtype2 = "meshoptions", + inventory_image = "farming_oat_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {flammable = 4}, + place_param2 = 3, +}) + +minetest.register_craftitem("grains:oat_bread", { + description = "Oatbread", + inventory_image = "farming_oat_bread.png", + on_use = minetest.item_eat(5), + groups = {flammable = 2}, +}) + +minetest.register_craftitem("grains:oat_flour", { + description = "Oat Flour", + inventory_image = "farming_oat_flour.png", + groups = {flammable = 1}, +}) + +-- BARLEY + +farming.register_plant("grains:barley", { + description = "Barley seed", + paramtype2 = "meshoptions", + inventory_image = "farming_barley_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {flammable = 4}, + place_param2 = 3, +}) + +minetest.register_craftitem("grains:barley_bread", { + description = "Barley Bread", + inventory_image = "farming_barley_bread.png", + on_use = minetest.item_eat(5), + groups = {flammable = 2}, +}) + +minetest.register_craftitem("grains:barley_flour", { + description = "Barley Flour", + inventory_image = "farming_barley_flour.png", + groups = {flammable = 1}, +}) + +-- Cooking + +minetest.register_craft({ + type = "shapeless", + output = "grains:rye_flour", + recipe = {"grains:rye", "grains:rye", "grains:rye", "grains:rye"} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "grains:rye_bread", + recipe = "grains:rye_flour" +}) + +minetest.register_craft({ + type = "shapeless", + output = "grains:oat_flour", + recipe = {"grains:oat", "grains:oat", "grains:oat", "grains:oat"} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "grains:oat_bread", + recipe = "grains:oat_flour" +}) + +minetest.register_craft({ + type = "shapeless", + output = "grains:barley_flour", + recipe = {"grains:barley", "grains:barley", "grains:barley", "grains:barley"} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "grains:barley_bread", + recipe = "grains:barley_flour" +}) + +-- Fuels +minetest.register_craft({ + type = "fuel", + recipe = "farming:bread", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "grains:rye_bread", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "grains:oat_bread", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "grains:barley_bread", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:wheat", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "grains:rye", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "grains:oat", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "grains:barley", + burntime = 1, +}) + +-- Seed gathering + +for i = 1, 5 do + minetest.override_item("default:grass_"..i, {drop = { + max_items = 1, + items = { + {items = {'farming:seed_wheat'},rarity = 10}, + {items = {'grains:seed_barley'},rarity = 20}, + {items = {'default:grass_1'}}, + } + }}) +end + +for i = 1, 5 do + minetest.override_item("default:dry_grass_"..i, {drop = { + max_items = 1, + items = { + {items = {'grains:seed_rye'},rarity = 10}, + {items = {'grains:seed_oat'},rarity = 20}, + {items = {'default:dry_grass_1'}}, + } + }}) +end \ No newline at end of file diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..d1b25aa --- /dev/null +++ b/license.txt @@ -0,0 +1,54 @@ +License of source code +---------------------- + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +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 OR COPYRIGHT HOLDERS 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 details: +https://opensource.org/licenses/MIT + + +License of media (textures) +--------------------------- + +Attribution 3.0 Unported (CC BY 3.0) + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ diff --git a/textures/grains_barley.png b/textures/grains_barley.png new file mode 100644 index 0000000..839d0a7 Binary files /dev/null and b/textures/grains_barley.png differ diff --git a/textures/grains_barley_1.png b/textures/grains_barley_1.png new file mode 100644 index 0000000..2cdc7f5 Binary files /dev/null and b/textures/grains_barley_1.png differ diff --git a/textures/grains_barley_2.png b/textures/grains_barley_2.png new file mode 100644 index 0000000..40f2a14 Binary files /dev/null and b/textures/grains_barley_2.png differ diff --git a/textures/grains_barley_3.png b/textures/grains_barley_3.png new file mode 100644 index 0000000..0097fa4 Binary files /dev/null and b/textures/grains_barley_3.png differ diff --git a/textures/grains_barley_4.png b/textures/grains_barley_4.png new file mode 100644 index 0000000..134c653 Binary files /dev/null and b/textures/grains_barley_4.png differ diff --git a/textures/grains_barley_5.png b/textures/grains_barley_5.png new file mode 100644 index 0000000..68b540c Binary files /dev/null and b/textures/grains_barley_5.png differ diff --git a/textures/grains_barley_6.png b/textures/grains_barley_6.png new file mode 100644 index 0000000..8e1fe61 Binary files /dev/null and b/textures/grains_barley_6.png differ diff --git a/textures/grains_barley_7.png b/textures/grains_barley_7.png new file mode 100644 index 0000000..a0f02ca Binary files /dev/null and b/textures/grains_barley_7.png differ diff --git a/textures/grains_barley_8.png b/textures/grains_barley_8.png new file mode 100644 index 0000000..7ea3465 Binary files /dev/null and b/textures/grains_barley_8.png differ diff --git a/textures/grains_barley_bread.png b/textures/grains_barley_bread.png new file mode 100644 index 0000000..397307e Binary files /dev/null and b/textures/grains_barley_bread.png differ diff --git a/textures/grains_barley_flour.png b/textures/grains_barley_flour.png new file mode 100644 index 0000000..6c75a68 Binary files /dev/null and b/textures/grains_barley_flour.png differ diff --git a/textures/grains_barley_seed.png b/textures/grains_barley_seed.png new file mode 100644 index 0000000..b45f55e Binary files /dev/null and b/textures/grains_barley_seed.png differ diff --git a/textures/grains_oat.png b/textures/grains_oat.png new file mode 100644 index 0000000..76e0499 Binary files /dev/null and b/textures/grains_oat.png differ diff --git a/textures/grains_oat_1.png b/textures/grains_oat_1.png new file mode 100644 index 0000000..7a38cdc Binary files /dev/null and b/textures/grains_oat_1.png differ diff --git a/textures/grains_oat_2.png b/textures/grains_oat_2.png new file mode 100644 index 0000000..70232f1 Binary files /dev/null and b/textures/grains_oat_2.png differ diff --git a/textures/grains_oat_3.png b/textures/grains_oat_3.png new file mode 100644 index 0000000..cf7d3f8 Binary files /dev/null and b/textures/grains_oat_3.png differ diff --git a/textures/grains_oat_4.png b/textures/grains_oat_4.png new file mode 100644 index 0000000..2af69d5 Binary files /dev/null and b/textures/grains_oat_4.png differ diff --git a/textures/grains_oat_5.png b/textures/grains_oat_5.png new file mode 100644 index 0000000..778ad00 Binary files /dev/null and b/textures/grains_oat_5.png differ diff --git a/textures/grains_oat_6.png b/textures/grains_oat_6.png new file mode 100644 index 0000000..87c46db Binary files /dev/null and b/textures/grains_oat_6.png differ diff --git a/textures/grains_oat_7.png b/textures/grains_oat_7.png new file mode 100644 index 0000000..ecc2ee9 Binary files /dev/null and b/textures/grains_oat_7.png differ diff --git a/textures/grains_oat_8.png b/textures/grains_oat_8.png new file mode 100644 index 0000000..6c40574 Binary files /dev/null and b/textures/grains_oat_8.png differ diff --git a/textures/grains_oat_bread.png b/textures/grains_oat_bread.png new file mode 100644 index 0000000..e0d59e8 Binary files /dev/null and b/textures/grains_oat_bread.png differ diff --git a/textures/grains_oat_flour.png b/textures/grains_oat_flour.png new file mode 100644 index 0000000..0879da1 Binary files /dev/null and b/textures/grains_oat_flour.png differ diff --git a/textures/grains_oat_seed.png b/textures/grains_oat_seed.png new file mode 100644 index 0000000..29d7e27 Binary files /dev/null and b/textures/grains_oat_seed.png differ diff --git a/textures/grains_rye.png b/textures/grains_rye.png new file mode 100644 index 0000000..ecfd4f8 Binary files /dev/null and b/textures/grains_rye.png differ diff --git a/textures/grains_rye_1.png b/textures/grains_rye_1.png new file mode 100644 index 0000000..b25e731 Binary files /dev/null and b/textures/grains_rye_1.png differ diff --git a/textures/grains_rye_2.png b/textures/grains_rye_2.png new file mode 100644 index 0000000..1b9ce5b Binary files /dev/null and b/textures/grains_rye_2.png differ diff --git a/textures/grains_rye_3.png b/textures/grains_rye_3.png new file mode 100644 index 0000000..3f0e0f2 Binary files /dev/null and b/textures/grains_rye_3.png differ diff --git a/textures/grains_rye_4.png b/textures/grains_rye_4.png new file mode 100644 index 0000000..9ad1e51 Binary files /dev/null and b/textures/grains_rye_4.png differ diff --git a/textures/grains_rye_5.png b/textures/grains_rye_5.png new file mode 100644 index 0000000..620b19f Binary files /dev/null and b/textures/grains_rye_5.png differ diff --git a/textures/grains_rye_6.png b/textures/grains_rye_6.png new file mode 100644 index 0000000..3e184d0 Binary files /dev/null and b/textures/grains_rye_6.png differ diff --git a/textures/grains_rye_7.png b/textures/grains_rye_7.png new file mode 100644 index 0000000..ab27f39 Binary files /dev/null and b/textures/grains_rye_7.png differ diff --git a/textures/grains_rye_8.png b/textures/grains_rye_8.png new file mode 100644 index 0000000..7c60256 Binary files /dev/null and b/textures/grains_rye_8.png differ diff --git a/textures/grains_rye_bread.png b/textures/grains_rye_bread.png new file mode 100644 index 0000000..a796a0e Binary files /dev/null and b/textures/grains_rye_bread.png differ diff --git a/textures/grains_rye_flour.png b/textures/grains_rye_flour.png new file mode 100644 index 0000000..094397d Binary files /dev/null and b/textures/grains_rye_flour.png differ diff --git a/textures/grains_rye_seed.png b/textures/grains_rye_seed.png new file mode 100644 index 0000000..d4f7a70 Binary files /dev/null and b/textures/grains_rye_seed.png differ