From 4ed802709961bc1be0a9ac99b1e749970c46f52e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 5 Jan 2017 01:28:43 +0100 Subject: [PATCH] Add coarse dirt --- mods/default/crafting.lua | 7 +++++++ mods/default/nodes.lua | 8 ++++++++ mods/default/textures/default_coarse_dirt.png | Bin 0 -> 20570 bytes mods/farming/hoes.lua | 12 +++++++++--- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 mods/default/textures/default_coarse_dirt.png diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index 61f916e7b..b87e03995 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -48,6 +48,13 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:coarse_dirt 4', + recipe = { + {'default:dirt', 'default:gravel'}, + {'default:gravel', 'default:dirt'}, + } +}) minetest.register_craft({ output = 'default:stick 4', diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 1678fa568..73bc6034c 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -235,6 +235,14 @@ minetest.register_node("default:dirt", { sounds = default.node_sound_dirt_defaults(), }) +minetest.register_node("default:coarse_dirt", { + description = "Coarse Dirt", + tiles = {"default_coarse_dirt.png"}, + is_ground_content = true, + stack_max = 64, + groups = {crumbly=3, soil=1}, + sounds = default.node_sound_dirt_defaults(), +}) minetest.register_node("default:gravel", { description = "Gravel", diff --git a/mods/default/textures/default_coarse_dirt.png b/mods/default/textures/default_coarse_dirt.png new file mode 100644 index 0000000000000000000000000000000000000000..86c406ba277c416318fff8b08dafd17216ec5e86 GIT binary patch literal 20570 zcmeI4c{o)6`|uB1P*TV)B3c+@jIoTZEH$zu`w}(AU@(T6v5b%s^+~pbWQoYus6>%$ zB}>*Qk|iZuNw$zs&(Z2LpFZ<^f6w!KuIKt)*UUA{-0%B+-|zE&-OD-Wk28N68y(qY@R4<5&&#^wDQLkC%s7s0N4$2+S=#^CS|SaPC+D@as-7^|gwf=hf(+$8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vQ}w--uzokSe?TA|tO{}^HvJ*QEqIC^3|KzL->v2Bk{=gNVE-cXux;? literal 0 HcmV?d00001 diff --git a/mods/farming/hoes.lua b/mods/farming/hoes.lua index f15d1ea77..f0905bf1f 100644 --- a/mods/farming/hoes.lua +++ b/mods/farming/hoes.lua @@ -2,13 +2,19 @@ local function create_soil(pos, inv) if pos == nil then return false end - local node = minetest.env:get_node(pos) + local node = minetest.get_node(pos) local name = node.name - local above = minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}) + local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) if name == "default:dirt" or name == "default:dirt_with_grass" then if above.name == "air" then node.name = "farming:soil" - minetest.env:set_node(pos, node) + minetest.set_node(pos, node) + return true + end + elseif name == "default:coarse_dirt" then + if above.name == "air" then + node.name = "default:dirt" + minetest.set_node(pos, node) return true end end