Skip to content

Commit 08727bc

Browse files
committedAug 18, 2017
Farming: Make cotton look like cotton, add crafted string item
Remove string -> cotton alias.
1 parent f928780 commit 08727bc

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed
 

‎mods/farming/README.txt

+3
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ Created by Gambit (CC BY 3.0):
3535
farming_flour.png
3636
farming_cotton_seed.png
3737
farming_wheat_seed.png
38+
39+
Created by Napiophelios (CC BY-SA 3.0):
40+
farming_cotton.png

‎mods/farming/init.lua

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
-- Global farming namespace
2+
23
farming = {}
34
farming.path = minetest.get_modpath("farming")
45

6+
57
-- Load files
8+
69
dofile(farming.path .. "/api.lua")
710
dofile(farming.path .. "/nodes.lua")
811
dofile(farming.path .. "/hoes.lua")
912

13+
1014
-- WHEAT
15+
1116
farming.register_plant("farming:wheat", {
1217
description = "Wheat Seed",
1318
paramtype2 = "meshoptions",
@@ -19,6 +24,7 @@ farming.register_plant("farming:wheat", {
1924
groups = {flammable = 4},
2025
place_param2 = 3,
2126
})
27+
2228
minetest.register_craftitem("farming:flour", {
2329
description = "Flour",
2430
inventory_image = "farming_flour.png",
@@ -45,7 +51,9 @@ minetest.register_craft({
4551
recipe = "farming:flour"
4652
})
4753

54+
4855
-- Cotton
56+
4957
farming.register_plant("farming:cotton", {
5058
description = "Cotton Seed",
5159
inventory_image = "farming_cotton_seed.png",
@@ -56,7 +64,11 @@ farming.register_plant("farming:cotton", {
5664
groups = {flammable = 4},
5765
})
5866

59-
minetest.register_alias("farming:string", "farming:cotton")
67+
minetest.register_craftitem("farming:string", {
68+
description = "String",
69+
inventory_image = "farming_string.png",
70+
groups = {flammable = 2},
71+
})
6072

6173
minetest.register_craft({
6274
output = "wool:white",
@@ -66,7 +78,17 @@ minetest.register_craft({
6678
}
6779
})
6880

81+
minetest.register_craft({
82+
output = "farming:string 2",
83+
recipe = {
84+
{"farming:cotton"},
85+
{"farming:cotton"},
86+
}
87+
})
88+
89+
6990
-- Straw
91+
7092
minetest.register_craft({
7193
output = "farming:straw 3",
7294
recipe = {
@@ -83,7 +105,9 @@ minetest.register_craft({
83105
}
84106
})
85107

108+
86109
-- Fuels
110+
87111
minetest.register_craft({
88112
type = "fuel",
89113
recipe = "farming:straw",
@@ -102,6 +126,12 @@ minetest.register_craft({
102126
burntime = 1,
103127
})
104128

129+
minetest.register_craft({
130+
type = "fuel",
131+
recipe = "farming:string",
132+
burntime = 1,
133+
})
134+
105135
minetest.register_craft({
106136
type = "fuel",
107137
recipe = "farming:hoe_wood",
150 Bytes
Loading
166 Bytes
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.