summaryrefslogtreecommitdiff
path: root/farming/cotton.lua
diff options
context:
space:
mode:
Diffstat (limited to 'farming/cotton.lua')
-rw-r--r--farming/cotton.lua43
1 files changed, 35 insertions, 8 deletions
diff --git a/farming/cotton.lua b/farming/cotton.lua
index eef6425..bf0412e 100644
--- a/farming/cotton.lua
+++ b/farming/cotton.lua
@@ -8,7 +8,7 @@ minetest.register_node("farming:seed_cotton", {
inventory_image = "farming_cotton_seed.png",
wield_image = "farming_cotton_seed.png",
drawtype = "signlike",
- groups = {seed = 1, snappy = 3, attached_node = 1},
+ groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4},
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
@@ -24,19 +24,46 @@ minetest.register_node("farming:seed_cotton", {
minetest.register_craftitem("farming:cotton", {
description = S("Cotton"),
inventory_image = "farming_cotton.png",
+ groups = {flammable = 4},
})
-minetest.register_alias("farming:string", "farming:cotton")
+minetest.register_craftitem("farming:string", {
+ description = S("String"),
+ inventory_image = "farming_string.png",
+ groups = {flammable = 2},
+})
-- cotton to wool
minetest.register_craft({
output = "wool:white",
recipe = {
- {"farming:string", "farming:string"},
- {"farming:string", "farming:string"},
+ {"farming:cotton", "farming:cotton"},
+ {"farming:cotton", "farming:cotton"},
}
})
+-- cotton to string
+minetest.register_craft({
+ output = "farming:string 2",
+ recipe = {
+ {"farming:cotton"},
+ {"farming:cotton"},
+ }
+})
+
+-- can be used as fuel
+minetest.register_craft({
+ type = "fuel",
+ recipe = "farming:string",
+ burntime = 1,
+})
+
+minetest.register_craft({
+ type = "fuel",
+ recipe = "farming:cotton",
+ burntime = 1,
+})
+
-- cotton definition
local crop_def = {
drawtype = "plantlike",
@@ -48,7 +75,7 @@ local crop_def = {
drop = "",
selection_box = farming.select,
groups = {
- snappy = 3, flammable = 2, plant = 1, attached_node = 1,
+ snappy = 3, flammable = 4, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
@@ -105,9 +132,9 @@ crop_def.tiles = {"farming_cotton_8.png"}
crop_def.groups.growing = 0
crop_def.drop = {
items = {
- {items = {"farming:string"}, rarity = 1},
- {items = {"farming:string"}, rarity = 2},
- {items = {"farming:string"}, rarity = 3},
+ {items = {"farming:cotton"}, rarity = 1},
+ {items = {"farming:cotton"}, rarity = 2},
+ {items = {"farming:cotton"}, rarity = 3},
{items = {"farming:seed_cotton"}, rarity = 1},
{items = {"farming:seed_cotton"}, rarity = 2},
{items = {"farming:seed_cotton"}, rarity = 3},