From 08727bcd698d511c880bd1c2f7b454bfe0c2b20d Mon Sep 17 00:00:00 2001 From: paramat Date: Mon, 14 Aug 2017 16:19:53 +0100 Subject: [PATCH] Farming: Make cotton look like cotton, add crafted string item Remove string -> cotton alias. --- mods/farming/README.txt | 3 +++ mods/farming/init.lua | 32 ++++++++++++++++++++++- mods/farming/textures/farming_cotton.png | Bin 166 -> 316 bytes mods/farming/textures/farming_string.png | Bin 0 -> 166 bytes 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 mods/farming/textures/farming_string.png diff --git a/mods/farming/README.txt b/mods/farming/README.txt index 3ccd8c30..d46748d7 100644 --- a/mods/farming/README.txt +++ b/mods/farming/README.txt @@ -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 diff --git a/mods/farming/init.lua b/mods/farming/init.lua index 667a6685..fff48fa5 100644 --- a/mods/farming/init.lua +++ b/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", @@ -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", diff --git a/mods/farming/textures/farming_cotton.png b/mods/farming/textures/farming_cotton.png index e2bbfd7af486b64c658bcc7c6101b22ca95ab7e7..8aa50e4e38c75bce9f41cbee1ed6535adb7c7f9c 100644 GIT binary patch delta 300 zcmZ3+xQA(iWIZzj1A~Sxe=v}$3-AeX1=8t3ve^;Jxsl45aXJOD8W~B3SxJW3$;P?K z23cw5Ica9OX{LEVGTl5s-7G)DyfDZ1^&1d)`}Xa-ckkZ52ZIkF@cPrIj~_pN_yhu< zKY#x81q8kV!MAVUzkmPv^Jo3fU%!3>!5=XA`*+o}`G$v}klz+>jX%2nYTLpB_LCHif@qmYK$KgskD%6%UkXBkHe85=Ij(pH*q zEPLs#tw&tWOrCbnzN6FRS5fT$vL=W8uUAjqRXmYY-#P90WwT=$tg14XY;L}3WKDZo f75>OO@IgLvdpv4THu6{1-oD!M<@%x*6 delta 149 zcmdnPw2X0rWIY2ASj||l7f3Oc1o;IsFqBO`YXRiNd%8G=NJz3CT*%vCz`%0gc0H3= z0$0}(IjxBvLbC)`&9??=WmxfiH-p;^W`_%^416&UUo{BGzj08P<492YUYwu1&SAsB uDkis!0ec!E(s{TO4u~*3@n8pO`@nqP-XMGaG`@3>L0nH)KbLh*2~7ZC129Vf diff --git a/mods/farming/textures/farming_string.png b/mods/farming/textures/farming_string.png new file mode 100644 index 0000000000000000000000000000000000000000..e2bbfd7af486b64c658bcc7c6101b22ca95ab7e7 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx*Bp9q_EZ7UAm`Z~Df*BafCZDwc^5Q*R977}| zSr0DcZ7^V9IdHq4Ni2b@Yl)oJL=T}^0;}d*gS0ZNc)pv#?FO^M1yu&Vn1`<#1mxd1 zsLOFAD19%^&t2!R;b0Y$+r@xA4H4-)+zAIn7@l~rgS35MzHe`kJ%8G{#~_}ktDnm{ Hr-UW|pV=_A literal 0 HcmV?d00001 -- 2.25.1