Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Biome dust node: Only place on 'walkable' cubic non-liquid drawtypes
No longer decide placement on 'buildable_to' parameter.
Dust nodes only look acceptable placed on cubic nodes.
Modders may not want to make their plantlike decorations 'buildable_to'.
  • Loading branch information
paramat committed Nov 17, 2017
1 parent 05d93c7 commit ec93893
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/mapgen/mapgen.cpp
Expand Up @@ -831,7 +831,16 @@ void MapgenBasic::dustTopNodes()
}

content_t c = vm->m_data[vi].getContent();
if (!ndef->get(c).buildable_to && c != CONTENT_IGNORE && c != biome->c_dust) {
NodeDrawType dtype = ndef->get(c).drawtype;
// Only place on walkable cubic non-liquid nodes
// Dust check needed due to vertical overgeneration
if ((dtype == NDT_NORMAL ||
dtype == NDT_ALLFACES_OPTIONAL ||
dtype == NDT_GLASSLIKE_FRAMED_OPTIONAL ||
dtype == NDT_GLASSLIKE ||
dtype == NDT_GLASSLIKE_FRAMED ||
dtype == NDT_ALLFACES) &&
ndef->get(c).walkable && c != biome->c_dust) {
vm->m_area.add_y(em, vi, 1);
vm->m_data[vi] = MapNode(biome->c_dust);
}
Expand Down

0 comments on commit ec93893

Please sign in to comment.