|
@@ -66,24 +66,12 @@ static void SetupEngineNames(void)
|
|
|
*name = STR_SV_EMPTY;
|
|
|
|
|
|
DeleteCustomEngineNames();
|
|
|
LoadCustomEngineNames();
|
|
|
}
|
|
|
|
|
|
static void AdjustAvailAircraft(void)
|
|
|
{
|
|
|
byte avail = 0;
|
|
|
if (_cur_year >= 1955) avail |= 2; // big airport
|
|
|
if (_cur_year < 1960 || _patches.always_small_airport) avail |= 1; // small airport
|
|
|
if (_cur_year >= 1963) avail |= 4; // enable heliport
|
|
|
|
|
|
if (avail != _avail_aircraft) {
|
|
|
_avail_aircraft = avail;
|
|
|
InvalidateWindow(WC_BUILD_STATION, 0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static void CalcEngineReliability(Engine *e)
|
|
|
{
|
|
|
uint age = e->age;
|
|
|
|
|
|
if (age < e->duration_phase_1) {
|
|
@@ -175,14 +163,12 @@ void StartupEngines(void)
|
|
|
/* This sets up type for the engine
|
|
|
* It is needed if you want to ask the engine what type it is
|
|
|
* It should hopefully be the same as when you ask a vehicle what it is
|
|
|
* but using this, you can ask what type an engine number is
|
|
|
* even if it is not a vehicle (yet)*/
|
|
|
}
|
|
|
|
|
|
AdjustAvailAircraft();
|
|
|
}
|
|
|
|
|
|
static void AcceptEnginePreview(EngineID eid, PlayerID player)
|
|
|
{
|
|
|
Engine *e = GetEngine(eid);
|
|
|
|
|
@@ -368,13 +354,12 @@ void EnginesMonthlyLoop(void)
|
|
|
// Do not introduce new rail wagons
|
|
|
if (!IsWagon(e - _engines))
|
|
|
e->preview_player = (PlayerID)1; // Give to the player with the highest rating.
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
AdjustAvailAircraft();
|
|
|
}
|
|
|
|
|
|
/** Rename an engine.
|
|
|
* @param tile unused
|
|
|
* @param p1 engine ID to rename
|
|
|
* @param p2 unused
|