1
0
Fork 0

Compare commits

...

4 Commits

Author SHA1 Message Date
Adam Zmuda 56357adc74
Merge 0fc4be750b into b8e56cd05d 2025-07-19 04:45:24 +00:00
translators b8e56cd05d Update: Translations from eints
chinese (traditional): 3 changes by KogentaSan
chinese (simplified): 1 change by ahyangyi
2025-07-19 04:43:14 +00:00
Peter Nelson df5237e721
Fix: Vehicle liveries did not update when switching company. (#14456)
Vehicle liveries must be refreshed if "Show vehicle-type specific liveries" is set to "Own company".
2025-07-18 23:43:07 +00:00
kojonek2 0fc4be750b Fix #12900: Join station window will be shown for stations with existing stations in tile gaps 2025-06-19 20:23:18 +02:00
4 changed files with 16 additions and 17 deletions

View File

@ -141,6 +141,8 @@ void SetLocalCompany(CompanyID new_company)
MarkWholeScreenDirty();
InvalidateWindowClassesData(WC_SIGN_LIST, -1);
InvalidateWindowClassesData(WC_GOALS_LIST);
InvalidateWindowClassesData(WC_COMPANY_COLOUR, -1);
ResetVehicleColourMap();
}
/**

View File

@ -5001,6 +5001,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}需要
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}土地倾斜的方向不对
STR_ERROR_CAN_T_DO_THIS :{WHITE}不能这样做……
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}必须先摧毁建筑
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}……建筑物被保护
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}无法清除这个区域……
STR_ERROR_SITE_UNSUITABLE :{WHITE}……地点不合适
STR_ERROR_ALREADY_BUILT :{WHITE}……已经建成

View File

@ -1356,8 +1356,8 @@ STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :可以在建築
STR_CONFIG_SETTING_CATCHMENT :容許更真實的服務範圍設定:{STRING}
STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :使車站和機場的服務範圍根據其種類和大小而改變。
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES :公司車站可以為自帶車站的工業設施提供服務{STRING}
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :啟用後,公司車站可以為附近自帶車站的工業設施(如油井)提供服務。禁用後,這些工業設施只能由其自帶的車站提供服務,並且這些車站不會提供除了該工業設施以外的產品
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES :公司車站可以服務附設車站的工業設施{STRING}
STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :啟用後,公司車站可以為附近附設車站的工業(如鑽油平台)提供服務。停用後,這些工業只能由其附設的車站提供服務,並且附設車站不會提供除了該工業設施以外的任何服務
STR_CONFIG_SETTING_EXTRADYNAMITE :允許移除更多市鎮擁有的道路、橋樑及隧道:{STRING}
STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :使玩家更容易地移除市鎮擁有的基礎建設和建築物。
@ -5001,7 +5001,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}需要
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}地面斜坡方向不對
STR_ERROR_CAN_T_DO_THIS :{WHITE}不能執行以下動作...
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}必須先摧毀建築物
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}……建築物受到保護
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}……建築物保護
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}不能清除這個地段...
STR_ERROR_SITE_UNSUITABLE :{WHITE}... 地點不適合
STR_ERROR_ALREADY_BUILT :{WHITE}……經已建成

View File

@ -2222,7 +2222,7 @@ static void AddNearbyStation(TileIndex tile, TileArea *ctx)
* @tparam T the station filter type, for stations to look for
*/
template <class T>
static const BaseStation *FindStationsNearby(TileArea ta, bool distant_join)
static void FindStationsNearby(TileArea ta, bool distant_join)
{
TileArea ctx = ta;
@ -2230,11 +2230,6 @@ static const BaseStation *FindStationsNearby(TileArea ta, bool distant_join)
_stations_nearby_list.push_back(NEW_STATION);
_deleted_stations_nearby.clear();
/* Check the inside, to return, if we sit on another station */
for (TileIndex t : ta) {
if (t < Map::Size() && IsTileType(t, MP_STATION) && T::IsValidID(GetStationIndex(t))) return BaseStation::GetByTile(t);
}
/* Look for deleted stations */
for (const BaseStation *st : BaseStation::Iterate()) {
if (T::IsValidBaseStation(st) && !st->IsInUse() && st->owner == _local_company) {
@ -2251,17 +2246,20 @@ static const BaseStation *FindStationsNearby(TileArea ta, bool distant_join)
}
}
/* Add stations that are within station tile area. Stations do not have to occupy all tiles */
for (auto t : ta) {
AddNearbyStation<T>(t, &ctx);
}
/* Only search tiles where we have a chance to stay within the station spread.
* The complete check needs to be done in the callback as we don't know the
* extent of the found station, yet. */
if (distant_join && std::min(ta.w, ta.h) >= _settings_game.station.station_spread) return nullptr;
if (distant_join && std::min(ta.w, ta.h) >= _settings_game.station.station_spread) return;
uint max_dist = distant_join ? _settings_game.station.station_spread - std::min(ta.w, ta.h) : 1;
for (auto tile : SpiralTileSequence(TileAddByDir(ctx.tile, DIR_N), max_dist, ta.w, ta.h)) {
AddNearbyStation<T>(tile, &ctx);
}
return nullptr;
}
static constexpr NWidgetPart _nested_select_station_widgets[] = {
@ -2421,7 +2419,7 @@ static WindowDesc _select_station_desc(
* @return whether we need to show the station selection window.
*/
template <class T>
static bool StationJoinerNeeded(TileArea ta, const StationPickerCmdProc &proc)
static bool StationJoinerNeeded(const StationPickerCmdProc &proc)
{
/* Only show selection if distant join is enabled in the settings */
if (!_settings_game.station.distant_join_stations) return false;
@ -2439,9 +2437,7 @@ static bool StationJoinerNeeded(TileArea ta, const StationPickerCmdProc &proc)
if (!_ctrl_pressed) return false;
/* Now check if we could build there */
if (!proc(true, StationID::Invalid())) return false;
return FindStationsNearby<T>(ta, false) == nullptr;
return proc(true, StationID::Invalid());
}
/**
@ -2453,7 +2449,7 @@ static bool StationJoinerNeeded(TileArea ta, const StationPickerCmdProc &proc)
template <class T>
void ShowSelectBaseStationIfNeeded(TileArea ta, StationPickerCmdProc&& proc)
{
if (StationJoinerNeeded<T>(ta, proc)) {
if (StationJoinerNeeded<T>(proc)) {
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
new SelectStationWindow<T>(_select_station_desc, ta, std::move(proc));
} else {