1
0
espelhamento de https://github.com/luanti-org/minetest_game.git sincronizado 2025-10-28 22:35:22 +01:00

Fix dry_grass_N on dirt producing dirt_with_grass

`dry_grass_N` has groups `grass` and `dry_grass`, so if the check for `grass` is done first, having dry_grass on it makes it turn into `dirt_with_grass` instead of `dirt_with_dry_grass`. Changing the order fixes this.
Esse commit está contido em:
Pedro Gimeno
2025-04-19 18:40:59 +02:00
commit de sfan5
commit 838ad60ad0

Ver arquivo

@@ -645,10 +645,11 @@ minetest.register_abm({
-- Snow check is cheapest, so comes first
if name == "default:snow" then
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"})
-- The group grass is also present in dry grass, so check dry grass first
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
elseif minetest.get_item_group(name, "grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_grass"})
end
end
})