(svn r13226) -Feature: Allow to have more than only two airports per town. The number of airports is now controlled by the noise each of them generates, the distance from town's center and how tolerant the town is.

Initial concept : TTDPatch (moreairpots),  Initial code : Pasky
Thanks to BigBB (help coding), Smatz Skidd13 and frosch for bugcatches and advices
This commit is contained in:
belugas
2008-05-24 02:54:47 +00:00
parent 6f233b1f8f
commit fc35ad9ee9
16 changed files with 279 additions and 26 deletions

View File

@@ -22,6 +22,7 @@
#include "player_base.h"
#include "player_gui.h"
#include "settings_type.h"
#include "station_func.h"
#include "table/strings.h"
@@ -402,6 +403,15 @@ CommandCost CmdChangeDifficultyLevel(TileIndex tile, uint32 flags, uint32 p1, ui
_opt_ptr->diff_level = p2;
}
/* Since the tolerance of the town council has a direct impact on the noise generation/tolerance,
* launch a re-evaluation of the actual values only when setting has changed */
if (p2 == GAME_DIFFICULTY_TOWNCOUNCIL_TOLERANCE && _game_mode == GM_NORMAL) {
UpdateAirportsNoise();
if (_patches.station_noise_level) {
InvalidateWindowClassesData(WC_TOWN_VIEW, 0);
}
}
/* If we are a network-client, update the difficult setting (if it is open).
* Use this instead of just dirtying the window because we need to load in
* the new difficulty settings */