(svn r18719) -Feature: don't delete the rough/rocky status of a tile when it's covered by snow, this allows rocky tiles under snow if you have a variable snowline

This commit is contained in:
yexo
2010-01-04 18:33:43 +00:00
parent 3e131e2fec
commit b378e82676
10 changed files with 147 additions and 38 deletions

View File

@@ -112,21 +112,21 @@
{
if (!::IsValidTile(tile)) return false;
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_ROCKS));
return (::IsTileType(tile, MP_CLEAR) && ::GetRawClearGround(tile) == ::CLEAR_ROCKS);
}
/* static */ bool AITile::IsRoughTile(TileIndex tile)
{
if (!::IsValidTile(tile)) return false;
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_ROUGH));
return (::IsTileType(tile, MP_CLEAR) && ::GetRawClearGround(tile) == ::CLEAR_ROUGH);
}
/* static */ bool AITile::IsSnowTile(TileIndex tile)
{
if (!::IsValidTile(tile)) return false;
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_SNOW));
return (::IsTileType(tile, MP_CLEAR) && ::IsSnowTile(tile));
}
/* static */ bool AITile::IsDesertTile(TileIndex tile)