Skip to content

Commit

Permalink
Farming: Make cotton look like cotton, add crafted string item
Browse files Browse the repository at this point in the history
Remove string -> cotton alias.
  • Loading branch information
paramat committed Aug 18, 2017
1 parent f928780 commit 08727bc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mods/farming/README.txt
Expand Up @@ -35,3 +35,6 @@ Created by Gambit (CC BY 3.0):
farming_flour.png
farming_cotton_seed.png
farming_wheat_seed.png

Created by Napiophelios (CC BY-SA 3.0):
farming_cotton.png
32 changes: 31 additions & 1 deletion mods/farming/init.lua
@@ -1,13 +1,18 @@
-- Global farming namespace

farming = {}
farming.path = minetest.get_modpath("farming")


-- Load files

dofile(farming.path .. "/api.lua")
dofile(farming.path .. "/nodes.lua")
dofile(farming.path .. "/hoes.lua")


-- WHEAT

farming.register_plant("farming:wheat", {
description = "Wheat Seed",
paramtype2 = "meshoptions",
Expand All @@ -19,6 +24,7 @@ farming.register_plant("farming:wheat", {
groups = {flammable = 4},
place_param2 = 3,
})

minetest.register_craftitem("farming:flour", {
description = "Flour",
inventory_image = "farming_flour.png",
Expand All @@ -45,7 +51,9 @@ minetest.register_craft({
recipe = "farming:flour"
})


-- Cotton

farming.register_plant("farming:cotton", {
description = "Cotton Seed",
inventory_image = "farming_cotton_seed.png",
Expand All @@ -56,7 +64,11 @@ farming.register_plant("farming:cotton", {
groups = {flammable = 4},
})

minetest.register_alias("farming:string", "farming:cotton")
minetest.register_craftitem("farming:string", {
description = "String",
inventory_image = "farming_string.png",
groups = {flammable = 2},
})

minetest.register_craft({
output = "wool:white",
Expand All @@ -66,7 +78,17 @@ minetest.register_craft({
}
})

minetest.register_craft({
output = "farming:string 2",
recipe = {
{"farming:cotton"},
{"farming:cotton"},
}
})


-- Straw

minetest.register_craft({
output = "farming:straw 3",
recipe = {
Expand All @@ -83,7 +105,9 @@ minetest.register_craft({
}
})


-- Fuels

minetest.register_craft({
type = "fuel",
recipe = "farming:straw",
Expand All @@ -102,6 +126,12 @@ minetest.register_craft({
burntime = 1,
})

minetest.register_craft({
type = "fuel",
recipe = "farming:string",
burntime = 1,
})

minetest.register_craft({
type = "fuel",
recipe = "farming:hoe_wood",
Expand Down
Binary file modified mods/farming/textures/farming_cotton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mods/farming/textures/farming_string.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 08727bc

Please sign in to comment.