Initial commit

master
v-rob 2017-10-28 18:19:11 -09:00 committed by GitHub
parent 851b457e4d
commit db4918309a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 295 additions and 0 deletions

37
README.txt Normal file
View File

@ -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

2
depends.txt Normal file
View File

@ -0,0 +1,2 @@
default
farming

202
init.lua Normal file
View File

@ -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

54
license.txt Normal file
View File

@ -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/

BIN
textures/grains_barley.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

BIN
textures/grains_oat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

BIN
textures/grains_oat_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

BIN
textures/grains_oat_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

BIN
textures/grains_oat_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

BIN
textures/grains_oat_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

BIN
textures/grains_oat_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

BIN
textures/grains_oat_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

BIN
textures/grains_oat_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

BIN
textures/grains_oat_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

BIN
textures/grains_rye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

BIN
textures/grains_rye_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

BIN
textures/grains_rye_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

BIN
textures/grains_rye_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

BIN
textures/grains_rye_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
textures/grains_rye_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

BIN
textures/grains_rye_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

BIN
textures/grains_rye_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

BIN
textures/grains_rye_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B