|
@@ -289,51 +289,52 @@ void GenerateClearTile()
|
|
|
/* add rocky tiles */
|
|
|
i = gi;
|
|
|
do {
|
|
|
uint32 r = Random();
|
|
|
tile = RandomTileSeed(r);
|
|
|
|
|
|
IncreaseGeneratingWorldProgress(GWP_ROUGH_ROCKY);
|
|
|
if (IsTileType(tile, MP_CLEAR) && !IsClearGround(tile, CLEAR_DESERT)) {
|
|
|
uint j = GB(r, 16, 4) + 5;
|
|
|
for (;;) {
|
|
|
TileIndex tile_new;
|
|
|
|
|
|
SetClearGroundDensity(tile, CLEAR_ROCKS, 3);
|
|
|
do {
|
|
|
if (--j == 0) goto get_out;
|
|
|
tile_new = tile + TileOffsByDiagDir((DiagDirection)GB(Random(), 0, 2));
|
|
|
} while (!IsTileType(tile_new, MP_CLEAR) || IsClearGround(tile_new, CLEAR_DESERT));
|
|
|
tile = tile_new;
|
|
|
}
|
|
|
get_out:;
|
|
|
}
|
|
|
} while (--i);
|
|
|
}
|
|
|
|
|
|
static void ClickTile_Clear(TileIndex tile)
|
|
|
static bool ClickTile_Clear(TileIndex tile)
|
|
|
{
|
|
|
/* not used */
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
static TrackStatus GetTileTrackStatus_Clear(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
|
|
|
{
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
static const StringID _clear_land_str[] = {
|
|
|
STR_080D_GRASS,
|
|
|
STR_080B_ROUGH_LAND,
|
|
|
STR_080A_ROCKS,
|
|
|
STR_080E_FIELDS,
|
|
|
STR_080F_SNOW_COVERED_LAND,
|
|
|
STR_0810_DESERT
|
|
|
};
|
|
|
|
|
|
static void GetTileDesc_Clear(TileIndex tile, TileDesc *td)
|
|
|
{
|
|
|
if (IsClearGround(tile, CLEAR_GRASS) && GetClearDensity(tile) == 0) {
|
|
|
td->str = STR_080C_BARE_LAND;
|
|
|
} else {
|
|
|
td->str = _clear_land_str[GetClearGround(tile)];
|
|
|
}
|
|
|
td->owner[0] = GetTileOwner(tile);
|