Farming: Make cotton look like cotton, add crafted string item
authorparamat <paramat@users.noreply.github.com>
Mon, 14 Aug 2017 15:19:53 +0000 (16:19 +0100)
committerparamat <mat.gregory@virginmedia.com>
Fri, 18 Aug 2017 17:48:25 +0000 (18:48 +0100)
Remove string -> cotton alias.

mods/farming/README.txt
mods/farming/init.lua
mods/farming/textures/farming_cotton.png
mods/farming/textures/farming_string.png [new file with mode: 0644]

index 3ccd8c30934de518b1162ad72dd8ed2bdb4abc8a..d46748d7320c165cb648c51589999b2c8705f63a 100644 (file)
@@ -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
index 667a66851827b7d5cc26cf0a037f7deff4032333..fff48fa5f8d166d3e7158d9b8f6e8d42734bf059 100644 (file)
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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 = {
@@ -83,7 +105,9 @@ minetest.register_craft({
        }
 })
 
+
 -- Fuels
+
 minetest.register_craft({
        type = "fuel",
        recipe = "farming:straw",
@@ -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",
index e2bbfd7af486b64c658bcc7c6101b22ca95ab7e7..8aa50e4e38c75bce9f41cbee1ed6535adb7c7f9c 100644 (file)
Binary files a/mods/farming/textures/farming_cotton.png and b/mods/farming/textures/farming_cotton.png differ
diff --git a/mods/farming/textures/farming_string.png b/mods/farming/textures/farming_string.png
new file mode 100644 (file)
index 0000000..e2bbfd7
Binary files /dev/null and b/mods/farming/textures/farming_string.png differ