From 2f74c645e4b625cf973b8ed4c0d84bf643d00ef1 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 16 May 2022 19:58:02 +0200 Subject: [PATCH] Villagegen: Fix floor being naked dirt --- mods/rp_village/generate.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/rp_village/generate.lua b/mods/rp_village/generate.lua index 0a8aa65..db7776a 100644 --- a/mods/rp_village/generate.lua +++ b/mods/rp_village/generate.lua @@ -288,7 +288,10 @@ function village.generate_hill(pos, ground, ground_top) local p = {x=pos.x+x, y=pos.y+y, z=pos.z+z} local n = minetest.get_node(p) local def = minetest.registered_nodes[n.name] - if minetest.get_item_group(n.name, "dirt") == 0 and (n.name == "air" or n.name == "ignore" or (def and (def.liquidtype ~= "none" or (def.is_ground_content)))) then + local is_any_dirt = minetest.get_item_group(n.name, "dirt") == 1 + local is_dirt = n.name == "rp_default:dirt" + local is_dry_dirt = n.name == "rp_default:dry_dirt" + if (not is_dry_dirt) and (is_dirt or (not is_any_dirt)) and (n.name == "air" or n.name == "ignore" or (def and (def.liquidtype ~= "none" or (def.is_ground_content)))) then if (y == HILL_H-1 or z == y or x == y or z == HILL_W-1-y or x == HILL_W-1-y) and (p.y >= water_level) then table.insert(dirts_with_grass, p) else