Add company setting to auto-enable auto timetables for new vehicles.

Default: off.
This commit is contained in:
Jonathan G Rennison
2015-09-03 23:27:26 +01:00
parent 25bc8eb1e2
commit 42370dc28d
10 changed files with 23 additions and 1 deletions

View File

@@ -775,6 +775,8 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, const Engin
if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SetBit(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
v->SetServiceIntervalIsPercent(Company::Get(_current_company)->settings.vehicle.servint_ispercent);
SB(v->vehicle_flags, VF_AUTOMATE_TIMETABLE, 1,
_settings_game.order.timetable_automated && Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
v->group_id = DEFAULT_GROUP;