mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Remove global automated timetable setting.
This commit is contained in:
parent
ff5ee52b94
commit
efcdd6c36f
@ -325,8 +325,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
|
||||
v->vehicle_flags = 0;
|
||||
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);
|
||||
SB(v->vehicle_flags, VF_AUTOMATE_TIMETABLE, 1, Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
|
||||
|
||||
v->InvalidateNewGRFCacheOfChain();
|
||||
|
||||
|
@ -1394,8 +1394,6 @@ STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :Use groups in v
|
||||
STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT :Enable usage of the advanced vehicle lists for grouping vehicles
|
||||
STR_CONFIG_SETTING_LOADING_INDICATORS :Use loading indicators: {STRING2}
|
||||
STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :Select whether loading indicators are displayed above loading or unloading vehicles
|
||||
STR_CONFIG_SETTING_TIMETABLE_AUTOMATED :Automatically manage timetables: {STRING2}
|
||||
STR_CONFIG_SETTING_TIMETABLE_AUTOMATED_HELPTEXT :Whether to enable automatic timetables
|
||||
STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Show timetable in ticks rather than days: {STRING2}
|
||||
STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Show travel times in time tables in game ticks instead of days
|
||||
STR_CONFIG_SETTING_TIMETABLE_SEPARATION :Use timetable to ensure vehicle separation: {STRING2}
|
||||
|
@ -316,8 +316,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,
|
||||
_settings_game.order.timetable_automated && Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
|
||||
SB(v->vehicle_flags, VF_AUTOMATE_TIMETABLE, 1, Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
|
||||
|
||||
AddArticulatedParts(v);
|
||||
v->InvalidateNewGRFCacheOfChain();
|
||||
|
@ -1629,7 +1629,6 @@ static SettingsContainer &GetSettingsTree()
|
||||
|
||||
vehicles->Add(new SettingEntry("order.no_servicing_if_no_breakdowns"));
|
||||
vehicles->Add(new SettingEntry("order.serviceathelipad"));
|
||||
vehicles->Add(new SettingEntry("order.timetable_automated"));
|
||||
vehicles->Add(new SettingEntry("order.timetable_separation"));
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,6 @@ struct OrderSettings {
|
||||
bool gradual_loading; ///< load vehicles gradually
|
||||
bool selectgoods; ///< only send the goods to station if a train has been there
|
||||
bool no_servicing_if_no_breakdowns; ///< don't send vehicles to depot when breakdowns are disabled
|
||||
bool timetable_automated; ///< whether to automatically manage timetables
|
||||
bool timetable_separation; ///< whether to perform automatic separation based on timetable
|
||||
bool serviceathelipad; ///< service helicopters at helipads automatically (no need to send to depot)
|
||||
|
||||
|
@ -717,8 +717,7 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, u
|
||||
|
||||
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);
|
||||
SB(v->vehicle_flags, VF_AUTOMATE_TIMETABLE, 1, Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
|
||||
|
||||
v->InvalidateNewGRFCacheOfChain();
|
||||
|
||||
|
@ -331,16 +331,6 @@ min = 0
|
||||
max = 3
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_BOOL]
|
||||
base = GameSettings
|
||||
var = order.timetable_automated
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_TIMETABLE_AUTOMATED
|
||||
strhelp = STR_CONFIG_SETTING_TIMETABLE_AUTOMATED_HELPTEXT
|
||||
cat = SC_EXPERT
|
||||
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_AUTO_TIMETABLE)
|
||||
patxname = ""auto_timetables.order.timetable_automated""
|
||||
|
||||
[SDT_BOOL]
|
||||
base = GameSettings
|
||||
var = order.timetable_separation
|
||||
|
@ -395,8 +395,6 @@ CommandCost CmdAutofillTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
|
||||
CommandCost CmdAutomateTimetable(TileIndex index, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
if (!_settings_game.order.timetable_automated) return CMD_ERROR;
|
||||
|
||||
VehicleID veh = GB(p1, 0, 16);
|
||||
|
||||
Vehicle *v = Vehicle::GetIfValid(veh);
|
||||
|
@ -340,7 +340,6 @@ struct TimetableWindow : Window {
|
||||
this->SetWidgetLoweredState(WID_VT_AUTOFILL, HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE));
|
||||
this->SetWidgetLoweredState(WID_VT_AUTOMATE, HasBit(v->vehicle_flags, VF_AUTOMATE_TIMETABLE));
|
||||
this->SetWidgetDisabledState(WID_VT_START_DATE, _settings_game.order.timetable_separation);
|
||||
this->SetWidgetDisabledState(WID_VT_AUTOMATE, !_settings_game.order.timetable_automated);
|
||||
this->SetWidgetDisabledState(WID_VT_CHANGE_TIME, HasBit(v->vehicle_flags, VF_AUTOMATE_TIMETABLE));
|
||||
this->SetWidgetDisabledState(WID_VT_AUTOFILL, HasBit(v->vehicle_flags, VF_AUTOMATE_TIMETABLE));
|
||||
this->SetWidgetDisabledState(WID_VT_CLEAR_TIME, HasBit(v->vehicle_flags, VF_AUTOMATE_TIMETABLE));
|
||||
@ -661,7 +660,6 @@ struct TimetableWindow : Window {
|
||||
void UpdateSelectionStates()
|
||||
{
|
||||
this->GetWidget<NWidgetStacked>(WID_VT_ARRIVAL_DEPARTURE_SELECTION)->SetDisplayedPlane(_settings_client.gui.timetable_arrival_departure ? 0 : SZSP_NONE);
|
||||
// this->GetWidget<NWidgetStacked>(TTV_AUTO_SELECTION)->SetDisplayedPlane(!_settings_game.order.timetable_automated ? 0 : 1);
|
||||
this->GetWidget<NWidgetStacked>(WID_VT_EXPECTED_SELECTION)->SetDisplayedPlane(_settings_client.gui.timetable_arrival_departure ? 0 : 1);
|
||||
}
|
||||
};
|
||||
|
@ -775,8 +775,7 @@ 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);
|
||||
SB(v->vehicle_flags, VF_AUTOMATE_TIMETABLE, 1, Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
|
||||
|
||||
v->group_id = DEFAULT_GROUP;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user