mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r21826) -Fix [FS#4007]: the expectations from the "always build infrastructure" setting name/description didn't match the behaviour
This commit is contained in:
parent
805afdb002
commit
62128e8263
@ -1247,7 +1247,7 @@ STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :{LTBLUE}Show re
|
||||
STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :{LTBLUE}Keep building tools active after usage: {ORANGE}{STRING1}
|
||||
STR_CONFIG_SETTING_EXPENSES_LAYOUT :{LTBLUE}Group expenses in company finance window: {ORANGE}{STRING1}
|
||||
|
||||
STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE :{LTBLUE}Show building tools when no suitable vehicles are available: {ORANGE}{STRING1}
|
||||
STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING :{LTBLUE}Disable infrastructure building when no suitable vehicles are available: {ORANGE}{STRING1}
|
||||
STR_CONFIG_SETTING_MAX_TRAINS :{LTBLUE}Max trains per company: {ORANGE}{STRING1}
|
||||
STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :{LTBLUE}Max road vehicles per company: {ORANGE}{STRING1}
|
||||
STR_CONFIG_SETTING_MAX_AIRCRAFT :{LTBLUE}Max aircraft per company: {ORANGE}{STRING1}
|
||||
|
@ -1315,7 +1315,7 @@ static SettingEntry _settings_ui[] = {
|
||||
SettingEntry("gui.timetable_arrival_departure"),
|
||||
SettingEntry("gui.quick_goto"),
|
||||
SettingEntry("gui.default_rail_type"),
|
||||
SettingEntry("gui.always_build_infrastructure"),
|
||||
SettingEntry("gui.disable_unsuitable_building"),
|
||||
SettingEntry("gui.persistent_buildingtools"),
|
||||
SettingEntry("gui.coloured_news_year"),
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ struct GUISettings {
|
||||
uint8 statusbar_pos; ///< position of statusbar, 0=left, 1=center, 2=right
|
||||
uint8 window_snap_radius; ///< windows snap at each other if closer than this
|
||||
uint8 window_soft_limit; ///< soft limit of maximum number of non-stickied non-vital windows (0 = no limit)
|
||||
bool always_build_infrastructure; ///< always allow building of infrastructure, even when you do not have the vehicles for it
|
||||
bool disable_unsuitable_building; ///< disable infrastructure building when no suitable vehicles are available
|
||||
byte autosave; ///< how often should we do autosaves?
|
||||
bool threaded_saves; ///< should we do threaded saves?
|
||||
bool keep_all_autosave; ///< name the autosave in a different way
|
||||
|
@ -598,7 +598,7 @@ const SettingDesc _settings[] = {
|
||||
SDTC_BOOL(gui.vehicle_income_warn, S, 0, true, STR_CONFIG_SETTING_WARN_INCOME_LESS, NULL),
|
||||
SDTC_VAR(gui.order_review_system, SLE_UINT8, S, MS, 2, 0, 2, 0, STR_CONFIG_SETTING_ORDER_REVIEW, NULL),
|
||||
SDTC_BOOL(gui.lost_vehicle_warn, S, 0, true, STR_CONFIG_SETTING_WARN_LOST_VEHICLE, NULL),
|
||||
SDTC_BOOL(gui.always_build_infrastructure, S, 0, false, STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE, RedrawScreen),
|
||||
SDTC_BOOL(gui.disable_unsuitable_building, S, 0, true, STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING, RedrawScreen),
|
||||
SDTC_BOOL(gui.new_nonstop, S, 0, false, STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT, NULL),
|
||||
SDTC_VAR(gui.stop_location, SLE_UINT8, S, MS, 2, 0, 2, 1, STR_CONFIG_SETTING_STOP_LOCATION, NULL),
|
||||
SDTC_BOOL(gui.keep_all_autosave, S, 0, false, STR_NULL, NULL),
|
||||
|
@ -1468,7 +1468,7 @@ bool CanBuildVehicleInfrastructure(VehicleType type)
|
||||
assert(IsCompanyBuildableVehicleType(type));
|
||||
|
||||
if (!Company::IsValidID(_local_company)) return false;
|
||||
if (_settings_client.gui.always_build_infrastructure) return true;
|
||||
if (!_settings_client.gui.disable_unsuitable_building) return true;
|
||||
|
||||
UnitID max;
|
||||
switch (type) {
|
||||
|
Loading…
Reference in New Issue
Block a user