Mercurial > hg > openttd
comparison src/newgrf_station.cpp @ 6343:f75b72d9fc98 draft
(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.
author | maedhros <maedhros@openttd.org> |
---|---|
date | Tue, 20 Mar 2007 13:47:00 +0000 |
parents | 57363e064324 |
children | bcf98ba27bbf |
comparison
equal
deleted
inserted
replaced
6342:02bfc4a81378 | 6343:f75b72d9fc98 |
---|---|
4 | 4 |
5 #include "stdafx.h" | 5 #include "stdafx.h" |
6 #include "openttd.h" | 6 #include "openttd.h" |
7 #include "variables.h" | 7 #include "variables.h" |
8 #include "functions.h" | 8 #include "functions.h" |
9 #include "landscape.h" | |
9 #include "debug.h" | 10 #include "debug.h" |
10 #include "sprite.h" | 11 #include "sprite.h" |
11 #include "table/sprites.h" | 12 #include "table/sprites.h" |
12 #include "table/strings.h" | 13 #include "table/strings.h" |
13 #include "station.h" | 14 #include "station.h" |
368 switch (variable) { | 369 switch (variable) { |
369 /* Calculated station variables */ | 370 /* Calculated station variables */ |
370 case 0x40: return GetPlatformInfoHelper(tile, false, false, false); | 371 case 0x40: return GetPlatformInfoHelper(tile, false, false, false); |
371 case 0x41: return GetPlatformInfoHelper(tile, true, false, false); | 372 case 0x41: return GetPlatformInfoHelper(tile, true, false, false); |
372 case 0x42: /* Terrain and rail type */ | 373 case 0x42: /* Terrain and rail type */ |
373 return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > _opt.snow_line) ? 4 : 0) | | 374 return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > GetSnowLine()) ? 4 : 0) | |
374 (_opt.landscape == LT_DESERT ? GetTropicZone(tile) : 0) | | 375 (_opt.landscape == LT_DESERT ? GetTropicZone(tile) : 0) | |
375 (GetRailType(tile) << 8); | 376 (GetRailType(tile) << 8); |
376 case 0x43: return st->owner; /* Station owner */ | 377 case 0x43: return st->owner; /* Station owner */ |
377 case 0x44: return 2; /* PBS status */ | 378 case 0x44: return 2; /* PBS status */ |
378 case 0x45: return GetRailContinuationInfo(tile); | 379 case 0x45: return GetRailContinuationInfo(tile); |