mirror of https://github.com/OpenTTD/OpenTTD
(svn r1958) GenerateStationName() tidyup.
parent
f2e45daf54
commit
bcc9dcd210
|
@ -362,17 +362,17 @@ static bool GenerateStationName(Station *st, uint tile, int flag)
|
|||
}
|
||||
|
||||
/* Check lakeside */
|
||||
if (HASBIT(free_names, M(STR_SV_STNAME_LAKESIDE)) &&
|
||||
DistanceFromEdge(tile) < 20 &&
|
||||
CountMapSquareAround(tile, MP_WATER, 0, 0) >= 5) {
|
||||
if (HASBIT(free_names, M(STR_SV_STNAME_LAKESIDE))
|
||||
&& DistanceFromEdge(tile) < 20
|
||||
&& CountMapSquareAround(tile, MP_WATER, 0, 0) >= 5) {
|
||||
found = M(STR_SV_STNAME_LAKESIDE);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Check woods */
|
||||
if (HASBIT(free_names, M(STR_SV_STNAME_WOODS)) && (
|
||||
CountMapSquareAround(tile, MP_TREES, 0, 255) >= 8 ||
|
||||
CountMapSquareAround(tile, MP_INDUSTRY, 0x10, 0x11) >= 2 )) {
|
||||
if (HASBIT(free_names, M(STR_SV_STNAME_WOODS)) &&
|
||||
(CountMapSquareAround(tile, MP_TREES, 0, 255) >= 8 ||
|
||||
CountMapSquareAround(tile, MP_INDUSTRY, 0x10, 0x11) >= 2)) {
|
||||
found = (_opt.landscape==LT_DESERT) ? M(STR_SV_STNAME_FOREST) : M(STR_SV_STNAME_WOODS);
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue