mirror of https://github.com/OpenTTD/OpenTTD
(svn r1958) GenerateStationName() tidyup.
parent
f2e45daf54
commit
bcc9dcd210
|
@ -362,16 +362,16 @@ 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;
|
||||||
|
|
Loading…
Reference in New Issue