Timetable auto separation is now per vehicle, with a company default.

Remove global on-off setting.
Add button to timetable GUI.
Add company setting to control default for new vehicles.

Fix automate, start date, change time and autofill buttons
being shown enabled for other companies' vehicles.
This commit is contained in:
Jonathan G Rennison
2016-05-07 01:15:46 +01:00
parent efcdd6c36f
commit d59252d15b
21 changed files with 111 additions and 25 deletions

View File

@@ -317,6 +317,7 @@ CommandCost CmdBuildRoadVehicle(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, Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
SB(v->vehicle_flags, VF_TIMETABLE_SEPARATION, 1, Company::Get(_current_company)->settings.vehicle.auto_separation_by_default);
AddArticulatedParts(v);
v->InvalidateNewGRFCacheOfChain();