forked from mirror/OpenTTD
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
by newgrf files. When this is enabled forests cannot be built below the highest snow line, and farms can't be built above it. Houses still use the _opt.snow_line so they are all consistent, so to make them respect the snowline you may want to use some newhouses features as well.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
#include "map.h"
|
||||
#include "landscape.h"
|
||||
#include "tile.h"
|
||||
#include "town_map.h"
|
||||
#include "tunnel_map.h"
|
||||
@@ -1700,7 +1701,7 @@ static void UpdateTownGrowRate(Town *t)
|
||||
}
|
||||
|
||||
if (_opt.landscape == LT_HILLY) {
|
||||
if (TilePixelHeight(t->xy) >= _opt.snow_line && t->act_food == 0 && t->population > 90)
|
||||
if (TilePixelHeight(t->xy) >= GetSnowLine() && t->act_food == 0 && t->population > 90)
|
||||
return;
|
||||
} else if (_opt.landscape == LT_DESERT) {
|
||||
if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food==0 || t->act_water==0) && t->population > 60)
|
||||
|
Reference in New Issue
Block a user