From 28429e1f575a350c4123a62267316cb29839682a Mon Sep 17 00:00:00 2001 From: dP Date: Thu, 19 Aug 2021 23:27:22 +0300 Subject: [PATCH] Reorganize CityMania client custom settings --- cm_changelog.txt | 7 +++++++ src/citymania/cm_highlight.cpp | 6 +++--- src/citymania/cm_zoning_cmd.cpp | 2 +- src/depot_gui.cpp | 13 +++---------- src/dock_gui.cpp | 2 +- src/economy.cpp | 2 +- src/industry_gui.cpp | 8 ++++---- src/lang/english.txt | 3 +-- src/order_cmd.cpp | 2 +- src/order_gui.cpp | 20 ++++++++++---------- src/rail_gui.cpp | 2 +- src/road_gui.cpp | 2 +- src/saveload/afterload.cpp | 2 +- src/settings_gui.cpp | 27 ++++++++++++--------------- src/settings_type.h | 33 +++++++++++++++------------------ src/town_cmd.cpp | 4 ++-- src/viewport.cpp | 3 +-- 17 files changed, 65 insertions(+), 73 deletions(-) diff --git a/cm_changelog.txt b/cm_changelog.txt index 9540e40abf..d3c946f41b 100644 --- a/cm_changelog.txt +++ b/cm_changelog.txt @@ -74,6 +74,13 @@ This is usable for any OpenTTD servers == CHANGELOG == +*** 12.0-beta2 (19 Aug 2021) *** +- Fixed crash when building airport with no valid airport type selected. +- Renamed a bunch of setttings in the config file adding cm_* prefix to distinguish them from vanilla ones. +- Removed setting to show train length in old format in the depot (new one is more usable now). +- Removed setting to disable ending the polyrail with double click (it's always disabled). +- Removed setting to disable starting-stopping vehicles with ctrl-click (seems pointless). + *** 1.11.2 (3 May 2021) *** - OpenTTD update. diff --git a/src/citymania/cm_highlight.cpp b/src/citymania/cm_highlight.cpp index 0a3bec8c3a..23fbebc203 100644 --- a/src/citymania/cm_highlight.cpp +++ b/src/citymania/cm_highlight.cpp @@ -955,7 +955,7 @@ static void SetStationSelectionHighlight(const TileInfo *ti, TileHighlight &th) void CalcCBAcceptanceBorders(TileHighlight &th, TileIndex tile, SpriteID border_pal, SpriteID ground_pal) { int tx = TileX(tile), ty = TileY(tile); - uint16 radius = _settings_client.gui.cb_distance_check; + uint16 radius = _settings_client.gui.cm_cb_distance; bool in_zone = false; ZoningBorder border = ZoningBorder::NONE; _town_kdtree.FindContained( @@ -1112,7 +1112,7 @@ TileHighlight GetTileHighlight(const TileInfo *ti) { if (z) th.ground_pal = th.structure_pal = GetTintBySelectionColour(pal[z]); } - if (_settings_client.gui.show_industry_forbidden_tiles && + if (_settings_client.gui.cm_show_industry_forbidden_tiles && _industry_forbidden_tiles != INVALID_INDUSTRYTYPE) { auto b = CalcTileBorders(ti->tile, [](TileIndex t) { return !CanBuildIndustryOnTileCached(_industry_forbidden_tiles, t); }); th.add_border(b.first, SPR_PALETTE_ZONING_RED); @@ -1384,7 +1384,7 @@ ZoningBorder GetAnyStationCatchmentBorder(TileIndex tile) { } void SetIndustryForbiddenTilesHighlight(IndustryType type) { - if (_settings_client.gui.show_industry_forbidden_tiles && + if (_settings_client.gui.cm_show_industry_forbidden_tiles && _industry_forbidden_tiles != type) { MarkWholeScreenDirty(); } diff --git a/src/citymania/cm_zoning_cmd.cpp b/src/citymania/cm_zoning_cmd.cpp index 7e628fcd76..760f235ead 100644 --- a/src/citymania/cm_zoning_cmd.cpp +++ b/src/citymania/cm_zoning_cmd.cpp @@ -286,7 +286,7 @@ SpriteID TileZoneCheckNewCBBorders(TileIndex tile) { //Check CB town acceptance area SpriteID TileZoneCheckCBBorders(TileIndex tile) { for (Town *town : Town::Iterate()) { - if (DistanceMax(town->xy, tile) <= _settings_client.gui.cb_distance_check) + if (DistanceMax(town->xy, tile) <= _settings_client.gui.cm_cb_distance) return SPR_PALETTE_ZONING_LIGHT_BLUE; } return INVALID_SPRITE_ID; // no town diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index e5d0cad5a4..db78ea2658 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -305,16 +305,9 @@ struct DepotWindow : Window { this->sel, EIT_IN_DEPOT, free_wagon ? 0 : this->hscroll->GetPosition(), this->vehicle_over); /* Length of consist in tiles with 1 fractional digit (rounded up) */ - if (_settings_client.gui.old_depot_train_length_calc) { - SetDParam(0, CeilDiv(u->gcache.cached_total_length, 8)); - SetDParam(1, 1); - DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, y + (this->resize.step_height - FONT_HEIGHT_SMALL) / 2, STR_TINY_BLACK_COMA, TC_FROMSTRING, SA_RIGHT); // Draw the counter - } - else { - SetDParam(0, CeilDiv(u->gcache.cached_total_length * 10, TILE_SIZE)); - SetDParam(1, 1); - DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, y + (this->resize.step_height - FONT_HEIGHT_SMALL) / 2, STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter - } + SetDParam(0, CeilDiv(u->gcache.cached_total_length * 10, TILE_SIZE)); + SetDParam(1, 1); + DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, y + (this->resize.step_height - FONT_HEIGHT_SMALL) / 2, STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter break; } diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 7170aba7a5..205a25f85a 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -203,7 +203,7 @@ struct BuildDocksToolbarWindow : Window { case WID_DT_DEPOT: // Build depot button DoCommandP(tile, _ship_depot_direction, 0, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_SHIP_DEPOT), CcBuildDocks); - if (citymania::_fn_mod == _settings_client.gui.persistent_depottools) + if (citymania::_fn_mod == _settings_client.gui.cm_keep_depot_tools) ResetObjectToPlace(); break; diff --git a/src/economy.cpp b/src/economy.cpp index 10f972071e..e19eddfd52 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1121,7 +1121,7 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti /* Increase town's counter for all goods types only if delivered near town*/ if(CB_Enabled()){ - if (_settings_client.gui.cb_distance_check == 0 || (DistanceManhattan(st->town->xy, st->xy) <= _settings_client.gui.cb_distance_check)) { + if (_settings_client.gui.cm_cb_distance == 0 || (DistanceManhattan(st->town->xy, st->xy) <= _settings_client.gui.cm_cb_distance)) { st->town->cb.delivered[cargo_type] += accepted_total; InvalidateWindowData(WC_CB_TOWN, st->town->index); } diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 0efb89f5c0..45aa8ab602 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -365,7 +365,7 @@ class BuildIndustryWindow : public Window { { this->SetWidgetDisabledState(WID_DPI_FUND_WIDGET, !this->funding_enabled || (this->selected_type != INVALID_INDUSTRYTYPE && !this->enabled[this->selected_index])); this->SetWidgetDisabledState(WID_DPI_DISPLAY_WIDGET, this->selected_type == INVALID_INDUSTRYTYPE && this->enabled[this->selected_index]); - this->LowerWidget(_settings_client.gui.show_industry_forbidden_tiles + WID_DPI_FT_OFF); + this->LowerWidget(_settings_client.gui.cm_show_industry_forbidden_tiles + WID_DPI_FT_OFF); } /** @@ -727,9 +727,9 @@ public: case WID_DPI_FT_OFF: case WID_DPI_FT_ON: - this->RaiseWidget(_settings_client.gui.show_industry_forbidden_tiles + WID_DPI_FT_OFF); - _settings_client.gui.show_industry_forbidden_tiles = (widget != WID_DPI_FT_OFF); - this->LowerWidget(_settings_client.gui.show_industry_forbidden_tiles + WID_DPI_FT_OFF); + this->RaiseWidget(_settings_client.gui.cm_show_industry_forbidden_tiles + WID_DPI_FT_OFF); + _settings_client.gui.cm_show_industry_forbidden_tiles = (widget != WID_DPI_FT_OFF); + this->LowerWidget(_settings_client.gui.cm_show_industry_forbidden_tiles + WID_DPI_FT_OFF); if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); this->SetDirty(); MarkWholeScreenDirty(); diff --git a/src/lang/english.txt b/src/lang/english.txt index 61b17071d1..60b962ce63 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1,3 +1,4 @@ + ##name English (UK) ##ownname English (UK) ##isocode en_GB @@ -1830,7 +1831,6 @@ STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Change s STR_CONFIG_SETTING_VEHICLES_CTRL :{ORANGE}Controls & Orders STR_CONFIG_SETTING_ORDER_SHORTCUTS :{ORANGE}Order's Shortcuts -STR_CONFIG_SETTING_CTRL_ENABLE_CTRLCLICK_STARTSTOP :Allow ctrl+left-click vehicles to start or stop them: {STRING2} STR_CONFIG_SETTING_AUTOSET_NOLOAD_ON_TRANSFER :"Transfer" orders are "No Loading" by default: {STRING2} STR_CONFIG_SETTING_AUTOSET_NOLOAD_ON_UNLOAD :"Unload all" orders are "No Loading" by default: {STRING2} @@ -5455,7 +5455,6 @@ STR_TOOLBAR_CARGOS_NAME :{BLACK}{STRING} #towns STR_TOWN_DIRECTORY_TOWN_COLOUR :{ORANGE}{TOWN}{BLACK} ({COMMA}->{COMMA}) {YELLOW}{COMMA} {P "house" "houses"} STR_TOWN_DIRECTORY_CITY_COLOUR :{YELLOW}{TOWN}{BLACK} ({COMMA}->{COMMA}) {YELLOW}{COMMA} {P "house" "houses"} -STR_OLD_DEPOT_TRAINT_LENGTH :Old depot length format: {STRING2} STR_SMALLMAP_TOWN_LARGE :{TINY_FONT}{YELLOW}{TOWN} STR_SORT_BY_HOUSES :Houses diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index cf315600d3..ebff2f2bc7 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1763,7 +1763,7 @@ void CheckOrders(const Vehicle *v) } else if (v->type == VEH_AIRCRAFT && (AircraftVehInfo(v->engine_type)->subtype & AIR_FAST) && (st->airport.GetFTA()->flags & AirportFTAClass::SHORT_STRIP) && - _settings_client.gui.runway_too_short_warn && + _settings_client.gui.cm_runway_too_short_warning && !_cheats.no_jetcrash.value && message == INVALID_STRING_ID) { message = STR_NEWS_PLANE_USES_TOO_SHORT_RUNWAY; diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 5d06ee6a50..94400de2d6 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -222,7 +222,7 @@ static OrdersFromSettings GetOrdersFromSettings(const Vehicle *v, uint8 setting) case GOFS_UNLOAD: res.unload = OUFB_UNLOAD; - if (_settings_client.gui.auto_noload_on_unloadall) + if (_settings_client.gui.cm_no_loading_on_unload_order) res.load = OLFB_NO_LOAD; break; @@ -234,7 +234,7 @@ static OrdersFromSettings GetOrdersFromSettings(const Vehicle *v, uint8 setting) case GOFS_XFER: res.unload = OUFB_TRANSFER; - if (_settings_client.gui.auto_noload_on_transfer) + if (_settings_client.gui.cm_no_loading_on_transfer_order) res.load = OLFB_NO_LOAD; break; @@ -506,20 +506,20 @@ static std::pair GetOrderCmdFromTile(const Vehicle *v, Ti uint8 os = 0xff; if (_ctrl_pressed) { if (_shift_pressed) - os = _settings_client.gui.goto_shortcuts_ctrlshift_lclick; + os = _settings_client.gui.cm_ctrl_shift_order_mod; else if (_alt_pressed) - os = _settings_client.gui.goto_shortcuts_altctrl_lclick; + os = _settings_client.gui.cm_alt_ctrl_order_mod; else - os = _settings_client.gui.goto_shortcuts_ctrl_lclick; + os = _settings_client.gui.cm_ctrl_order_mod; } else if (_shift_pressed) { if (_alt_pressed) - os = _settings_client.gui.goto_shortcuts_altshift_lclick; + os = _settings_client.gui.cm_alt_shift_order_mod; else - os = _settings_client.gui.goto_shortcuts_shift_lclick; + os = _settings_client.gui.cm_ctrl_order_mod; } else if (_alt_pressed) - os = _settings_client.gui.goto_shortcuts_alt_lclick; + os = _settings_client.gui.cm_alt_order_mod; auto feeder_mod = FeederOrderMod::NONE; if (os != 0xff) { @@ -765,10 +765,10 @@ private: bool set_no_load = false; if (unload_type == OUFB_TRANSFER){ - set_no_load = _settings_client.gui.auto_noload_on_transfer; + set_no_load = _settings_client.gui.cm_no_loading_on_transfer_order; } else if (unload_type == OUFB_UNLOAD){ - set_no_load = _settings_client.gui.auto_noload_on_unloadall; + set_no_load = _settings_client.gui.cm_no_loading_on_unload_order; } /* Transfer orders with leave empty as default */ if (set_no_load) { diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 3f4750afc7..b151d75957 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -817,7 +817,7 @@ struct BuildRailToolbarWindow : Window { DoCommandP(tile, _cur_railtype, ddir, CMD_BUILD_TRAIN_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT), CcRailDepot); - if (citymania::_fn_mod == _settings_client.gui.persistent_depottools) + if (citymania::_fn_mod == _settings_client.gui.cm_keep_depot_tools) ResetObjectToPlace(); break; diff --git a/src/road_gui.cpp b/src/road_gui.cpp index b94f70c4d2..0f804524f6 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -574,7 +574,7 @@ struct BuildRoadToolbarWindow : Window { } DoCommandP(tile, _cur_roadtype << 2 | ddir, 0, CMD_BUILD_ROAD_DEPOT | CMD_MSG(this->rti->strings.err_depot), CcRoadDepot); - if (citymania::_fn_mod == _settings_client.gui.persistent_depottools) + if (citymania::_fn_mod == _settings_client.gui.cm_keep_depot_tools) ResetObjectToPlace(); break; diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index df71353f07..3895e6d04a 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -3212,7 +3212,7 @@ bool AfterLoadGame() AfterLoadFindBTProCBInfo(); citymania::InitializeZoningMap(); - if ((!_networking || _network_server ) && _settings_client.gui.pause_after_load) _pause_mode = PM_PAUSED_NORMAL; + if ((!_networking || _network_server ) && _settings_client.gui.cm_pause_after_load) _pause_mode = PM_PAUSED_NORMAL; return true; } diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 58ac938bb2..594f59980c 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1640,12 +1640,10 @@ static SettingsContainer &GetSettingsTree() viewports->Add(new SettingEntry("gui.measure_tooltip")); viewports->Add(new SettingEntry("gui.loading_indicators")); viewports->Add(new SettingEntry("gui.show_track_reservation")); - viewports->Add(new SettingEntry("gui.cb_distance_check")); - viewports->Add(new SettingEntry("gui.old_depot_train_length_calc")); + viewports->Add(new SettingEntry("gui.cm_cb_distance")); viewports->Add(new SettingEntry("gui.cm_land_tooltips_for_industries")); viewports->Add(new SettingEntry("gui.cm_land_tooltips_for_stations")); viewports->Add(new SettingEntry("gui.cm_land_tooltips_for_houses")); - // viewports->Add(new SettingEntry("gui.polyrail_double_click")); } SettingsPage *construction = interface->Add(new SettingsPage(STR_CONFIG_SETTING_INTERFACE_CONSTRUCTION)); @@ -1670,8 +1668,8 @@ static SettingsContainer &GetSettingsTree() interface->Add(new SettingEntry("gui.timetable_in_ticks")); interface->Add(new SettingEntry("gui.timetable_arrival_departure")); interface->Add(new SettingEntry("gui.expenses_layout")); - interface->Add(new SettingEntry("gui.powerfund_money")); - interface->Add(new SettingEntry("gui.powerfund_houses")); + interface->Add(new SettingEntry("gui.cm_powerfund_money")); + interface->Add(new SettingEntry("gui.cm_powerfund_houses")); interface->Add(new SettingEntry("gui.show_newgrf_name")); interface->Add(new SettingEntry("gui.cm_graph_background")); } @@ -1690,7 +1688,7 @@ static SettingsContainer &GetSettingsTree() advisors->Add(new SettingEntry("gui.order_review_system")); advisors->Add(new SettingEntry("gui.vehicle_income_warn")); advisors->Add(new SettingEntry("gui.lost_vehicle_warn")); - advisors->Add(new SettingEntry("gui.runway_too_short_warn")); + advisors->Add(new SettingEntry("gui.cm_runway_too_short_warning")); advisors->Add(new SettingEntry("gui.show_finances")); advisors->Add(new SettingEntry("news_display.economy")); advisors->Add(new SettingEntry("news_display.subsidies")); @@ -1739,21 +1737,20 @@ static SettingsContainer &GetSettingsTree() /** Vehicle control page */ SettingsPage *veh_control = vehicles->Add(new SettingsPage(STR_CONFIG_SETTING_VEHICLES_CTRL)); { - veh_control->Add(new SettingEntry("gui.enable_ctrl_click_start_stop")); veh_control->Add(new SettingEntry("gui.new_nonstop")); - veh_control->Add(new SettingEntry("gui.auto_noload_on_transfer")); - veh_control->Add(new SettingEntry("gui.auto_noload_on_unloadall")); + veh_control->Add(new SettingEntry("gui.cm_no_loading_on_transfer_order")); + veh_control->Add(new SettingEntry("gui.cm_no_loading_on_unload_order")); } /** Order Shorcuts page */ SettingsPage *orders = veh_control->Add(new SettingsPage(STR_CONFIG_SETTING_ORDER_SHORTCUTS)); { - orders->Add(new SettingEntry("gui.goto_shortcuts_ctrl_lclick")); - orders->Add(new SettingEntry("gui.goto_shortcuts_shift_lclick")); - orders->Add(new SettingEntry("gui.goto_shortcuts_ctrlshift_lclick")); - orders->Add(new SettingEntry("gui.goto_shortcuts_alt_lclick")); - orders->Add(new SettingEntry("gui.goto_shortcuts_altshift_lclick")); - orders->Add(new SettingEntry("gui.goto_shortcuts_altctrl_lclick")); + orders->Add(new SettingEntry("gui.cm_ctrl_order_mod")); + orders->Add(new SettingEntry("gui.cm_shift_order_mod")); + orders->Add(new SettingEntry("gui.cm_ctrl_shift_order_mod")); + orders->Add(new SettingEntry("gui.cm_alt_order_mod")); + orders->Add(new SettingEntry("gui.cm_alt_shift_order_mod")); + orders->Add(new SettingEntry("gui.cm_alt_ctrl_order_mod")); } SettingsPage *physics = vehicles->Add(new SettingsPage(STR_CONFIG_SETTING_VEHICLES_PHYSICS)); diff --git a/src/settings_type.h b/src/settings_type.h index 3bfb7c4107..8222e38106 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -109,15 +109,14 @@ struct GUISettings { bool vehicle_income_warn; ///< if a vehicle isn't generating income, show a warning bool show_finances; ///< show finances at end of year bool sg_new_nonstop; ///< ttdpatch compatible nonstop handling read from pre v93 savegames - bool enable_ctrl_click_start_stop; ///< allow ctrl+click to start or stop vehicles - uint8 goto_shortcuts_ctrl_lclick; ///< goto action shortcut CTRL+LEFT-CLICK - uint8 goto_shortcuts_shift_lclick; ///< goto action shortcut SHIFT+LEFT-CLICK - uint8 goto_shortcuts_ctrlshift_lclick; ///< goto action shortcut CTRL+SHIFT+LEFT-CLICK - uint8 goto_shortcuts_alt_lclick; ///< goto action shortcut ALT+LEFT-CLICK - uint8 goto_shortcuts_altshift_lclick; ///< goto action shortcut ALT+SHIFT+LEFT-CLICK - uint8 goto_shortcuts_altctrl_lclick; ///< goto action shortcut ALT+CTRL+LEFT-CLICK - bool auto_noload_on_transfer; ///< automatically set no-loading when ordering to transfer all cargo - bool auto_noload_on_unloadall; ///< automatically set no-loading when ordering to unload all cargo + uint8 cm_ctrl_order_mod; ///< goto action shortcut CTRL+LEFT-CLICK + uint8 cm_shift_order_mod; ///< goto action shortcut SHIFT+LEFT-CLICK + uint8 cm_ctrl_shift_order_mod; ///< goto action shortcut CTRL+SHIFT+LEFT-CLICK + uint8 cm_alt_order_mod; ///< goto action shortcut ALT+LEFT-CLICK + uint8 cm_alt_shift_order_mod; ///< goto action shortcut ALT+SHIFT+LEFT-CLICK + uint8 cm_alt_ctrl_order_mod; ///< goto action shortcut ALT+CTRL+LEFT-CLICK + bool cm_no_loading_on_transfer_order; ///< automatically set no-loading when ordering to transfer all cargo + bool cm_no_loading_on_unload_order; ///< automatically set no-loading when ordering to unload all cargo bool new_nonstop; ///< ttdpatch compatible nonstop handling uint8 stop_location; ///< what is the default stop location of trains? uint8 auto_scrolling; ///< scroll when moving mouse to the edge (see #ViewportAutoscrolling) @@ -149,7 +148,7 @@ struct GUISettings { byte max_num_autosaves; ///< controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1) bool population_in_label; ///< show the population of a town in its label? uint8 right_mouse_btn_emulation; ///< should we emulate right mouse clicking? - bool pause_after_load; ///< CM should we pause the game after loading save? + bool cm_pause_after_load; ///< CM should we pause the game after loading save? uint8 scrollwheel_scrolling; ///< scrolling using the scroll wheel? uint8 scrollwheel_multiplier; ///< how much 'wheel' per incoming event from the OS? bool timetable_arrival_departure; ///< show arrivals and departures in vehicle timetables @@ -172,7 +171,7 @@ struct GUISettings { bool station_dragdrop; ///< whether drag and drop is enabled for stations bool station_show_coverage; ///< whether to highlight coverage area bool persistent_buildingtools; ///< keep the building tools active after usage - bool persistent_depottools; ///< keep the depot building tools active after usage + bool cm_keep_depot_tools; ///< keep the depot building tools active after usage bool cm_use_improved_station_join; ///< use ctrl-clicking station tiles to join instead of popup window bool expenses_layout; ///< layout of expenses window uint32 last_newgrf_count; ///< the numbers of NewGRFs we found during the last scan @@ -204,14 +203,12 @@ struct GUISettings { bool newgrf_show_old_versions; ///< whether to show old versions in the NewGRF list uint8 newgrf_default_palette; ///< default palette to use for NewGRFs without action 14 palette information - bool old_depot_train_length_calc; ///< display vehicle length in whole numbers - old style - uint8 cb_distance_check; ///< zoning cb distance - bool polyrail_double_click; ///< finish polyrail with mouse double click - bool show_industry_forbidden_tiles; ///< higlight areas where industry placement is forbidden regardless of terrain - bool runway_too_short_warn; ///< warn about aircrafts using too short runways + uint8 cm_cb_distance; ///< zoning cb distance + bool cm_show_industry_forbidden_tiles; ///< higlight areas where industry placement is forbidden regardless of terrain + bool cm_runway_too_short_warning; ///< warn about aircrafts using too short runways - uint32 powerfund_money; ///< minimum amount of money for powerfund to work - uint16 powerfund_houses; ///< powerfunding maximum houses limit + uint32 cm_powerfund_money; ///< minimum amount of money for powerfund to work + uint16 cm_powerfund_houses; ///< powerfunding maximum houses limit bool cm_open_vehicle_for_shared_clone; bool cm_open_orders_for_new_vehicles; diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index f5dc9bbeb4..6642969d3f 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -863,8 +863,8 @@ bool TownNeedsFunding(Town *t) { bool fund_regularly = HasBit(t->fund_regularly, _local_company); bool do_powerfund = HasBit(t->do_powerfund, _local_company); - if (do_powerfund && (_settings_client.gui.powerfund_money > Company::Get(_local_company)->money || - _settings_client.gui.powerfund_houses < t->cache.num_houses)) { + if (do_powerfund && (_settings_client.gui.cm_powerfund_money > Company::Get(_local_company)->money || + _settings_client.gui.cm_powerfund_houses < t->cache.num_houses)) { do_powerfund = false; } diff --git a/src/viewport.cpp b/src/viewport.cpp index 53469dd92b..92d0935920 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -2426,8 +2426,7 @@ bool HandleViewportClicked(const Viewport *vp, int x, int y, bool double_click) if (IsCompanyBuildableVehicleType(v)) { v = v->First(); if (citymania::_fn_mod && v->owner == _local_company) { - if (_settings_client.gui.enable_ctrl_click_start_stop) - StartStopVehicle(v, true); + StartStopVehicle(v, true); } else { ShowVehicleViewWindow(v); }