(svn r1958) GenerateStationName() tidyup.

This commit is contained in:
pasky
2005-03-08 00:26:30 +00:00
parent f2e45daf54
commit bcc9dcd210

View File

@@ -362,17 +362,17 @@ static bool GenerateStationName(Station *st, uint tile, int flag)
} }
/* Check lakeside */ /* Check lakeside */
if (HASBIT(free_names, M(STR_SV_STNAME_LAKESIDE)) && if (HASBIT(free_names, M(STR_SV_STNAME_LAKESIDE))
DistanceFromEdge(tile) < 20 && && DistanceFromEdge(tile) < 20
CountMapSquareAround(tile, MP_WATER, 0, 0) >= 5) { && CountMapSquareAround(tile, MP_WATER, 0, 0) >= 5) {
found = M(STR_SV_STNAME_LAKESIDE); found = M(STR_SV_STNAME_LAKESIDE);
goto done; goto done;
} }
/* Check woods */ /* Check woods */
if (HASBIT(free_names, M(STR_SV_STNAME_WOODS)) && ( if (HASBIT(free_names, M(STR_SV_STNAME_WOODS)) &&
CountMapSquareAround(tile, MP_TREES, 0, 255) >= 8 || (CountMapSquareAround(tile, MP_TREES, 0, 255) >= 8 ||
CountMapSquareAround(tile, MP_INDUSTRY, 0x10, 0x11) >= 2 )) { CountMapSquareAround(tile, MP_INDUSTRY, 0x10, 0x11) >= 2)) {
found = (_opt.landscape==LT_DESERT) ? M(STR_SV_STNAME_FOREST) : M(STR_SV_STNAME_WOODS); found = (_opt.landscape==LT_DESERT) ? M(STR_SV_STNAME_FOREST) : M(STR_SV_STNAME_WOODS);
goto done; goto done;
} }