Make dry grass spread on default:dirt again (#2687)
authorParamat <paramat@users.noreply.github.com>
Tue, 16 Jun 2020 19:42:45 +0000 (20:42 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Jun 2020 19:42:45 +0000 (20:42 +0100)
mods/default/functions.lua
mods/default/nodes.lua

index f9ff77cc455de0472a32e9dafa43def5b11cfb27..16bdd79853e3fe89a8cc41a9893080af11e207fe 100644 (file)
@@ -501,7 +501,7 @@ end
 
 
 --
--- Convert dirt to something that fits the environment
+-- Convert default:dirt to something that fits the environment
 --
 
 minetest.register_abm({
@@ -510,6 +510,7 @@ minetest.register_abm({
        neighbors = {
                "air",
                "group:grass",
+               "group:dry_grass",
                "default:snow",
        },
        interval = 6,
@@ -538,6 +539,8 @@ minetest.register_abm({
                        minetest.set_node(pos, {name = "default:dirt_with_snow"})
                elseif minetest.get_item_group(name, "grass") ~= 0 then
                        minetest.set_node(pos, {name = "default:dirt_with_grass"})
+               elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
+                       minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
                end
        end
 })
index aa7d482feb8d116342573a32f78b13838a26b4e0..d2a291510bd94ddee2ba90b1239513465776aadd 100644 (file)
@@ -463,7 +463,7 @@ minetest.register_node("default:dirt_with_dry_grass", {
                "default_dirt.png",
                {name = "default_dirt.png^default_dry_grass_side.png",
                        tileable_vertical = false}},
-       groups = {crumbly = 3, soil = 1},
+       groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
        drop = "default:dirt",
        sounds = default.node_sound_dirt_defaults({
                footstep = {name = "default_grass_footstep", gain = 0.4},