Skip to content

Commit

Permalink
Give some points to matching plants with soil in findSimilarTileType().
Browse files Browse the repository at this point in the history
  • Loading branch information
MagistrumT-T committed Feb 18, 2024
1 parent ecfb64f commit 597c3cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions library/TileTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ namespace DFHack
assert(is_valid_enum_item(sourceTileType));
#endif



// Special case for smooth pillars.
// When you want a smooth wall, no need to search for best match. Just use a pillar instead.
// Choosing the right direction would require knowing neighbors.
Expand Down Expand Up @@ -340,6 +342,11 @@ namespace DFHack
// Direction is medium value match
if (cur_direction == tileDirection(tt))
value |= 4;

Check failure on line 345 in library/TileTypes.cpp

View workflow job for this annotation

GitHub Actions / lint / lint

Contains trailing whitespace: line 345
// If the material is a plant, consider soil an acceptable alternative
if (cur_material == tiletype_material::PLANT and tileMaterial(tt) == tiletype_material::SOIL) {
value |= 2;
}

// Variant is low-value match
if (cur_variant == tileVariant(tt))
Expand Down

0 comments on commit 597c3cf

Please sign in to comment.