From 735abfe111da48ac123482dc9a060ede05bb69cf Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Mon, 22 Jan 2024 09:04:34 -0500 Subject: [PATCH 01/52] Codechange: Split dates and timers into Economy and Calendar time (#10700) --- src/aircraft.h | 3 +- src/aircraft_cmd.cpp | 16 ++- src/cheat_gui.cpp | 16 ++- src/command.cpp | 4 +- src/company_base.h | 4 +- src/company_cmd.cpp | 6 +- src/company_gui.cpp | 8 +- src/core/random_func.cpp | 2 +- src/date_gui.cpp | 24 ++-- src/date_gui.h | 4 +- src/disaster_vehicle.cpp | 4 +- src/economy.cpp | 26 ++-- src/engine.cpp | 8 +- src/graph_gui.cpp | 17 +-- src/industry.h | 9 +- src/industry_cmd.cpp | 17 +-- src/linkgraph/linkgraph.cpp | 28 ++-- src/linkgraph/linkgraph.h | 32 ++--- src/linkgraph/linkgraphjob.cpp | 6 +- src/linkgraph/linkgraphjob.h | 12 +- src/linkgraph/linkgraphschedule.cpp | 20 +-- src/linkgraph/linkgraphschedule.h | 2 +- src/misc.cpp | 6 +- src/network/network.cpp | 32 ++--- src/network/network_base.h | 4 +- src/network/network_client.cpp | 2 +- src/network/network_server.cpp | 35 +++-- src/newgrf.cpp | 15 +++ src/newgrf_industries.cpp | 4 +- src/news_gui.cpp | 14 +- src/news_type.h | 4 +- src/openttd.cpp | 7 +- src/order_cmd.cpp | 2 +- src/roadveh.h | 3 +- src/roadveh_cmd.cpp | 11 +- src/saveload/afterload.cpp | 20 ++- src/saveload/industry_sl.cpp | 4 +- src/saveload/misc_sl.cpp | 3 + src/saveload/oldloader_sl.cpp | 4 +- src/saveload/saveload.h | 1 + src/ship.h | 3 +- src/ship_cmd.cpp | 13 +- src/station.cpp | 2 +- src/station_cmd.cpp | 23 ++-- src/subsidy.cpp | 6 +- src/subsidy_gui.cpp | 6 +- src/survey.cpp | 5 + src/timer/CMakeLists.txt | 4 + src/timer/timer_game_calendar.cpp | 146 ++------------------- src/timer/timer_game_calendar.h | 168 ++---------------------- src/timer/timer_game_common.cpp | 140 ++++++++++++++++++++ src/timer/timer_game_common.h | 196 ++++++++++++++++++++++++++++ src/timer/timer_game_economy.cpp | 160 +++++++++++++++++++++++ src/timer/timer_game_economy.h | 48 +++++++ src/timetable.h | 8 +- src/timetable_cmd.cpp | 24 ++-- src/timetable_gui.cpp | 16 +-- src/toolbar_gui.cpp | 16 ++- src/town_cmd.cpp | 5 +- src/train.h | 3 +- src/train_cmd.cpp | 13 +- src/vehicle.cpp | 38 ++++-- src/vehicle_base.h | 15 ++- src/vehicle_func.h | 1 + src/vehicle_gui.cpp | 2 +- 65 files changed, 951 insertions(+), 549 deletions(-) create mode 100644 src/timer/timer_game_common.cpp create mode 100644 src/timer/timer_game_common.h create mode 100644 src/timer/timer_game_economy.cpp create mode 100644 src/timer/timer_game_economy.h diff --git a/src/aircraft.h b/src/aircraft.h index a11383332c..0beab20dfb 100644 --- a/src/aircraft.h +++ b/src/aircraft.h @@ -107,7 +107,8 @@ struct Aircraft FINAL : public SpecializedVehicle { } bool Tick() override; - void OnNewDay() override; + void OnNewCalendarDay() override; + void OnNewEconomyDay() override; uint Crash(bool flooded = false) override; TileIndex GetOrderStationLocation(StationID station) override; ClosestDepot FindClosestDepot() override; diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 1f5f986282..6002a05f20 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -22,6 +22,7 @@ #include "command_func.h" #include "window_func.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "vehicle_func.h" #include "sound_func.h" #include "cheat_type.h" @@ -338,7 +339,7 @@ CommandCost CmdBuildAircraft(DoCommandFlag flags, TileIndex tile, const Engine * v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_aircraft); - v->date_of_last_service = TimerGameCalendar::date; + v->date_of_last_service = TimerGameEconomy::date; v->date_of_last_service_newgrf = TimerGameCalendar::date; v->build_year = u->build_year = TimerGameCalendar::year; @@ -439,7 +440,15 @@ Money Aircraft::GetRunningCost() const return GetPrice(PR_RUNNING_AIRCRAFT, cost_factor, e->GetGRF()); } -void Aircraft::OnNewDay() +/** Calendar day handler */ +void Aircraft::OnNewCalendarDay() +{ + if (!this->IsNormalAircraft()) return; + AgeVehicle(this); +} + +/** Economy day handler */ +void Aircraft::OnNewEconomyDay() { if (!this->IsNormalAircraft()) return; @@ -448,7 +457,6 @@ void Aircraft::OnNewDay() CheckOrders(this); CheckVehicleBreakdown(this); - AgeVehicle(this); CheckIfAircraftNeedsService(this); if (this->running_ticks == 0) return; @@ -1555,7 +1563,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass * if (_settings_game.order.serviceathelipad) { if (v->subtype == AIR_HELICOPTER && apc->num_helipads > 0) { /* an excerpt of ServiceAircraft, without the invisibility stuff */ - v->date_of_last_service = TimerGameCalendar::date; + v->date_of_last_service = TimerGameEconomy::date; v->date_of_last_service_newgrf = TimerGameCalendar::date; v->breakdowns_since_last_service = 0; v->reliability = v->GetEngine()->reliability; diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 5033faabfd..d5f6d6ca25 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -31,6 +31,7 @@ #include "core/geometry_func.hpp" #include "timer/timer.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "widgets/cheat_widget.h" @@ -91,7 +92,7 @@ static int32_t ClickSetProdCheat(int32_t new_value, int32_t) return _cheats.setup_prod.value; } -extern void EnginesMonthlyLoop(); +extern void CalendarEnginesMonthlyLoop(); /** * Handle changing of the current year. @@ -105,16 +106,19 @@ static int32_t ClickChangeDateCheat(int32_t new_value, int32_t) if (new_year == TimerGameCalendar::year) return TimerGameCalendar::year.base(); TimerGameCalendar::YearMonthDay ymd = TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date); - TimerGameCalendar::Date new_date = TimerGameCalendar::ConvertYMDToDate(new_year, ymd.month, ymd.day); + TimerGameCalendar::Date new_calendar_date = TimerGameCalendar::ConvertYMDToDate(new_year, ymd.month, ymd.day); + /* Keep economy and calendar dates synced. */ + TimerGameEconomy::Date new_economy_date = new_calendar_date.base(); /* Shift cached dates before we change the date. */ - for (auto v : Vehicle::Iterate()) v->ShiftDates(new_date - TimerGameCalendar::date); - LinkGraphSchedule::instance.ShiftDates(new_date - TimerGameCalendar::date); + for (auto v : Vehicle::Iterate()) v->ShiftDates(new_economy_date - TimerGameEconomy::date); + LinkGraphSchedule::instance.ShiftDates(new_economy_date - TimerGameEconomy::date); /* Now it's safe to actually change the date. */ - TimerGameCalendar::SetDate(new_date, TimerGameCalendar::date_fract); + TimerGameCalendar::SetDate(new_calendar_date, TimerGameCalendar::date_fract); + TimerGameEconomy::SetDate(new_economy_date, TimerGameEconomy::date_fract); - EnginesMonthlyLoop(); + CalendarEnginesMonthlyLoop(); SetWindowDirty(WC_STATUS_BAR, 0); InvalidateWindowClassesData(WC_BUILD_STATION, 0); InvalidateWindowClassesData(WC_BUS_STATION, 0); diff --git a/src/command.cpp b/src/command.cpp index 48fa93ffcb..51ec446e77 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -18,7 +18,7 @@ #include "strings_func.h" #include "texteff.hpp" #include "town.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "company_func.h" #include "company_base.h" #include "signal_func.h" @@ -274,7 +274,7 @@ void CommandHelperBase::InternalPostResult(const CommandCost &res, TileIndex til /** Helper to make a desync log for a command. */ void CommandHelperBase::LogCommandExecution(Commands cmd, StringID err_message, const CommandDataBuffer &args, bool failed) { - Debug(desync, 1, "{}: {:08x}; {:02x}; {:02x}; {:08x}; {:08x}; {} ({})", failed ? "cmdf" : "cmd", (uint32_t)TimerGameCalendar::date.base(), TimerGameCalendar::date_fract, (int)_current_company, cmd, err_message, FormatArrayAsHex(args), GetCommandName(cmd)); + Debug(desync, 1, "{}: {:08x}; {:02x}; {:02x}; {:08x}; {:08x}; {} ({})", failed ? "cmdf" : "cmd", (uint32_t)TimerGameEconomy::date.base(), TimerGameEconomy::date_fract, (int)_current_company, cmd, err_message, FormatArrayAsHex(args), GetCommandName(cmd)); } /** diff --git a/src/company_base.h b/src/company_base.h index bcdbeef11a..d78b5b402f 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -14,7 +14,7 @@ #include "livery.h" #include "autoreplace_type.h" #include "tile_type.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "settings_type.h" #include "group.h" @@ -74,7 +74,7 @@ struct CompanyProperties { TileIndex location_of_HQ; ///< Northern tile of HQ; #INVALID_TILE when there is none. TileIndex last_build_coordinate; ///< Coordinate of the last build thing by this company. - TimerGameCalendar::Year inaugurated_year; ///< Year of starting the company. + TimerGameEconomy::Year inaugurated_year; ///< Economy year of starting the company. byte months_of_bankruptcy; ///< Number of months that the company is unable to pay its debts CompanyMask bankrupt_asked; ///< which companies were asked about buying it? diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index d6166d4571..6605ef9878 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -36,7 +36,7 @@ #include "widgets/statusbar_widget.h" #include "company_cmd.h" #include "timer/timer.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_game_tick.h" #include "table/strings.h" @@ -566,7 +566,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY) c->avail_railtypes = GetCompanyRailTypes(c->index); c->avail_roadtypes = GetCompanyRoadTypes(c->index); - c->inaugurated_year = TimerGameCalendar::year; + c->inaugurated_year = TimerGameEconomy::year; /* If starting a player company in singleplayer and a favorite company manager face is selected, choose it. Otherwise, use a random face. * In a network game, we'll choose the favorite face later in CmdCompanyCtrl to sync it to all clients. */ @@ -747,7 +747,7 @@ void OnTick_Companies() * A year has passed, update the economic data of all companies, and perhaps show the * financial overview window of the local company. */ -static IntervalTimer _companies_yearly({TimerGameCalendar::YEAR, TimerGameCalendar::Priority::COMPANY}, [](auto) +static IntervalTimer _economy_companies_yearly({TimerGameEconomy::YEAR, TimerGameEconomy::Priority::COMPANY}, [](auto) { /* Copy statistics */ for (Company *c : Company::Iterate()) { diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 0e4ac392a4..600666e3d7 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -22,7 +22,7 @@ #include "newgrf.h" #include "company_manager_face.h" #include "strings_func.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "widgets/dropdown_type.h" #include "tilehighlight_func.h" #include "company_base.h" @@ -255,7 +255,7 @@ static Money DrawYearCategory(const Rect &r, int start_y, const ExpensesList &li * @param tbl Reference to table of amounts for \a year. * @note The environment must provide padding at the left and right of \a r. */ -static void DrawYearColumn(const Rect &r, TimerGameCalendar::Year year, const Expenses &tbl) +static void DrawYearColumn(const Rect &r, TimerGameEconomy::Year year, const Expenses &tbl) { int y = r.top; Money sum; @@ -421,10 +421,10 @@ struct CompanyFinancesWindow : Window { case WID_CF_EXPS_PRICE2: case WID_CF_EXPS_PRICE3: { const Company *c = Company::Get((CompanyID)this->window_number); - auto age = std::min(TimerGameCalendar::year - c->inaugurated_year, TimerGameCalendar::Year(2)); + auto age = std::min(TimerGameEconomy::year - c->inaugurated_year, TimerGameEconomy::Year(2)); int wid_offset = widget - WID_CF_EXPS_PRICE1; if (wid_offset <= age) { - DrawYearColumn(r, TimerGameCalendar::year - (age - wid_offset), c->yearly_expenses[(age - wid_offset).base()]); + DrawYearColumn(r, TimerGameEconomy::year - (age - wid_offset), c->yearly_expenses[(age - wid_offset).base()]); } break; } diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index dfbd2311fe..7b605501a0 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -84,7 +84,7 @@ void SetRandomSeed(uint32_t seed) uint32_t DoRandom(int line, const char *file) { if (_networking && (!_network_server || (NetworkClientSocket::IsValidID(0) && NetworkClientSocket::Get(0)->status != NetworkClientSocket::STATUS_INACTIVE))) { - Debug(random, 0, "{:08x}; {:02x}; {:04x}; {:02x}; {}:{}", TimerGameCalendar::date, TimerGameCalendar::date_fract, _frame_counter, (byte)_current_company, file, line); + Debug(random, 0, "{:08x}; {:02x}; {:04x}; {:02x}; {}:{}", TimerGameEconomy::date, TimerGameEconomy::date_fract, _frame_counter, (byte)_current_company, file, line); } return _random.Next(); diff --git a/src/date_gui.cpp b/src/date_gui.cpp index 035b820ec6..abbe8ad784 100644 --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -9,7 +9,7 @@ #include "stdafx.h" #include "strings_func.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "window_func.h" #include "window_gui.h" #include "date_gui.h" @@ -25,9 +25,9 @@ struct SetDateWindow : Window { SetDateCallback *callback; ///< Callback to call when a date has been selected void *callback_data; ///< Callback data pointer. - TimerGameCalendar::YearMonthDay date; ///< The currently selected date - TimerGameCalendar::Year min_year; ///< The minimum year in the year dropdown - TimerGameCalendar::Year max_year; ///< The maximum year (inclusive) in the year dropdown + TimerGameEconomy::YearMonthDay date; ///< The currently selected date + TimerGameEconomy::Year min_year; ///< The minimum year in the year dropdown + TimerGameEconomy::Year max_year; ///< The maximum year (inclusive) in the year dropdown /** * Create the new 'set date' window @@ -39,19 +39,19 @@ struct SetDateWindow : Window { * @param max_year the maximum year (inclusive) to show in the year dropdown * @param callback the callback to call once a date has been selected */ - SetDateWindow(WindowDesc *desc, WindowNumber window_number, Window *parent, TimerGameCalendar::Date initial_date, TimerGameCalendar::Year min_year, TimerGameCalendar::Year max_year, SetDateCallback *callback, void *callback_data) : + SetDateWindow(WindowDesc *desc, WindowNumber window_number, Window *parent, TimerGameEconomy::Date initial_date, TimerGameEconomy::Year min_year, TimerGameEconomy::Year max_year, SetDateCallback *callback, void *callback_data) : Window(desc), callback(callback), callback_data(callback_data), - min_year(std::max(CalendarTime::MIN_YEAR, min_year)), - max_year(std::min(CalendarTime::MAX_YEAR, max_year)) + min_year(std::max(EconomyTime::MIN_YEAR, min_year)), + max_year(std::min(EconomyTime::MAX_YEAR, max_year)) { assert(this->min_year <= this->max_year); this->parent = parent; this->InitNested(window_number); - if (initial_date == 0) initial_date = TimerGameCalendar::date; - this->date = TimerGameCalendar::ConvertDateToYMD(initial_date); + if (initial_date == 0) initial_date = TimerGameEconomy::date; + this->date = TimerGameEconomy::ConvertDateToYMD(initial_date); this->date.year = Clamp(this->date.year, min_year, max_year); } @@ -88,7 +88,7 @@ struct SetDateWindow : Window { break; case WID_SD_YEAR: - for (TimerGameCalendar::Year i = this->min_year; i <= this->max_year; i++) { + for (TimerGameEconomy::Year i = this->min_year; i <= this->max_year; i++) { SetDParam(0, i); list.push_back(std::make_unique(STR_JUST_INT, i.base(), false)); } @@ -147,7 +147,7 @@ struct SetDateWindow : Window { break; case WID_SD_SET_DATE: - if (this->callback != nullptr) this->callback(this, TimerGameCalendar::ConvertYMDToDate(this->date.year, this->date.month, this->date.day), this->callback_data); + if (this->callback != nullptr) this->callback(this, TimerGameEconomy::ConvertYMDToDate(this->date.year, this->date.month, this->date.day), this->callback_data); this->Close(); break; } @@ -212,7 +212,7 @@ static WindowDesc _set_date_desc(__FILE__, __LINE__, * @param callback the callback to call once a date has been selected * @param callback_data extra callback data */ -void ShowSetDateWindow(Window *parent, int window_number, TimerGameCalendar::Date initial_date, TimerGameCalendar::Year min_year, TimerGameCalendar::Year max_year, SetDateCallback *callback, void *callback_data) +void ShowSetDateWindow(Window *parent, int window_number, TimerGameEconomy::Date initial_date, TimerGameEconomy::Year min_year, TimerGameEconomy::Year max_year, SetDateCallback *callback, void *callback_data) { CloseWindowByClass(WC_SET_DATE); new SetDateWindow(&_set_date_desc, window_number, parent, initial_date, min_year, max_year, callback, callback_data); diff --git a/src/date_gui.h b/src/date_gui.h index d2e9a3cd37..4733f50600 100644 --- a/src/date_gui.h +++ b/src/date_gui.h @@ -18,8 +18,8 @@ * @param w the window that sends the callback * @param date the date that has been chosen */ -typedef void SetDateCallback(const Window *w, TimerGameCalendar::Date date, void *data); +typedef void SetDateCallback(const Window *w, TimerGameEconomy::Date date, void *data); -void ShowSetDateWindow(Window *parent, int window_number, TimerGameCalendar::Date initial_date, TimerGameCalendar::Year min_year, TimerGameCalendar::Year max_year, SetDateCallback *callback, void *callback_data); +void ShowSetDateWindow(Window *parent, int window_number, TimerGameEconomy::Date initial_date, TimerGameEconomy::Year min_year, TimerGameEconomy::Year max_year, SetDateCallback *callback, void *callback_data); #endif /* DATE_GUI_H */ diff --git a/src/disaster_vehicle.cpp b/src/disaster_vehicle.cpp index bfc4c58ebd..98f03f9679 100644 --- a/src/disaster_vehicle.cpp +++ b/src/disaster_vehicle.cpp @@ -47,7 +47,7 @@ #include "core/backup_type.hpp" #include "landscape_cmd.h" #include "timer/timer.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "table/strings.h" @@ -936,7 +936,7 @@ static void ResetDisasterDelay() _disaster_delay = GB(Random(), 0, 9) + 730; } -static IntervalTimer _disaster_daily({TimerGameCalendar::DAY, TimerGameCalendar::Priority::DISASTER}, [](auto) +static IntervalTimer _economy_disaster_daily({TimerGameEconomy::DAY, TimerGameEconomy::Priority::DISASTER}, [](auto) { if (--_disaster_delay != 0) return; diff --git a/src/economy.cpp b/src/economy.cpp index 8d15c7504a..840822b10c 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -54,6 +54,7 @@ #include "vehicle_cmd.h" #include "timer/timer.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "table/strings.h" #include "table/pricebase.h" @@ -690,8 +691,8 @@ static void CompaniesGenStatistics() } cur_company.Restore(); - /* Only run the economic statics and update company stats every 3rd month (1st of quarter). */ - if (!HasBit(1 << 0 | 1 << 3 | 1 << 6 | 1 << 9, TimerGameCalendar::month)) return; + /* Only run the economic statics and update company stats every 3rd economy month (1st of quarter). */ + if (!HasBit(1 << 0 | 1 << 3 | 1 << 6 | 1 << 9, TimerGameEconomy::month)) return; for (Company *c : Company::Iterate()) { /* Drop the oldest history off the end */ @@ -844,8 +845,8 @@ static void CompaniesPayInterest() if (c->money < 0) { yearly_fee += -c->money *_economy.interest_rate / 100; } - Money up_to_previous_month = yearly_fee * TimerGameCalendar::month / 12; - Money up_to_this_month = yearly_fee * (TimerGameCalendar::month + 1) / 12; + Money up_to_previous_month = yearly_fee * TimerGameEconomy::month / 12; + Money up_to_this_month = yearly_fee * (TimerGameEconomy::month + 1) / 12; SubtractMoneyFromCompany(CommandCost(EXPENSES_LOAN_INTEREST, up_to_this_month - up_to_previous_month)); @@ -1080,7 +1081,7 @@ static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint n uint amount = std::min(num_pieces, 0xFFFFu - it->waiting); it->waiting += amount; - it->last_accepted = TimerGameCalendar::date; + it->last_accepted = TimerGameEconomy::date; num_pieces -= amount; accepted += amount; @@ -1980,16 +1981,23 @@ void LoadUnloadStation(Station *st) } /** - * Monthly update of the economic data (of the companies as well as economic fluctuations). + * Every calendar month update of inflation. */ -static IntervalTimer _companies_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::COMPANY}, [](auto) +static IntervalTimer _calendar_inflation_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::COMPANY}, [](auto) { - CompaniesPayInterest(); - CompaniesGenStatistics(); if (_settings_game.economy.inflation) { AddInflation(); RecomputePrices(); } +}); + +/** + * Every economy month update of company economic data, plus economy fluctuations. + */ +static IntervalTimer _economy_companies_monthly({ TimerGameEconomy::MONTH, TimerGameEconomy::Priority::COMPANY }, [](auto) +{ + CompaniesGenStatistics(); + CompaniesPayInterest(); HandleEconomyFluctuations(); }); diff --git a/src/engine.cpp b/src/engine.cpp index 7de1525c1c..c00d05824a 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -919,7 +919,7 @@ static bool IsVehicleTypeDisabled(VehicleType type, bool ai) } /** Daily check to offer an exclusive engine preview to the companies. */ -static IntervalTimer _engines_daily({TimerGameCalendar::DAY, TimerGameCalendar::Priority::ENGINE}, [](auto) +static IntervalTimer _calendar_engines_daily({TimerGameCalendar::DAY, TimerGameCalendar::Priority::ENGINE}, [](auto) { for (Company *c : Company::Iterate()) { c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes, TimerGameCalendar::date); @@ -1104,7 +1104,7 @@ static void NewVehicleAvailable(Engine *e) } /** Monthly update of the availability, reliability, and preview offers of the engines. */ -void EnginesMonthlyLoop() +void CalendarEnginesMonthlyLoop() { if (TimerGameCalendar::year < _year_engine_aging_stops) { bool refresh = false; @@ -1151,9 +1151,9 @@ void EnginesMonthlyLoop() } } -static IntervalTimer _engines_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::ENGINE}, [](auto) +static IntervalTimer _calendar_engines_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::ENGINE}, [](auto) { - EnginesMonthlyLoop(); + CalendarEnginesMonthlyLoop(); }); /** diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 070ad8754c..61c4bfb647 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -23,6 +23,7 @@ #include "timer/timer_window.h" #include "timer/timer_game_tick.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "zoom_func.h" #include "widgets/graph_widget.h" @@ -181,8 +182,8 @@ protected: byte num_vert_lines; /* The starting month and year that values are plotted against. */ - TimerGameCalendar::Month month; - TimerGameCalendar::Year year; + TimerGameEconomy::Month month; + TimerGameEconomy::Year year; bool draw_dates = true; ///< Should we draw months and years on the time axis? @@ -380,8 +381,8 @@ protected: if (this->draw_dates) { x = r.left; y = r.bottom + ScaleGUITrad(2); - TimerGameCalendar::Month month = this->month; - TimerGameCalendar::Year year = this->year; + TimerGameEconomy::Month month = this->month; + TimerGameEconomy::Year year = this->year; for (int i = 0; i < this->num_on_x_axis; i++) { SetDParam(0, month + STR_MONTH_ABBREV_JAN); SetDParam(1, year); @@ -497,8 +498,8 @@ public: /* Draw x-axis labels and markings for graphs based on financial quarters and years. */ if (this->draw_dates) { - TimerGameCalendar::Month month = this->month; - TimerGameCalendar::Year year = this->year; + TimerGameEconomy::Month month = this->month; + TimerGameEconomy::Year year = this->year; for (int i = 0; i < this->num_on_x_axis; i++) { SetDParam(0, month + STR_MONTH_ABBREV_JAN); SetDParam(1, year); @@ -577,8 +578,8 @@ public: nums = std::min(this->num_vert_lines, std::max(nums, c->num_valid_stat_ent)); } - int mo = (TimerGameCalendar::month / 3 - nums) * 3; - auto yr = TimerGameCalendar::year; + int mo = (TimerGameEconomy::month / 3 - nums) * 3; + auto yr = TimerGameEconomy::year; while (mo < 0) { yr--; mo += 12; diff --git a/src/industry.h b/src/industry.h index 0d1bbe29b1..52b4dcd359 100644 --- a/src/industry.h +++ b/src/industry.h @@ -17,12 +17,13 @@ #include "tilearea_type.h" #include "station_base.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" typedef Pool IndustryPool; extern IndustryPool _industry_pool; -static const TimerGameCalendar::Year PROCESSING_INDUSTRY_ABANDONMENT_YEARS = 5; ///< If a processing industry doesn't produce for this many consecutive years, it may close. +static const TimerGameEconomy::Year PROCESSING_INDUSTRY_ABANDONMENT_YEARS = 5; ///< If a processing industry doesn't produce for this many consecutive economy years, it may close. /** * Production level maximum, minimum and default values. @@ -86,7 +87,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> { struct AcceptedCargo { CargoID cargo; ///< Cargo type uint16_t waiting; ///< Amount of cargo waiting to processed - TimerGameCalendar::Date last_accepted; ///< Last day cargo was accepted by this industry + TimerGameEconomy::Date last_accepted; ///< Last day cargo was accepted by this industry }; using ProducedCargoArray = std::array; @@ -103,7 +104,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> { IndustryType type; ///< type of industry. Owner owner; ///< owner of the industry. Which SHOULD always be (imho) OWNER_NONE Colours random_colour; ///< randomized colour of the industry, for display purpose - TimerGameCalendar::Year last_prod_year; ///< last year of production + TimerGameEconomy::Year last_prod_year; ///< last economy year of production byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry IndustryControlFlags ctlflags; ///< flags overriding standard behaviours @@ -296,7 +297,7 @@ struct IndustryBuildData { void SetupTargetCount(); void TryBuildNewIndustry(); - void MonthlyLoop(); + void EconomyMonthlyLoop(); }; extern IndustryBuildData _industry_builder; diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 68cfe9f312..82dd51cc88 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -45,6 +45,7 @@ #include "terraform_cmd.h" #include "timer/timer.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_game_tick.h" #include "table/strings.h" @@ -1782,7 +1783,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, i->counter = GB(r, 4, 12); i->random = initial_random_bits; i->was_cargo_delivered = false; - i->last_prod_year = TimerGameCalendar::year; + i->last_prod_year = TimerGameEconomy::year; i->founder = founder; i->ctlflags = INDCTL_NONE; @@ -2393,7 +2394,7 @@ void IndustryBuildData::Reset() } /** Monthly update of industry build data. */ -void IndustryBuildData::MonthlyLoop() +void IndustryBuildData::EconomyMonthlyLoop() { static const int NEWINDS_PER_MONTH = 0x38000 / (10 * 12); // lower 16 bits is a float fraction, 3.5 industries per decade, divided by 10 * 12 months. if (_settings_game.difficulty.industry_density == ID_FUND_ONLY) return; // 'no industries' setting. @@ -2465,7 +2466,7 @@ static void UpdateIndustryStatistics(Industry *i) { for (auto &p : i->produced) { if (IsValidCargoID(p.cargo)) { - if (p.history[THIS_MONTH].production != 0) i->last_prod_year = TimerGameCalendar::year; + if (p.history[THIS_MONTH].production != 0) i->last_prod_year = TimerGameEconomy::year; /* Move history from this month to last month. */ std::rotate(std::rbegin(p.history), std::rbegin(p.history) + 1, std::rend(p.history)); @@ -2888,7 +2889,7 @@ static void ChangeIndustryProduction(Industry *i, bool monthly) } if (!callback_enabled && (indspec->life_type & INDUSTRYLIFE_PROCESSING)) { - if (TimerGameCalendar::year - i->last_prod_year >= PROCESSING_INDUSTRY_ABANDONMENT_YEARS && Chance16(1, original_economy ? 2 : 180)) { + if (TimerGameEconomy::year - i->last_prod_year >= PROCESSING_INDUSTRY_ABANDONMENT_YEARS && Chance16(1, original_economy ? 2 : 180)) { closeit = true; } } @@ -2970,13 +2971,13 @@ static void ChangeIndustryProduction(Industry *i, bool monthly) } /** - * Daily handler for the industry changes + * Every economy day handler for the industry changes * Taking the original map size of 256*256, the number of random changes was always of just one unit. * But it cannot be the same on smaller or bigger maps. That number has to be scaled up or down. * For small maps, it implies that less than one change per month is required, while on bigger maps, * it would be way more. The daily loop handles those changes. */ -static IntervalTimer _industries_daily({TimerGameCalendar::DAY, TimerGameCalendar::Priority::INDUSTRY}, [](auto) +static IntervalTimer _economy_industries_daily({TimerGameEconomy::DAY, TimerGameEconomy::Priority::INDUSTRY}, [](auto) { _economy.industry_daily_change_counter += _economy.industry_daily_increment; @@ -3018,11 +3019,11 @@ static IntervalTimer _industries_daily({TimerGameCalendar::DA InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, IDIWD_PRODUCTION_CHANGE); }); -static IntervalTimer _industries_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::INDUSTRY}, [](auto) +static IntervalTimer _economy_industries_monthly({TimerGameEconomy::MONTH, TimerGameEconomy::Priority::INDUSTRY}, [](auto) { Backup cur_company(_current_company, OWNER_NONE, FILE_LINE); - _industry_builder.MonthlyLoop(); + _industry_builder.EconomyMonthlyLoop(); for (Industry *i : Industry::Iterate()) { UpdateIndustryStatistics(i); diff --git a/src/linkgraph/linkgraph.cpp b/src/linkgraph/linkgraph.cpp index 1dcb2eecff..8f8a5e9c55 100644 --- a/src/linkgraph/linkgraph.cpp +++ b/src/linkgraph/linkgraph.cpp @@ -29,7 +29,7 @@ LinkGraph::BaseNode::BaseNode(TileIndex xy, StationID st, uint demand) this->supply = 0; this->demand = demand; this->station = st; - this->last_update = CalendarTime::INVALID_DATE; + this->last_update = EconomyTime::INVALID_DATE; } /** @@ -40,8 +40,8 @@ LinkGraph::BaseEdge::BaseEdge(NodeID dest_node) this->capacity = 0; this->usage = 0; this->travel_time_sum = 0; - this->last_unrestricted_update = CalendarTime::INVALID_DATE; - this->last_restricted_update = CalendarTime::INVALID_DATE; + this->last_unrestricted_update = EconomyTime::INVALID_DATE; + this->last_restricted_update = EconomyTime::INVALID_DATE; this->dest_node = dest_node; } @@ -50,22 +50,22 @@ LinkGraph::BaseEdge::BaseEdge(NodeID dest_node) * This is useful if the date has been modified with the cheat menu. * @param interval Number of days to be added or subtracted. */ -void LinkGraph::ShiftDates(TimerGameCalendar::Date interval) +void LinkGraph::ShiftDates(TimerGameEconomy::Date interval) { this->last_compression += interval; for (NodeID node1 = 0; node1 < this->Size(); ++node1) { BaseNode &source = this->nodes[node1]; - if (source.last_update != CalendarTime::INVALID_DATE) source.last_update += interval; + if (source.last_update != EconomyTime::INVALID_DATE) source.last_update += interval; for (BaseEdge &edge : this->nodes[node1].edges) { - if (edge.last_unrestricted_update != CalendarTime::INVALID_DATE) edge.last_unrestricted_update += interval; - if (edge.last_restricted_update != CalendarTime::INVALID_DATE) edge.last_restricted_update += interval; + if (edge.last_unrestricted_update != EconomyTime::INVALID_DATE) edge.last_unrestricted_update += interval; + if (edge.last_restricted_update != EconomyTime::INVALID_DATE) edge.last_restricted_update += interval; } } } void LinkGraph::Compress() { - this->last_compression = (TimerGameCalendar::date + this->last_compression).base() / 2; + this->last_compression = (TimerGameEconomy::date + this->last_compression).base() / 2; for (NodeID node1 = 0; node1 < this->Size(); ++node1) { this->nodes[node1].supply /= 2; for (BaseEdge &edge : this->nodes[node1].edges) { @@ -89,8 +89,8 @@ void LinkGraph::Compress() */ void LinkGraph::Merge(LinkGraph *other) { - TimerGameCalendar::Date age = TimerGameCalendar::date - this->last_compression + 1; - TimerGameCalendar::Date other_age = TimerGameCalendar::date - other->last_compression + 1; + TimerGameEconomy::Date age = TimerGameEconomy::date - this->last_compression + 1; + TimerGameEconomy::Date other_age = TimerGameEconomy::date - other->last_compression + 1; NodeID first = this->Size(); for (NodeID node1 = 0; node1 < other->Size(); ++node1) { Station *st = Station::Get(other->nodes[node1].station); @@ -172,8 +172,8 @@ void LinkGraph::BaseNode::AddEdge(NodeID to, uint capacity, uint usage, uint32_t edge.capacity = capacity; edge.usage = usage; edge.travel_time_sum = static_cast(travel_time) * capacity; - if (mode & EUM_UNRESTRICTED) edge.last_unrestricted_update = TimerGameCalendar::date; - if (mode & EUM_RESTRICTED) edge.last_restricted_update = TimerGameCalendar::date; + if (mode & EUM_UNRESTRICTED) edge.last_unrestricted_update = TimerGameEconomy::date; + if (mode & EUM_RESTRICTED) edge.last_restricted_update = TimerGameEconomy::date; } /** @@ -239,8 +239,8 @@ void LinkGraph::BaseEdge::Update(uint capacity, uint usage, uint32_t travel_time } this->usage = std::max(this->usage, usage); } - if (mode & EUM_UNRESTRICTED) this->last_unrestricted_update = TimerGameCalendar::date; - if (mode & EUM_RESTRICTED) this->last_restricted_update = TimerGameCalendar::date; + if (mode & EUM_UNRESTRICTED) this->last_unrestricted_update = TimerGameEconomy::date; + if (mode & EUM_RESTRICTED) this->last_restricted_update = TimerGameEconomy::date; } /** diff --git a/src/linkgraph/linkgraph.h b/src/linkgraph/linkgraph.h index e9c346a4ff..76eebca10c 100644 --- a/src/linkgraph/linkgraph.h +++ b/src/linkgraph/linkgraph.h @@ -13,7 +13,7 @@ #include "../core/pool_type.hpp" #include "../station_base.h" #include "../cargotype.h" -#include "../timer/timer_game_calendar.h" +#include "../timer/timer_game_economy.h" #include "../saveload/saveload.h" #include "linkgraph_type.h" #include @@ -43,8 +43,8 @@ public: uint capacity; ///< Capacity of the link. uint usage; ///< Usage of the link. uint64_t travel_time_sum; ///< Sum of the travel times of the link, in ticks. - TimerGameCalendar::Date last_unrestricted_update; ///< When the unrestricted part of the link was last updated. - TimerGameCalendar::Date last_restricted_update; ///< When the restricted part of the link was last updated. + TimerGameEconomy::Date last_unrestricted_update; ///< When the unrestricted part of the link was last updated. + TimerGameEconomy::Date last_restricted_update; ///< When the restricted part of the link was last updated. NodeID dest_node; ///< Destination of the edge. BaseEdge(NodeID dest_node = INVALID_NODE); @@ -59,11 +59,11 @@ public: * Get the date of the last update to any part of the edge's capacity. * @return Last update. */ - TimerGameCalendar::Date LastUpdate() const { return std::max(this->last_unrestricted_update, this->last_restricted_update); } + TimerGameEconomy::Date LastUpdate() const { return std::max(this->last_unrestricted_update, this->last_restricted_update); } void Update(uint capacity, uint usage, uint32_t time, EdgeUpdateMode mode); - void Restrict() { this->last_unrestricted_update = CalendarTime::INVALID_DATE; } - void Release() { this->last_restricted_update = CalendarTime::INVALID_DATE; } + void Restrict() { this->last_unrestricted_update = EconomyTime::INVALID_DATE; } + void Release() { this->last_restricted_update = EconomyTime::INVALID_DATE; } /** Comparison operator based on \c dest_node. */ bool operator <(const BaseEdge &rhs) const @@ -92,7 +92,7 @@ public: uint demand; ///< Acceptance at the station. StationID station; ///< Station ID. TileIndex xy; ///< Location of the station referred to by the node. - TimerGameCalendar::Date last_update; ///< When the supply was last updated. + TimerGameEconomy::Date last_update; ///< When the supply was last updated. std::vector edges; ///< Sorted list of outgoing edges from this node. @@ -105,7 +105,7 @@ public: void UpdateSupply(uint supply) { this->supply += supply; - this->last_update = TimerGameCalendar::date; + this->last_update = TimerGameEconomy::date; } /** @@ -170,10 +170,10 @@ public: static const uint MIN_TIMEOUT_DISTANCE = 32; /** Number of days before deleting links served only by vehicles stopped in depot. */ - static constexpr TimerGameCalendar::Date STALE_LINK_DEPOT_TIMEOUT = 1024; + static constexpr TimerGameEconomy::Date STALE_LINK_DEPOT_TIMEOUT = 1024; /** Minimum number of days between subsequent compressions of a LG. */ - static constexpr TimerGameCalendar::Date COMPRESSION_INTERVAL = 256; + static constexpr TimerGameEconomy::Date COMPRESSION_INTERVAL = 256; /** * Scale a value from a link graph of age orig_age for usage in one of age @@ -183,7 +183,7 @@ public: * @param orig_age Age of the original link graph. * @return scaled value. */ - inline static uint Scale(uint val, TimerGameCalendar::Date target_age, TimerGameCalendar::Date orig_age) + inline static uint Scale(uint val, TimerGameEconomy::Date target_age, TimerGameEconomy::Date orig_age) { return val > 0 ? std::max(1U, val * target_age.base() / orig_age.base()) : 0; } @@ -194,10 +194,10 @@ public: * Real constructor. * @param cargo Cargo the link graph is about. */ - LinkGraph(CargoID cargo) : cargo(cargo), last_compression(TimerGameCalendar::date) {} + LinkGraph(CargoID cargo) : cargo(cargo), last_compression(TimerGameEconomy::date) {} void Init(uint size); - void ShiftDates(TimerGameCalendar::Date interval); + void ShiftDates(TimerGameEconomy::Date interval); void Compress(); void Merge(LinkGraph *other); @@ -233,7 +233,7 @@ public: * Get date of last compression. * @return Date of last compression. */ - inline TimerGameCalendar::Date LastCompression() const { return this->last_compression; } + inline TimerGameEconomy::Date LastCompression() const { return this->last_compression; } /** * Get the cargo ID this component's link graph refers to. @@ -248,7 +248,7 @@ public: */ inline uint Monthly(uint base) const { - return base * 30 / (TimerGameCalendar::date - this->last_compression + 1).base(); + return base * 30 / (TimerGameEconomy::date - this->last_compression + 1).base(); } NodeID AddNode(const Station *st); @@ -262,7 +262,7 @@ protected: friend class LinkGraphJob; CargoID cargo; ///< Cargo of this component's link graph. - TimerGameCalendar::Date last_compression; ///< Last time the capacities and supplies were compressed. + TimerGameEconomy::Date last_compression; ///< Last time the capacities and supplies were compressed. NodeVector nodes; ///< Nodes in the component. }; diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index a4ca8ae2f2..e50935bd27 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -37,7 +37,7 @@ LinkGraphJob::LinkGraphJob(const LinkGraph &orig) : * This is on purpose. */ link_graph(orig), settings(_settings_game.linkgraph), - join_date(TimerGameCalendar::date + (_settings_game.linkgraph.recalc_time / CalendarTime::SECONDS_PER_DAY)), + join_date(TimerGameEconomy::date + (_settings_game.linkgraph.recalc_time / EconomyTime::SECONDS_PER_DAY)), job_completed(false), job_aborted(false) { @@ -131,14 +131,14 @@ LinkGraphJob::~LinkGraphJob() if (st2 == nullptr || st2->goods[this->Cargo()].link_graph != this->link_graph.index || st2->goods[this->Cargo()].node != dest_id || !(*lg)[node_id].HasEdgeTo(dest_id) || - (*lg)[node_id][dest_id].LastUpdate() == CalendarTime::INVALID_DATE) { + (*lg)[node_id][dest_id].LastUpdate() == EconomyTime::INVALID_DATE) { /* Edge has been removed. Delete flows. */ StationIDStack erased = flows.DeleteFlows(to); /* Delete old flows for source stations which have been deleted * from the new flows. This avoids flow cycles between old and * new flows. */ while (!erased.IsEmpty()) ge.flows.erase(erased.Pop()); - } else if ((*lg)[node_id][dest_id].last_unrestricted_update == CalendarTime::INVALID_DATE) { + } else if ((*lg)[node_id][dest_id].last_unrestricted_update == EconomyTime::INVALID_DATE) { /* Edge is fully restricted. */ flows.RestrictFlows(to); } diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h index 90e477e161..06d5098bd3 100644 --- a/src/linkgraph/linkgraphjob.h +++ b/src/linkgraph/linkgraphjob.h @@ -163,7 +163,7 @@ protected: const LinkGraph link_graph; ///< Link graph to by analyzed. Is copied when job is started and mustn't be modified later. const LinkGraphSettings settings; ///< Copy of _settings_game.linkgraph at spawn time. std::thread thread; ///< Thread the job is running in or a default-constructed thread if it's running in the main thread. - TimerGameCalendar::Date join_date; ///< Date when the job is to be joined. + TimerGameEconomy::Date join_date; ///< Date when the job is to be joined. NodeAnnotationVector nodes; ///< Extra node data necessary for link graph calculation. std::atomic job_completed; ///< Is the job still running. This is accessed by multiple threads and reads may be stale. std::atomic job_aborted; ///< Has the job been aborted. This is accessed by multiple threads and reads may be stale. @@ -178,7 +178,7 @@ public: * settings have to be brutally const-casted in order to populate them. */ LinkGraphJob() : settings(_settings_game.linkgraph), - join_date(CalendarTime::INVALID_DATE), job_completed(false), job_aborted(false) {} + join_date(EconomyTime::INVALID_DATE), job_completed(false), job_aborted(false) {} LinkGraphJob(const LinkGraph &orig); ~LinkGraphJob(); @@ -211,19 +211,19 @@ public: * Check if job is supposed to be finished. * @return True if job should be finished by now, false if not. */ - inline bool IsScheduledToBeJoined() const { return this->join_date <= TimerGameCalendar::date; } + inline bool IsScheduledToBeJoined() const { return this->join_date <= TimerGameEconomy::date; } /** * Get the date when the job should be finished. * @return Join date. */ - inline TimerGameCalendar::Date JoinDate() const { return join_date; } + inline TimerGameEconomy::Date JoinDate() const { return join_date; } /** * Change the join date on date cheating. * @param interval Number of days to add. */ - inline void ShiftJoinDate(TimerGameCalendar::Date interval) { this->join_date += interval; } + inline void ShiftJoinDate(TimerGameEconomy::Date interval) { this->join_date += interval; } /** * Get the link graph settings for this component. @@ -254,7 +254,7 @@ public: * Get the date when the underlying link graph was last compressed. * @return Compression date. */ - inline TimerGameCalendar::Date LastCompression() const { return this->link_graph.LastCompression(); } + inline TimerGameEconomy::Date LastCompression() const { return this->link_graph.LastCompression(); } /** * Get the ID of the underlying link graph. diff --git a/src/linkgraph/linkgraphschedule.cpp b/src/linkgraph/linkgraphschedule.cpp index 0e2f03785c..aef287c439 100644 --- a/src/linkgraph/linkgraphschedule.cpp +++ b/src/linkgraph/linkgraphschedule.cpp @@ -132,7 +132,7 @@ void LinkGraphSchedule::SpawnAll() * graph jobs by the number of days given. * @param interval Number of days to be added or subtracted. */ -void LinkGraphSchedule::ShiftDates(TimerGameCalendar::Date interval) +void LinkGraphSchedule::ShiftDates(TimerGameEconomy::Date interval) { for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(interval); for (LinkGraphJob *lgj : LinkGraphJob::Iterate()) lgj->ShiftJoinDate(interval); @@ -163,10 +163,10 @@ LinkGraphSchedule::~LinkGraphSchedule() } /** - * Pause the game if in 2 TimerGameCalendar::date_fract ticks, we would do a join with the next + * Pause the game if in 2 TimerGameEconomy::date_fract ticks, we would do a join with the next * link graph job, but it is still running. - * The check is done 2 TimerGameCalendar::date_fract ticks early instead of 1, as in multiplayer - * calls to DoCommandP are executed after a delay of 1 TimerGameCalendar::date_fract tick. + * The check is done 2 TimerGameEconomy::date_fract ticks early instead of 1, as in multiplayer + * calls to DoCommandP are executed after a delay of 1 TimerGameEconomy::date_fract tick. * If we previously paused, unpause if the job is now ready to be joined with. */ void StateGameLoop_LinkGraphPauseControl() @@ -177,10 +177,10 @@ void StateGameLoop_LinkGraphPauseControl() Command::Post(PM_PAUSED_LINK_GRAPH, false); } } else if (_pause_mode == PM_UNPAUSED && - TimerGameCalendar::date_fract == LinkGraphSchedule::SPAWN_JOIN_TICK - 2 && - TimerGameCalendar::date.base() % (_settings_game.linkgraph.recalc_interval / CalendarTime::SECONDS_PER_DAY) == (_settings_game.linkgraph.recalc_interval / CalendarTime::SECONDS_PER_DAY) / 2 && + TimerGameEconomy::date_fract == LinkGraphSchedule::SPAWN_JOIN_TICK - 2 && + TimerGameEconomy::date.base() % (_settings_game.linkgraph.recalc_interval / EconomyTime::SECONDS_PER_DAY) == (_settings_game.linkgraph.recalc_interval / EconomyTime::SECONDS_PER_DAY) / 2 && LinkGraphSchedule::instance.IsJoinWithUnfinishedJobDue()) { - /* Perform check two TimerGameCalendar::date_fract ticks before we would join, to make + /* Perform check two TimerGameEconomy::date_fract ticks before we would join, to make * sure it also works in multiplayer. */ Command::Post(PM_PAUSED_LINK_GRAPH, true); } @@ -204,11 +204,11 @@ void AfterLoad_LinkGraphPauseControl() */ void OnTick_LinkGraph() { - if (TimerGameCalendar::date_fract != LinkGraphSchedule::SPAWN_JOIN_TICK) return; - TimerGameCalendar::Date offset = TimerGameCalendar::date.base() % (_settings_game.linkgraph.recalc_interval / CalendarTime::SECONDS_PER_DAY); + if (TimerGameEconomy::date_fract != LinkGraphSchedule::SPAWN_JOIN_TICK) return; + TimerGameEconomy::Date offset = TimerGameEconomy::date.base() % (_settings_game.linkgraph.recalc_interval / EconomyTime::SECONDS_PER_DAY); if (offset == 0) { LinkGraphSchedule::instance.SpawnNext(); - } else if (offset == (_settings_game.linkgraph.recalc_interval / CalendarTime::SECONDS_PER_DAY) / 2) { + } else if (offset == (_settings_game.linkgraph.recalc_interval / EconomyTime::SECONDS_PER_DAY) / 2) { if (!_networking || _network_server) { PerformanceMeasurer::SetInactive(PFE_GL_LINKGRAPH); LinkGraphSchedule::instance.JoinNext(); diff --git a/src/linkgraph/linkgraphschedule.h b/src/linkgraph/linkgraphschedule.h index 572db030a9..05c90bb1a0 100644 --- a/src/linkgraph/linkgraphschedule.h +++ b/src/linkgraph/linkgraphschedule.h @@ -58,7 +58,7 @@ public: bool IsJoinWithUnfinishedJobDue() const; void JoinNext(); void SpawnAll(); - void ShiftDates(TimerGameCalendar::Date interval); + void ShiftDates(TimerGameEconomy::Date interval); /** * Queue a link graph for execution. diff --git a/src/misc.cpp b/src/misc.cpp index 76e4ed4cfc..0dee94f470 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -16,6 +16,7 @@ #include "newgrf_house.h" #include "economy_func.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_game_tick.h" #include "texteff.hpp" #include "gfx_func.h" @@ -109,7 +110,10 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin _newgrf_profilers.clear(); if (reset_date) { - TimerGameCalendar::SetDate(TimerGameCalendar::ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1), 0); + TimerGameCalendar::Date new_date = TimerGameCalendar::ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1); + TimerGameCalendar::SetDate(new_date, 0); + /* Keep the economy date synced with the calendar date. */ + TimerGameEconomy::SetDate(new_date.base(), 0); InitializeOldNames(); } diff --git a/src/network/network.cpp b/src/network/network.cpp index 9fa5562333..b310323179 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -12,7 +12,7 @@ #include "../strings_func.h" #include "../command_func.h" #include "../timer/timer_game_tick.h" -#include "../timer/timer_game_calendar.h" +#include "../timer/timer_game_economy.h" #include "network_admin.h" #include "network_client.h" #include "network_query.h" @@ -263,7 +263,7 @@ void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, Utf8Encode(iterator, _current_text_dir == TD_LTR ? CHAR_TD_LRM : CHAR_TD_RLM); std::string message = stream.str() + GetString(strid); - Debug(desync, 1, "msg: {:08x}; {:02x}; {}", TimerGameCalendar::date, TimerGameCalendar::date_fract, message); + Debug(desync, 1, "msg: {:08x}; {:02x}; {}", TimerGameEconomy::date, TimerGameEconomy::date_fract, message); IConsolePrint(colour, message); NetworkAddChatMessage(colour, _settings_client.gui.network_chat_timeout, message); } @@ -1043,42 +1043,42 @@ void NetworkGameLoop() if (_network_server) { /* Log the sync state to check for in-syncedness of replays. */ - if (TimerGameCalendar::date_fract == 0) { + if (TimerGameEconomy::date_fract == 0) { /* We don't want to log multiple times if paused. */ - static TimerGameCalendar::Date last_log; - if (last_log != TimerGameCalendar::date) { - Debug(desync, 1, "sync: {:08x}; {:02x}; {:08x}; {:08x}", TimerGameCalendar::date, TimerGameCalendar::date_fract, _random.state[0], _random.state[1]); - last_log = TimerGameCalendar::date; + static TimerGameEconomy::Date last_log; + if (last_log != TimerGameEconomy::date) { + Debug(desync, 1, "sync: {:08x}; {:02x}; {:08x}; {:08x}", TimerGameEconomy::date, TimerGameEconomy::date_fract, _random.state[0], _random.state[1]); + last_log = TimerGameEconomy::date; } } #ifdef DEBUG_DUMP_COMMANDS /* Loading of the debug commands from -ddesync>=1 */ static FILE *f = FioFOpenFile("commands.log", "rb", SAVE_DIR); - static TimerGameCalendar::Date next_date(0); + static TimerGameEconomy::Date next_date(0); static uint32_t next_date_fract; static CommandPacket *cp = nullptr; static bool check_sync_state = false; static uint32_t sync_state[2]; if (f == nullptr && next_date == 0) { Debug(desync, 0, "Cannot open commands.log"); - next_date = TimerGameCalendar::Date(1); + next_date = TimerGameEconomy::Date(1); } while (f != nullptr && !feof(f)) { - if (TimerGameCalendar::date == next_date && TimerGameCalendar::date_fract == next_date_fract) { + if (TimerGameEconomy::date == next_date && TimerGameEconomy::date_fract == next_date_fract) { if (cp != nullptr) { NetworkSendCommand(cp->cmd, cp->err_msg, nullptr, cp->company, cp->data); - Debug(desync, 0, "Injecting: {:08x}; {:02x}; {:02x}; {:08x}; {} ({})", TimerGameCalendar::date, TimerGameCalendar::date_fract, (int)_current_company, cp->cmd, FormatArrayAsHex(cp->data), GetCommandName(cp->cmd)); + Debug(desync, 0, "Injecting: {:08x}; {:02x}; {:02x}; {:08x}; {} ({})", TimerGameEconomy::date, TimerGameEconomy::date_fract, (int)_current_company, cp->cmd, FormatArrayAsHex(cp->data), GetCommandName(cp->cmd)); delete cp; cp = nullptr; } if (check_sync_state) { if (sync_state[0] == _random.state[0] && sync_state[1] == _random.state[1]) { - Debug(desync, 0, "Sync check: {:08x}; {:02x}; match", TimerGameCalendar::date, TimerGameCalendar::date_fract); + Debug(desync, 0, "Sync check: {:08x}; {:02x}; match", TimerGameEconomy::date, TimerGameEconomy::date_fract); } else { Debug(desync, 0, "Sync check: {:08x}; {:02x}; mismatch expected {{{:08x}, {:08x}}}, got {{{:08x}, {:08x}}}", - TimerGameCalendar::date, TimerGameCalendar::date_fract, sync_state[0], sync_state[1], _random.state[0], _random.state[1]); + TimerGameEconomy::date, TimerGameEconomy::date_fract, sync_state[0], sync_state[1], _random.state[0], _random.state[1]); NOT_REACHED(); } check_sync_state = false; @@ -1112,7 +1112,7 @@ void NetworkGameLoop() uint32_t next_date_raw; int ret = sscanf(p, "%x; %x; %x; %x; %x; %255s", &next_date_raw, &next_date_fract, &company, &cmd, &cp->err_msg, buffer); assert(ret == 6); - next_date = TimerGameCalendar::Date((int32_t)next_date_raw); + next_date = TimerGameEconomy::Date((int32_t)next_date_raw); cp->company = (CompanyID)company; cp->cmd = (Commands)cmd; @@ -1129,7 +1129,7 @@ void NetworkGameLoop() /* Manually insert a pause when joining; this way the client can join at the exact right time. */ uint32_t next_date_raw; int ret = sscanf(p + 6, "%x; %x", &next_date_raw, &next_date_fract); - next_date = TimerGameCalendar::Date((int32_t)next_date_raw); + next_date = TimerGameEconomy::Date((int32_t)next_date_raw); assert(ret == 2); Debug(desync, 0, "Injecting pause for join at {:08x}:{:02x}; please join when paused", next_date, next_date_fract); cp = new CommandPacket(); @@ -1140,7 +1140,7 @@ void NetworkGameLoop() } else if (strncmp(p, "sync: ", 6) == 0) { uint32_t next_date_raw; int ret = sscanf(p + 6, "%x; %x; %x; %x", &next_date_raw, &next_date_fract, &sync_state[0], &sync_state[1]); - next_date = TimerGameCalendar::Date((int32_t)next_date_raw); + next_date = TimerGameEconomy::Date((int32_t)next_date_raw); assert(ret == 4); check_sync_state = true; } else if (strncmp(p, "msg: ", 5) == 0 || strncmp(p, "client: ", 8) == 0 || diff --git a/src/network/network_base.h b/src/network/network_base.h index 3557cb45e4..0b717163f7 100644 --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -14,7 +14,7 @@ #include "core/address.h" #include "../core/pool_type.hpp" #include "../company_type.h" -#include "../timer/timer_game_calendar.h" +#include "../timer/timer_game_economy.h" /** Type for the pool with client information. */ typedef Pool NetworkClientInfoPool; @@ -25,7 +25,7 @@ struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_p ClientID client_id; ///< Client identifier (same as ClientState->client_id) std::string client_name; ///< Name of the client CompanyID client_playas; ///< As which company is this client playing (CompanyID) - TimerGameCalendar::Date join_date; ///< Gamedate the client has joined + TimerGameEconomy::Date join_date; ///< Gamedate the client has joined /** * Create a new client. diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index fa01e6f110..1a177e87d3 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -282,7 +282,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res) if (_sync_seed_1 != _random.state[0]) { #endif ShowNetworkError(STR_NETWORK_ERROR_DESYNC); - Debug(desync, 1, "sync_err: {:08x}; {:02x}", TimerGameCalendar::date, TimerGameCalendar::date_fract); + Debug(desync, 1, "sync_err: {:08x}; {:02x}", TimerGameEconomy::date, TimerGameEconomy::date_fract); Debug(net, 0, "Sync error detected"); my_client->ClientError(NETWORK_RECV_STATUS_DESYNC); return false; diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index a22d6b2d42..121223a4cf 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -32,6 +32,7 @@ #include "../rev.h" #include "../timer/timer.h" #include "../timer/timer_game_calendar.h" +#include "../timer/timer_game_economy.h" #include #include @@ -882,10 +883,10 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(Packet *p) assert(NetworkClientInfo::CanAllocateItem()); NetworkClientInfo *ci = new NetworkClientInfo(this->client_id); this->SetInfo(ci); - ci->join_date = TimerGameCalendar::date; + ci->join_date = TimerGameEconomy::date; ci->client_name = client_name; ci->client_playas = playas; - Debug(desync, 1, "client: {:08x}; {:02x}; {:02x}; {:02x}", TimerGameCalendar::date, TimerGameCalendar::date_fract, (int)ci->client_playas, (int)ci->index); + Debug(desync, 1, "client: {:08x}; {:02x}; {:02x}; {:02x}", TimerGameEconomy::date, TimerGameEconomy::date_fract, (int)ci->client_playas, (int)ci->index); /* Make sure companies to which people try to join are not autocleaned */ if (Company::IsValidID(playas)) _network_company_states[playas].months_empty = 0; @@ -1479,7 +1480,7 @@ void NetworkUpdateClientInfo(ClientID client_id) if (ci == nullptr) return; - Debug(desync, 1, "client: {:08x}; {:02x}; {:02x}; {:04x}", TimerGameCalendar::date, TimerGameCalendar::date_fract, (int)ci->client_playas, client_id); + Debug(desync, 1, "client: {:08x}; {:02x}; {:02x}; {:04x}", TimerGameEconomy::date, TimerGameEconomy::date_fract, (int)ci->client_playas, client_id); for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->status >= ServerNetworkGameSocketHandler::STATUS_AUTHORIZED) { @@ -1810,17 +1811,23 @@ void NetworkServer_Tick(bool send_frame) } } -/** Yearly "callback". Called whenever the year changes. */ -static IntervalTimer _network_yearly({TimerGameCalendar::YEAR, TimerGameCalendar::Priority::NONE}, [](auto) -{ +/** Calendar yearly "callback". Called whenever the calendar year changes. */ +static IntervalTimer _calendar_network_yearly({ TimerGameCalendar::YEAR, TimerGameCalendar::Priority::NONE }, [](auto) { if (!_network_server) return; NetworkCheckRestartMap(); +}); + +/** Economy yearly "callback". Called whenever the economy year changes. */ +static IntervalTimer _economy_network_yearly({TimerGameEconomy::YEAR, TimerGameEconomy::Priority::NONE}, [](auto) +{ + if (!_network_server) return; + NetworkAdminUpdate(ADMIN_FREQUENCY_ANUALLY); }); -/** Quarterly "callback". Called whenever the quarter changes. */ -static IntervalTimer _network_quarterly({TimerGameCalendar::QUARTER, TimerGameCalendar::Priority::NONE}, [](auto) +/** Quarterly "callback". Called whenever the economy quarter changes. */ +static IntervalTimer _network_quarterly({TimerGameEconomy::QUARTER, TimerGameEconomy::Priority::NONE}, [](auto) { if (!_network_server) return; @@ -1828,8 +1835,8 @@ static IntervalTimer _network_quarterly({TimerGameCalendar::Q NetworkAdminUpdate(ADMIN_FREQUENCY_QUARTERLY); }); -/** Monthly "callback". Called whenever the month changes. */ -static IntervalTimer _network_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::NONE}, [](auto) +/** Economy monthly "callback". Called whenever the economy month changes. */ +static IntervalTimer _network_monthly({TimerGameEconomy::MONTH, TimerGameEconomy::Priority::NONE}, [](auto) { if (!_network_server) return; @@ -1837,16 +1844,16 @@ static IntervalTimer _network_monthly({TimerGameCalendar::MON NetworkAdminUpdate(ADMIN_FREQUENCY_MONTHLY); }); -/** Weekly "callback". Called whenever the week changes. */ -static IntervalTimer _network_weekly({TimerGameCalendar::WEEK, TimerGameCalendar::Priority::NONE}, [](auto) +/** Economy weekly "callback". Called whenever the economy week changes. */ +static IntervalTimer _network_weekly({TimerGameEconomy::WEEK, TimerGameEconomy::Priority::NONE}, [](auto) { if (!_network_server) return; NetworkAdminUpdate(ADMIN_FREQUENCY_WEEKLY); }); -/** Daily "callback". Called whenever the date changes. */ -static IntervalTimer _network_daily({TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [](auto) +/** Daily "callback". Called whenever the economy date changes. */ +static IntervalTimer _economy_network_daily({TimerGameEconomy::DAY, TimerGameEconomy::Priority::NONE}, [](auto) { if (!_network_server) return; diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 621dd971f2..c13c30d1ee 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -9945,6 +9945,11 @@ void LoadNewGRF(uint load_index, uint num_baseset) TimerGameCalendar::Date date = TimerGameCalendar::date; TimerGameCalendar::Year year = TimerGameCalendar::year; TimerGameCalendar::DateFract date_fract = TimerGameCalendar::date_fract; + + TimerGameEconomy::Date economy_date = TimerGameEconomy::date; + TimerGameEconomy::Year economy_year = TimerGameEconomy::year; + TimerGameEconomy::DateFract economy_date_fract = TimerGameEconomy::date_fract; + uint64_t tick_counter = TimerGameTick::counter; byte display_opt = _display_opt; @@ -9952,6 +9957,11 @@ void LoadNewGRF(uint load_index, uint num_baseset) TimerGameCalendar::year = _settings_game.game_creation.starting_year; TimerGameCalendar::date = TimerGameCalendar::ConvertYMDToDate(TimerGameCalendar::year, 0, 1); TimerGameCalendar::date_fract = 0; + + TimerGameEconomy::year = _settings_game.game_creation.starting_year.base(); + TimerGameEconomy::date = TimerGameEconomy::ConvertYMDToDate(TimerGameEconomy::year, 0, 1); + TimerGameEconomy::date_fract = 0; + TimerGameTick::counter = 0; _display_opt = 0; } @@ -10049,6 +10059,11 @@ void LoadNewGRF(uint load_index, uint num_baseset) TimerGameCalendar::year = year; TimerGameCalendar::date = date; TimerGameCalendar::date_fract = date_fract; + + TimerGameEconomy::year = economy_year; + TimerGameEconomy::date = economy_date; + TimerGameEconomy::date_fract = economy_date_fract; + TimerGameTick::counter = tick_counter; _display_opt = display_opt; } diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 2f37abf5d4..b2db76a431 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -396,7 +396,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(byte param_setID, byte layo case 0xA6: return indspec->grf_prop.local_id; case 0xA7: return this->industry->founder; case 0xA8: return this->industry->random_colour; - case 0xA9: return ClampTo(this->industry->last_prod_year - CalendarTime::ORIGINAL_BASE_YEAR); + case 0xA9: return ClampTo(this->industry->last_prod_year - EconomyTime::ORIGINAL_BASE_YEAR); case 0xAA: return this->industry->counter; case 0xAB: return GB(this->industry->counter, 8, 8); case 0xAC: return this->industry->was_cargo_delivered; @@ -405,7 +405,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(byte param_setID, byte layo case 0xB3: return this->industry->construction_type; // Construction type case 0xB4: { auto it = std::max_element(std::begin(this->industry->accepted), std::end(this->industry->accepted), [](const auto &a, const auto &b) { return a.last_accepted < b.last_accepted; }); - return ClampTo(it->last_accepted - CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR); // Date last cargo accepted since 1920 (in days) + return ClampTo(it->last_accepted - EconomyTime::DAYS_TILL_ORIGINAL_BASE_YEAR); // Date last cargo accepted since 1920 (in days) } } diff --git a/src/news_gui.cpp b/src/news_gui.cpp index afd894fee4..01479f1872 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -690,7 +690,7 @@ static void MoveToNextTickerItem() const NewsType type = ni->type; /* check the date, don't show too old items */ - if (TimerGameCalendar::date - _news_type_data[type].age > ni->date) continue; + if (TimerGameEconomy::date - _news_type_data[type].age > ni->economy_date) continue; switch (_news_type_data[type].GetDisplay()) { default: NOT_REACHED(); @@ -727,7 +727,7 @@ static void MoveToNextNewsItem() const NewsType type = ni->type; /* check the date, don't show too old items */ - if (TimerGameCalendar::date - _news_type_data[type].age > ni->date) continue; + if (TimerGameEconomy::date - _news_type_data[type].age > ni->economy_date) continue; switch (_news_type_data[type].GetDisplay()) { default: NOT_REACHED(); @@ -804,7 +804,7 @@ static void DeleteNewsItem(NewsItem *ni) * @see NewsSubtype */ NewsItem::NewsItem(StringID string_id, NewsType type, NewsFlag flags, NewsReferenceType reftype1, uint32_t ref1, NewsReferenceType reftype2, uint32_t ref2, const NewsAllocatedData *data) : - string_id(string_id), date(TimerGameCalendar::date), type(type), flags(flags), reftype1(reftype1), reftype2(reftype2), ref1(ref1), ref2(ref2), data(data) + string_id(string_id), date(TimerGameCalendar::date), economy_date(TimerGameEconomy::date), type(type), flags(flags), reftype1(reftype1), reftype2(reftype2), ref1(ref1), ref2(ref2), data(data) { /* show this news message in colour? */ if (TimerGameCalendar::year >= _settings_client.gui.coloured_news_year) this->flags |= NF_INCOLOUR; @@ -987,7 +987,7 @@ static void RemoveOldNewsItems() NewsItem *next; for (NewsItem *cur = _oldest_news; _total_news > MIN_NEWS_AMOUNT && cur != nullptr; cur = next) { next = cur->next; - if (TimerGameCalendar::date - _news_type_data[cur->type].age * _settings_client.gui.news_message_timeout > cur->date) DeleteNewsItem(cur); + if (TimerGameEconomy::date - _news_type_data[cur->type].age * _settings_client.gui.news_message_timeout > cur->economy_date) DeleteNewsItem(cur); } } @@ -1011,11 +1011,11 @@ void NewsLoop() /* no news item yet */ if (_total_news == 0) return; - static byte _last_clean_month = 0; + static TimerGameEconomy::Month _last_clean_month = 0; - if (_last_clean_month != TimerGameCalendar::month) { + if (_last_clean_month != TimerGameEconomy::month) { RemoveOldNewsItems(); - _last_clean_month = TimerGameCalendar::month; + _last_clean_month = TimerGameEconomy::month; } if (ReadyForNextTickerItem()) MoveToNextTickerItem(); diff --git a/src/news_type.h b/src/news_type.h index ca6343d6d6..53afc9be34 100644 --- a/src/news_type.h +++ b/src/news_type.h @@ -13,6 +13,7 @@ #include "core/enum_type.hpp" #include "gfx_type.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "strings_type.h" #include "sound_type.h" @@ -128,7 +129,8 @@ struct NewsItem { NewsItem *prev; ///< Previous news item NewsItem *next; ///< Next news item StringID string_id; ///< Message text - TimerGameCalendar::Date date; ///< Date of the news + TimerGameCalendar::Date date; ///< Calendar date to show for the news + TimerGameEconomy::Date economy_date; ///< Economy date of the news item, never shown but used to calculate age NewsType type; ///< Type of the news NewsFlag flags; ///< NewsFlags bits @see NewsFlag diff --git a/src/openttd.cpp b/src/openttd.cpp index 57a7fb9a41..50521ab663 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -72,6 +72,7 @@ #include "misc_cmd.h" #include "timer/timer.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_game_realtime.h" #include "timer/timer_game_tick.h" @@ -830,7 +831,7 @@ static void OnStartScenario() /* Make sure all industries were built "this year", to avoid too early closures. (#9918) */ for (Industry *i : Industry::Iterate()) { - i->last_prod_year = TimerGameCalendar::year; + i->last_prod_year = TimerGameEconomy::year; } } @@ -1396,7 +1397,7 @@ void StateGameLoop() CallWindowGameTickEvent(); NewsLoop(); } else { - if (_debug_desync_level > 2 && TimerGameCalendar::date_fract == 0 && (TimerGameCalendar::date.base() & 0x1F) == 0) { + if (_debug_desync_level > 2 && TimerGameEconomy::date_fract == 0 && (TimerGameEconomy::date.base() & 0x1F) == 0) { /* Save the desync savegame if needed. */ std::string name = fmt::format("dmp_cmds_{:08x}_{:08x}.sav", _settings_game.game_creation.generation_seed, TimerGameCalendar::date); SaveOrLoad(name, SLO_SAVE, DFT_GAME_FILE, AUTOSAVE_DIR, false); @@ -1411,8 +1412,10 @@ void StateGameLoop() BasePersistentStorageArray::SwitchMode(PSM_ENTER_GAMELOOP); AnimateAnimatedTiles(); TimerManager::Elapsed(1); + TimerManager::Elapsed(1); TimerManager::Elapsed(1); RunTileLoop(); + RunVehicleCalendarDayProc(); CallVehicleTicks(); CallLandscapeTick(); BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP); diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index d6e1748f90..04ada61c7b 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1963,7 +1963,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) { /* If the vehicle can't find its destination, delay its next search. * In case many vehicles are in this state, use the vehicle index to spread out pathfinder calls. */ - if (v->dest_tile == 0 && TimerGameCalendar::date_fract != (v->index % Ticks::DAY_TICKS)) break; + if (v->dest_tile == 0 && TimerGameEconomy::date_fract != (v->index % Ticks::DAY_TICKS)) break; /* We need to search for the nearest depot (hangar). */ ClosestDepot closestDepot = v->FindClosestDepot(); diff --git a/src/roadveh.h b/src/roadveh.h index 90b02ba878..f05e7ee3a6 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -134,7 +134,8 @@ struct RoadVehicle FINAL : public GroundVehicle { int GetDisplayImageWidth(Point *offset = nullptr) const; bool IsInDepot() const override { return this->state == RVSB_IN_DEPOT; } bool Tick() override; - void OnNewDay() override; + void OnNewCalendarDay() override; + void OnNewEconomyDay() override; uint Crash(bool flooded = false) override; Trackdir GetVehicleTrackdir() const override; TileIndex GetOrderStationLocation(StationID station) override; diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 52e1e4ac58..066ea84762 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -21,6 +21,7 @@ #include "strings_func.h" #include "tunnelbridge_map.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "vehicle_func.h" #include "sound_func.h" #include "ai/ai.hpp" @@ -299,7 +300,7 @@ CommandCost CmdBuildRoadVehicle(DoCommandFlag flags, TileIndex tile, const Engin v->SetServiceInterval(Company::Get(v->owner)->settings.vehicle.servint_roadveh); - v->date_of_last_service = TimerGameCalendar::date; + v->date_of_last_service = TimerGameEconomy::date; v->date_of_last_service_newgrf = TimerGameCalendar::date; v->build_year = TimerGameCalendar::year; @@ -1705,10 +1706,16 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } -void RoadVehicle::OnNewDay() +/** Calandar day handler */ +void RoadVehicle::OnNewCalendarDay() { + if (!this->IsFrontEngine()) return; AgeVehicle(this); +} +/** Economy day handler. */ +void RoadVehicle::OnNewEconomyDay() +{ if (!this->IsFrontEngine()) return; if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this); diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index e6fd1c7ba1..cbebf87329 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -60,6 +60,7 @@ #include "../water.h" #include "../timer/timer.h" #include "../timer/timer_game_calendar.h" +#include "../timer/timer_game_economy.h" #include "../timer/timer_game_tick.h" #include "saveload_internal.h" @@ -260,8 +261,8 @@ static void InitializeWindowsAndCaches() /* For each company, verify (while loading a scenario) that the inauguration date is the current year and set it * accordingly if it is not the case. No need to set it on companies that are not been used already, * thus the MIN_YEAR (which is really nothing more than Zero, initialized value) test */ - if (_file_to_saveload.abstract_ftype == FT_SCENARIO && c->inaugurated_year != CalendarTime::MIN_YEAR) { - c->inaugurated_year = TimerGameCalendar::year; + if (_file_to_saveload.abstract_ftype == FT_SCENARIO && c->inaugurated_year != EconomyTime::MIN_YEAR) { + c->inaugurated_year = TimerGameEconomy::year; } } @@ -734,6 +735,13 @@ bool AfterLoadGame() * must be done before loading sprites as some newgrfs check it */ TimerGameCalendar::SetDate(TimerGameCalendar::date, TimerGameCalendar::date_fract); + /* Update economy year. If we don't have a separate economy date saved, follow the calendar date. */ + if (IsSavegameVersionBefore(SLV_ECONOMY_DATE)) { + TimerGameEconomy::SetDate(TimerGameCalendar::date.base(), TimerGameCalendar::date_fract); + } else { + TimerGameEconomy::SetDate(TimerGameEconomy::date, TimerGameEconomy::date_fract); + } + /* * Force the old behaviour for compatibility reasons with old savegames. As new * settings can only be loaded from new savegames loading old savegames with new @@ -1429,11 +1437,11 @@ bool AfterLoadGame() for (Station *st : Station::Iterate()) st->build_date += CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR; for (Waypoint *wp : Waypoint::Iterate()) wp->build_date += CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR; for (Engine *e : Engine::Iterate()) e->intro_date += CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR; - for (Company *c : Company::Iterate()) c->inaugurated_year += CalendarTime::ORIGINAL_BASE_YEAR; - for (Industry *i : Industry::Iterate()) i->last_prod_year += CalendarTime::ORIGINAL_BASE_YEAR; + for (Company *c : Company::Iterate()) c->inaugurated_year += EconomyTime::ORIGINAL_BASE_YEAR; + for (Industry *i : Industry::Iterate()) i->last_prod_year += EconomyTime::ORIGINAL_BASE_YEAR; for (Vehicle *v : Vehicle::Iterate()) { - v->date_of_last_service += CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR; + v->date_of_last_service += EconomyTime::DAYS_TILL_ORIGINAL_BASE_YEAR; v->build_year += CalendarTime::ORIGINAL_BASE_YEAR; } } @@ -3258,7 +3266,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_NEWGRF_LAST_SERVICE)) { /* Set service date provided to NewGRF. */ for (Vehicle *v : Vehicle::Iterate()) { - v->date_of_last_service_newgrf = v->date_of_last_service; + v->date_of_last_service_newgrf = v->date_of_last_service.base(); } } diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index 1c0b79f5b3..d55549afe4 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -50,12 +50,12 @@ public: /* Old array structure used for savegames before SLV_INDUSTRY_CARGO_REORGANISE. */ static CargoID old_cargo[INDUSTRY_NUM_INPUTS]; static uint16_t old_waiting[INDUSTRY_NUM_INPUTS]; - static TimerGameCalendar::Date old_last_accepted[INDUSTRY_NUM_INPUTS]; + static TimerGameEconomy::Date old_last_accepted[INDUSTRY_NUM_INPUTS]; }; /* static */ CargoID SlIndustryAccepted::old_cargo[INDUSTRY_NUM_INPUTS]; /* static */ uint16_t SlIndustryAccepted::old_waiting[INDUSTRY_NUM_INPUTS]; -/* static */ TimerGameCalendar::Date SlIndustryAccepted::old_last_accepted[INDUSTRY_NUM_INPUTS]; +/* static */ TimerGameEconomy::Date SlIndustryAccepted::old_last_accepted[INDUSTRY_NUM_INPUTS]; class SlIndustryProducedHistory : public DefaultSaveLoadHandler { public: diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index f50cab48b5..a28021f520 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -13,6 +13,7 @@ #include "compat/misc_sl_compat.h" #include "../timer/timer_game_calendar.h" +#include "../timer/timer_game_economy.h" #include "../zoom_func.h" #include "../window_gui.h" #include "../window_func.h" @@ -85,6 +86,8 @@ static const SaveLoad _date_desc[] = { SLEG_VAR("date_fract", TimerGameCalendar::date_fract, SLE_UINT16), SLEG_CONDVAR("tick_counter", TimerGameTick::counter, SLE_FILE_U16 | SLE_VAR_U64, SL_MIN_VERSION, SLV_U64_TICK_COUNTER), SLEG_CONDVAR("tick_counter", TimerGameTick::counter, SLE_UINT64, SLV_U64_TICK_COUNTER, SL_MAX_VERSION), + SLEG_CONDVAR("economy_date", TimerGameEconomy::date, SLE_INT32, SLV_ECONOMY_DATE, SL_MAX_VERSION), + SLEG_CONDVAR("economy_date_fract", TimerGameEconomy::date_fract, SLE_UINT16, SLV_ECONOMY_DATE, SL_MAX_VERSION), SLEG_CONDVAR("age_cargo_skip_counter", _age_cargo_skip_counter, SLE_UINT8, SL_MIN_VERSION, SLV_162), SLEG_CONDVAR("cur_tileloop_tile", _cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), SLEG_CONDVAR("cur_tileloop_tile", _cur_tileloop_tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 9ba3397412..c5d405ea57 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -859,7 +859,7 @@ static bool LoadOldIndustry(LoadgameState *ls, int num) if (i->type > 0x06) i->type++; // Printing Works were added if (i->type == 0x0A) i->type = 0x12; // Iron Ore Mine has different ID - TimerGameCalendar::YearMonthDay ymd = TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date); + TimerGameEconomy::YearMonthDay ymd = TimerGameEconomy::ConvertDateToYMD(TimerGameEconomy::date); i->last_prod_year = ymd.year; i->random_colour = RemapTTOColour(i->random_colour); @@ -1034,7 +1034,7 @@ static bool LoadOldCompany(LoadgameState *ls, int num) } _company_colours[num] = c->colour; - c->inaugurated_year -= CalendarTime::ORIGINAL_BASE_YEAR; + c->inaugurated_year -= EconomyTime::ORIGINAL_BASE_YEAR; return true; } diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 4c784ba70d..97625fb482 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -368,6 +368,7 @@ enum SaveLoadVersion : uint16_t { SLV_WATER_REGIONS, ///< 324 PR#10543 Water Regions for ship pathfinder. SLV_WATER_REGION_EVAL_SIMPLIFIED, ///< 325 PR#11750 Simplified Water Region evaluation. + SLV_ECONOMY_DATE, ///< 326 PR#10700 Split calendar and economy timers and dates. SL_MAX_VERSION, ///< Highest possible saveload version }; diff --git a/src/ship.h b/src/ship.h index 7c8fcc89a9..955bbf6bfe 100644 --- a/src/ship.h +++ b/src/ship.h @@ -45,7 +45,8 @@ struct Ship FINAL : public SpecializedVehicle { Money GetRunningCost() const override; bool IsInDepot() const override { return this->state == TRACK_BIT_DEPOT; } bool Tick() override; - void OnNewDay() override; + void OnNewCalendarDay() override; + void OnNewEconomyDay() override; Trackdir GetVehicleTrackdir() const override; TileIndex GetOrderStationLocation(StationID station) override; ClosestDepot FindClosestDepot() override; diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 2e0186d714..5e2ff388af 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -23,6 +23,7 @@ #include "strings_func.h" #include "window_func.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "vehicle_func.h" #include "sound_func.h" #include "ai/ai.hpp" @@ -222,14 +223,20 @@ Money Ship::GetRunningCost() const return GetPrice(PR_RUNNING_SHIP, cost_factor, e->GetGRF()); } -void Ship::OnNewDay() +/** Calendar day handler. */ +void Ship::OnNewCalendarDay() +{ + AgeVehicle(this); +} + +/** Economy day handler. */ +void Ship::OnNewEconomyDay() { if ((++this->day_counter & 7) == 0) { DecreaseVehicleValue(this); } CheckVehicleBreakdown(this); - AgeVehicle(this); CheckIfShipNeedsService(this); CheckOrders(this); @@ -902,7 +909,7 @@ CommandCost CmdBuildShip(DoCommandFlag flags, TileIndex tile, const Engine *e, V v->state = TRACK_BIT_DEPOT; v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_ships); - v->date_of_last_service = TimerGameCalendar::date; + v->date_of_last_service = TimerGameEconomy::date; v->date_of_last_service_newgrf = TimerGameCalendar::date; v->build_year = TimerGameCalendar::year; v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY); diff --git a/src/station.cpp b/src/station.cpp index 1338077d57..820299bc6a 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -105,7 +105,7 @@ Station::~Station() for (NodeID node = 0; node < lg->Size(); ++node) { Station *st = Station::Get((*lg)[node].station); st->goods[c].flows.erase(this->index); - if ((*lg)[node].HasEdgeTo(this->goods[c].node) && (*lg)[node][this->goods[c].node].LastUpdate() != CalendarTime::INVALID_DATE) { + if ((*lg)[node].HasEdgeTo(this->goods[c].node) && (*lg)[node][this->goods[c].node].LastUpdate() != EconomyTime::INVALID_DATE) { st->goods[c].flows.DeleteFlows(this->index); RerouteCargo(st, c, this->index, st->index); } diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index ea2553bf77..f1bcd69fd0 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -63,6 +63,7 @@ #include "newgrf_roadstop.h" #include "timer/timer.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_game_tick.h" #include "cheat_type.h" @@ -3824,9 +3825,9 @@ void DeleteStaleLinks(Station *from) for (Edge &edge : (*lg)[ge.node].edges) { Station *to = Station::Get((*lg)[edge.dest_node].station); assert(to->goods[c].node == edge.dest_node); - assert(TimerGameCalendar::date >= edge.LastUpdate()); - auto timeout = TimerGameCalendar::Date(LinkGraph::MIN_TIMEOUT_DISTANCE + (DistanceManhattan(from->xy, to->xy) >> 3)); - if (TimerGameCalendar::date - edge.LastUpdate() > timeout) { + assert(TimerGameEconomy::date >= edge.LastUpdate()); + auto timeout = TimerGameEconomy::Date(LinkGraph::MIN_TIMEOUT_DISTANCE + (DistanceManhattan(from->xy, to->xy) >> 3)); + if (TimerGameEconomy::date - edge.LastUpdate() > timeout) { bool updated = false; if (auto_distributed) { @@ -3854,10 +3855,10 @@ void DeleteStaleLinks(Station *from) while (iter != vehicles.end()) { Vehicle *v = *iter; /* Do not refresh links of vehicles that have been stopped in depot for a long time. */ - if (!v->IsStoppedInDepot() || TimerGameCalendar::date - v->date_of_last_service <= LinkGraph::STALE_LINK_DEPOT_TIMEOUT) { + if (!v->IsStoppedInDepot() || TimerGameEconomy::date - v->date_of_last_service <= LinkGraph::STALE_LINK_DEPOT_TIMEOUT) { LinkRefresher::Run(v, false); // Don't allow merging. Otherwise lg might get deleted. } - if (edge.LastUpdate() == TimerGameCalendar::date) { + if (edge.LastUpdate() == TimerGameEconomy::date) { updated = true; break; } @@ -3880,19 +3881,19 @@ void DeleteStaleLinks(Station *from) ge.flows.DeleteFlows(to->index); RerouteCargo(from, c, to->index, from->index); } - } else if (edge.last_unrestricted_update != CalendarTime::INVALID_DATE && TimerGameCalendar::date - edge.last_unrestricted_update > timeout) { + } else if (edge.last_unrestricted_update != EconomyTime::INVALID_DATE && TimerGameEconomy::date - edge.last_unrestricted_update > timeout) { edge.Restrict(); ge.flows.RestrictFlows(to->index); RerouteCargo(from, c, to->index, from->index); - } else if (edge.last_restricted_update != CalendarTime::INVALID_DATE && TimerGameCalendar::date - edge.last_restricted_update > timeout) { + } else if (edge.last_restricted_update != EconomyTime::INVALID_DATE && TimerGameEconomy::date - edge.last_restricted_update > timeout) { edge.Release(); } } /* Remove dead edges. */ for (NodeID r : to_remove) (*lg)[ge.node].RemoveEdge(r); - assert(TimerGameCalendar::date >= lg->LastCompression()); - if (TimerGameCalendar::date - lg->LastCompression() > LinkGraph::COMPRESSION_INTERVAL) { + assert(TimerGameEconomy::date >= lg->LastCompression()); + if (TimerGameEconomy::date - lg->LastCompression() > LinkGraph::COMPRESSION_INTERVAL) { lg->Compress(); } } @@ -4014,8 +4015,8 @@ void OnTick_Station() } } -/** Monthly loop for stations. */ -static IntervalTimer _stations_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::STATION}, [](auto) +/** Economy monthly loop for stations. */ +static IntervalTimer _economy_stations_monthly({TimerGameEconomy::MONTH, TimerGameEconomy::Priority::STATION}, [](auto) { for (Station *st : Station::Iterate()) { for (GoodsEntry &ge : st->goods) { diff --git a/src/subsidy.cpp b/src/subsidy.cpp index 620a5c30be..3d9a60408e 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -27,7 +27,7 @@ #include "tile_cmd.h" #include "subsidy_cmd.h" #include "timer/timer.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "table/strings.h" @@ -474,8 +474,8 @@ bool FindSubsidyCargoDestination(CargoID cid, SourceType src_type, SourceID src) return true; } -/** Perform the monthly update of open subsidies, and try to create a new one. */ -static IntervalTimer _subsidies_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::SUBSIDY}, [](auto) +/** Perform the economy monthly update of open subsidies, and try to create a new one. */ +static IntervalTimer _economy_subsidies_monthly({TimerGameEconomy::MONTH, TimerGameEconomy::Priority::SUBSIDY}, [](auto) { bool modified = false; diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index bd31e0f611..c0d5c0eeff 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -142,7 +142,7 @@ struct SubsidyListWindow : Window { { if (widget != WID_SUL_PANEL) return; - TimerGameCalendar::YearMonthDay ymd = TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date); + TimerGameEconomy::YearMonthDay ymd = TimerGameEconomy::ConvertDateToYMD(TimerGameEconomy::date); Rect tr = r.Shrink(WidgetDimensions::scaled.framerect); @@ -159,7 +159,7 @@ struct SubsidyListWindow : Window { if (IsInsideMM(pos, 0, cap)) { /* Displays the two offered towns */ SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui); - SetDParam(7, TimerGameCalendar::date - ymd.day + s->remaining * 32); + SetDParam(7, TimerGameEconomy::date - ymd.day + s->remaining * 32); DrawString(tr.left, tr.right, tr.top + pos * GetCharacterHeight(FS_NORMAL), STR_SUBSIDIES_OFFERED_FROM_TO); } pos++; @@ -183,7 +183,7 @@ struct SubsidyListWindow : Window { if (IsInsideMM(pos, 0, cap)) { SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui); SetDParam(7, s->awarded); - SetDParam(8, TimerGameCalendar::date - ymd.day + s->remaining * 32); + SetDParam(8, TimerGameEconomy::date - ymd.day + s->remaining * 32); /* Displays the two connected stations */ DrawString(tr.left, tr.right, tr.top + pos * GetCharacterHeight(FS_NORMAL), STR_SUBSIDIES_SUBSIDISED_FROM_TO); diff --git a/src/survey.cpp b/src/survey.cpp index 7dc2d238f8..6f71c869bb 100644 --- a/src/survey.cpp +++ b/src/survey.cpp @@ -16,6 +16,8 @@ #include "rev.h" #include "settings_type.h" #include "timer/timer_game_tick.h" +#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "currency.h" #include "fontcache.h" @@ -317,6 +319,9 @@ void SurveyTimers(nlohmann::json &survey) survey["ticks"] = TimerGameTick::counter; survey["seconds"] = std::chrono::duration_cast(std::chrono::steady_clock::now() - _switch_mode_time).count(); + TimerGameEconomy::YearMonthDay economy_ymd = TimerGameEconomy::ConvertDateToYMD(TimerGameEconomy::date); + survey["economy"] = fmt::format("{:04}-{:02}-{:02} ({})", economy_ymd.year, economy_ymd.month + 1, economy_ymd.day, TimerGameEconomy::date_fract); + TimerGameCalendar::YearMonthDay ymd = TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date); survey["calendar"] = fmt::format("{:04}-{:02}-{:02} ({})", ymd.year, ymd.month + 1, ymd.day, TimerGameCalendar::date_fract); } diff --git a/src/timer/CMakeLists.txt b/src/timer/CMakeLists.txt index f4f82e1a5a..ae18530833 100644 --- a/src/timer/CMakeLists.txt +++ b/src/timer/CMakeLists.txt @@ -1,6 +1,10 @@ add_files( + timer_game_common.cpp + timer_game_common.h timer_game_calendar.cpp timer_game_calendar.h + timer_game_economy.cpp + timer_game_economy.h timer_game_realtime.cpp timer_game_realtime.h timer_game_tick.cpp diff --git a/src/timer/timer_game_calendar.cpp b/src/timer/timer_game_calendar.cpp index 369b002cd2..87f0ca81cf 100644 --- a/src/timer/timer_game_calendar.cpp +++ b/src/timer/timer_game_calendar.cpp @@ -10,12 +10,21 @@ * This file implements the timer logic for the game-calendar-timer. */ +/** + * Calendar time is used for technology and time-of-year changes, including: + * - Vehicle, airport, station, object introduction and obsolescence + * - Vehicle and engine age + * - NewGRF variables for visual styles or behavior based on year or time of year (e.g. variable snow line) + * - Inflation, since it is tied to original game years. One interpretation of inflation is that it compensates for faster and higher capacity vehicles, + * another is that it compensates for more established companies. Each of these point to a different choice of calendar versus economy time, but we have to pick one + * so we follow a previous decision to tie inflation to original TTD game years. + */ + #include "../stdafx.h" #include "../openttd.h" #include "timer.h" #include "timer_game_calendar.h" #include "../vehicle_base.h" -#include "../linkgraph/linkgraph.h" #include "../safeguards.h" @@ -24,127 +33,6 @@ TimerGameCalendar::Month TimerGameCalendar::month = {}; TimerGameCalendar::Date TimerGameCalendar::date = {}; TimerGameCalendar::DateFract TimerGameCalendar::date_fract = {}; -#define M(a, b) ((a << 5) | b) -static const uint16_t _month_date_from_year_day[] = { - M(0, 1), M(0, 2), M(0, 3), M(0, 4), M(0, 5), M(0, 6), M(0, 7), M(0, 8), M(0, 9), M(0, 10), M(0, 11), M(0, 12), M(0, 13), M(0, 14), M(0, 15), M(0, 16), M(0, 17), M(0, 18), M(0, 19), M(0, 20), M(0, 21), M(0, 22), M(0, 23), M(0, 24), M(0, 25), M(0, 26), M(0, 27), M(0, 28), M(0, 29), M(0, 30), M(0, 31), - M(1, 1), M(1, 2), M(1, 3), M(1, 4), M(1, 5), M(1, 6), M(1, 7), M(1, 8), M(1, 9), M(1, 10), M(1, 11), M(1, 12), M(1, 13), M(1, 14), M(1, 15), M(1, 16), M(1, 17), M(1, 18), M(1, 19), M(1, 20), M(1, 21), M(1, 22), M(1, 23), M(1, 24), M(1, 25), M(1, 26), M(1, 27), M(1, 28), M(1, 29), - M(2, 1), M(2, 2), M(2, 3), M(2, 4), M(2, 5), M(2, 6), M(2, 7), M(2, 8), M(2, 9), M(2, 10), M(2, 11), M(2, 12), M(2, 13), M(2, 14), M(2, 15), M(2, 16), M(2, 17), M(2, 18), M(2, 19), M(2, 20), M(2, 21), M(2, 22), M(2, 23), M(2, 24), M(2, 25), M(2, 26), M(2, 27), M(2, 28), M(2, 29), M(2, 30), M(2, 31), - M(3, 1), M(3, 2), M(3, 3), M(3, 4), M(3, 5), M(3, 6), M(3, 7), M(3, 8), M(3, 9), M(3, 10), M(3, 11), M(3, 12), M(3, 13), M(3, 14), M(3, 15), M(3, 16), M(3, 17), M(3, 18), M(3, 19), M(3, 20), M(3, 21), M(3, 22), M(3, 23), M(3, 24), M(3, 25), M(3, 26), M(3, 27), M(3, 28), M(3, 29), M(3, 30), - M(4, 1), M(4, 2), M(4, 3), M(4, 4), M(4, 5), M(4, 6), M(4, 7), M(4, 8), M(4, 9), M(4, 10), M(4, 11), M(4, 12), M(4, 13), M(4, 14), M(4, 15), M(4, 16), M(4, 17), M(4, 18), M(4, 19), M(4, 20), M(4, 21), M(4, 22), M(4, 23), M(4, 24), M(4, 25), M(4, 26), M(4, 27), M(4, 28), M(4, 29), M(4, 30), M(4, 31), - M(5, 1), M(5, 2), M(5, 3), M(5, 4), M(5, 5), M(5, 6), M(5, 7), M(5, 8), M(5, 9), M(5, 10), M(5, 11), M(5, 12), M(5, 13), M(5, 14), M(5, 15), M(5, 16), M(5, 17), M(5, 18), M(5, 19), M(5, 20), M(5, 21), M(5, 22), M(5, 23), M(5, 24), M(5, 25), M(5, 26), M(5, 27), M(5, 28), M(5, 29), M(5, 30), - M(6, 1), M(6, 2), M(6, 3), M(6, 4), M(6, 5), M(6, 6), M(6, 7), M(6, 8), M(6, 9), M(6, 10), M(6, 11), M(6, 12), M(6, 13), M(6, 14), M(6, 15), M(6, 16), M(6, 17), M(6, 18), M(6, 19), M(6, 20), M(6, 21), M(6, 22), M(6, 23), M(6, 24), M(6, 25), M(6, 26), M(6, 27), M(6, 28), M(6, 29), M(6, 30), M(6, 31), - M(7, 1), M(7, 2), M(7, 3), M(7, 4), M(7, 5), M(7, 6), M(7, 7), M(7, 8), M(7, 9), M(7, 10), M(7, 11), M(7, 12), M(7, 13), M(7, 14), M(7, 15), M(7, 16), M(7, 17), M(7, 18), M(7, 19), M(7, 20), M(7, 21), M(7, 22), M(7, 23), M(7, 24), M(7, 25), M(7, 26), M(7, 27), M(7, 28), M(7, 29), M(7, 30), M(7, 31), - M(8, 1), M(8, 2), M(8, 3), M(8, 4), M(8, 5), M(8, 6), M(8, 7), M(8, 8), M(8, 9), M(8, 10), M(8, 11), M(8, 12), M(8, 13), M(8, 14), M(8, 15), M(8, 16), M(8, 17), M(8, 18), M(8, 19), M(8, 20), M(8, 21), M(8, 22), M(8, 23), M(8, 24), M(8, 25), M(8, 26), M(8, 27), M(8, 28), M(8, 29), M(8, 30), - M(9, 1), M(9, 2), M(9, 3), M(9, 4), M(9, 5), M(9, 6), M(9, 7), M(9, 8), M(9, 9), M(9, 10), M(9, 11), M(9, 12), M(9, 13), M(9, 14), M(9, 15), M(9, 16), M(9, 17), M(9, 18), M(9, 19), M(9, 20), M(9, 21), M(9, 22), M(9, 23), M(9, 24), M(9, 25), M(9, 26), M(9, 27), M(9, 28), M(9, 29), M(9, 30), M(9, 31), - M(10, 1), M(10, 2), M(10, 3), M(10, 4), M(10, 5), M(10, 6), M(10, 7), M(10, 8), M(10, 9), M(10, 10), M(10, 11), M(10, 12), M(10, 13), M(10, 14), M(10, 15), M(10, 16), M(10, 17), M(10, 18), M(10, 19), M(10, 20), M(10, 21), M(10, 22), M(10, 23), M(10, 24), M(10, 25), M(10, 26), M(10, 27), M(10, 28), M(10, 29), M(10, 30), - M(11, 1), M(11, 2), M(11, 3), M(11, 4), M(11, 5), M(11, 6), M(11, 7), M(11, 8), M(11, 9), M(11, 10), M(11, 11), M(11, 12), M(11, 13), M(11, 14), M(11, 15), M(11, 16), M(11, 17), M(11, 18), M(11, 19), M(11, 20), M(11, 21), M(11, 22), M(11, 23), M(11, 24), M(11, 25), M(11, 26), M(11, 27), M(11, 28), M(11, 29), M(11, 30), M(11, 31), -}; -#undef M - -enum DaysTillMonth { - ACCUM_JAN = 0, - ACCUM_FEB = ACCUM_JAN + 31, - ACCUM_MAR = ACCUM_FEB + 29, - ACCUM_APR = ACCUM_MAR + 31, - ACCUM_MAY = ACCUM_APR + 30, - ACCUM_JUN = ACCUM_MAY + 31, - ACCUM_JUL = ACCUM_JUN + 30, - ACCUM_AUG = ACCUM_JUL + 31, - ACCUM_SEP = ACCUM_AUG + 31, - ACCUM_OCT = ACCUM_SEP + 30, - ACCUM_NOV = ACCUM_OCT + 31, - ACCUM_DEC = ACCUM_NOV + 30, -}; - -/** Number of days to pass from the first day in the year before reaching the first of a month. */ -static const uint16_t _accum_days_for_month[] = { - ACCUM_JAN, ACCUM_FEB, ACCUM_MAR, ACCUM_APR, - ACCUM_MAY, ACCUM_JUN, ACCUM_JUL, ACCUM_AUG, - ACCUM_SEP, ACCUM_OCT, ACCUM_NOV, ACCUM_DEC, -}; - -/** - * Converts a Date to a Year, Month & Day. - * @param date the date to convert from - * @returns YearMonthDay representation of the Date. - */ -/* static */ TimerGameCalendar::YearMonthDay TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::Date date) -{ - /* Year determination in multiple steps to account for leap - * years. First do the large steps, then the smaller ones. - */ - - /* There are 97 leap years in 400 years */ - TimerGameCalendar::Year yr = 400 * (date.base() / (CalendarTime::DAYS_IN_YEAR * 400 + 97)); - int rem = date.base() % (CalendarTime::DAYS_IN_YEAR * 400 + 97); - - if (rem >= CalendarTime::DAYS_IN_YEAR * 100 + 25) { - /* There are 25 leap years in the first 100 years after - * every 400th year, as every 400th year is a leap year */ - yr += 100; - rem -= CalendarTime::DAYS_IN_YEAR * 100 + 25; - - /* There are 24 leap years in the next couple of 100 years */ - yr += 100 * (rem / (CalendarTime::DAYS_IN_YEAR * 100 + 24)); - rem = (rem % (CalendarTime::DAYS_IN_YEAR * 100 + 24)); - } - - if (!TimerGameCalendar::IsLeapYear(yr) && rem >= CalendarTime::DAYS_IN_YEAR * 4) { - /* The first 4 year of the century are not always a leap year */ - yr += 4; - rem -= CalendarTime::DAYS_IN_YEAR * 4; - } - - /* There is 1 leap year every 4 years */ - yr += 4 * (rem / (CalendarTime::DAYS_IN_YEAR * 4 + 1)); - rem = rem % (CalendarTime::DAYS_IN_YEAR * 4 + 1); - - /* The last (max 3) years to account for; the first one - * can be, but is not necessarily a leap year */ - while (rem >= (TimerGameCalendar::IsLeapYear(yr) ? CalendarTime::DAYS_IN_LEAP_YEAR : CalendarTime::DAYS_IN_YEAR)) { - rem -= TimerGameCalendar::IsLeapYear(yr) ? CalendarTime::DAYS_IN_LEAP_YEAR : CalendarTime::DAYS_IN_YEAR; - yr++; - } - - /* Skip the 29th of February in non-leap years */ - if (!TimerGameCalendar::IsLeapYear(yr) && rem >= ACCUM_MAR - 1) rem++; - - uint16_t x = _month_date_from_year_day[rem]; - - YearMonthDay ymd; - ymd.year = yr; - ymd.month = x >> 5; - ymd.day = x & 0x1F; - return ymd; -} - -/** - * Converts a tuple of Year, Month and Day to a Date. - * @param year is a number between 0..MAX_YEAR - * @param month is a number between 0..11 - * @param day is a number between 1..31 - */ -/* static */ TimerGameCalendar::Date TimerGameCalendar::ConvertYMDToDate(TimerGameCalendar::Year year, TimerGameCalendar::Month month, TimerGameCalendar::Day day) -{ - /* Day-offset in a leap year */ - int days = _accum_days_for_month[month] + day - 1; - - /* Account for the missing of the 29th of February in non-leap years */ - if (!TimerGameCalendar::IsLeapYear(year) && days >= ACCUM_MAR) days--; - - return TimerGameCalendar::DateAtStartOfYear(year) + days; -} - -/** - * Checks whether the given year is a leap year or not. - * @param yr The year to check. - * @return True if \c yr is a leap year, otherwise false. - */ -/* static */ bool TimerGameCalendar::IsLeapYear(TimerGameCalendar::Year yr) -{ - return yr.base() % 4 == 0 && (yr.base() % 100 != 0 || yr.base() % 400 == 0); -} - /** * Set the date. * @param date New date @@ -213,22 +101,10 @@ void TimerManager::Elapsed([[maybe_unused]] TimerGameCalendar timer->Elapsed(TimerGameCalendar::DAY); } - if ((TimerGameCalendar::date.base() % 7) == 3) { - for (auto timer : timers) { - timer->Elapsed(TimerGameCalendar::WEEK); - } - } - if (new_month) { for (auto timer : timers) { timer->Elapsed(TimerGameCalendar::MONTH); } - - if ((TimerGameCalendar::month % 3) == 0) { - for (auto timer : timers) { - timer->Elapsed(TimerGameCalendar::QUARTER); - } - } } if (new_year) { @@ -244,8 +120,6 @@ void TimerManager::Elapsed([[maybe_unused]] TimerGameCalendar TimerGameCalendar::year--; days_this_year = TimerGameCalendar::IsLeapYear(TimerGameCalendar::year) ? CalendarTime::DAYS_IN_LEAP_YEAR : CalendarTime::DAYS_IN_YEAR; TimerGameCalendar::date -= days_this_year; - for (Vehicle *v : Vehicle::Iterate()) v->ShiftDates(-days_this_year); - for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(-days_this_year); } } diff --git a/src/timer/timer_game_calendar.h b/src/timer/timer_game_calendar.h index ab29063f54..3ec2b66fdd 100644 --- a/src/timer/timer_game_calendar.h +++ b/src/timer/timer_game_calendar.h @@ -12,6 +12,7 @@ #include "../stdafx.h" #include "../core/strong_typedef_type.hpp" +#include "timer_game_common.h" /** * Timer that is increased every 27ms, and counts towards ticks / days / months / years. @@ -19,173 +20,26 @@ * The amount of days in a month depends on the month and year (leap-years). * There are always 74 ticks in a day (and with 27ms, this makes 1 day 1.998 seconds). * - * IntervalTimer and TimeoutTimer based on this Timer are a bit unusual, as their count is always one. - * You create those timers based on a transition: a new day, a new month or a new year. - * - * Additionally, you need to set a priority. To ensure deterministic behaviour, events are executed - * in priority. It is important that if you assign NONE, you do not use Random() in your callback. - * Other than that, make sure you only set one callback per priority. - * - * For example: - * IntervalTimer({TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [](uint count){}); - * - * @note Callbacks are executed in the game-thread. + * Calendar time is used for technology and time-of-year changes, including: + * - Vehicle, airport, station, object introduction and obsolescence + * - NewGRF variables for visual styles or behavior based on year or time of year (e.g. variable snow line) + * - Inflation, since it is tied to original game years. One interpretation of inflation is that it compensates for faster and higher capacity vehicles, + * another is that it compensates for more established companies. Each of these point to a different choice of calendar versus economy time, but we have to pick one + * so we follow a previous decision to tie inflation to original TTD game years. */ -class TimerGameCalendar { +class TimerGameCalendar : public TimerGame { public: - /** The type to store our dates in. */ - using Date = StrongType::Typedef; - - /** The fraction of a date we're in, i.e. the number of ticks since the last date changeover. */ - using DateFract = uint16_t; - - /** Type for the year, note: 0 based, i.e. starts at the year 0. */ - using Year = StrongType::Typedef; - /** Type for the month, note: 0 based, i.e. 0 = January, 11 = December. */ - using Month = uint8_t; - /** Type for the day of the month, note: 1 based, first day of a month is 1. */ - using Day = uint8_t; - - /** - * Data structure to convert between Date and triplet (year, month, and day). - * @see TimerGameCalendar::ConvertDateToYMD(), TimerGameCalendar::ConvertYMDToDate() - */ - struct YearMonthDay { - Year year; ///< Year (0...) - Month month; ///< Month (0..11) - Day day; ///< Day (1..31) - }; - - enum Trigger { - DAY, - WEEK, - MONTH, - QUARTER, - YEAR, - }; - enum Priority { - NONE, ///< These timers can be executed in any order; there is no Random() in them, so order is not relevant. - - /* All other may have a Random() call in them, so order is important. - * For safety, you can only setup a single timer on a single priority. */ - COMPANY, - DISASTER, - ENGINE, - INDUSTRY, - STATION, - SUBSIDY, - TOWN, - VEHICLE, - }; - - struct TPeriod { - Trigger trigger; - Priority priority; - - TPeriod(Trigger trigger, Priority priority) : trigger(trigger), priority(priority) {} - - bool operator < (const TPeriod &other) const - { - if (this->trigger != other.trigger) return this->trigger < other.trigger; - return this->priority < other.priority; - } - - bool operator == (const TPeriod &other) const - { - return this->trigger == other.trigger && this->priority == other.priority; - } - }; - - using TElapsed = uint; - struct TStorage { - }; - - static bool IsLeapYear(Year yr); - static YearMonthDay ConvertDateToYMD(Date date); - static Date ConvertYMDToDate(Year year, Month month, Day day); - static void SetDate(Date date, DateFract fract); - - /** - * Calculate the year of a given date. - * @param date The date to consider. - * @return the year. - */ - static constexpr Year DateToYear(Date date) - { - /* Hardcode the number of days in a year because we can't access CalendarTime from here. */ - return date.base() / 366; - } - - /** - * Calculate the date of the first day of a given year. - * @param year the year to get the first day of. - * @return the date. - */ - static constexpr Date DateAtStartOfYear(Year year) - { - int32_t year_as_int = year.base(); - uint number_of_leap_years = (year == 0) ? 0 : ((year_as_int - 1) / 4 - (year_as_int - 1) / 100 + (year_as_int - 1) / 400 + 1); - - /* Hardcode the number of days in a year because we can't access CalendarTime from here. */ - return (365 * year_as_int) + number_of_leap_years; - } - static Year year; ///< Current year, starting at 0. static Month month; ///< Current month (0..11). static Date date; ///< Current date in days (day counter). static DateFract date_fract; ///< Fractional part of the day. + + static void SetDate(Date date, DateFract fract); }; /** * Storage class for Calendar time constants. */ -class CalendarTime { -public: - static constexpr int DAYS_IN_YEAR = 365; ///< days per year - static constexpr int DAYS_IN_LEAP_YEAR = 366; ///< sometimes, you need one day more... - static constexpr int MONTHS_IN_YEAR = 12; ///< months per year - - static constexpr int SECONDS_PER_DAY = 2; ///< approximate seconds per day, not for precise calculations - - /* - * ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR and DAYS_TILL_ORIGINAL_BASE_YEAR are - * primarily used for loading newgrf and savegame data and returning some - * newgrf (callback) functions that were in the original (TTD) inherited - * format, where 'TimerGameCalendar::date == 0' meant that it was 1920-01-01. - */ - - /** The minimum starting year/base year of the original TTD */ - static constexpr TimerGameCalendar::Year ORIGINAL_BASE_YEAR = 1920; - /** The original ending year */ - static constexpr TimerGameCalendar::Year ORIGINAL_END_YEAR = 2051; - /** The maximum year of the original TTD */ - static constexpr TimerGameCalendar::Year ORIGINAL_MAX_YEAR = 2090; - - /** The absolute minimum & maximum years in OTTD */ - static constexpr TimerGameCalendar::Year MIN_YEAR = 0; - - /** The default starting year */ - static constexpr TimerGameCalendar::Year DEF_START_YEAR = 1950; - /** The default scoring end year */ - static constexpr TimerGameCalendar::Year DEF_END_YEAR = ORIGINAL_END_YEAR - 1; - - /** - * MAX_YEAR, nicely rounded value of the number of years that can - * be encoded in a single 32 bits date, about 2^31 / 366 years. - */ - static constexpr TimerGameCalendar::Year MAX_YEAR = 5000000; - - /** The date of the first day of the original base year. */ - static constexpr TimerGameCalendar::Date DAYS_TILL_ORIGINAL_BASE_YEAR = TimerGameCalendar::DateAtStartOfYear(ORIGINAL_BASE_YEAR); - - /** The absolute minimum date. */ - static constexpr TimerGameCalendar::Date MIN_DATE = 0; - - /** The date of the last day of the max year. */ - static constexpr TimerGameCalendar::Date MAX_DATE = TimerGameCalendar::DateAtStartOfYear(CalendarTime::MAX_YEAR + 1) - 1; - - static constexpr TimerGameCalendar::Year INVALID_YEAR = -1; ///< Representation of an invalid year - static constexpr TimerGameCalendar::Date INVALID_DATE = -1; ///< Representation of an invalid date -}; +class CalendarTime : public TimerGameConst {}; #endif /* TIMER_GAME_CALENDAR_H */ diff --git a/src/timer/timer_game_common.cpp b/src/timer/timer_game_common.cpp new file mode 100644 index 0000000000..13bd9bf5e1 --- /dev/null +++ b/src/timer/timer_game_common.cpp @@ -0,0 +1,140 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** + * @file timer_game_common.cpp + * This file implements the common timer logic for the game-calendar timers. + */ + +#include "../stdafx.h" + +#include "timer_game_common.h" +#include "timer_game_calendar.h" +#include "timer_game_economy.h" + +#include "../safeguards.h" + +#define M(a, b) ((a << 5) | b) +static constexpr uint16_t _month_date_from_year_day[] = { + M(0, 1), M(0, 2), M(0, 3), M(0, 4), M(0, 5), M(0, 6), M(0, 7), M(0, 8), M(0, 9), M(0, 10), M(0, 11), M(0, 12), M(0, 13), M(0, 14), M(0, 15), M(0, 16), M(0, 17), M(0, 18), M(0, 19), M(0, 20), M(0, 21), M(0, 22), M(0, 23), M(0, 24), M(0, 25), M(0, 26), M(0, 27), M(0, 28), M(0, 29), M(0, 30), M(0, 31), + M(1, 1), M(1, 2), M(1, 3), M(1, 4), M(1, 5), M(1, 6), M(1, 7), M(1, 8), M(1, 9), M(1, 10), M(1, 11), M(1, 12), M(1, 13), M(1, 14), M(1, 15), M(1, 16), M(1, 17), M(1, 18), M(1, 19), M(1, 20), M(1, 21), M(1, 22), M(1, 23), M(1, 24), M(1, 25), M(1, 26), M(1, 27), M(1, 28), M(1, 29), + M(2, 1), M(2, 2), M(2, 3), M(2, 4), M(2, 5), M(2, 6), M(2, 7), M(2, 8), M(2, 9), M(2, 10), M(2, 11), M(2, 12), M(2, 13), M(2, 14), M(2, 15), M(2, 16), M(2, 17), M(2, 18), M(2, 19), M(2, 20), M(2, 21), M(2, 22), M(2, 23), M(2, 24), M(2, 25), M(2, 26), M(2, 27), M(2, 28), M(2, 29), M(2, 30), M(2, 31), + M(3, 1), M(3, 2), M(3, 3), M(3, 4), M(3, 5), M(3, 6), M(3, 7), M(3, 8), M(3, 9), M(3, 10), M(3, 11), M(3, 12), M(3, 13), M(3, 14), M(3, 15), M(3, 16), M(3, 17), M(3, 18), M(3, 19), M(3, 20), M(3, 21), M(3, 22), M(3, 23), M(3, 24), M(3, 25), M(3, 26), M(3, 27), M(3, 28), M(3, 29), M(3, 30), + M(4, 1), M(4, 2), M(4, 3), M(4, 4), M(4, 5), M(4, 6), M(4, 7), M(4, 8), M(4, 9), M(4, 10), M(4, 11), M(4, 12), M(4, 13), M(4, 14), M(4, 15), M(4, 16), M(4, 17), M(4, 18), M(4, 19), M(4, 20), M(4, 21), M(4, 22), M(4, 23), M(4, 24), M(4, 25), M(4, 26), M(4, 27), M(4, 28), M(4, 29), M(4, 30), M(4, 31), + M(5, 1), M(5, 2), M(5, 3), M(5, 4), M(5, 5), M(5, 6), M(5, 7), M(5, 8), M(5, 9), M(5, 10), M(5, 11), M(5, 12), M(5, 13), M(5, 14), M(5, 15), M(5, 16), M(5, 17), M(5, 18), M(5, 19), M(5, 20), M(5, 21), M(5, 22), M(5, 23), M(5, 24), M(5, 25), M(5, 26), M(5, 27), M(5, 28), M(5, 29), M(5, 30), + M(6, 1), M(6, 2), M(6, 3), M(6, 4), M(6, 5), M(6, 6), M(6, 7), M(6, 8), M(6, 9), M(6, 10), M(6, 11), M(6, 12), M(6, 13), M(6, 14), M(6, 15), M(6, 16), M(6, 17), M(6, 18), M(6, 19), M(6, 20), M(6, 21), M(6, 22), M(6, 23), M(6, 24), M(6, 25), M(6, 26), M(6, 27), M(6, 28), M(6, 29), M(6, 30), M(6, 31), + M(7, 1), M(7, 2), M(7, 3), M(7, 4), M(7, 5), M(7, 6), M(7, 7), M(7, 8), M(7, 9), M(7, 10), M(7, 11), M(7, 12), M(7, 13), M(7, 14), M(7, 15), M(7, 16), M(7, 17), M(7, 18), M(7, 19), M(7, 20), M(7, 21), M(7, 22), M(7, 23), M(7, 24), M(7, 25), M(7, 26), M(7, 27), M(7, 28), M(7, 29), M(7, 30), M(7, 31), + M(8, 1), M(8, 2), M(8, 3), M(8, 4), M(8, 5), M(8, 6), M(8, 7), M(8, 8), M(8, 9), M(8, 10), M(8, 11), M(8, 12), M(8, 13), M(8, 14), M(8, 15), M(8, 16), M(8, 17), M(8, 18), M(8, 19), M(8, 20), M(8, 21), M(8, 22), M(8, 23), M(8, 24), M(8, 25), M(8, 26), M(8, 27), M(8, 28), M(8, 29), M(8, 30), + M(9, 1), M(9, 2), M(9, 3), M(9, 4), M(9, 5), M(9, 6), M(9, 7), M(9, 8), M(9, 9), M(9, 10), M(9, 11), M(9, 12), M(9, 13), M(9, 14), M(9, 15), M(9, 16), M(9, 17), M(9, 18), M(9, 19), M(9, 20), M(9, 21), M(9, 22), M(9, 23), M(9, 24), M(9, 25), M(9, 26), M(9, 27), M(9, 28), M(9, 29), M(9, 30), M(9, 31), + M(10, 1), M(10, 2), M(10, 3), M(10, 4), M(10, 5), M(10, 6), M(10, 7), M(10, 8), M(10, 9), M(10, 10), M(10, 11), M(10, 12), M(10, 13), M(10, 14), M(10, 15), M(10, 16), M(10, 17), M(10, 18), M(10, 19), M(10, 20), M(10, 21), M(10, 22), M(10, 23), M(10, 24), M(10, 25), M(10, 26), M(10, 27), M(10, 28), M(10, 29), M(10, 30), + M(11, 1), M(11, 2), M(11, 3), M(11, 4), M(11, 5), M(11, 6), M(11, 7), M(11, 8), M(11, 9), M(11, 10), M(11, 11), M(11, 12), M(11, 13), M(11, 14), M(11, 15), M(11, 16), M(11, 17), M(11, 18), M(11, 19), M(11, 20), M(11, 21), M(11, 22), M(11, 23), M(11, 24), M(11, 25), M(11, 26), M(11, 27), M(11, 28), M(11, 29), M(11, 30), M(11, 31), +}; +#undef M + +enum DaysTillMonth { + ACCUM_JAN = 0, + ACCUM_FEB = ACCUM_JAN + 31, + ACCUM_MAR = ACCUM_FEB + 29, + ACCUM_APR = ACCUM_MAR + 31, + ACCUM_MAY = ACCUM_APR + 30, + ACCUM_JUN = ACCUM_MAY + 31, + ACCUM_JUL = ACCUM_JUN + 30, + ACCUM_AUG = ACCUM_JUL + 31, + ACCUM_SEP = ACCUM_AUG + 31, + ACCUM_OCT = ACCUM_SEP + 30, + ACCUM_NOV = ACCUM_OCT + 31, + ACCUM_DEC = ACCUM_NOV + 30, +}; + +/** Number of days to pass from the first day in the year before reaching the first of a month. */ +static constexpr uint16_t _accum_days_for_month[] = { + ACCUM_JAN, ACCUM_FEB, ACCUM_MAR, ACCUM_APR, + ACCUM_MAY, ACCUM_JUN, ACCUM_JUL, ACCUM_AUG, + ACCUM_SEP, ACCUM_OCT, ACCUM_NOV, ACCUM_DEC, +}; + +/** + * Converts a Date to a Year, Month & Day. + * @param date the date to convert from + * @returns YearMonthDay representation of the Date. + */ +template +/* static */ typename TimerGame::YearMonthDay TimerGame::ConvertDateToYMD(Date date) +{ + /* Year determination in multiple steps to account for leap + * years. First do the large steps, then the smaller ones. + */ + + /* There are 97 leap years in 400 years */ + Year yr = 400 * (date.base() / (TimerGameConst::DAYS_IN_YEAR * 400 + 97)); + int rem = date.base() % (TimerGameConst::DAYS_IN_YEAR * 400 + 97); + + if (rem >= TimerGameConst::DAYS_IN_YEAR * 100 + 25) { + /* There are 25 leap years in the first 100 years after + * every 400th year, as every 400th year is a leap year */ + yr += 100; + rem -= TimerGameConst::DAYS_IN_YEAR * 100 + 25; + + /* There are 24 leap years in the next couple of 100 years */ + yr += 100 * (rem / (TimerGameConst::DAYS_IN_YEAR * 100 + 24)); + rem = (rem % (TimerGameConst::DAYS_IN_YEAR * 100 + 24)); + } + + if (!IsLeapYear(yr) && rem >= TimerGameConst::DAYS_IN_YEAR * 4) { + /* The first 4 year of the century are not always a leap year */ + yr += 4; + rem -= TimerGameConst::DAYS_IN_YEAR * 4; + } + + /* There is 1 leap year every 4 years */ + yr += 4 * (rem / (TimerGameConst::DAYS_IN_YEAR * 4 + 1)); + rem = rem % (TimerGameConst::DAYS_IN_YEAR * 4 + 1); + + /* The last (max 3) years to account for; the first one + * can be, but is not necessarily a leap year */ + while (rem >= (IsLeapYear(yr) ? TimerGameConst::DAYS_IN_LEAP_YEAR : TimerGameConst::DAYS_IN_YEAR)) { + rem -= IsLeapYear(yr) ? TimerGameConst::DAYS_IN_LEAP_YEAR : TimerGameConst::DAYS_IN_YEAR; + yr++; + } + + /* Skip the 29th of February in non-leap years */ + if (!IsLeapYear(yr) && rem >= ACCUM_MAR - 1) rem++; + + uint16_t x = _month_date_from_year_day[rem]; + + YearMonthDay ymd; + ymd.year = yr; + ymd.month = x >> 5; + ymd.day = x & 0x1F; + return ymd; +} + +/** + * Converts a tuple of Year, Month and Day to a Date. + * @param year is a number between 0..MAX_YEAR + * @param month is a number between 0..11 + * @param day is a number between 1..31 + */ +template +/* static */ typename TimerGame::Date TimerGame::ConvertYMDToDate(Year year, Month month, Day day) +{ + /* Day-offset in a leap year */ + int days = _accum_days_for_month[month] + day - 1; + + /* Account for the missing of the 29th of February in non-leap years */ + if (!IsLeapYear(year) && days >= ACCUM_MAR) days--; + + return DateAtStartOfYear(year) + days; +} + +/* Create instances of the two template variants that we have. + * This is needed, as this templated functions are not in a header-file. */ +template TimerGame::YearMonthDay TimerGame::ConvertDateToYMD(Date date); +template TimerGame::YearMonthDay TimerGame::ConvertDateToYMD(Date date); + +template TimerGame::Date TimerGame::ConvertYMDToDate(Year year, Month month, Day day); +template TimerGame::Date TimerGame::ConvertYMDToDate(Year year, Month month, Day day); diff --git a/src/timer/timer_game_common.h b/src/timer/timer_game_common.h new file mode 100644 index 0000000000..f807359e1c --- /dev/null +++ b/src/timer/timer_game_common.h @@ -0,0 +1,196 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file timer_game_common.h Definition of the common class inherited by both calendar and economy timers. */ + +#ifndef TIMER_GAME_COMMON_H +#define TIMER_GAME_COMMON_H + +#include "../core/strong_typedef_type.hpp" + +/** + * Template class for all TimerGame based timers. As Calendar and Economy are very similar, this class is used to share code between them. + * + * IntervalTimer and TimeoutTimer based on this Timer are a bit unusual, as their count is always one. + * You create those timers based on a transition: a new day, a new month or a new year. + * + * Additionally, you need to set a priority. To ensure deterministic behaviour, events are executed + * in priority. It is important that if you assign NONE, you do not use Random() in your callback. + * Other than that, make sure you only set one callback per priority. + * + * For example: + * IntervalTimer({TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [](uint count){}); + * + * @note Callbacks are executed in the game-thread. + */ +template +class TimerGame { +public: + /** The type to store our dates in. */ + template struct DateTag; + using Date = StrongType::Typedef, StrongType::Compare, StrongType::Integer>; + + /** The fraction of a date we're in, i.e. the number of ticks since the last date changeover. */ + using DateFract = uint16_t; + + /** Type for the year, note: 0 based, i.e. starts at the year 0. */ + template struct YearTag; + using Year = StrongType::Typedef, StrongType::Compare, StrongType::Integer>; + /** Type for the month, note: 0 based, i.e. 0 = January, 11 = December. */ + using Month = uint8_t; + /** Type for the day of the month, note: 1 based, first day of a month is 1. */ + using Day = uint8_t; + + /** + * Data structure to convert between Date and triplet (year, month, and day). + * @see ConvertDateToYMD(), ConvertYMDToDate() + */ + struct YearMonthDay { + Year year; ///< Year (0...) + Month month; ///< Month (0..11) + Day day; ///< Day (1..31) + }; + + /** + * Checks whether the given year is a leap year or not. + * @param year The year to check. + * @return True if \c year is a leap year, otherwise false. + */ + static constexpr bool IsLeapYear(Year year) + { + int32_t year_as_int = year.base(); + return year_as_int % 4 == 0 && (year_as_int % 100 != 0 || year_as_int % 400 == 0); + } + + static YearMonthDay ConvertDateToYMD(Date date); + static Date ConvertYMDToDate(Year year, Month month, Day day); + + /** + * Calculate the year of a given date. + * @param date The date to consider. + * @return the year. + */ + static constexpr Year DateToYear(Date date) + { + /* Hardcode the number of days in a year because we can't access CalendarTime from here. */ + return date.base() / 366; + } + + /** + * Calculate the date of the first day of a given year. + * @param year the year to get the first day of. + * @return the date. + */ + static constexpr Date DateAtStartOfYear(Year year) + { + int32_t year_as_int = year.base(); + uint number_of_leap_years = (year == 0) ? 0 : ((year_as_int - 1) / 4 - (year_as_int - 1) / 100 + (year_as_int - 1) / 400 + 1); + + /* Hardcode the number of days in a year because we can't access CalendarTime from here. */ + return (365 * year_as_int) + number_of_leap_years; + } + + enum Trigger { + DAY, + WEEK, + MONTH, + QUARTER, + YEAR, + }; + + enum Priority { + NONE, ///< These timers can be executed in any order; there is no Random() in them, so order is not relevant. + + /* All other may have a Random() call in them, so order is important. + * For safety, you can only setup a single timer on a single priority. */ + COMPANY, + DISASTER, + ENGINE, + INDUSTRY, + STATION, + SUBSIDY, + TOWN, + VEHICLE, + }; + + struct TPeriod { + Trigger trigger; + Priority priority; + + TPeriod(Trigger trigger, Priority priority) : trigger(trigger), priority(priority) + {} + + bool operator < (const TPeriod &other) const + { + if (this->trigger != other.trigger) return this->trigger < other.trigger; + return this->priority < other.priority; + } + + bool operator == (const TPeriod &other) const + { + return this->trigger == other.trigger && this->priority == other.priority; + } + }; + + using TElapsed = uint; + struct TStorage {}; +}; + +/** + * Template class for time constants shared by both Calendar and Economy time. + */ +template +class TimerGameConst { +public: + static constexpr int DAYS_IN_YEAR = 365; ///< days per year + static constexpr int DAYS_IN_LEAP_YEAR = 366; ///< sometimes, you need one day more... + static constexpr int MONTHS_IN_YEAR = 12; ///< months per year + + static constexpr int SECONDS_PER_DAY = 2; ///< approximate seconds per day, not for precise calculations + + /* + * ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR and DAYS_TILL_ORIGINAL_BASE_YEAR are + * primarily used for loading newgrf and savegame data and returning some + * newgrf (callback) functions that were in the original (TTD) inherited + * format, where 'TimerGame::date == 0' meant that it was 1920-01-01. + */ + + /** The minimum starting year/base year of the original TTD */ + static constexpr typename TimerGame::Year ORIGINAL_BASE_YEAR = 1920; + /** The original ending year */ + static constexpr typename TimerGame::Year ORIGINAL_END_YEAR = 2051; + /** The maximum year of the original TTD */ + static constexpr typename TimerGame::Year ORIGINAL_MAX_YEAR = 2090; + + /** + * MAX_YEAR, nicely rounded value of the number of years that can + * be encoded in a single 32 bits date, about 2^31 / 366 years. + */ + static constexpr typename TimerGame::Year MAX_YEAR = 5000000; + + /** The absolute minimum year in OTTD */ + static constexpr typename TimerGame::Year MIN_YEAR = 0; + + /** The default starting year */ + static constexpr typename TimerGame::Year DEF_START_YEAR = 1950; + /** The default scoring end year */ + static constexpr typename TimerGame::Year DEF_END_YEAR = ORIGINAL_END_YEAR - 1; + + /** The date of the first day of the original base year. */ + static constexpr typename TimerGame::Date DAYS_TILL_ORIGINAL_BASE_YEAR = TimerGame::DateAtStartOfYear(ORIGINAL_BASE_YEAR); + + /** The date of the last day of the max year. */ + static constexpr typename TimerGame::Date MAX_DATE = TimerGame::DateAtStartOfYear(MAX_YEAR + 1) - 1; + + /** The date on January 1, year 0. */ + static constexpr typename TimerGame::Date MIN_DATE = 0; + + static constexpr typename TimerGame::Year INVALID_YEAR = -1; ///< Representation of an invalid year + static constexpr typename TimerGame::Date INVALID_DATE = -1; ///< Representation of an invalid date +}; + +#endif /* TIMER_GAME_COMMON_H */ diff --git a/src/timer/timer_game_economy.cpp b/src/timer/timer_game_economy.cpp new file mode 100644 index 0000000000..28ef7b4c70 --- /dev/null +++ b/src/timer/timer_game_economy.cpp @@ -0,0 +1,160 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** + * @file timer_game_economy.cpp + * This file implements the timer logic for the game-economy-timer. + */ + +/** + * Economy time is used for the regular pace of the game, including: + * - Industry and house production/consumption + * - Industry production changes, closure, and spawning + * - Town growth + * - Company age and financial statistics + * - Vehicle financial statistics + * - Vehicle aging, depreciation, reliability, and renewal + * - Payment intervals for running and maintenance costs, loan interest, etc. + * - Cargo payment "time" calculation + * - Local authority and station ratings change intervals + */ + +#include "../stdafx.h" +#include "../openttd.h" +#include "timer.h" +#include "timer_game_economy.h" +#include "timer_game_tick.h" +#include "../vehicle_base.h" +#include "../linkgraph/linkgraph.h" + +#include "../safeguards.h" + +TimerGameEconomy::Year TimerGameEconomy::year = {}; +TimerGameEconomy::Month TimerGameEconomy::month = {}; +TimerGameEconomy::Date TimerGameEconomy::date = {}; +TimerGameEconomy::DateFract TimerGameEconomy::date_fract = {}; + +/** + * Set the date. + * @param date The new date + * @param fract The number of ticks that have passed on this date. + */ +/* static */ void TimerGameEconomy::SetDate(TimerGameEconomy::Date date, TimerGameEconomy::DateFract fract) +{ + assert(fract < Ticks::DAY_TICKS); + + TimerGameEconomy::date = date; + TimerGameEconomy::date_fract = fract; + TimerGameEconomy::YearMonthDay ymd = TimerGameEconomy::ConvertDateToYMD(date); + TimerGameEconomy::year = ymd.year; + TimerGameEconomy::month = ymd.month; +} + +template<> +void IntervalTimer::Elapsed(TimerGameEconomy::TElapsed trigger) +{ + if (trigger == this->period.trigger) { + this->callback(1); + } +} + +template<> +void TimeoutTimer::Elapsed(TimerGameEconomy::TElapsed trigger) +{ + if (this->fired) return; + + if (trigger == this->period.trigger) { + this->callback(); + this->fired = true; + } +} + +template<> +void TimerManager::Elapsed([[maybe_unused]] TimerGameEconomy::TElapsed delta) +{ + assert(delta == 1); + + if (_game_mode == GM_MENU) return; + + TimerGameEconomy::date_fract++; + if (TimerGameEconomy::date_fract < Ticks::DAY_TICKS) return; + TimerGameEconomy::date_fract = 0; + + /* increase day counter */ + TimerGameEconomy::date++; + + TimerGameEconomy::YearMonthDay ymd = TimerGameEconomy::ConvertDateToYMD(TimerGameEconomy::date); + + /* check if we entered a new month? */ + bool new_month = ymd.month != TimerGameEconomy::month; + + /* check if we entered a new year? */ + bool new_year = ymd.year != TimerGameEconomy::year; + + /* update internal variables before calling the daily/monthly/yearly loops */ + TimerGameEconomy::month = ymd.month; + TimerGameEconomy::year = ymd.year; + + /* Make a temporary copy of the timers, as a timer's callback might add/remove other timers. */ + auto timers = TimerManager::GetTimers(); + + for (auto timer : timers) { + timer->Elapsed(TimerGameEconomy::DAY); + } + + if ((TimerGameEconomy::date.base() % 7) == 3) { + for (auto timer : timers) { + timer->Elapsed(TimerGameEconomy::WEEK); + } + } + + if (new_month) { + for (auto timer : timers) { + timer->Elapsed(TimerGameEconomy::MONTH); + } + + if ((TimerGameEconomy::month % 3) == 0) { + for (auto timer : timers) { + timer->Elapsed(TimerGameEconomy::QUARTER); + } + } + } + + if (new_year) { + for (auto timer : timers) { + timer->Elapsed(TimerGameEconomy::YEAR); + } + } + + /* check if we reached the maximum year, decrement dates by a year */ + if (TimerGameEconomy::year == EconomyTime::MAX_YEAR + 1) { + int days_this_year; + + TimerGameEconomy::year--; + days_this_year = TimerGameEconomy::IsLeapYear(TimerGameEconomy::year) ? EconomyTime::DAYS_IN_LEAP_YEAR : EconomyTime::DAYS_IN_YEAR; + TimerGameEconomy::date -= days_this_year; + for (Vehicle *v : Vehicle::Iterate()) v->ShiftDates(-days_this_year); + for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(-days_this_year); + } +} + +#ifdef WITH_ASSERT +template<> +void TimerManager::Validate(TimerGameEconomy::TPeriod period) +{ + if (period.priority == TimerGameEconomy::Priority::NONE) return; + + /* Validate we didn't make a developer error and scheduled more than one + * entry on the same priority/trigger. There can only be one timer on + * a specific trigger/priority, to ensure we are deterministic. */ + for (const auto &timer : TimerManager::GetTimers()) { + if (timer->period.trigger != period.trigger) continue; + + assert(timer->period.priority != period.priority); + } +} +#endif /* WITH_ASSERT */ diff --git a/src/timer/timer_game_economy.h b/src/timer/timer_game_economy.h new file mode 100644 index 0000000000..14a693e512 --- /dev/null +++ b/src/timer/timer_game_economy.h @@ -0,0 +1,48 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file timer_game_economy.h Definition of the game-economy-timer */ + +#ifndef TIMER_GAME_ECONOMY_H +#define TIMER_GAME_ECONOMY_H + +#include "../core/strong_typedef_type.hpp" +#include "timer_game_common.h" + +/** + * Timer that is increased every 27ms, and counts towards economy time units, expressed in days / months / years. + * + * For now, this is kept in sync with the calendar date, so the amount of days in a month depends on the month and year (leap-years). + * There are always 74 ticks in a day (and with 27ms, this makes 1 day 1.998 seconds). + * + * Economy time is used for the regular pace of the game, including: + * - Industry and house production/consumption + * - Industry production changes, closure, and spawning + * - Town growth + * - Company age and periodical finance stats + * - Vehicle age and profit statistics, both individual and group + * - Vehicle aging, depreciation, reliability, and renewal + * - Payment intervals for running and maintenance costs, loan interest, etc. + * - Cargo payment "time" calculation + * - Local authority and station ratings change intervals + */ +class TimerGameEconomy : public TimerGame { +public: + static Year year; ///< Current year, starting at 0. + static Month month; ///< Current month (0..11). + static Date date; ///< Current date in days (day counter). + static DateFract date_fract; ///< Fractional part of the day. + + static void SetDate(Date date, DateFract fract); +}; + +/** + * Storage class for Economy time constants. + */ +class EconomyTime : public TimerGameConst {}; + +#endif /* TIMER_GAME_ECONOMY_H */ diff --git a/src/timetable.h b/src/timetable.h index 5f8bb2d6ec..16b6ceb03f 100644 --- a/src/timetable.h +++ b/src/timetable.h @@ -11,10 +11,10 @@ #define TIMETABLE_H #include "timer/timer_game_tick.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "vehicle_type.h" -static const TimerGameCalendar::Year MAX_TIMETABLE_START_YEARS = 15; ///< The maximum start date offset, in years. +static const TimerGameEconomy::Year MAX_TIMETABLE_START_YEARS = 15; ///< The maximum start date offset, in economy years. enum class TimetableMode : uint8_t { Days, @@ -22,8 +22,8 @@ enum class TimetableMode : uint8_t { Ticks, }; -TimerGameTick::TickCounter GetStartTickFromDate(TimerGameCalendar::Date start_date); -TimerGameCalendar::Date GetDateFromStartTick(TimerGameTick::TickCounter start_tick); +TimerGameTick::TickCounter GetStartTickFromDate(TimerGameEconomy::Date start_date); +TimerGameEconomy::Date GetDateFromStartTick(TimerGameTick::TickCounter start_tick); void ShowTimetableWindow(const Vehicle *v); void UpdateVehicleTimetable(Vehicle *v, bool travelling); diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 9c923bdeff..5e70b09147 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -11,7 +11,7 @@ #include "command_func.h" #include "company_func.h" #include "timer/timer_game_tick.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "window_func.h" #include "vehicle_base.h" #include "timetable_cmd.h" @@ -26,13 +26,13 @@ * @param start_date The date when the timetable starts. * @return The first tick of this date. */ -TimerGameTick::TickCounter GetStartTickFromDate(TimerGameCalendar::Date start_date) +TimerGameTick::TickCounter GetStartTickFromDate(TimerGameEconomy::Date start_date) { /* Calculate the offset in ticks from the current date. */ - TimerGameTick::Ticks tick_offset = (start_date - TimerGameCalendar::date).base() * Ticks::DAY_TICKS; + TimerGameTick::Ticks tick_offset = (start_date - TimerGameEconomy::date).base() * Ticks::DAY_TICKS; /* Compensate for the current date_fract. */ - tick_offset -= TimerGameCalendar::date_fract; + tick_offset -= TimerGameEconomy::date_fract; /* Return the current tick plus the offset. */ return TimerGameTick::counter + tick_offset; @@ -43,16 +43,16 @@ TimerGameTick::TickCounter GetStartTickFromDate(TimerGameCalendar::Date start_da * @param start_tick The TimerGameTick::TickCounter when the timetable starts. * @return The date when we reach this tick. */ -TimerGameCalendar::Date GetDateFromStartTick(TimerGameTick::TickCounter start_tick) +TimerGameEconomy::Date GetDateFromStartTick(TimerGameTick::TickCounter start_tick) { /* Calculate the offset in ticks from the current counter tick. */ TimerGameTick::Ticks tick_offset = start_tick - TimerGameTick::counter; /* Compensate for the current date_fract. */ - tick_offset += TimerGameCalendar::date_fract; + tick_offset += TimerGameEconomy::date_fract; /* Return the current date plus the offset in days. */ - return TimerGameCalendar::date + (tick_offset / Ticks::DAY_TICKS); + return TimerGameEconomy::date + (tick_offset / Ticks::DAY_TICKS); } /** @@ -347,21 +347,21 @@ CommandCost CmdSetTimetableStart(DoCommandFlag flags, VehicleID veh_id, bool tim TimerGameTick::Ticks total_duration = v->orders->GetTimetableTotalDuration(); - TimerGameCalendar::Date start_date = GetDateFromStartTick(start_tick); + TimerGameEconomy::Date start_date = GetDateFromStartTick(start_tick); /* Don't let a timetable start at an invalid date. */ - if (start_date < 0 || start_date > CalendarTime::MAX_DATE) return CMD_ERROR; + if (start_date < 0 || start_date > EconomyTime::MAX_DATE) return CMD_ERROR; /* Don't let a timetable start more than 15 years into the future... */ - if (start_date - TimerGameCalendar::date > TimerGameCalendar::DateAtStartOfYear(MAX_TIMETABLE_START_YEARS)) return CMD_ERROR; + if (start_date - TimerGameEconomy::date > TimerGameEconomy::DateAtStartOfYear(MAX_TIMETABLE_START_YEARS)) return CMD_ERROR; /* ...or 1 year in the past. */ - if (TimerGameCalendar::date - start_date > CalendarTime::DAYS_IN_LEAP_YEAR) return CMD_ERROR; + if (TimerGameEconomy::date - start_date > EconomyTime::DAYS_IN_LEAP_YEAR) return CMD_ERROR; /* If trying to distribute start dates over a shared order group, we need to know the total duration. */ if (timetable_all && !v->orders->IsCompleteTimetable()) return CommandCost(STR_ERROR_TIMETABLE_INCOMPLETE); /* Don't allow invalid start dates for other vehicles in the shared order group. */ - if (timetable_all && start_date + (total_duration / Ticks::DAY_TICKS) > CalendarTime::MAX_DATE) return CMD_ERROR; + if (timetable_all && start_date + (total_duration / Ticks::DAY_TICKS) > EconomyTime::MAX_DATE) return CMD_ERROR; if (flags & DC_EXEC) { std::vector vehs; diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 80a523e035..01d7aa9496 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -20,7 +20,7 @@ #include "company_func.h" #include "timer/timer.h" #include "timer/timer_game_tick.h" -#include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_window.h" #include "date_gui.h" #include "vehicle_gui.h" @@ -192,7 +192,7 @@ static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID * @param w the window related to the setting of the date * @param date the actually chosen date */ -static void ChangeTimetableStartCallback(const Window *w, TimerGameCalendar::Date date, void *data) +static void ChangeTimetableStartCallback(const Window *w, TimerGameEconomy::Date date, void *data) { Command::Post(STR_ERROR_CAN_T_TIMETABLE_VEHICLE, (VehicleID)w->window_number, reinterpret_cast(data) != 0, GetStartTickFromDate(date)); } @@ -235,7 +235,7 @@ struct TimetableWindow : Window { TimerGameTick::Ticks start_time = -v->current_order_time; /* If arrival and departure times are in days, compensate for the current date_fract. */ - if (_settings_client.gui.timetable_mode != TimetableMode::Seconds) start_time += TimerGameCalendar::date_fract; + if (_settings_client.gui.timetable_mode != TimetableMode::Seconds) start_time += TimerGameEconomy::date_fract; FillTimetableArrivalDepartureTable(v, v->cur_real_order_index % v->GetNumOrders(), travelling, table, start_time); @@ -252,7 +252,7 @@ struct TimetableWindow : Window { SetDParamMaxDigits(1, 4, FS_SMALL); size->width = std::max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_SECONDS_IN_FUTURE).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_SECONDS_IN_FUTURE).width) + WidgetDimensions::scaled.hsep_wide + padding.width; } else { - SetDParamMaxValue(1, TimerGameCalendar::DateAtStartOfYear(CalendarTime::MAX_YEAR), 0, FS_SMALL); + SetDParamMaxValue(1, TimerGameEconomy::DateAtStartOfYear(EconomyTime::MAX_YEAR), 0, FS_SMALL); size->width = std::max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_DATE).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_DATE).width) + WidgetDimensions::scaled.hsep_wide + padding.width; } FALLTHROUGH; @@ -525,7 +525,7 @@ struct TimetableWindow : Window { DrawString(tr.left, tr.right, tr.top, STR_TIMETABLE_ARRIVAL_SECONDS_IN_FUTURE, i == selected ? TC_WHITE : TC_BLACK); } else { /* Show a date. */ - SetDParam(1, TimerGameCalendar::date + (arr_dep[i / 2].arrival + this_offset) / Ticks::DAY_TICKS); + SetDParam(1, TimerGameEconomy::date + (arr_dep[i / 2].arrival + this_offset) / Ticks::DAY_TICKS); DrawString(tr.left, tr.right, tr.top, STR_TIMETABLE_ARRIVAL_DATE, i == selected ? TC_WHITE : TC_BLACK); } } @@ -538,7 +538,7 @@ struct TimetableWindow : Window { DrawString(tr.left, tr.right, tr.top, STR_TIMETABLE_DEPARTURE_SECONDS_IN_FUTURE, i == selected ? TC_WHITE : TC_BLACK); } else { /* Show a date. */ - SetDParam(1, TimerGameCalendar::date + (arr_dep[i / 2].departure + offset) / Ticks::DAY_TICKS); + SetDParam(1, TimerGameEconomy::date + (arr_dep[i / 2].departure + offset) / Ticks::DAY_TICKS); DrawString(tr.left, tr.right, tr.top, STR_TIMETABLE_DEPARTURE_DATE, i == selected ? TC_WHITE : TC_BLACK); } } @@ -572,7 +572,7 @@ struct TimetableWindow : Window { SetDParam(0, (static_cast(v->timetable_start - TimerGameTick::counter) / Ticks::TICKS_PER_SECOND)); DrawString(tr, STR_TIMETABLE_STATUS_START_IN_SECONDS); } else { - /* Calendar units use dates. */ + /* Other units use dates. */ SetDParam(0, STR_JUST_DATE_TINY); SetDParam(1, GetDateFromStartTick(v->timetable_start)); DrawString(tr, STR_TIMETABLE_STATUS_START_AT_DATE); @@ -643,7 +643,7 @@ struct TimetableWindow : Window { this->change_timetable_all = _ctrl_pressed; ShowQueryString(STR_EMPTY, STR_TIMETABLE_START_SECONDS_QUERY, 6, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED); } else { - ShowSetDateWindow(this, v->index, TimerGameCalendar::date, TimerGameCalendar::year, TimerGameCalendar::year + MAX_TIMETABLE_START_YEARS, ChangeTimetableStartCallback, reinterpret_cast(static_cast(_ctrl_pressed))); + ShowSetDateWindow(this, v->index, TimerGameEconomy::date, TimerGameEconomy::year, TimerGameEconomy::year + MAX_TIMETABLE_START_YEARS, ChangeTimetableStartCallback, reinterpret_cast(static_cast(_ctrl_pressed))); } break; diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index dab9ff0dc8..9fa9788258 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1103,10 +1103,18 @@ void ToggleWidgetOutlines() void SetStartingYear(TimerGameCalendar::Year year) { _settings_game.game_creation.starting_year = Clamp(year, CalendarTime::MIN_YEAR, CalendarTime::MAX_YEAR); - TimerGameCalendar::Date new_date = TimerGameCalendar::ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1); - /* If you open a savegame as scenario there may already be link graphs.*/ - LinkGraphSchedule::instance.ShiftDates(new_date - TimerGameCalendar::date); - TimerGameCalendar::SetDate(new_date, 0); + TimerGameCalendar::Date new_calendar_date = TimerGameCalendar::ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1); + TimerGameEconomy::Date new_economy_date = new_calendar_date.base(); + + /* We must set both Calendar and Economy dates to keep them in sync. Calendar first. */ + TimerGameCalendar::SetDate(new_calendar_date, 0); + + /* If you open a savegame as a scenario, there may already be link graphs and/or vehicles. These use economy date. */ + LinkGraphSchedule::instance.ShiftDates(new_economy_date - TimerGameEconomy::date); + for (auto v : Vehicle::Iterate()) v->ShiftDates(new_economy_date - TimerGameEconomy::date); + + /* Only change the date after changing cached values above. */ + TimerGameEconomy::SetDate(new_economy_date, 0); } /** diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 8a40d3d457..f9e78fc902 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -54,6 +54,7 @@ #include "tunnelbridge_cmd.h" #include "timer/timer.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_game_tick.h" #include "table/strings.h" @@ -3837,7 +3838,7 @@ CommandCost CheckforTownRating(DoCommandFlag flags, Town *t, TownRatingCheckType return CommandCost(); } -static IntervalTimer _towns_monthly({TimerGameCalendar::MONTH, TimerGameCalendar::Priority::TOWN}, [](auto) +static IntervalTimer _economy_towns_monthly({TimerGameEconomy::MONTH, TimerGameEconomy::Priority::TOWN}, [](auto) { for (Town *t : Town::Iterate()) { /* Check for active town actions and decrement their counters. */ @@ -3864,7 +3865,7 @@ static IntervalTimer _towns_monthly({TimerGameCalendar::MONTH } }); -static IntervalTimer _towns_yearly({TimerGameCalendar::YEAR, TimerGameCalendar::Priority::TOWN}, [](auto) +static IntervalTimer _economy_towns_yearly({TimerGameEconomy::YEAR, TimerGameEconomy::Priority::TOWN}, [](auto) { /* Increment house ages */ for (TileIndex t = 0; t < Map::Size(); t++) { diff --git a/src/train.h b/src/train.h index 460a1cd365..f863250e5c 100644 --- a/src/train.h +++ b/src/train.h @@ -123,7 +123,8 @@ struct Train FINAL : public GroundVehicle { int GetDisplayImageWidth(Point *offset = nullptr) const; bool IsInDepot() const override { return this->track == TRACK_BIT_DEPOT; } bool Tick() override; - void OnNewDay() override; + void OnNewCalendarDay() override; + void OnNewEconomyDay() override; uint Crash(bool flooded = false) override; Trackdir GetVehicleTrackdir() const override; TileIndex GetOrderStationLocation(StationID station) override; diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 544cd35ef9..5d019380d2 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -38,6 +38,7 @@ #include "train_cmd.h" #include "misc_cmd.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "table/strings.h" #include "table/train_sprites.h" @@ -653,7 +654,7 @@ static CommandCost CmdBuildRailWagon(DoCommandFlag flags, TileIndex tile, const v->railtype = rvi->railtype; - v->date_of_last_service = TimerGameCalendar::date; + v->date_of_last_service = TimerGameEconomy::date; v->date_of_last_service_newgrf = TimerGameCalendar::date; v->build_year = TimerGameCalendar::year; v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY); @@ -787,7 +788,7 @@ CommandCost CmdBuildRailVehicle(DoCommandFlag flags, TileIndex tile, const Engin v->railtype = rvi->railtype; v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_trains); - v->date_of_last_service = TimerGameCalendar::date; + v->date_of_last_service = TimerGameEconomy::date; v->date_of_last_service_newgrf = TimerGameCalendar::date; v->build_year = TimerGameCalendar::year; v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY); @@ -4163,11 +4164,15 @@ static void CheckIfTrainNeedsService(Train *v) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } -/** Update day counters of the train vehicle. */ -void Train::OnNewDay() +/** Calendar day handler. */ +void Train::OnNewCalendarDay() { AgeVehicle(this); +} +/** Economy day handler. */ +void Train::OnNewEconomyDay() +{ if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this); if (this->IsFrontEngine()) { diff --git a/src/vehicle.cpp b/src/vehicle.cpp index a383de7a44..b2f5e37c90 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -58,6 +58,7 @@ #include "newgrf_roadstop.h" #include "timer/timer.h" #include "timer/timer_game_calendar.h" +#include "timer/timer_game_economy.h" #include "timer/timer_game_tick.h" #include "table/strings.h" @@ -169,7 +170,7 @@ void VehicleServiceInDepot(Vehicle *v) SetWindowDirty(WC_VEHICLE_DETAILS, v->index); // ensure that last service date and reliability are updated do { - v->date_of_last_service = TimerGameCalendar::date; + v->date_of_last_service = TimerGameEconomy::date; v->date_of_last_service_newgrf = TimerGameCalendar::date; v->breakdowns_since_last_service = 0; v->reliability = v->GetEngine()->reliability; @@ -196,7 +197,7 @@ bool Vehicle::NeedsServicing() const const Company *c = Company::Get(this->owner); if (this->ServiceIntervalIsPercent() ? (this->reliability >= this->GetEngine()->reliability * (100 - this->GetServiceInterval()) / 100) : - (this->date_of_last_service + this->GetServiceInterval() >= TimerGameCalendar::date)) { + (this->date_of_last_service + this->GetServiceInterval() >= TimerGameEconomy::date)) { return false; } @@ -766,9 +767,9 @@ uint32_t Vehicle::GetGRFID() const * This is useful if the date has been modified with the cheat menu. * @param interval Number of days to be added or substracted. */ -void Vehicle::ShiftDates(TimerGameCalendar::Date interval) +void Vehicle::ShiftDates(TimerGameEconomy::Date interval) { - this->date_of_last_service = std::max(this->date_of_last_service + interval, TimerGameCalendar::Date(0)); + this->date_of_last_service = std::max(this->date_of_last_service + interval, TimerGameEconomy::Date(0)); /* date_of_last_service_newgrf is not updated here as it must stay stable * for vehicles outside of a depot. */ } @@ -915,17 +916,32 @@ void VehicleEnteredDepotThisTick(Vehicle *v) v->vehstatus |= VS_STOPPED; } +/** + * Age all vehicles, spreading out the action using the current TimerGameCalendar::date_fract. + */ +void RunVehicleCalendarDayProc() +{ + if (_game_mode != GM_NORMAL) return; + + /* Run the calendar day proc for every DAY_TICKS vehicle starting at TimerGameCalendar::date_fract. */ + for (size_t i = TimerGameCalendar::date_fract; i < Vehicle::GetPoolSize(); i += Ticks::DAY_TICKS) { + Vehicle *v = Vehicle::Get(i); + if (v == nullptr) continue; + v->OnNewCalendarDay(); + } +} + /** * Increases the day counter for all vehicles and calls 1-day and 32-day handlers. - * Each tick, it processes vehicles with "index % DAY_TICKS == TimerGameCalendar::date_fract", + * Each tick, it processes vehicles with "index % DAY_TICKS == TimerGameEconomy::date_fract", * so each day, all vehicles are processes in DAY_TICKS steps. */ -static void RunVehicleDayProc() +static void RunEconomyVehicleDayProc() { if (_game_mode != GM_NORMAL) return; - /* Run the day_proc for every DAY_TICKS vehicle starting at TimerGameCalendar::date_fract. */ - for (size_t i = TimerGameCalendar::date_fract; i < Vehicle::GetPoolSize(); i += Ticks::DAY_TICKS) { + /* Run the economy day proc for every DAY_TICKS vehicle starting at TimerGameEconomy::date_fract. */ + for (size_t i = TimerGameEconomy::date_fract; i < Vehicle::GetPoolSize(); i += Ticks::DAY_TICKS) { Vehicle *v = Vehicle::Get(i); if (v == nullptr) continue; @@ -946,7 +962,7 @@ static void RunVehicleDayProc() } /* This is called once per day for each vehicle, but not in the first tick of the day */ - v->OnNewDay(); + v->OnNewEconomyDay(); } } @@ -954,7 +970,7 @@ void CallVehicleTicks() { _vehicles_to_autoreplace.clear(); - RunVehicleDayProc(); + RunEconomyVehicleDayProc(); { PerformanceMeasurer framerate(PFE_GL_ECONOMY); @@ -2819,7 +2835,7 @@ void Vehicle::RemoveFromShared() this->previous_shared = nullptr; } -static IntervalTimer _vehicles_yearly({TimerGameCalendar::YEAR, TimerGameCalendar::Priority::VEHICLE}, [](auto) +static IntervalTimer _economy_vehicles_yearly({TimerGameEconomy::YEAR, TimerGameEconomy::Priority::VEHICLE}, [](auto) { for (Vehicle *v : Vehicle::Iterate()) { if (v->IsPrimaryVehicle()) { diff --git a/src/vehicle_base.h b/src/vehicle_base.h index b1ddea8a61..313ec18346 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -287,8 +287,8 @@ public: TimerGameCalendar::Year build_year; ///< Year the vehicle has been built. TimerGameCalendar::Date age; ///< Age in days TimerGameCalendar::Date max_age; ///< Maximum age - TimerGameCalendar::Date date_of_last_service; ///< Last date the vehicle had a service at a depot. - TimerGameCalendar::Date date_of_last_service_newgrf; ///< Last date the vehicle had a service at a depot, unchanged by the date cheat to protect against unsafe NewGRF behavior. + TimerGameEconomy::Date date_of_last_service; ///< Last economy date the vehicle had a service at a depot. + TimerGameCalendar::Date date_of_last_service_newgrf; ///< Last calendar date the vehicle had a service at a depot, unchanged by the date cheat to protect against unsafe NewGRF behavior. uint16_t reliability; ///< Reliability. uint16_t reliability_spd_dec; ///< Reliability decrease speed. byte breakdown_ctr; ///< Counter for managing breakdown events. @see Vehicle::HandleBreakdown @@ -567,11 +567,16 @@ public: virtual bool Tick() { return true; }; /** - * Calls the new day handler of the vehicle + * Calls the new calendar day handler of the vehicle. */ - virtual void OnNewDay() {}; + virtual void OnNewCalendarDay() {}; - void ShiftDates(TimerGameCalendar::Date interval); + /** + * Calls the new economy day handler of the vehicle. + */ + virtual void OnNewEconomyDay() {}; + + void ShiftDates(TimerGameEconomy::Date interval); /** * Crash the (whole) vehicle chain. diff --git a/src/vehicle_func.h b/src/vehicle_func.h index 7595c9478b..f2d67227d5 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -62,6 +62,7 @@ CommandCost TunnelBridgeIsFree(TileIndex tile, TileIndex endtile, const Vehicle void DecreaseVehicleValue(Vehicle *v); void CheckVehicleBreakdown(Vehicle *v); void AgeVehicle(Vehicle *v); +void RunVehicleCalendarDayProc(); void VehicleEnteredDepotThisTick(Vehicle *v); UnitID GetFreeUnitNumber(VehicleType type); diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index eb6484651a..3fb3e02895 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -2431,7 +2431,7 @@ struct VehicleDetailsWindow : Window { case WID_VD_SERVICING_INTERVAL: SetDParamMaxValue(0, MAX_SERVINT_DAYS); // Roughly the maximum interval - SetDParamMaxValue(1, TimerGameCalendar::DateAtStartOfYear(CalendarTime::MAX_YEAR)); // Roughly the maximum year + SetDParamMaxValue(1, TimerGameEconomy::DateAtStartOfYear(EconomyTime::MAX_YEAR)); // Roughly the maximum year size->width = std::max( GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT).width, GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS).width From 786cc85e86719f3b18b10572b4f876091ba234e7 Mon Sep 17 00:00:00 2001 From: translators Date: Mon, 22 Jan 2024 18:40:42 +0000 Subject: [PATCH 02/52] Update: Translations from eints english (au): 155 changes by krysclarke norwegian (bokmal): 9 changes by v0nNemizez english (us): 155 changes by 2TallTyler chinese (simplified): 9 changes by WenSimEHRP russian: 41 changes by Ln-Wolf finnish: 1 change by hpiirai --- src/lang/english_AU.txt | 310 ++++++++++++++++---------------- src/lang/english_US.txt | 310 ++++++++++++++++---------------- src/lang/finnish.txt | 2 +- src/lang/norwegian_bokmal.txt | 9 + src/lang/russian.txt | 82 ++++----- src/lang/simplified_chinese.txt | 18 +- 6 files changed, 370 insertions(+), 361 deletions(-) diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index c409709897..79749d427b 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -282,7 +282,7 @@ STR_TOOLTIP_RESIZE :{BLACK}Click an STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Toggle large/small window size STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list up/down STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list left/right -STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolish buildings etc. on a square of land. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolish buildings etc. on a square of land. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only # Show engines button ###length VEHICLE_TYPES @@ -370,32 +370,32 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Pause ga STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Fast forward the game STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Options and settings STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Save, load or abandon game, exit program -STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Display map, extra viewport, cargo flow or list of signs -STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Display town directory -STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Display subsidies -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Display list of company's stations -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Display company finances information -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Display general company information -STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Display story book -STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Display goal list -STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Display company graphs and cargo payment rates -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Display company league table -STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Examine industries or fund construction of a new industry -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Display list of company's trains. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Display list of company's road vehicles. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Display list of company's ships. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Display list of company's aircraft. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom the view in -STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom the view out -STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track -STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Build roads -STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Build tramways -STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Build ship docks +STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Open map, extra viewport, cargo flow or list of signs +STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Open town directory or found town +STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Open subsidy list +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Open list of company's stations +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Open company finances information +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Open general company information +STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Open story book +STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Open goal list +STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Open company graphs and cargo payment rates +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Open company league table +STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Open industry directory, industry chain, or fund construction of a new industry +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Open list of company's trains. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Open list of company's road vehicles. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Open list of company's ships. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Open list of company's aircraft. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom in +STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom out +STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway infrastructure +STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Build road infrastructure +STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Build tramway infrastructure +STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Build waterway infrastructure STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Build airports -STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open the landscaping toolbar to raise/lower land, plant trees, etc. -STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Show sound/music window -STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Show last message/news report, messages history or delete all messages -STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Land area information, screenshot, about OpenTTD and developer tools +STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open landscaping menu, tree menu, or place a sign +STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Open sound/music window +STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Open last message/news report, messages history or delete all messages +STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Open land information, screenshot menu, OpenTTD credits, or developer tools STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Switch toolbars # Extra tooltips for the scenario editor toolbar @@ -405,15 +405,15 @@ STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Scenari STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Move the starting date backward 1 year STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Move the starting date forward 1 year STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Click to enter the starting year -STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Display map, town directory -STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Landscape generation -STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Town generation -STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industry generation -STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Road construction -STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Tramway construction -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Open map, extra viewport, sign list, or town or industry directory +STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Open landscaping menu or generate a new world +STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Build or generate towns +STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Build or generate industries +STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Build road infrastructure +STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Build tramway infrastructure +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Place sign -STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only # Scenario editor file menu ###length 7 @@ -1037,7 +1037,7 @@ STR_GAME_OPTIONS_VIDEO_VSYNC_TOOLTIP :{BLACK}Check th STR_GAME_OPTIONS_VIDEO_DRIVER_INFO :{BLACK}Current driver: {STRING} STR_GAME_OPTIONS_GUI_SCALE_FRAME :{BLACK}Interface size -STR_GAME_OPTIONS_GUI_SCALE_TOOLTIP :{BLACK}Drag slider to set interface size. Hold Ctrl for continuous adjustment +STR_GAME_OPTIONS_GUI_SCALE_TOOLTIP :{BLACK}Drag slider to set interface size. Ctrl+Drag for continuous adjustment STR_GAME_OPTIONS_GUI_SCALE_AUTO :{BLACK}Auto-detect size STR_GAME_OPTIONS_GUI_SCALE_AUTO_TOOLTIP :{BLACK}Check this box to detect interface size automatically @@ -1334,7 +1334,7 @@ STR_CONFIG_SETTING_FORBID_90_DEG :Forbid trains a STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :90 degree turns occur when a horizontal track is directly followed by a vertical track piece on the adjacent tile, thus making the train turn by 90 degree when traversing the tile edge instead of the usual 45 degrees for other track combinations. This also applies to the turning radius of ships STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Allow to join stations not directly adjacent: {STRING} -STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Allow adding parts to a station without directly touching the existing parts. Needs Ctrl+Click while placing the new parts +STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Allow adding parts to a station without directly touching the existing parts, by Ctrl+Clicking while placing the new parts STR_CONFIG_SETTING_INFLATION :Inflation: {STRING} STR_CONFIG_SETTING_INFLATION_HELPTEXT :Enable inflation in the economy, where costs are rising slightly faster than payments @@ -1874,7 +1874,7 @@ STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :Automatically b STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Set the year when electric signals will be used for tracks. Before this year, non-electric signals will be used (which have the exact same function, but different looks) STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Cycle through signal types: {STRING} -STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Select which signal types to cycle through when Ctrl+clicking on a built signal with the signal tool +STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Select which signal types to cycle through when Ctrl+Clicking on a built signal with the signal tool ###length 2 STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Path signals only STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :All visible @@ -2147,14 +2147,14 @@ STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Select ' STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Select 'sub-tropical' landscape style STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Select 'toyland' landscape style -STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Display game options -STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Display highscore table +STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Open game options +STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Open highscore table STR_INTRO_TOOLTIP_HELP :{BLACK}Get access to documentation and online resources -STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Display settings -STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Display NewGRF settings +STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Open settings +STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Open NewGRF settings STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Check for new and updated content to download -STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Display AI settings -STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Display Game script settings +STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Open AI settings +STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Open Game script settings STR_INTRO_TOOLTIP_QUIT :{BLACK}Exit 'OpenTTD' STR_INTRO_BASESET :{BLACK}The currently selected base graphics set is missing {NUM} sprite{P "" s}. Please check for updates for the baseset. @@ -2212,8 +2212,8 @@ STR_LIVERY_TRAIN_GROUP_TOOLTIP :{BLACK}Show col STR_LIVERY_ROAD_VEHICLE_GROUP_TOOLTIP :{BLACK}Show colours of road vehicle groups STR_LIVERY_SHIP_GROUP_TOOLTIP :{BLACK}Show colours of ship groups STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP :{BLACK}Show colours of aircraft groups -STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary colour for the selected scheme. Ctrl+Click will set this colour for every scheme -STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary colour for the selected scheme. Ctrl+Click will set this colour for every scheme +STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary colour for the selected scheme. Ctrl+Click to set this colour for every scheme +STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary colour for the selected scheme. Ctrl+Click to set this colour for every scheme STR_LIVERY_PANEL_TOOLTIP :{BLACK}Select a colour scheme to change, or multiple schemes with Ctrl+Click. Click on the box to toggle use of the scheme STR_LIVERY_TRAIN_GROUP_EMPTY :No train groups are set up STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY :No road vehicle groups are set up @@ -2726,16 +2726,16 @@ STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Electrified Rai STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Monorail Construction STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Maglev Construction -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track. Ctrl toggles build/remove for railway construction. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Build railway track using the Autorail mode. Ctrl toggles build/remove for railway construction. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Build train depot (for buying and servicing trains). Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Build waypoint on railway. Ctrl enables joining waypoints. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Build railway station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Build signal on railway. Ctrl toggles semaphore/light signals{}Dragging builds signals along a straight stretch of rail. Ctrl builds signals up to the next junction or signal{}Ctrl+Click toggles opening the signal selection window. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Build railway bridge. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Build railway tunnel. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Toggle build/remove for railway track, signals, waypoints and stations. Hold Ctrl to also remove the rail of waypoints and stations -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Convert/Upgrade the type of rail. Shift toggles building/showing cost estimate +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track. Ctrl+Click to remove railway track. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Build railway track using the Autorail mode. Ctrl+Click to remove railway track. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Build train depot (for buying and servicing trains). Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Build waypoint on railway. Ctrl+Click to select another waypoint to join. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Build railway station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Build signal on railway. Ctrl+Click to build the alternate signal style{}Click+Drag to fill the selected section of rail with signals at the chosen spacing. Ctrl+Click+Drag to fill signals up to the next junction, station, or signal. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Build railway bridge. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Build railway tunnel. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Toggle build/remove for railway track, signals, waypoints and stations. Ctrl+Click to also remove the rail of waypoints and stations +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Convert/Upgrade the type of rail. Also press Shift to show cost estimate only STR_RAIL_NAME_RAILROAD :Railway STR_RAIL_NAME_ELRAIL :Electrified railway @@ -2785,7 +2785,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Exit Sig STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combo Signal (electric){}The combo signal simply acts as both an entry and exit signal. This allows you to build large "trees" of pre-signals STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side -STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}When selected, clicking an existing signal will convert it to the selected signal type and variant. Ctrl+Click will toggle the existing variant. Shift+Click shows estimated conversion cost +STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}Click an existing signal to convert it to the selected signal type and variant. Ctrl+Click to toggle the existing variant. Shift+Click shows estimated conversion cost STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal density STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal density STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal density @@ -2811,25 +2811,25 @@ STR_BRIDGE_TUBULAR_SILICON :Tubular, Silico # Road construction toolbar STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Road Construction STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Tramway Construction -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Build road section. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Build tramway section. Ctrl toggles build/remove for tramway construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build road section using the Autoroad mode. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build tramway section using the Autotram mode. Ctrl toggles build/remove for tramway construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and servicing vehicles). Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build tram vehicle depot (for buying and servicing vehicles). Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger tram station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build lorry station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Build freight tram station. Ctrl enables joining stations. Shift toggles building/showing cost estimate +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Build road section. Ctrl+Click to remove road section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Build tramway section. Ctrl+Click to remove tramway section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build road section using the Autoroad mode. Ctrl+Click to remove road section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build tramway section using the Autotram mode. Ctrl+Click to remove tramway section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and servicing vehicles). Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build tram vehicle depot (for buying and servicing vehicles). Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger tram station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build lorry station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Build freight tram station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activate/Deactivate one way roads -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Build road bridge. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Build tramway bridge. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Build road tunnel. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Build tramway tunnel. Shift toggles building/showing cost estimate +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Build road bridge. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Build tramway bridge. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Build road tunnel. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Build tramway tunnel. Also press Shift to show cost estimate only STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Toggle build/remove for road construction STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Toggle build/remove for tramway construction -STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Convert/Upgrade the type of road. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convert/Upgrade the type of tram. Shift toggles building/showing cost estimate +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Convert/Upgrade the type of road. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convert/Upgrade the type of tram. Also press Shift to show cost estimate only STR_ROAD_NAME_ROAD :Road STR_ROAD_NAME_TRAM :Tramway @@ -2853,14 +2853,14 @@ STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Select f # Waterways toolbar (last two for SE only) STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Waterways Construction STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Waterways -STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Build canals. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Build locks. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for buying and servicing ships). Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Build aqueduct. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Define water area.{}Make a canal, unless Ctrl is held down at sea level, when it will flood the surroundings instead -STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Place rivers. Ctrl selects the area diagonally +STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Build canals. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Build locks. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for buying and servicing ships). Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Build aqueduct. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Build canal. Ctrl+Click at sea level to flood with sea water instead +STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Place rivers. Ctrl+Click to select diagonally # Ship depot construction window STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Ship Depot Orientation @@ -2871,7 +2871,7 @@ STR_STATION_BUILD_DOCK_CAPTION :{WHITE}Dock # Airport toolbar STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Airports -STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport. Ctrl enables joining stations. Shift toggles building/showing cost estimate +STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only # Airport construction window STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Airport Selection @@ -2898,14 +2898,14 @@ STR_STATION_BUILD_NOISE :{BLACK}Noise ge # Landscaping toolbar STR_LANDSCAPING_TOOLBAR :{WHITE}Landscaping -STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Lower a corner of land. Dragging lowers the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate -STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a corner of land. Dragging raises the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate -STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate -STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Lower a corner of land. Click+Drag to lower the first selected corner and level the selected area to the new corner height. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a corner of land. Click+Drag to raise the first selected corner and level the selected area to the new corner height. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only # Object construction window STR_OBJECT_BUILD_CAPTION :{WHITE}Object Selection -STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Select class of the object to build STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Preview of the object STR_OBJECT_BUILD_SIZE :{BLACK}Size: {GOLD}{NUM} x {NUM} tiles @@ -2917,7 +2917,7 @@ STR_OBJECT_CLASS_TRNS :Transmitters STR_PLANT_TREE_CAPTION :{WHITE}Trees STR_PLANT_TREE_TOOLTIP :{BLACK}Select tree type to plant. If the tile already has a tree, this will add more trees of mixed types independent of the selected type STR_TREES_RANDOM_TYPE :{BLACK}Trees of random type -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Random Trees STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plant trees randomly throughout the landscape STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal @@ -2930,7 +2930,7 @@ STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Plant la # Land generation window (SE) STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Land Generation STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Place rocky areas on landscape -STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Hold Ctrl to remove it +STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Ctrl+Click to remove desert area STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Increase area of land to lower/raise STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Decrease area of land to lower/raise STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Generate random land @@ -2944,7 +2944,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Are you # Town generation window (SE) STR_FOUND_TOWN_CAPTION :{WHITE}Town Generation STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}New Town -STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town. Shift+Click shows only estimated cost +STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town. Also press Shift to show cost estimate only STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Random Town STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Found town in random location STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Many random towns @@ -3010,7 +3010,7 @@ STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Select t # Land area window STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Land Area Information -STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Centre the main view on tile location. Ctrl+Click opens a new viewport on tile location +STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Centre the main view on tile location. Ctrl+Click to open a new viewport on tile location STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Cost to clear: {LTBLUE}N/A STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Cost to clear: {RED}{CURRENCY_LONG} STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Revenue when cleared: {LTBLUE}{CURRENCY_LONG} @@ -3257,11 +3257,11 @@ STR_MAPGEN_VARIETY :{BLACK}Variety STR_MAPGEN_GENERATE :{WHITE}Generate STR_MAPGEN_GENERATE_TOOLTIP :{BLACK}Create the world and play OpenTTD! STR_MAPGEN_NEWGRF_SETTINGS :{BLACK}NewGRF Settings -STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Display NewGRF settings +STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Open NewGRF settings STR_MAPGEN_AI_SETTINGS :{BLACK}AI Settings -STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Display AI settings +STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Open AI settings STR_MAPGEN_GS_SETTINGS :{BLACK}Game Script Settings -STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Display game script settings +STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Open game script settings ###length 21 STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH :English (Original) @@ -3537,7 +3537,7 @@ STR_SIGN_LIST_MATCH_CASE_TOOLTIP :{BLACK}Toggle m # Sign window STR_EDIT_SIGN_CAPTION :{WHITE}Edit sign text -STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Centre the main view on sign location. Ctrl+Click opens a new viewport on sign location +STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Centre the main view on sign location. Ctrl+Click to open a new viewport on sign location STR_EDIT_SIGN_NEXT_SIGN_TOOLTIP :{BLACK}Go to next sign STR_EDIT_SIGN_PREVIOUS_SIGN_TOOLTIP :{BLACK}Go to previous sign @@ -3548,7 +3548,7 @@ STR_TOWN_DIRECTORY_CAPTION :{WHITE}Towns STR_TOWN_DIRECTORY_NONE :{ORANGE}- None - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) -STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to centre main view on town. Ctrl+Click opens a new viewport on town location +STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to centre main view on town. Ctrl+Click to open a new viewport on town location STR_TOWN_POPULATION :{BLACK}World population: {COMMA} # Town view window @@ -3566,7 +3566,7 @@ STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Town gro STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK}{NBSP}day{P "" s} (funded) STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}Town is {RED}not{BLACK} growing STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Noise limit in town: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centre the main view on town location. Ctrl+Click opens a new viewport on town location +STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centre the main view on town location. Ctrl+Click to open a new viewport on town location STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Local Authority STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP :{BLACK}Show information on local authority STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Change town name @@ -3621,7 +3621,7 @@ STR_GOALS_TEXT :{ORANGE}{STRING STR_GOALS_NONE :{ORANGE}- None - STR_GOALS_PROGRESS :{ORANGE}{STRING} STR_GOALS_PROGRESS_COMPLETE :{GREEN}{STRING} -STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on goal to centre main view on industry/town/tile. Ctrl+Click opens a new viewport on industry/town/tile location +STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on goal to centre main view on industry/town/tile. Ctrl+Click to open a new viewport on industry/town/tile location # Goal question window STR_GOAL_QUESTION_CAPTION_QUESTION :{BLACK}Question @@ -3657,7 +3657,7 @@ STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING STR_SUBSIDIES_NONE :{ORANGE}- None - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidised: STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING} to {STRING}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT}) -STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click opens a new viewport on industry/town location +STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click to open a new viewport on industry/town location # Story book window STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Story Book @@ -3673,8 +3673,8 @@ STR_STORY_BOOK_NEXT_PAGE_TOOLTIP :{BLACK}Go to ne STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Invalid goal reference # Station list window -STR_STATION_LIST_TOOLTIP :{BLACK}Station names - click on name to centre main view on station. Ctrl+Click opens a new viewport on station location -STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Hold Ctrl to select more than one item +STR_STATION_LIST_TOOLTIP :{BLACK}Station names - click on name to centre main view on station. Ctrl+Click to open a new viewport on station location +STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Ctrl+Click to select multiple items STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} Station{P "" s} STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATION_FEATURES} STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT} @@ -3733,7 +3733,7 @@ STR_CARGO_RATING_VERY_GOOD :Very Good STR_CARGO_RATING_EXCELLENT :Excellent STR_CARGO_RATING_OUTSTANDING :Outstanding -STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on station location. Ctrl+Click opens a new viewport on station location +STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on station location. Ctrl+Click to open a new viewport on station location STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Change name of station STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Show all trains which have this station on their schedule @@ -3748,9 +3748,9 @@ STR_STATION_VIEW_CLOSE_AIRPORT_TOOLTIP :{BLACK}Prevent # Waypoint/buoy view window STR_WAYPOINT_VIEW_CAPTION :{WHITE}{WAYPOINT} -STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on waypoint location. Ctrl+Click opens a new viewport on waypoint location +STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on waypoint location. Ctrl+Click to open a new viewport on waypoint location STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME :{BLACK}Change waypoint name -STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on buoy location. Ctrl+Click opens a new viewport on buoy location +STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on buoy location. Ctrl+Click to open a new viewport on buoy location STR_BUOY_VIEW_CHANGE_BUOY_NAME :{BLACK}Change buoy name STR_EDIT_WAYPOINT_NAME :{WHITE}Edit waypoint name @@ -3793,9 +3793,9 @@ STR_FINANCES_MAX_LOAN :{WHITE}Maximum STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG} STR_FINANCES_BANK_BALANCE :{WHITE}{CURRENCY_LONG} STR_FINANCES_BORROW_BUTTON :{BLACK}Borrow {CURRENCY_LONG} -STR_FINANCES_BORROW_TOOLTIP :{BLACK}Increase size of loan. Ctrl+Click borrows as much as possible +STR_FINANCES_BORROW_TOOLTIP :{BLACK}Increase size of loan. Ctrl+Click to borrow as much as possible STR_FINANCES_REPAY_BUTTON :{BLACK}Repay {CURRENCY_LONG} -STR_FINANCES_REPAY_TOOLTIP :{BLACK}Repay part of loan. Ctrl+Click repays as much loan as possible +STR_FINANCES_REPAY_TOOLTIP :{BLACK}Repay part of loan. Ctrl+Click to repay as much loan as possible STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infrastructure # Company view @@ -3824,7 +3824,7 @@ STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Build co STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}View HQ STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}View company headquarters STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Relocate HQ -STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rebuild company headquarters elsewhere for 1% cost of company value. Shift+Click shows estimated cost without relocating HQ +STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rebuild company headquarters elsewhere for 1% cost of company value. Also press Shift to show cost estimate only STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Details STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}View detailed infrastructure counts STR_COMPANY_VIEW_GIVE_MONEY_BUTTON :{BLACK}Give money @@ -3870,7 +3870,7 @@ STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUST STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} and {NUM} more... -STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to centre main view on industry. Ctrl+Click opens a new viewport on industry location +STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to centre main view on industry. Ctrl+Click to open a new viewport on industry location STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER :{BLACK}Accepted cargo: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_PRODUCED_CARGO_FILTER :{BLACK}Produced cargo: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_FILTER_ALL_TYPES :All cargo types @@ -3880,7 +3880,7 @@ STR_INDUSTRY_DIRECTORY_FILTER_NONE :None STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Production last month: STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transported) -STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre the main view on industry location. Ctrl+Click opens a new viewport on industry location +STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre the main view on industry location. Ctrl+Click to open a new viewport on industry location STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! @@ -4019,10 +4019,10 @@ STR_CARGO_TYPE_FILTER_FREIGHT :Freight STR_CARGO_TYPE_FILTER_NONE :None ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list - click on vehicle for information -STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list - click on vehicle for information -STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list - click on ship for information -STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list - click on aircraft for information +STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide this vehicle type +STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide of the vehicle type +STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list. Click on ship for information. Ctrl+Click to show/hide of the ship type +STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list. Click on aircraft for information. Ctrl+Click to show/hide of the aircraft type ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Buy Vehicle @@ -4037,16 +4037,16 @@ STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Buy and STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Buy and Refit Aircraft ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted train vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted road vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted ship. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted aircraft. Shift+Click shows estimated cost without purchase +STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted train vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted road vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted ship. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted aircraft. Also press Shift to show cost estimate only ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted train vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted road vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted ship. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted aircraft. Shift+Click shows estimated cost without purchase +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted train vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted road vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted ship. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted aircraft. Also press Shift to show cost estimate only ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Rename @@ -4096,7 +4096,7 @@ STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} ve STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT}) ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - drag vehicle with left-click to add/remove from train, right-click for information. Hold Ctrl to make both functions apply to the following chain +STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - drag vehicle with left-click to add/remove from train, right-click for information. Ctrl+Click to apply either function to the following chain STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Vehicles - right-click on vehicle for information STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Ships - right-click on ship for information STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft - right-click on aircraft for information @@ -4138,16 +4138,16 @@ STR_DEPOT_CLONE_SHIP :{BLACK}Clone Sh STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Clone Aircraft ###length VEHICLE_TYPES -STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}This will buy a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click share the orders. Shift+Click shows estimated cost without purchase -STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}This will buy a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click will will share the orders. Shift+Click shows estimated cost without purchase -STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}This will buy a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}This will buy a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase +STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Buy a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only +STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Buy a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only +STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Buy a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only +STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Buy a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click to share the orders. Also press Shift to show cost estimate only ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train depot location. Ctrl+Click opens a new viewport on train depot location -STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centre main view on road vehicle depot location. Ctrl+Click opens a new viewport on road depot location -STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship depot location. Ctrl+Click opens a new viewport on ship depot location -STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on hangar location. Ctrl+Click opens a new viewport on hangar location +STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train depot location. Ctrl+Click to open a new viewport on train depot location +STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centre main view on road vehicle depot location. Ctrl+Click to open a new viewport on road depot location +STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship depot location. Ctrl+Click to open a new viewport on ship depot location +STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on hangar location. Ctrl+Click to open a new viewport on hangar location ###length VEHICLE_TYPES STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Get a list of all trains with the current depot in their orders @@ -4248,27 +4248,27 @@ STR_REPLACE_REMOVE_WAGON_GROUP_HELP :{STRING}. Ctrl+ STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE} ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Centre main view on train's location. Double click will follow train in main view. Ctrl+Click opens a new viewport on train's location -STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Centre main view on vehicle's location. Double click will follow vehicle in main view. Ctrl+Click opens a new viewport on vehicle's location -STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Centre main view on ship's location. Double click will follow ship in main view. Ctrl+Click opens a new viewport on ship's location -STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Centre main view on aircraft's location. Double click will follow aircraft in main view. Ctrl+Click opens a new viewport on aircraft's location +STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Centre main view on train's location. Double click to follow train in main view. Ctrl+Click to open a new viewport on train's location +STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Centre main view on vehicle's location. Double click to follow vehicle in main view. Ctrl+Click to open a new viewport on vehicle's location +STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Centre main view on ship's location. Double click to follow ship in main view. Ctrl+Click to open a new viewport on ship's location +STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Centre main view on aircraft's location. Double click to follow aircraft in main view. Ctrl+Click to open a new viewport on aircraft's location ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click will only service -STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click will only service -STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click will only service -STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click will only service +STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click to only service +STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click to only service +STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click to only service +STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click to only service ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}This will buy a copy of the train including all cars. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}This will buy a copy of the road vehicle. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}This will buy a copy of the ship. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}This will buy a copy of the aircraft. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase +STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Buy a copy of the train including all cars. Ctrl+Click to share orders. Also press Shift to show cost estimate only +STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Buy a copy of the road vehicle. Ctrl+Click to share orders. Also press Shift to show cost estimate only +STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Buy a copy of the ship. Ctrl+Click to share orders. Also press Shift to show cost estimate only +STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Buy a copy of the aircraft. Ctrl+Click to share orders. Also press Shift to show cost estimate only STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Force train to proceed without waiting for signal to clear it STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Reverse direction of train STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Force vehicle to turn around -STR_VEHICLE_VIEW_ORDER_LOCATION_TOOLTIP :{BLACK}Centre main view on order destination. Ctrl+Click opens a new viewport on the order destination's location +STR_VEHICLE_VIEW_ORDER_LOCATION_TOOLTIP :{BLACK}Centre main view on order destination. Ctrl+Click to open a new viewport on the order destination's location ###length VEHICLE_TYPES STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry a different cargo type @@ -4358,8 +4358,8 @@ STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} Last service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} Last service: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by 10. Ctrl+Click increases servicing interval by 5 -STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by 10. Ctrl+Click decreases servicing interval by 5 +STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by 10. Ctrl+Click to increase servicing interval by 5 +STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by 10. Ctrl+Click to decrease servicing interval by 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type STR_VEHICLE_DETAILS_DEFAULT :Default @@ -4402,7 +4402,7 @@ STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}New capa STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG} -STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Dragging with the mouse allows to select multiple vehicles. Clicking on an empty space will select the whole vehicle. Ctrl+Click will select a vehicle and the following chain +STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Click+Drag to select multiple vehicles. Click on an empty space to select the whole vehicle. Ctrl+Click to select a vehicle and the following chain ###length VEHICLE_TYPES STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry @@ -4427,7 +4427,7 @@ STR_ORDERS_CAPTION :{WHITE}{VEHICLE STR_ORDERS_TIMETABLE_VIEW :{BLACK}Timetable STR_ORDERS_TIMETABLE_VIEW_TOOLTIP :{BLACK}Switch to the timetable view -STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click scrolls to the order's destination +STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click to scroll to the order's destination STR_ORDER_INDEX :{COMMA}:{NBSP} STR_ORDER_TEXT :{STRING} {STRING} {STRING} @@ -4497,20 +4497,20 @@ STR_ORDER_CONDITIONAL_VALUE_TOOLTIP :{BLACK}The valu STR_ORDER_CONDITIONAL_VALUE_CAPT :{WHITE}Enter value to compare against STR_ORDERS_SKIP_BUTTON :{BLACK}Skip -STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the current order, and start the next. Ctrl+Click skips to the selected order +STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the current order, and start the next. Ctrl+Click to skip to the selected order STR_ORDERS_DELETE_BUTTON :{BLACK}Delete STR_ORDERS_DELETE_TOOLTIP :{BLACK}Delete the highlighted order STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Delete all orders STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Stop sharing -STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click additionally deletes all orders for this vehicle +STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click to additionally delete all orders for this vehicle STR_ORDERS_GO_TO_BUTTON :{BLACK}Go To STR_ORDER_GO_TO_NEAREST_DEPOT :Go to nearest depot STR_ORDER_GO_TO_NEAREST_HANGAR :Go to nearest hangar STR_ORDER_CONDITIONAL :Conditional order jump STR_ORDER_SHARE :Share orders -STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl makes station orders 'full load any cargo', waypoint orders 'non-stop' and depot orders 'service'. 'Share orders' or Ctrl lets this vehicle share orders with the selected vehicle. Clicking a vehicle copies the orders from that vehicle. A depot order disables automatic servicing of the vehicle +STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl+Click on a station for 'full load any cargo', on a waypoint for 'non-stop', or on a depot for 'service'. Click on another vehicle to copy its orders or Ctrl+Click to share orders. A depot order disables automatic servicing of the vehicle STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Show all vehicles that share this schedule @@ -4616,24 +4616,24 @@ STR_TIMETABLE_STATUS_START_AT_DATE :{BLACK}This tim STR_TIMETABLE_STATUS_START_IN_SECONDS :{BLACK}This timetable will start in {COMMA} seconds STR_TIMETABLE_START :{BLACK}Start Timetable -STR_TIMETABLE_START_TOOLTIP :{BLACK}Select when this timetable starts. Ctrl+Click evenly distributes the start of all vehicles sharing this order based on their relative order, if the order is completely timetabled +STR_TIMETABLE_START_TOOLTIP :{BLACK}Select when this timetable starts. Ctrl+Click to evenly distribute the start of all vehicles sharing this order based on their relative order, if the order is completely timetabled STR_TIMETABLE_START_SECONDS_QUERY :Seconds until timetable starts STR_TIMETABLE_CHANGE_TIME :{BLACK}Change Time -STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take. Ctrl+Click sets the time for all orders +STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take. Ctrl+Click to set the time for all orders STR_TIMETABLE_CLEAR_TIME :{BLACK}Clear Time -STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order. Ctrl+Click clears the time for all orders +STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order. Ctrl+Click to clear the time for all orders STR_TIMETABLE_CHANGE_SPEED :{BLACK}Change Speed Limit -STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order. Ctrl+Click sets the speed for all orders +STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order. Ctrl+Click to set the speed for all orders STR_TIMETABLE_CLEAR_SPEED :{BLACK}Clear Speed Limit -STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order. Ctrl+Click clears the speed for all orders +STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order. Ctrl+Click to clear the speed for all orders STR_TIMETABLE_RESET_LATENESS :{BLACK}Reset Late Counter -STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time. Ctrl+Click will reset the entire group so the latest vehicle will be on time and all others will be early +STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time. Ctrl+Click to reset the entire group so the latest vehicle will be on time and all others will be early STR_TIMETABLE_AUTOFILL :{BLACK}Autofill STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Fill the timetable automatically with the values from the next journey. Ctrl+Click to try to keep waiting times diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index e45526f70d..5091b63231 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -282,7 +282,7 @@ STR_TOOLTIP_RESIZE :{BLACK}Click an STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Toggle large/small window size STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list up/down STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list left/right -STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolish buildings etc. on a square of land. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolish buildings etc. on a square of land. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only # Show engines button ###length VEHICLE_TYPES @@ -370,32 +370,32 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Pause ga STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Fast forward the game STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Options and settings STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Save, load or abandon game, exit program -STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Display map, extra viewport, cargo flow or list of signs -STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Display town directory -STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Display subsidies -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Display list of company's stations -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Display company finances information -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Display general company information -STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Display story book -STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Display goal list -STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Display company graphs and cargo payment rates -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Display company league table -STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Examine industries or fund construction of a new industry -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Display list of company's trains. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Display list of company's road vehicles. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Display list of company's ships. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Display list of company's aircraft. Ctrl+Click toggles opening the group/vehicle list -STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom the view in -STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom the view out -STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railroad track -STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Build roads -STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Build streetcar lines -STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Build ship docks +STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Open map, extra viewport, cargo flow or list of signs +STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Open town directory or found town +STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Open subsidy list +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Open list of company's stations +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Open company finances information +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Open general company information +STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Open story book +STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Open goal list +STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Open company graphs and cargo payment rates +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Open company league table +STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Open industry directory, industry chain, or fund construction of a new industry +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Open list of company's trains. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Open list of company's road vehicles. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Open list of company's ships. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Open list of company's aircraft. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting +STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom in +STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom out +STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railroad infrastructure +STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Build road infrastructure +STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Build streetcar infrastructure +STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Build waterway infrastructure STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Build airports -STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open the landscaping toolbar to raise/lower land, plant trees, etc. -STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Show sound/music window -STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Show last message/news report, messages history or delete all messages -STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Land area information, screenshot, about OpenTTD and developer tools +STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open landscaping menu, tree menu, or place a sign +STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Open sound/music window +STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Open last message/news report, messages history or delete all messages +STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Open land information, screenshot menu, OpenTTD credits, or developer tools STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Switch toolbars # Extra tooltips for the scenario editor toolbar @@ -405,15 +405,15 @@ STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Scenari STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Move the starting date backward 1 year STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Move the starting date forward 1 year STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Click to enter the starting year -STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Display map, town directory -STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Landscape generation -STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Town generation -STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industry generation -STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Road construction -STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Streetcar line construction -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Open map, extra viewport, sign list, or town or industry directory +STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Open landscaping menu or generate a new world +STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Build or generate towns +STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Build or generate industries +STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Build road infrastructure +STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Build streetcar infrastructure +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Place sign -STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only # Scenario editor file menu ###length 7 @@ -1037,7 +1037,7 @@ STR_GAME_OPTIONS_VIDEO_VSYNC_TOOLTIP :{BLACK}Check th STR_GAME_OPTIONS_VIDEO_DRIVER_INFO :{BLACK}Current driver: {STRING} STR_GAME_OPTIONS_GUI_SCALE_FRAME :{BLACK}Interface size -STR_GAME_OPTIONS_GUI_SCALE_TOOLTIP :{BLACK}Drag slider to set interface size. Hold Ctrl for continuous adjustment +STR_GAME_OPTIONS_GUI_SCALE_TOOLTIP :{BLACK}Drag slider to set interface size. Ctrl+Drag for continuous adjustment STR_GAME_OPTIONS_GUI_SCALE_AUTO :{BLACK}Auto-detect size STR_GAME_OPTIONS_GUI_SCALE_AUTO_TOOLTIP :{BLACK}Check this box to detect interface size automatically @@ -1334,7 +1334,7 @@ STR_CONFIG_SETTING_FORBID_90_DEG :Forbid trains f STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :90 degree turns occur when a horizontal track is directly followed by a vertical track piece on the adjacent tile, thus making the train turn by 90 degrees when traversing the tile edge instead of the usual 45 degrees for other track combinations. STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Allow joining stations not directly adjacent: {STRING} -STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Allow adding parts to a station without directly touching the existing parts. Needs Ctrl+Click while placing the new parts +STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Allow adding parts to a station without directly touching the existing parts, by Ctrl+Clicking while placing the new parts STR_CONFIG_SETTING_INFLATION :Inflation: {STRING} STR_CONFIG_SETTING_INFLATION_HELPTEXT :Enable inflation in the economy, where costs are slightly faster rising than payments @@ -1874,7 +1874,7 @@ STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :Automatically b STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Set the year when electric signals will be used for tracks. Before this year, non-electric signals will be used (which have the exact same function, but different looks) STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Cycle through signal types: {STRING} -STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Select which signal types to cycle through when Ctrl+clicking on a built signal with the signal tool +STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Select which signal types to cycle through when Ctrl+Clicking on a built signal with the signal tool ###length 2 STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Path signals only STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :All visible @@ -2147,14 +2147,14 @@ STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Select ' STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Select 'sub-tropical' landscape style STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Select 'toyland' landscape style -STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Display game options -STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Display highscore table +STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Open game options +STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Open highscore table STR_INTRO_TOOLTIP_HELP :{BLACK}Get access to documentation and online resources -STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Display settings -STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Display NewGRF settings +STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Open settings +STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Open NewGRF settings STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Check for new and updated content to download -STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Display AI settings -STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Display Game script settings +STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Open AI settings +STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Open Game script settings STR_INTRO_TOOLTIP_QUIT :{BLACK}Quit 'OpenTTD' STR_INTRO_BASESET :{BLACK}The currently selected base graphics set is missing {NUM} sprite{P "" s}. Please check for updates for the baseset. @@ -2212,8 +2212,8 @@ STR_LIVERY_TRAIN_GROUP_TOOLTIP :{BLACK}Show col STR_LIVERY_ROAD_VEHICLE_GROUP_TOOLTIP :{BLACK}Show colors of road vehicle groups STR_LIVERY_SHIP_GROUP_TOOLTIP :{BLACK}Show colors of ship groups STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP :{BLACK}Show colors of aircraft groups -STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary color for the selected scheme. Ctrl+Click will set this color for every scheme -STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary color for the selected scheme. Ctrl+Click will set this color for every scheme +STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary color for the selected scheme. Ctrl+Click to set this color for every scheme +STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary color for the selected scheme. Ctrl+Click to set this color for every scheme STR_LIVERY_PANEL_TOOLTIP :{BLACK}Select a color scheme to change, or multiple schemes with Ctrl+Click. Click on the box to toggle use of the scheme STR_LIVERY_TRAIN_GROUP_EMPTY :No train groups are set up STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY :No road vehicle groups are set up @@ -2726,16 +2726,16 @@ STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Electrified Rai STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Monorail Construction STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Maglev Construction -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railroad track. Ctrl toggles build/remove for railroad construction. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Build railroad track using the Autorail mode. Ctrl toggles build/remove for railroad construction. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Build train depot (for buying and maintaining trains). Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Build waypoint on railway. Ctrl enables joining waypoints. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Build railroad station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Build signal on railway. Ctrl toggles semaphore/light signals{}Dragging builds signals along a straight stretch of rail. Ctrl builds signals up to the next junction or signal{}Ctrl+Click toggles opening the signal selection window. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Build railroad bridge. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Build railroad tunnel. Shift toggles building/showing cost estimate -STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Toggle build/remove for railroad track, signals, waypoints and stations. Hold Ctrl to also remove the rail of waypoints and stations -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Convert/Upgrade the type of rail. Shift toggles building/showing cost estimate +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railroad track. Ctrl+Click to remove railroad track. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Build railroad track using the Autorail mode. Ctrl+Click to remove railroad track. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Build train depot (for buying and maintaining trains). Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Build waypoint on railroad. Ctrl+Click to select another waypoint to join. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Build railroad station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Build signal on railroad. Ctrl+Click to build the alternate signal style{}Click+Drag to fill the selected section of rail with signals at the chosen spacing. Ctrl+Click+Drag to fill signals up to the next junction, station, or signal. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Build railroad bridge. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Build railroad tunnel. Also press Shift to show cost estimate only +STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Toggle build/remove for railroad track, signals, waypoints and stations. Ctrl+Click to also remove the rail of waypoints and stations +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Convert/Upgrade the type of rail. Also press Shift to show cost estimate only STR_RAIL_NAME_RAILROAD :Railroad STR_RAIL_NAME_ELRAIL :Electrified railroad @@ -2785,7 +2785,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Exit Sig STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combo Signal (electric){}The combo signal simply acts as both an entry and exit signal. This allows you to build large "trees" of pre-signals STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side -STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}When selected, clicking an existing signal will convert it to the selected signal type and variant. Ctrl+Click will toggle the existing variant. Shift+Click shows estimated conversion cost +STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}Click an existing signal to convert it to the selected signal type and variant. Ctrl+Click to toggle the existing variant. Shift+Click shows estimated conversion cost STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal distance STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal distance STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal distance @@ -2811,25 +2811,25 @@ STR_BRIDGE_TUBULAR_SILICON :Tubular, Silico # Road construction toolbar STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Road Construction STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Streetcar Construction -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Build road section. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Build streetcar track. Ctrl toggles build/remove for streetcar construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build road section using the Autoroad mode. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build streetcar track using the Autostreet mode. Ctrl toggles build/remove for streetcar construction. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and maintaining vehicles). Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build tram vehicle depot (for buying and servicing vehicles). Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger streetcar station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build truck station. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Build freight streetcar station. Ctrl enables joining stations. Shift toggles building/showing cost estimate +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Build road section. Ctrl+Click to remove road section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Build streetcar section. Ctrl+Click to remove streetcar section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build road section using the Autoroad mode. Ctrl+Click to remove road section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build streetcar section using the Autorail mode. Ctrl+Click to remove streetcar section. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and maintaining vehicles). Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build streetcar vehicle depot (for buying and maintaining vehicles). Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger streetcar station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build truck station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Build freight streetcar station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activate/Deactivate one way roads -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Build road bridge. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Build streetcar bridge. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Build road tunnel. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Build streetcar tunnel. Shift toggles building/showing cost estimate +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Build road bridge. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Build streetcar bridge. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Build road tunnel. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Build streetcar tunnel. Also press Shift to show cost estimate only STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Toggle build/remove for road construction STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Toggle build/remove for streetcar track construction -STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Convert/Upgrade the type of road. Shift toggles building/showing cost estimate -STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convert/Upgrade the type of streetcar. Shift toggles building/showing cost estimate +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Convert/Upgrade the type of road. Also press Shift to show cost estimate only +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convert/Upgrade the type of streetcar. Also press Shift to show cost estimate only STR_ROAD_NAME_ROAD :Road STR_ROAD_NAME_TRAM :Streetcar line @@ -2853,14 +2853,14 @@ STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Select f # Waterways toolbar (last two for SE only) STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Waterways Construction STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Waterways -STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Build canals. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Build locks. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for buying and maintaining ships). Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock. Ctrl enables joining stations. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Build aqueduct. Shift toggles building/showing cost estimate -STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Define water area.{}Make a canal. If Ctrl is held down at sea level, it will flood the surroundings instead -STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Place rivers. Ctrl selects the area diagonally +STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Build canals. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Build locks. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for buying and maintaining ships). Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Build aqueduct. Also press Shift to show cost estimate only +STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Build canal. Ctrl+Click at sea level to flood with sea water instead +STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Place rivers. Ctrl+Click to select diagonally # Ship depot construction window STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Ship Depot Orientation @@ -2871,7 +2871,7 @@ STR_STATION_BUILD_DOCK_CAPTION :{WHITE}Dock # Airport toolbar STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Airports -STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport. Ctrl enables joining stations. Shift toggles building/showing cost estimate +STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only # Airport construction window STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Airport Selection @@ -2898,14 +2898,14 @@ STR_STATION_BUILD_NOISE :{BLACK}Noise ge # Landscaping toolbar STR_LANDSCAPING_TOOLBAR :{WHITE}Landscaping -STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Lower a corner of land. Dragging lowers the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate -STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a corner of land. Dragging raises the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate -STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate -STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Lower a corner of land. Click+Drag to lower the first selected corner and level the selected area to the new corner height. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a corner of land. Click+Drag to raise the first selected corner and level the selected area to the new corner height. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only # Object construction window STR_OBJECT_BUILD_CAPTION :{WHITE}Object Selection -STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Select class of the object to build STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Preview of the object STR_OBJECT_BUILD_SIZE :{BLACK}Size: {GOLD}{NUM} x {NUM} tiles @@ -2917,7 +2917,7 @@ STR_OBJECT_CLASS_TRNS :Transmitters STR_PLANT_TREE_CAPTION :{WHITE}Trees STR_PLANT_TREE_TOOLTIP :{BLACK}Select tree type to plant. If the tile already has a tree, this will add more trees of mixed types independent of the selected type STR_TREES_RANDOM_TYPE :{BLACK}Trees of random type -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Random Trees STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plant trees randomly throughout the landscape STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal @@ -2930,7 +2930,7 @@ STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Plant la # Land generation window (SE) STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Land Generation STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Place rocky areas on landscape -STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Hold Ctrl to remove it +STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Ctrl+Click to remove desert area STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Increase area of land to lower/raise STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Decrease area of land to lower/raise STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Generate random land @@ -2944,7 +2944,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Are you # Town generation window (SE) STR_FOUND_TOWN_CAPTION :{WHITE}Town Generation STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}New Town -STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town. Shift+Click shows only estimated cost +STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town. Also press Shift to show cost estimate only STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Random Town STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Found town in random location STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Many random towns @@ -3010,7 +3010,7 @@ STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Select t # Land area window STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Land Area Information -STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Center the main view on tile location. Ctrl+Click opens a new viewport on tile location +STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Center the main view on tile location. Ctrl+Click to open a new viewport on tile location STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Cost to clear: {LTBLUE}N/A STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Cost to clear: {RED}{CURRENCY_LONG} STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Revenue when cleared: {LTBLUE}{CURRENCY_LONG} @@ -3257,11 +3257,11 @@ STR_MAPGEN_VARIETY :{BLACK}Variety STR_MAPGEN_GENERATE :{WHITE}Generate STR_MAPGEN_GENERATE_TOOLTIP :{BLACK}Create the world and play OpenTTD! STR_MAPGEN_NEWGRF_SETTINGS :{BLACK}NewGRF Settings -STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Display NewGRF settings +STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Open NewGRF settings STR_MAPGEN_AI_SETTINGS :{BLACK}AI Settings -STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Display AI settings +STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Open AI settings STR_MAPGEN_GS_SETTINGS :{BLACK}Game Script Settings -STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Display game script settings +STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Open game script settings ###length 21 STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH :English (Original) @@ -3537,7 +3537,7 @@ STR_SIGN_LIST_MATCH_CASE_TOOLTIP :{BLACK}Toggle m # Sign window STR_EDIT_SIGN_CAPTION :{WHITE}Edit sign text -STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Center the main view on sign location. Ctrl+Click opens a new viewport on sign location +STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Center the main view on sign location. Ctrl+Click to open a new viewport on sign location STR_EDIT_SIGN_NEXT_SIGN_TOOLTIP :{BLACK}Go to next sign STR_EDIT_SIGN_PREVIOUS_SIGN_TOOLTIP :{BLACK}Go to previous sign @@ -3548,7 +3548,7 @@ STR_TOWN_DIRECTORY_CAPTION :{WHITE}Towns STR_TOWN_DIRECTORY_NONE :{ORANGE}- None - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) -STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to center main view on town. Ctrl+Click opens a new viewport on town location +STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to center main view on town. Ctrl+Click to open a new viewport on town location STR_TOWN_POPULATION :{BLACK}World population: {COMMA} # Town view window @@ -3566,7 +3566,7 @@ STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Town gro STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK}{NBSP}day{P "" s} (funded) STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}Town is {RED}not{BLACK} growing STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Noise limit in town: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Center the main view on town location. Ctrl+Click opens a new viewport on town location +STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Center the main view on town location. Ctrl+Click to open a new viewport on town location STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Local Authority STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP :{BLACK}Show information on local authority STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Change town name @@ -3621,7 +3621,7 @@ STR_GOALS_TEXT :{ORANGE}{STRING STR_GOALS_NONE :{ORANGE}- None - STR_GOALS_PROGRESS :{ORANGE}{STRING} STR_GOALS_PROGRESS_COMPLETE :{GREEN}{STRING} -STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on goal to center main view on industry/town/tile. Ctrl+Click opens a new viewport on industry/town/tile location +STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on goal to center main view on industry/town/tile. Ctrl+Click to open a new viewport on industry/town/tile location # Goal question window STR_GOAL_QUESTION_CAPTION_QUESTION :{BLACK}Question @@ -3657,7 +3657,7 @@ STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING STR_SUBSIDIES_NONE :{ORANGE}- None - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidized: STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING} to {STRING}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT}) -STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to center main view on industry/town. Ctrl+Click opens a new viewport on industry/town location +STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to center main view on industry/town. Ctrl+Click to open a new viewport on industry/town location # Story book window STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Story Book @@ -3673,8 +3673,8 @@ STR_STORY_BOOK_NEXT_PAGE_TOOLTIP :{BLACK}Go to ne STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Invalid goal reference # Station list window -STR_STATION_LIST_TOOLTIP :{BLACK}Station names - click on name to center main view on station. Ctrl+Click opens a new viewport on station location -STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Hold Ctrl to select more than one item +STR_STATION_LIST_TOOLTIP :{BLACK}Station names - click on name to center main view on station. Ctrl+Click to open a new viewport on station location +STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Ctrl+Click to select multiple items STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} Station{P "" s} STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATION_FEATURES} STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT} @@ -3733,7 +3733,7 @@ STR_CARGO_RATING_VERY_GOOD :Very Good STR_CARGO_RATING_EXCELLENT :Excellent STR_CARGO_RATING_OUTSTANDING :Outstanding -STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Center main view on station location. Ctrl+Click opens a new viewport on station location +STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Center main view on station location. Ctrl+Click to open a new viewport on station location STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Change name of station STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Show all trains which have this station on their schedule @@ -3748,9 +3748,9 @@ STR_STATION_VIEW_CLOSE_AIRPORT_TOOLTIP :{BLACK}Prevent # Waypoint/buoy view window STR_WAYPOINT_VIEW_CAPTION :{WHITE}{WAYPOINT} -STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Center main view on waypoint location. Ctrl+Click opens a new viewport on waypoint location +STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Center main view on waypoint location. Ctrl+Click to open a new viewport on waypoint location STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME :{BLACK}Change waypoint name -STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Center main view on buoy location. Ctrl+Click opens a new viewport on buoy location +STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Center main view on buoy location. Ctrl+Click to open a new viewport on buoy location STR_BUOY_VIEW_CHANGE_BUOY_NAME :{BLACK}Change buoy name STR_EDIT_WAYPOINT_NAME :{WHITE}Edit waypoint name @@ -3793,9 +3793,9 @@ STR_FINANCES_MAX_LOAN :{WHITE}Maximum STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG} STR_FINANCES_BANK_BALANCE :{WHITE}{CURRENCY_LONG} STR_FINANCES_BORROW_BUTTON :{BLACK}Borrow {CURRENCY_LONG} -STR_FINANCES_BORROW_TOOLTIP :{BLACK}Increase size of loan. Ctrl+Click borrows as much as possible +STR_FINANCES_BORROW_TOOLTIP :{BLACK}Increase size of loan. Ctrl+Click to borrow as much as possible STR_FINANCES_REPAY_BUTTON :{BLACK}Repay {CURRENCY_LONG} -STR_FINANCES_REPAY_TOOLTIP :{BLACK}Repay part of loan. Ctrl+Click repays as much loan as possible +STR_FINANCES_REPAY_TOOLTIP :{BLACK}Repay part of loan. Ctrl+Click to repay as much loan as possible STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infrastructure # Company view @@ -3824,7 +3824,7 @@ STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Build co STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}View HQ STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}View company headquarters STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Relocate HQ -STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rebuild company headquarters elsewhere for 1% cost of company value. Shift+Click shows estimated cost without relocating HQ +STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rebuild company headquarters elsewhere for 1% cost of company value. Also press Shift to show cost estimate only STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Details STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}View detailed infrastructure counts STR_COMPANY_VIEW_GIVE_MONEY_BUTTON :{BLACK}Give money @@ -3870,7 +3870,7 @@ STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUST STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} and {NUM} more... -STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to center main view on industry. Ctrl+Click opens a new viewport on industry location +STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to center main view on industry. Ctrl+Click to open a new viewport on industry location STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER :{BLACK}Accepted cargo: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_PRODUCED_CARGO_FILTER :{BLACK}Produced cargo: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_FILTER_ALL_TYPES :All cargo types @@ -3880,7 +3880,7 @@ STR_INDUSTRY_DIRECTORY_FILTER_NONE :None STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Production last month: STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transported) -STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Center the main view on industry location. Ctrl+Click opens a new viewport on industry location +STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Center the main view on industry location. Ctrl+Click to open a new viewport on industry location STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! @@ -4019,10 +4019,10 @@ STR_CARGO_TYPE_FILTER_FREIGHT :Freight STR_CARGO_TYPE_FILTER_NONE :None ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list. Click on vehicle for information. Ctrl+Click to toggle hiding of the vehicle type -STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click to toggle hiding of the vehicle type -STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list. Click on ship for information. Ctrl+Click to toggle hiding of the ship type -STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list. Click on aircraft for information. Ctrl+Click to toggle hiding of the aircraft type +STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide this vehicle type +STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide the vehicle type +STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list. Click on ship for information. Ctrl+Click to show/hide the ship type +STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list. Click on aircraft for information. Ctrl+Click to show/hide of the aircraft type ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Buy Vehicle @@ -4037,16 +4037,16 @@ STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Buy and STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Buy and Refit Aircraft ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted train vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted road vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted ship. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted aircraft. Shift+Click shows estimated cost without purchase +STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted train vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted road vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted ship. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted aircraft. Also press Shift to show cost estimate only ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted train vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted road vehicle. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted ship. Shift+Click shows estimated cost without purchase -STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted aircraft. Shift+Click shows estimated cost without purchase +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted train vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted road vehicle. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted ship. Also press Shift to show cost estimate only +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted aircraft. Also press Shift to show cost estimate only ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Rename @@ -4096,7 +4096,7 @@ STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} ve STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT}) ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - drag vehicle with left-click to add/remove from train, right-click for information. Hold Ctrl to make both functions apply to the following chain +STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - drag vehicle with left-click to add/remove from train, right-click for information. Ctrl+Click to apply either function to the following chain STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Vehicles - right-click on vehicle for information STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Ships - right-click on ship for information STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft - right-click on aircraft for information @@ -4138,16 +4138,16 @@ STR_DEPOT_CLONE_SHIP :{BLACK}Clone Sh STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Clone Aircraft ###length VEHICLE_TYPES -STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}This will buy a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}This will buy a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}This will buy a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}This will buy a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase +STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Buy a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only +STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Buy a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only +STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Buy a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only +STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Buy a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click to share the orders. Also press Shift to show cost estimate only ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Center main view on train depot location. Ctrl+Click opens a new viewport on train depot location -STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Center main view on road vehicle depot location. Ctrl+Click opens a new viewport on road depot location -STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Center main view on ship depot location. Ctrl+Click opens a new viewport on ship depot location -STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Center main view on hangar location. Ctrl+Click opens a new viewport on hangar location +STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Center main view on train depot location. Ctrl+Click to open a new viewport on train depot location +STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Center main view on road vehicle depot location. Ctrl+Click to open a new viewport on road depot location +STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Center main view on ship depot location. Ctrl+Click to open a new viewport on ship depot location +STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Center main view on hangar location. Ctrl+Click to open a new viewport on hangar location ###length VEHICLE_TYPES STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Get a list of all trains with the current depot in their orders @@ -4248,27 +4248,27 @@ STR_REPLACE_REMOVE_WAGON_GROUP_HELP :{STRING}. Ctrl+ STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE} ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Center main view on train's location. Double click will follow train in main view. Ctrl+Click opens a new viewport on train's location -STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Center main view on vehicle's location. Double click will follow vehicle in main view. Ctrl+Click opens a new viewport on vehicle's location -STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Center main view on ship's location. Double click will follow ship in main view. Ctrl+Click opens a new viewport on ship's location -STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Center main view on aircraft's location. Double click will follow aircraft in main view. Ctrl+Click opens a new viewport on aircraft's location +STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Center main view on train's location. Double click to follow train in main view. Ctrl+Click to open a new viewport on train's location +STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Center main view on vehicle's location. Double click to follow vehicle in main view. Ctrl+Click to open a new viewport on vehicle's location +STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Center main view on ship's location. Double click to follow ship in main view. Ctrl+Click to open a new viewport on ship's location +STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Center main view on aircraft's location. Double click to follow aircraft in main view. Ctrl+Click to open a new viewport on aircraft's location ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click will only service -STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click will only service -STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click will only service -STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click will only service +STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click to only service +STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click to only service +STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click to only service +STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click to only service ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}This will buy a copy of the train including all cars. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}This will buy a copy of the road vehicle. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}This will buy a copy of the ship. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase -STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}This will buy a copy of the aircraft. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase +STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Buy a copy of the train including all cars. Ctrl+Click to share orders. Also press Shift to show cost estimate only +STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Buy a copy of the road vehicle. Ctrl+Click to share orders. Also press Shift to show cost estimate only +STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Buy a copy of the ship. Ctrl+Click to share orders. Also press Shift to show cost estimate only +STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Buy a copy of the aircraft. Ctrl+Click to share orders. Also press Shift to show cost estimate only STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Force train to proceed without waiting for signal to clear STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Reverse direction of train STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Force vehicle to turn around -STR_VEHICLE_VIEW_ORDER_LOCATION_TOOLTIP :{BLACK}Center main view on order destination. Ctrl+Click opens a new viewport on the order destination's location +STR_VEHICLE_VIEW_ORDER_LOCATION_TOOLTIP :{BLACK}Center main view on order destination. Ctrl+Click to open a new viewport on the order destination's location ###length VEHICLE_TYPES STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry a different cargo type @@ -4358,8 +4358,8 @@ STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Maintenance interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} Last maintenance: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Maintenance interval: {LTBLUE}{COMMA}%{BLACK} Last maintenance: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase maintenance interval by 10. Ctrl+Click increases maintenance interval by 5 -STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease maintenance interval by 10. Ctrl+Click decreases maintenance interval by 5 +STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase maintenance interval by 10. Ctrl+Click to increase maintenance interval by 5 +STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease maintenance interval by 10. Ctrl+Click to decrease maintenance interval by 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type STR_VEHICLE_DETAILS_DEFAULT :Default @@ -4402,7 +4402,7 @@ STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}New capa STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG} -STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Dragging with the mouse allows to select multiple vehicles. Clicking on an empty space will select the whole vehicle. Ctrl+Click will select a vehicle and the following chain +STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Click+Drag to select multiple vehicles. Click on an empty space to select the whole vehicle. Ctrl+Click to select a vehicle and the following chain ###length VEHICLE_TYPES STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry @@ -4427,7 +4427,7 @@ STR_ORDERS_CAPTION :{WHITE}{VEHICLE STR_ORDERS_TIMETABLE_VIEW :{BLACK}Timetable STR_ORDERS_TIMETABLE_VIEW_TOOLTIP :{BLACK}Switch to the timetable view -STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click scrolls to the order's destination +STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click to scroll to the order's destination STR_ORDER_INDEX :{COMMA}:{NBSP} STR_ORDER_TEXT :{STRING} {STRING} {STRING} @@ -4497,20 +4497,20 @@ STR_ORDER_CONDITIONAL_VALUE_TOOLTIP :{BLACK}The valu STR_ORDER_CONDITIONAL_VALUE_CAPT :{WHITE}Enter value to compare against STR_ORDERS_SKIP_BUTTON :{BLACK}Skip -STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the current order, and start the next. Ctrl+Click skips to the selected order +STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the current order, and start the next. Ctrl+Click to skip to the selected order STR_ORDERS_DELETE_BUTTON :{BLACK}Delete STR_ORDERS_DELETE_TOOLTIP :{BLACK}Delete the highlighted order STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Delete all orders STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Stop sharing -STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click additionally deletes all orders for this vehicle +STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click to additionally delete all orders for this vehicle STR_ORDERS_GO_TO_BUTTON :{BLACK}Go To STR_ORDER_GO_TO_NEAREST_DEPOT :Go to nearest depot STR_ORDER_GO_TO_NEAREST_HANGAR :Go to nearest hangar STR_ORDER_CONDITIONAL :Conditional order jump STR_ORDER_SHARE :Share orders -STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl makes station orders 'full load any cargo', waypoint orders 'non-stop', and depot orders 'maintenance'. 'Share orders' or Ctrl lets this vehicle share orders with the selected vehicle. Clicking a vehicle copies the orders from that vehicle. A depot order disables automatic maintenance of the vehicle +STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl+Click on a station for 'full load any cargo', on a waypoint for 'non-stop', or on a depot for 'service'. Click on another vehicle to copy its orders or Ctrl+Click to share orders. A depot order disables automatic servicing of the vehicle STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Show all vehicles that share this schedule @@ -4616,24 +4616,24 @@ STR_TIMETABLE_STATUS_START_AT_DATE :{BLACK}This tim STR_TIMETABLE_STATUS_START_IN_SECONDS :{BLACK}This timetable will start in {COMMA} seconds STR_TIMETABLE_START :{BLACK}Start Timetable -STR_TIMETABLE_START_TOOLTIP :{BLACK}Select when this timetable starts. Ctrl+Click evenly distributes the start of all vehicles sharing this order based on their relative order, if the order is completely timetabled +STR_TIMETABLE_START_TOOLTIP :{BLACK}Select when this timetable starts. Ctrl+Click to evenly distribute the start of all vehicles sharing this order based on their relative order, if the order is completely timetabled STR_TIMETABLE_START_SECONDS_QUERY :Seconds until timetable starts STR_TIMETABLE_CHANGE_TIME :{BLACK}Change Time -STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take. Ctrl+Click sets the time for all orders +STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take. Ctrl+Click to set the time for all orders STR_TIMETABLE_CLEAR_TIME :{BLACK}Clear Time -STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order. Ctrl+Click clears the time for all orders +STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order. Ctrl+Click to clear the time for all orders STR_TIMETABLE_CHANGE_SPEED :{BLACK}Change Speed Limit -STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order. Ctrl+Click sets the speed for all orders +STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order. Ctrl+Click to set the speed for all orders STR_TIMETABLE_CLEAR_SPEED :{BLACK}Clear Speed Limit -STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order. Ctrl+Click clears the speed for all orders +STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order. Ctrl+Click to clear the speed for all orders STR_TIMETABLE_RESET_LATENESS :{BLACK}Reset Late Counter -STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time. Ctrl+Click will reset the entire group so the latest vehicle will be on time and all others will be early +STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time. Ctrl+Click to reset the entire group so the latest vehicle will be on time and all others will be early STR_TIMETABLE_AUTOFILL :{BLACK}Autofill STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Fill the timetable automatically with the values from the next journey. Ctrl+Click to try to keep waiting times diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index 741aeea2ac..2f8895e397 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -2859,7 +2859,7 @@ STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Rakenna STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Rakenna satama. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Sijoita poiju, jota voi käyttää reittipisteenä. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Rakenna akvedukti. Shift vaihtaa rakennustilan ja kustannusarvion välillä -STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Määrittele vesialue.{}Tee kanava, paitsi jos Ctrl on painettuna merenpinnalla. Tällöin meri laajenee ympäristöön +STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Rakenna kanava. Merenpinnan tasolla Ctrl+napsautus täyttää alueen merivedellä kanavan rakentamisen sijaan. STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Sijoita jokia. Ctrl valitsee alueen vinottain. # Ship depot construction window diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index a506189a2b..6c902e29eb 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -905,6 +905,7 @@ STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}flytt pl STR_GAME_OPTIONS_CAPTION :{WHITE}Spillinnstillinger +STR_GAME_OPTIONS_SFX_VOLUME :Lydeffekter STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME :{BLACK}Valutaenhet @@ -987,6 +988,7 @@ STR_GAME_OPTIONS_VIDEO_VSYNC_TOOLTIP :{BLACK}Merk av STR_GAME_OPTIONS_GUI_SCALE_2X :2x STR_GAME_OPTIONS_GUI_SCALE_3X :3x +STR_GAME_OPTIONS_GUI_SCALE_4X :4x STR_GAME_OPTIONS_GRAPHICS :{BLACK}Grafikk @@ -1352,6 +1354,7 @@ STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Når aktivert, STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Startifarge for firmaet: {STRING} STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Velg startfarge for firmaet +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_SECONDARY :Oppstarsselskapets sekundære farge:{STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flyplasser utgår aldri: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Aktivering av denne innstillingen gjør at hver type flyplass forblir tilgjengelig for alltid etter at sin introduksjon @@ -1546,6 +1549,7 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Av STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE :Lukk vinduet med høyreklikk: {STRING} STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT :Lukker et vindu ved å høyreklikke i det. Deaktiverer verktøytipset med høyreklikk! ###length 3 +STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_YES :Ja STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Bruk {STRING} datoformat i navn på lagrede spill. STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_HELPTEXT :Datoformat i lagrede spills filnavn @@ -1572,6 +1576,7 @@ STR_CONFIG_SETTING_LOADING_INDICATORS :Bruk lastingsin STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :Velg hvorvidt lasteindikatorer vises over kjøretøy som lastes eller losses ###length 3 +STR_CONFIG_SETTING_TIMETABLE_MODE_SECONDS :Sekunder STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Vis ankomst og avgang i rutetabeller: {STRING} STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Vise forventede ankomst- og avgangstider i rutetabeller @@ -1872,6 +1877,7 @@ STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :ingen STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Innledende bystørrelsesmultiplikator: {STRING} STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Gjennomsnittsstørrelse på (stor)byer i forhold til vanlige byer ved begynnelsen av spillet +STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL :Oppdater distribusjonsgraf hvert {STRING} STR_CONFIG_SETTING_DISTRIBUTION_PAX :Distribusjonsmodus for passasjerer: {STRING} STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"symmetrisk" betyr at omtrent like mange passasjerer vil reise fra stasjon A til stasjon B som omvendt (fra B til A). "asymmetrisk" betyr at et vilkårlig antall passasjerer vil reise i begge retninger. "manuelt" betyr at det ikke vil forekomme automatisk distribusjon for passasjerene @@ -1957,6 +1963,7 @@ STR_CONFIG_SETTING_LIMITATIONS :Begrensninger STR_CONFIG_SETTING_ACCIDENTS :Katastrofer / Ulykker STR_CONFIG_SETTING_GENWORLD :Verdensgenerering STR_CONFIG_SETTING_ENVIRONMENT :Miljø +STR_CONFIG_SETTING_ENVIRONMENT_TIME :Tid STR_CONFIG_SETTING_ENVIRONMENT_AUTHORITIES :Myndigheter STR_CONFIG_SETTING_ENVIRONMENT_TOWNS :Byer STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES :Industrier @@ -3637,6 +3644,7 @@ STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Detaljer STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}Vis detaljert infrastrukturtelling STR_COMPANY_VIEW_GIVE_MONEY_BUTTON :{BLACK}Gi penger STR_COMPANY_VIEW_GIVE_MONEY_TOOLTIP :{BLACK}Gi penger til dette firmaet +STR_COMPANY_VIEW_HOSTILE_TAKEOVER_TOOLTIP :{BLACK}Gjør en fiendtlig overtagelse av dette selskapet STR_COMPANY_VIEW_NEW_FACE_BUTTON :{BLACK}Nytt ansikt STR_COMPANY_VIEW_NEW_FACE_TOOLTIP :{BLACK}Velg nytt ansikt på sjefen @@ -3816,6 +3824,7 @@ STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Rekkevid STR_PURCHASE_INFO_AIRCRAFT_TYPE :{BLACK}Flytype: {GOLD}{STRING} ###length 3 +STR_CARGO_TYPE_FILTER_ALL :Alle cargo typer ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Liste over tog/vogner - klikk på tog/vogn for mer informasjon. Ctrl+klikk for å skjule/vise denne typen diff --git a/src/lang/russian.txt b/src/lang/russian.txt index d3303a3fc4..8557b29e64 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -507,14 +507,14 @@ STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Спис STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Графики компаний и оплаты грузоперевозок STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Рейтинги компаний STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Список существующих предприятий; создание новых -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Список поездов. Ctrl+щелчок переключает отображение по группам. -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Список автотранспорта. Ctrl+щелчок переключает отображение по группам. -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Список судов. Ctrl+щелчок переключает отображение по группам. -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Список авиатранспорта. Ctrl+щелчок переключает отображение по группам. +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Списки поездов по компаниям. Ctrl+щелчок - показать/скрыть группы. +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Списки автомобильного транспорта по компаниям. Ctrl+щелчок - показать/скрыть группы. +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Списки судов по компаниям. Ctrl+щелчок - показать/скрыть группы. +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Списки воздушных судов по компаниям. Ctrl+щелчок - показать/скрыть группы. STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Приблизить STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Отдалить STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Строительство железных дорог -STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Строительство автомобильных дорог +STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Строительство автомобильной инфраструктуры STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Строительство трамвайных путей STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Строительство водных коммуникаций STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Строительство аэропортов @@ -535,11 +535,11 @@ STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Пока STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Создание ландшафта STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Создание городов STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Создание предприятий -STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Строительство автомобильных дорог +STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Строительство автомобильной инфраструктуры STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Строительство трамвайных путей STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Посадить деревья.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости высадки. STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Поставить метку -STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Разместить объект.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости строительства. +STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Разместить объект. Ctrl+щелчок+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости строительства. # Scenario editor file menu ###length 7 @@ -2298,7 +2298,7 @@ STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Суба STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Субтропический климат STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Детский мир -STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Изменить основные настройки игры +STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Открыть окно с основными настройками игры STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Показать таблицу рекордов STR_INTRO_TOOLTIP_HELP :{BLACK}Ссылки на документацию и интернет-ресурсы STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Изменить расширенные настройки игры @@ -2893,12 +2893,12 @@ STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Стро STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Строительство ж/д путей в автоматическом режиме. При нажатом Ctrl - удаление путей. При нажатом Shift - оценка стоимости строительства. STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Строительство депо (для приобретения и обслуживания поездов). При нажатом Shift - оценка стоимости строительства. STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Установка на рельсах маршрутных точек. Нажатие Ctrl позволяет объединять точки. При нажатом Shift - оценка стоимости строительства. -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Строительство ж/д станций. Нажатие Ctrl позволяет объединять станции. При нажатом Shift - оценка стоимости строительства. -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Установка сигналов на ж/д путях. Ctrl переключает семафоры/светофоры.{}Перетаскиванием можно строить сигналы на прямом участке пути. С нажатым Ctrl - строительство сигналов до ближайшего пересечения или сигнала.{}Ctrl+щелчок переключает открытие окна выбора сигналов. При нажатом Shift - оценка стоимости строительства. -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Строительство ж/д мостов. При нажатом Shift - оценка стоимости строительства. -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Строительство ж/д туннелей. При нажатом Shift - оценка стоимости строительства. -STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Переключение между строительством и удалением ж/д путей, сигналов, станций. При нажатом Ctrl убирает станции с рельсами. -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Преобразовать/модернизировать рельсы. При нажатом Shift - оценка стоимости модернизации. +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Строительство ж/д станций. Ctrl+щелчок - объединение новой станции с существующей. При нажатом Shift - оценка стоимости строительства. +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Установка сигналов на ж/д путях. Ctrl переключает семафоры/светофоры.{}Перетаскиванием можно строить сигналы с заданным интервалом. Ctrl+перетаскивание - строительство сигналов до ближайшей стрелки, сигнала или станции. При нажатом Shift - оценка стоимости строительства. +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Строительство железнодорожных мостов. При нажатом Shift - оценка стоимости строительства. +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Строительство железнодорожных туннелей. При нажатом Shift - оценка стоимости строительства. +STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Переключение между строительством и удалением ж/д путей, сигналов, станций. При нажатом Ctrl убирает станции вместе с рельсами. +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Преобразовать/модернизировать железнодорожное полотно. При нажатом Shift - оценка стоимости модернизации. STR_RAIL_NAME_RAILROAD :Ж/д STR_RAIL_NAME_RAILROAD.m :Ж/д @@ -2956,7 +2956,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Выхо STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Комбинированный светофор{}Работает одновременно как входной и выходной светофор. Это позволяет построить большую разветвлённую сеть. STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Маршрутный светофор{}Позволяет нескольким поездам находиться в одном сигнальном блоке, если каждый из них может зарезервировать безопасный путь. Допускает следование поездов в обе стороны. STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Односторонний маршрутн. светофор{}Позволяет нескольким поездам находиться в одном сигнальном блоке, если каждый из них может зарезервировать безопасный путь. Не допускает следования поездов в обратную сторону. -STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Изменение типа сигнала{}Когда кнопка нажата, щёлкните для преобразования существующего сигнала в сигнал выбранного типа и варианта, или щёлкните с нажатым Ctrl для перебора существующих вариантов. Shift+щелчок - оценка стоимости преобразования. +STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Изменение типа сигнала{}Когда кнопка нажата, щелчок по существующему сигналу преобразует его в выбранный тип. Ctrl+щелчок - перебор существующих вариантов. Shift+щелчок - оценка стоимости преобразования. STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Расстояние между сигналами при протягивании STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Уменьшить расстояние между сигналами при протягивании STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Увеличить расстояние между сигналами при протягивании @@ -2983,15 +2983,15 @@ STR_BRIDGE_TUBULAR_SILICON :Трубчат STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Автомобильные коммуникации STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Трамвайные коммуникации STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Строительство автомобильных дорог. При нажатом Ctrl - удаление дороги. При нажатом Shift - оценка стоимости строительства. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Строительство трамвайных путей. При нажатом Ctrl - удаление путей. При нажатом Shift - оценка стоимости строительства. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Строительство автодорог в автоматическом режиме. При нажатом Ctrl - удаление дороги. При нажатом Shift - оценка стоимости строительства. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Строительство трамвайных путей. При нажатом Ctrl - их удаление. При нажатом Shift - оценка стоимости работ. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Строительство автомобильных дорог в автоматическом режиме. При нажатом Ctrl - удаление дороги. При нажатом Shift - оценка стоимости работ. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Строительство трамвайных путей в автоматическом режиме. При нажатом Ctrl - удаление путей. При нажатом Shift - оценка стоимости строительства. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Строительство гаражей (для приобретения и обслуживания автомобилей). При нажатом Shift - оценка стоимости строительства. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Строительство трамвайных депо (для приобретения и обслуживания трамваев). При нажатом Shift - оценка стоимости строительства. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Строительство автобусных остановок. Нажатие Ctrl позволяет объединять станции. При нажатом Shift - оценка стоимости строительства. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Строительство трамвайных остановок. Нажатие Ctrl позволяет объединять станции. При нажатом Shift - оценка стоимости строительства. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Строительство грузовых терминалов. Нажатие Ctrl позволяет объединять станции. При нажатом Shift - оценка стоимости строительства. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Строительство грузовых трамвайных станций. Нажатие Ctrl позволяет объединять станции. При нажатом Shift - оценка стоимости строительства. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Строительство автобусных остановок. Ctrl+щелчок - объединение новой остановки с существующей. Shift+щелчок - оценка стоимости строительства. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Строительство трамвайных остановок. Ctrl+щелчок - объединение новой остановки с существующей. Shift+щелчок - оценка стоимости строительства. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Строительство грузовых терминалов. Ctrl+щелчок - объединение нового терминала с существующим. Shift+щелчок - оценка стоимости строительства. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Строительство грузовых трамвайных станций. Ctrl+щелчок - объединение новой станции с существующей. Shift+щелчок - оценка стоимости строительства. STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Включить/отключить односторонние дороги STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Строительство автомобильных мостов. При нажатом Shift - оценка стоимости строительства. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Строительство трамвайных мостов. При нажатом Shift - оценка стоимости строительства. @@ -3042,7 +3042,7 @@ STR_STATION_BUILD_DOCK_CAPTION :{WHITE}Прис # Airport toolbar STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Аэропорты -STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Строительство аэропортов. Нажатие Ctrl позволяет объединять станции. При нажатом Shift - оценка стоимости строительства. +STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Строительство аэропортов. Ctrl+щелчок - объединение нового аэропорта с существующим. Shift+щелчок - оценка стоимости строительства. # Airport construction window STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Выбор аэропорта @@ -3073,14 +3073,14 @@ STR_STATION_BUILD_NOISE :{BLACK}Прои # Landscaping toolbar STR_LANDSCAPING_TOOLBAR :{WHITE}Ландшафт -STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Опустить угол земли. Перетаскивание опускает первый выбранный угол и выравнивает выбранную область до новой высоты угла.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости строительства. -STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Поднять угол земли. Перетаскивание поднимает первый выбранный угол и выравнивает выбранную область до новой высоты угла.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости строительства. -STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Выровнять землю до высоты первого выбранного угла.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости выравнивания. -STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Покупка земли.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости покупки. +STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Опустить угол земли. Щелчок+перетаскивание опускает выбранный угол и прямоугольную область на новую глубину. Ctrl+щелчок+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости работ. +STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Поднять угол земли. Щелчок+перетаскивание поднимает выбранный угол и прямоугольную область на новую высоту. Ctrl+щелчок+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости работ. +STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Выровнять прямоугольный участок земли до высоты первого выбранного угла. Ctrl+щелчок+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости работ. +STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Покупка земли для будущего использования. Ctrl+щелчок+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости покупки. # Object construction window STR_OBJECT_BUILD_CAPTION :{WHITE}Выбор объекта -STR_OBJECT_BUILD_TOOLTIP :{BLACK}Выберите создаваемый объект.{}При нажатом Ctrl они размещаются в диагональной области.{}При нажатом Shift - оценка стоимости постройки. +STR_OBJECT_BUILD_TOOLTIP :{BLACK}Выберите создаваемый объект. Ctrl+щелчок+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости строительства. STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Выберите класс объекта для строительства STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Предварительный просмотр объекта STR_OBJECT_BUILD_SIZE :{BLACK}Размер: {GOLD}{NUM} × {NUM} клеток @@ -3092,7 +3092,7 @@ STR_OBJECT_CLASS_TRNS :Передат STR_PLANT_TREE_CAPTION :{WHITE}Деревья STR_PLANT_TREE_TOOLTIP :{BLACK}Выберите тип деревьев для посадки. Если на участке уже есть деревья, будут добавлены несколько деревьев различного типа, независимо от выбранного. STR_TREES_RANDOM_TYPE :{BLACK}Деревья случайного типа -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Высадка деревьев случайного типа.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости высадки. +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Высадка деревьев случайного типа. Ctrl+щелчок+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости высадки. STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Расставить по карте STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Разместить деревья на местности случайным образом STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Дерево @@ -3796,7 +3796,7 @@ STR_GOALS_TEXT :{ORANGE}{STRING STR_GOALS_NONE :{ORANGE}- Нет - STR_GOALS_PROGRESS :{ORANGE}{STRING} STR_GOALS_PROGRESS_COMPLETE :{GREEN}{STRING} -STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Щёлкните по задаче, чтобы показать предприятие/город/клетку. Ctrl+щелчок показывает в новом окне. +STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Щёлкните по задаче, чтобы показать предприятие/город/место. Ctrl+щелчок показывает в новом окне. # Goal question window STR_GOAL_QUESTION_CAPTION_QUESTION :{BLACK}Вопрос @@ -3832,7 +3832,7 @@ STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING STR_SUBSIDIES_NONE :{ORANGE}- Нет - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Субсидируемые маршруты: STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} по маршруту из {STRING} в {STRING}{YELLOW} ({COMPANY}{YELLOW}, до {DATE_SHORT}) -STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Нажмите на маршрут для отображения предприятия/города. Ctrl+щелчок показывает в дополнительном окне. +STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Щелчок по маршруту покажет нужные предприятия/города. Ctrl+щелчок откроет их в дополнительных окнах. # Story book window STR_STORY_BOOK_CAPTION :{WHITE}История компании «{COMPANY}» @@ -3970,7 +3970,7 @@ STR_FINANCES_BANK_BALANCE :{WHITE}{CURRENC STR_FINANCES_BORROW_BUTTON :{BLACK}Занять {CURRENCY_LONG} STR_FINANCES_BORROW_TOOLTIP :{BLACK}Взять деньги в кредит. Ctrl+щелчок - взять максимально возможную сумму. STR_FINANCES_REPAY_BUTTON :{BLACK}Отдать {CURRENCY_LONG} -STR_FINANCES_REPAY_TOOLTIP :{BLACK}Вернуть часть кредита. Ctrl+щелчок - вернуть всё, по возможности. +STR_FINANCES_REPAY_TOOLTIP :{BLACK}Вернуть часть кредита. Ctrl+щелчок - вернуть максимально возможную сумму. STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Инфраструктура # Company view @@ -3999,7 +3999,7 @@ STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Пост STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}Осмотреть штаб STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}Осмотреть штаб-квартиру компании STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Переместить -STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Переместить штаб-квартиру компании в другое место за 1% оценочной стоимости капитала компании. Shift+щелчок - оценка стоимости переноса. +STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Переместить штаб-квартиру компании в другое место за 1% оценочной стоимости компании. Shift+щелчок - оценка стоимости переноса. STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Подробности STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}Посмотреть подробный состав инфраструктуры STR_COMPANY_VIEW_GIVE_MONEY_BUTTON :{BLACK}Передать деньги @@ -4194,10 +4194,10 @@ STR_CARGO_TYPE_FILTER_FREIGHT :Груз STR_CARGO_TYPE_FILTER_NONE :Нет ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Список железнодорожного транспорта - щёлкните для получения информации. Ctrl+щелчок скроет/покажет ТС. -STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Список автотранспорта - щёлкните для получения информации. Ctrl+щелчок скроет/покажет выбранный автомобиль. -STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Список судов - щёлкните для получения информации. Ctrl+щелчок скроет/покажет выбранное судно. -STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Список воздушных судов - щёлкните для получения информации. Ctrl+щелчок скроет/покажет ТС. +STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Список доступных моделей железнодорожного транспорта. Выберите одну из них для получения информации. Ctrl+щелчок скроет/покажет выбранную модель. +STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Список доступных моделей автотранспорта. Выберите одну из них для получения информации. Ctrl+щелчок скроет/покажет выбранную модель. +STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Список доступных моделей судов. Выберите одну из них для получения информации. Ctrl+щелчок скроет/покажет выбранную модель. +STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Список доступных моделей воздушных судов. Выберите одну из них для получения информации. Ctrl+щелчок скроет/покажет выбранную модель. ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Купить @@ -4271,7 +4271,7 @@ STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} е STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT}) ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Поезда в депо. Изменяйте составы с помощью перетаскивания; нажмите ПКМ для получения информации.{}При нажатой Ctrl обе функции применяются от выбранного вагона до конца состава. +STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Поезда в депо. Формируйте составы с помощью перетаскивания локомотивов и вагонов. Нажмите ПКМ для получения информации. При нажатой Ctrl обе функции работают от выбранного вагона до конца состава. STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Автомобили в гараже. Нажмите ПКМ для получения информации. STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Суда в доке. Нажмите ПКМ для получения информации. STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Воздушный транспорт в ангаре. Нажмите ПКМ для получения информации. @@ -4316,7 +4316,7 @@ STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Копи STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Создать копию состава. Нажмите на кнопку, а затем на поезд внутри или снаружи депо. Ctrl+щелчок создаст поезд с общим маршрутом. Shift+щелчок - оценка стоимости покупки. STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Создать копию автомобиля. Нажмите на кнопку, а затем на машину внутри или снаружи гаража. Ctrl+щелчок создаст автомобиль с общим маршрутом. Shift+щелчок - оценка стоимости покупки. STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Создать копию судна. Нажмите на кнопку, а затем на судно внутри или снаружи дока. Ctrl+щелчок создаст судно с общим маршрутом. Shift+щелчок - оценка стоимости покупки. -STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Создать копию воздушного судна. Нажмите на кнопку, а потом на воздушное судно внутри или снаружи ангара. Ctrl+щелчок создаст копию с общим маршрутом. Shift+щелчок - оценка стоимости покупки. +STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Создать копию воздушного судна. Нажмите на кнопку, а потом на воздушное судно внутри или снаружи ангара. Ctrl+щелчок создаст копию с общим маршрутом. При нажатом Shift - оценка стоимости покупки. ###length VEHICLE_TYPES STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Показать депо в основном окне. Ctrl+щелчок - показать в дополнительном окне. @@ -4435,7 +4435,7 @@ STR_REPLACE_REMOVE_WAGON_GROUP_HELP :{STRING}{}Ctrl+ STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE} ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Показать поезд в основном окне.{}Двойной щелчок - следить за ним в основном окне.{}Ctrl+щелчок - показать в дополнительном окне. +STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Показать поезд в основном окне. Двойной щелчок - следить за ним в основном окне. Ctrl+щелчок - показать в дополнительном окне. STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Показать автомобиль в основном окне.{}Двойной щелчок - следить за ним в основном окне.{}Ctrl+щелчок - показать в дополнительном окне. STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Показать судно в основном окне.{}Двойной щелчок - следить за ним в основном окне.{}Ctrl+щелчок - показать в дополнительном окне. STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Показать воздушное судно в основном окне.{}Двойной щелчок - следить за ним в основном окне.{}Ctrl+щелчок - показать в дополнительном окне. @@ -4448,9 +4448,9 @@ STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Отпр ###length VEHICLE_TYPES STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Создать копию состава. Ctrl+щелчок создаст поезд с общим маршрутом. Shift+щелчок - оценка стоимости покупки. -STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Создать копию автомобиля. Ctrl+щелчок создаст автомобиль с общим маршрутом. Shift+щелчок - оценка стоимости покупки. +STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Создать копию автомобиля. Ctrl+щелчок создаст автомобиль с общим маршрутом. При нажатом Shift - оценка стоимости покупки. STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Создать копию судна. Ctrl+щелчок создаст судно с общим маршрутом. Shift+щелчок - оценка стоимости покупки. -STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Создать копию воздушного судна. Ctrl+щелчок создаст копию с общим маршрутом. Shift+щелчок - оценка стоимости покупки. +STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Создать копию воздушного судна. Ctrl+щелчок создаст копию с общим маршрутом. При нажатом Shift - оценка стоимости покупки. STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Заставить поезд проехать на красный сигнал светофора STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Развернуть поезд diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index cae88e708a..5fe4ccdfba 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -386,7 +386,7 @@ STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}显示 STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}显示公司的船只列表。按住 Ctrl 键单击可以切换组群和船只列表。 STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}显示公司的飞机列表。按住 Ctrl 键单击可以切换组群和飞机列表。 STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}放大视图 -STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}缩小视图 +STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}缩小 STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}显示铁路建设工具 STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}建设道路 STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}建造电车轨道 @@ -407,7 +407,7 @@ STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}将开 STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}点击输入开始年份 STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}显示地图和城镇列表 STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}生成地形 -STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}生成城镇 +STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}城镇生成 STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}生成工业 STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}公路建设 STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}电车道建设 @@ -2151,7 +2151,7 @@ STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}显示 STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}显示高分榜 STR_INTRO_TOOLTIP_HELP :{BLACK}获取说明和在线资源 STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}显示设置 -STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}显示GRF设定 +STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}显示 NewGRF 设定 STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}连接服务器并查找扩展包 STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}显示AI设置 STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}显示游戏脚本设置 @@ -2727,7 +2727,7 @@ STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :单轨铁路建 STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :磁悬浮铁路建设 STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}建设轨道。按住 Ctrl 键切换建设/移除轨道。按住 Shift 键显示预计费用。 -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}使用多向路轨工具铺设轨道。按住 Ctrl 键切换建设/移除轨道。按住 Shift 键显示预计费用。 +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}使用多向路轨工具铺设轨道。按住 键点选以移除轨道。按住 键点选以显示预计费用。 STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}建设列车车库(可以购买或维护列车)按住 Shift 键显示预计费用。 STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}建设铁路路点。按住 Ctrl 键允许合并路点。按住 Shift 键显示预计费用。 STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}建设火车站。按住 Ctrl 键允许合并站台。按住 Shift 键显示预计费用。 @@ -2812,7 +2812,7 @@ STR_BRIDGE_TUBULAR_SILICON :硅制函梁桥 STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}道路建设 STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}电车建设 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}建设道路。按住 Ctrl 键切换建设/移除道路。 -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}建造电车轨道。按住 Ctrl 键切换建设/移除电车轨道。 +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}建造电车轨道。按住 键以移除电车轨道。按住 键以显示建设成本。 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}使用多向道路工具建设道路。按住 Ctrl 键切换建设/移除道路。 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}使用多向轨道工具建设电车轨道。按住 Ctrl 键切换建设/移除电车轨道。 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}建设汽车车库(可以购买或维护车辆) @@ -2820,7 +2820,7 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}建造 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}建设公共汽车站。按住 Ctrl 键允许合并站台 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}建设客运电车站。按住 Ctrl 键允许合并站台 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}建设汽车货场。按住 Ctrl 键允许合并站台 -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}建设货运电车站。按住 Ctrl 键允许合并站台 +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}建设货运电车站。按住 键单击以合并站台。按住 键以显示预计费用。 STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}选择是否建设单行道 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}建设公路桥梁 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}建设电车桥梁 @@ -2828,7 +2828,7 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}建设 STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}建设电车隧道 STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}建设/拆除 公路 STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}建设/拆除 电车轨道 -STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}转换/升级 公路类型。按住 Shift 键显示预计费用。 +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}转换或升级道路类型。按住 键单击以显示预计费用。 STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :转换/升级 电车道类型。按住 Shift 键显示预计费用。 STR_ROAD_NAME_ROAD :公路 @@ -4043,7 +4043,7 @@ STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}购买 STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}购买选定的飞机,按住 Shift 键单击可以显示所需资金 ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}购买并改装选定的列车。按住 Shift 键单击可以显示所需资金 +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}购买并改装选定的列车。按住 键单击可以显示所需资金 STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}购买并改装选定的汽车。按住 Shift 键单击可以显示所需资金 STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}购买并改装选定的船只。按住 Shift 键单击可以显示所需资金 STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :购买并改装选定的飞机,按住 Shift 键单击可以显示所需资金 @@ -4144,7 +4144,7 @@ STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}复制 STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}复制飞机。按此按钮后{}点击一个在机库内或外面的飞机即可。按住 Ctrl 键单击可以同时共享调度计划,按住 Shift 键单击可以显示所需资金 ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到列车库所在的位置. 单击的同时按住Ctrl会在新视点中显示列车库位置 +STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到列车车库所在的位置。按住 单击会在新视点中显示列车车库位置。 STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到车库所在的位置. 单击的同时按住Ctrl会在新视点中显示车库位置 STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到当前船坞的位置. 单击的同时按住Ctrl会在新视点中显示船坞位置 STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到当前机库的位置. 单击的同时按住Ctrl会在新视点中显示机库位置 From 75f21065c97bc8da765c0ec2fe592ffc48e82db9 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Mon, 22 Jan 2024 19:42:47 +0100 Subject: [PATCH 03/52] Codechange: refactor DecodeHexText to a generic purpose ConvertHexToBytes (#11866) DecodeHexText() does more than just decoding hex. ConvertHexToBytes() now only does pure hex decoding. This required a bit of refactoring for the code using DecodeHexText(). --- src/settings.cpp | 81 ++++++++++++++------------------------- src/string.cpp | 49 +++++++++++++++++++++++ src/string_func.h | 2 + src/tests/string_func.cpp | 42 ++++++++++++++++++++ 4 files changed, 122 insertions(+), 52 deletions(-) diff --git a/src/settings.cpp b/src/settings.cpp index 0dd0a304b1..12bf89cab5 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -948,40 +948,6 @@ static void GameLoadConfig(const IniFile &ini, const char *grpname) if (item.value.has_value()) config->StringToSettings(*item.value); } -/** - * Convert a character to a hex nibble value, or \c -1 otherwise. - * @param c Character to convert. - * @return Hex value of the character, or \c -1 if not a hex digit. - */ -static int DecodeHexNibble(char c) -{ - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'A' && c <= 'F') return c + 10 - 'A'; - if (c >= 'a' && c <= 'f') return c + 10 - 'a'; - return -1; -} - -/** - * Parse a sequence of characters (supposedly hex digits) into a sequence of bytes. - * After the hex number should be a \c '|' character. - * @param pos First character to convert. - * @param[out] dest Output byte array to write the bytes. - * @param dest_size Number of bytes in \a dest. - * @return Whether reading was successful. - */ -static bool DecodeHexText(const char *pos, uint8_t *dest, size_t dest_size) -{ - while (dest_size > 0) { - int hi = DecodeHexNibble(pos[0]); - int lo = (hi >= 0) ? DecodeHexNibble(pos[1]) : -1; - if (lo < 0) return false; - *dest++ = (hi << 4) | lo; - pos += 2; - dest_size--; - } - return *pos == '|'; -} - /** * Load BaseGraphics set selection and configuration. */ @@ -1034,29 +1000,40 @@ static GRFConfig *GRFLoadConfig(const IniFile &ini, const char *grpname, bool is for (const IniItem &item : group->items) { GRFConfig *c = nullptr; - uint8_t grfid_buf[4]; + std::array grfid_buf; MD5Hash md5sum; - const char *filename = item.name.c_str(); - bool has_grfid = false; + std::string_view item_name = item.name; bool has_md5sum = false; /* Try reading "|" and on success, "|". */ - has_grfid = DecodeHexText(filename, grfid_buf, lengthof(grfid_buf)); - if (has_grfid) { - filename += 1 + 2 * lengthof(grfid_buf); - has_md5sum = DecodeHexText(filename, md5sum.data(), md5sum.size()); - if (has_md5sum) filename += 1 + 2 * md5sum.size(); - - uint32_t grfid = grfid_buf[0] | (grfid_buf[1] << 8) | (grfid_buf[2] << 16) | (grfid_buf[3] << 24); - if (has_md5sum) { - const GRFConfig *s = FindGRFConfig(grfid, FGCM_EXACT, &md5sum); - if (s != nullptr) c = new GRFConfig(*s); - } - if (c == nullptr && !FioCheckFileExists(filename, NEWGRF_DIR)) { - const GRFConfig *s = FindGRFConfig(grfid, FGCM_NEWEST_VALID); - if (s != nullptr) c = new GRFConfig(*s); + auto grfid_pos = item_name.find("|"); + if (grfid_pos != std::string_view::npos) { + std::string_view grfid_str = item_name.substr(0, grfid_pos); + + if (ConvertHexToBytes(grfid_str, grfid_buf)) { + item_name = item_name.substr(grfid_pos + 1); + + auto md5sum_pos = item_name.find("|"); + if (md5sum_pos != std::string_view::npos) { + std::string_view md5sum_str = item_name.substr(0, md5sum_pos); + + has_md5sum = ConvertHexToBytes(md5sum_str, md5sum); + if (has_md5sum) item_name = item_name.substr(md5sum_pos + 1); + } + + uint32_t grfid = grfid_buf[0] | (grfid_buf[1] << 8) | (grfid_buf[2] << 16) | (grfid_buf[3] << 24); + if (has_md5sum) { + const GRFConfig *s = FindGRFConfig(grfid, FGCM_EXACT, &md5sum); + if (s != nullptr) c = new GRFConfig(*s); + } + if (c == nullptr && !FioCheckFileExists(std::string(item_name), NEWGRF_DIR)) { + const GRFConfig *s = FindGRFConfig(grfid, FGCM_NEWEST_VALID); + if (s != nullptr) c = new GRFConfig(*s); + } } } + std::string filename = std::string(item_name); + if (c == nullptr) c = new GRFConfig(filename); /* Parse parameters */ @@ -1084,7 +1061,7 @@ static GRFConfig *GRFLoadConfig(const IniFile &ini, const char *grpname, bool is SetDParam(1, STR_CONFIG_ERROR_INVALID_GRF_UNKNOWN); } - SetDParamStr(0, StrEmpty(filename) ? item.name.c_str() : filename); + SetDParamStr(0, filename.empty() ? item.name.c_str() : filename); ShowErrorMessage(STR_CONFIG_ERROR, STR_CONFIG_ERROR_INVALID_GRF, WL_CRITICAL); delete c; continue; diff --git a/src/string.cpp b/src/string.cpp index 3bc3e223f1..f695194906 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -702,6 +702,55 @@ static int ICUStringContains(const std::string_view str, const std::string_view return ci_str.find(ci_value) != CaseInsensitiveStringView::npos; } +/** + * Convert a single hex-nibble to a byte. + * + * @param c The hex-nibble to convert. + * @return The byte the hex-nibble represents, or -1 if it is not a valid hex-nibble. + */ +static int ConvertHexNibbleToByte(char c) +{ + if (c >= '0' && c <= '9') return c - '0'; + if (c >= 'A' && c <= 'F') return c + 10 - 'A'; + if (c >= 'a' && c <= 'f') return c + 10 - 'a'; + return -1; +} + +/** + * Convert a hex-string to a byte-array, while validating it was actually hex. + * + * @param hex The hex-string to convert. + * @param bytes The byte-array to write the result to. + * + * @note The length of the hex-string has to be exactly twice that of the length + * of the byte-array, otherwise conversion will fail. + * + * @return True iff the hex-string was valid and the conversion succeeded. + */ +bool ConvertHexToBytes(std::string_view hex, std::span bytes) +{ + if (bytes.size() != hex.size() / 2) { + return false; + } + + /* Hex-string lengths are always divisible by 2. */ + if (hex.size() % 2 != 0) { + return false; + } + + for (size_t i = 0; i < hex.size() / 2; i++) { + auto hi = ConvertHexNibbleToByte(hex[i * 2]); + auto lo = ConvertHexNibbleToByte(hex[i * 2 + 1]); + + if (hi < 0 || lo < 0) { + return false; + } + + bytes[i] = (hi << 4) | lo; + } + + return true; +} #ifdef WITH_UNISCRIBE diff --git a/src/string_func.h b/src/string_func.h index 470a8eca3d..df487f12d2 100644 --- a/src/string_func.h +++ b/src/string_func.h @@ -39,6 +39,8 @@ void StrTrimInPlace(std::string &str); [[nodiscard]] bool StrNaturalContains(const std::string_view str, const std::string_view value); [[nodiscard]] bool StrNaturalContainsIgnoreCase(const std::string_view str, const std::string_view value); +bool ConvertHexToBytes(std::string_view hex, std::span bytes); + /** Case insensitive comparator for strings, for example for use in std::map. */ struct CaseInsensitiveComparator { bool operator()(const std::string_view s1, const std::string_view s2) const { return StrCompareIgnoreCase(s1, s2) < 0; } diff --git a/src/tests/string_func.cpp b/src/tests/string_func.cpp index eb61f0bac2..ca238db46f 100644 --- a/src/tests/string_func.cpp +++ b/src/tests/string_func.cpp @@ -342,3 +342,45 @@ TEST_CASE("FormatArrayAsHex") CHECK(FormatArrayAsHex(std::array{0x12}) == "12"); CHECK(FormatArrayAsHex(std::array{0x13, 0x38, 0x42, 0xAF}) == "133842AF"); } + +TEST_CASE("ConvertHexToBytes") +{ + CHECK(ConvertHexToBytes("", {}) == true); + CHECK(ConvertHexToBytes("1", {}) == false); + CHECK(ConvertHexToBytes("12", {}) == false); + + std::array bytes1; + CHECK(ConvertHexToBytes("1", bytes1) == false); + CHECK(ConvertHexToBytes("12", bytes1) == true); + CHECK(bytes1[0] == 0x12); + CHECK(ConvertHexToBytes("123", bytes1) == false); + CHECK(ConvertHexToBytes("1g", bytes1) == false); + CHECK(ConvertHexToBytes("g1", bytes1) == false); + + std::array bytes2; + CHECK(ConvertHexToBytes("12", bytes2) == false); + CHECK(ConvertHexToBytes("1234", bytes2) == true); + CHECK(bytes2[0] == 0x12); + CHECK(bytes2[1] == 0x34); + + std::array bytes3; + CHECK(ConvertHexToBytes("123456789abcdef0", bytes3) == true); + CHECK(bytes3[0] == 0x12); + CHECK(bytes3[1] == 0x34); + CHECK(bytes3[2] == 0x56); + CHECK(bytes3[3] == 0x78); + CHECK(bytes3[4] == 0x9a); + CHECK(bytes3[5] == 0xbc); + CHECK(bytes3[6] == 0xde); + CHECK(bytes3[7] == 0xf0); + + CHECK(ConvertHexToBytes("123456789ABCDEF0", bytes3) == true); + CHECK(bytes3[0] == 0x12); + CHECK(bytes3[1] == 0x34); + CHECK(bytes3[2] == 0x56); + CHECK(bytes3[3] == 0x78); + CHECK(bytes3[4] == 0x9a); + CHECK(bytes3[5] == 0xbc); + CHECK(bytes3[6] == 0xde); + CHECK(bytes3[7] == 0xf0); +} From d3b2a576de7db072a3ba2e080abeaa5d2d6aeec6 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Mon, 22 Jan 2024 20:22:45 +0100 Subject: [PATCH 04/52] Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) --- README.md | 14 +- cmake/Options.cmake | 10 + src/3rdparty/CMakeLists.txt | 1 + .../CMakeLists.txt | 4 + .../openttd_social_integration_api/LICENSE | 20 ++ .../openttd_social_integration_api.h | 38 +++ .../openttd_social_integration_api_v1.h | 157 ++++++++++ src/CMakeLists.txt | 4 + src/console_cmds.cpp | 1 + src/crashlog.cpp | 3 + src/fileio.cpp | 5 +- src/fileio_type.h | 1 + src/lang/english.txt | 16 + src/network/network_client.cpp | 3 + src/network/network_survey.cpp | 1 + src/openttd.cpp | 44 +++ src/settings_gui.cpp | 199 ++++++++++++- src/signature.cpp | 279 ++++++++++++++++++ src/signature.h | 15 + src/social_integration.cpp | 246 +++++++++++++++ src/social_integration.h | 85 ++++++ src/survey.cpp | 33 +++ src/survey.h | 1 + src/widgets/settings_widget.h | 5 + 24 files changed, 1181 insertions(+), 4 deletions(-) create mode 100644 src/3rdparty/openttd_social_integration_api/CMakeLists.txt create mode 100644 src/3rdparty/openttd_social_integration_api/LICENSE create mode 100644 src/3rdparty/openttd_social_integration_api/openttd_social_integration_api.h create mode 100644 src/3rdparty/openttd_social_integration_api/openttd_social_integration_api_v1.h create mode 100644 src/signature.cpp create mode 100644 src/signature.h create mode 100644 src/social_integration.cpp create mode 100644 src/social_integration.h diff --git a/README.md b/README.md index 594241a7a2..1943ed6bc3 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,15 @@ Most types of add-on content can be downloaded within OpenTTD via the 'Check Onl Add-on content can also be installed manually, but that's more complicated; the [OpenTTD wiki](https://wiki.openttd.org/) may offer help with that, or the [OpenTTD directory structure guide](./docs/directory_structure.md). +### 1.5.1) Social Integration + +OpenTTD has the ability to load plugins to integrate with Social Platforms like Steam, Discord, etc. + +To enable such integration, the plugin for the specific platform has to be downloaded and stored in the `social_integration` folder. + +See [OpenTTD's website](https://www.openttd.org), under Downloads, for what plugins are available. + + ### 1.6) OpenTTD directories OpenTTD uses its own directory structure to store game data, add-on content etc. @@ -198,7 +207,10 @@ The icu scriptrun implementation in `src/3rdparty/icu` is licensed under the Uni See `src/3rdparty/icu/LICENSE` for the complete license text. The monocypher implementation in `src/3rdparty/monocypher` is licensed under the 2-clause BSD and CC-0 license. -See src/3rdparty/monocypher/LICENSE.md` for the complete license text. +See `src/3rdparty/monocypher/LICENSE.md` for the complete license text. + +The OpenTTD Social Integration API in `src/3rdparty/openttd_social_integration_api` is licensed under the MIT license. +See `src/3rdparty/openttd_social_integration_api/LICENSE` for the complete license text. ## 4.0 Credits diff --git a/cmake/Options.cmake b/cmake/Options.cmake index 371b03d841..3c8692fe4a 100644 --- a/cmake/Options.cmake +++ b/cmake/Options.cmake @@ -67,6 +67,7 @@ function(set_options) option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF) option(OPTION_TOOLS_ONLY "Build only tools target" OFF) option(OPTION_DOCS_ONLY "Build only docs target" OFF) + option(OPTION_ALLOW_INVALID_SIGNATURE "Allow loading of content with invalid signatures" OFF) if (OPTION_DOCS_ONLY) set(OPTION_TOOLS_ONLY ON PARENT_SCOPE) @@ -92,6 +93,11 @@ function(show_options) else() message(STATUS "Option Survey Key - NOT USED") endif() + + if(OPTION_ALLOW_INVALID_SIGNATURE) + message(STATUS "Option Allow Invalid Signature - USED") + message(WARNING "Ignoring invalid signatures is a security risk! Use with care!") + endif() endfunction() # Add the definitions for the options that are selected. @@ -116,4 +122,8 @@ function(add_definitions_based_on_options) if(OPTION_SURVEY_KEY) add_definitions(-DSURVEY_KEY="${OPTION_SURVEY_KEY}") endif() + + if(OPTION_ALLOW_INVALID_SIGNATURE) + add_definitions(-DALLOW_INVALID_SIGNATURE) + endif() endfunction() diff --git a/src/3rdparty/CMakeLists.txt b/src/3rdparty/CMakeLists.txt index f167ffc3ec..4d17f023a5 100644 --- a/src/3rdparty/CMakeLists.txt +++ b/src/3rdparty/CMakeLists.txt @@ -6,3 +6,4 @@ add_subdirectory(monocypher) add_subdirectory(squirrel) add_subdirectory(nlohmann) add_subdirectory(opengl) +add_subdirectory(openttd_social_integration_api) diff --git a/src/3rdparty/openttd_social_integration_api/CMakeLists.txt b/src/3rdparty/openttd_social_integration_api/CMakeLists.txt new file mode 100644 index 0000000000..86cca4a3d6 --- /dev/null +++ b/src/3rdparty/openttd_social_integration_api/CMakeLists.txt @@ -0,0 +1,4 @@ +add_files( + openttd_social_integration_api.h + openttd_social_integration_api_v1.h +) diff --git a/src/3rdparty/openttd_social_integration_api/LICENSE b/src/3rdparty/openttd_social_integration_api/LICENSE new file mode 100644 index 0000000000..8e40136dbd --- /dev/null +++ b/src/3rdparty/openttd_social_integration_api/LICENSE @@ -0,0 +1,20 @@ + Copyright 2024 OpenTTD project + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/3rdparty/openttd_social_integration_api/openttd_social_integration_api.h b/src/3rdparty/openttd_social_integration_api/openttd_social_integration_api.h new file mode 100644 index 0000000000..3a165a1b96 --- /dev/null +++ b/src/3rdparty/openttd_social_integration_api/openttd_social_integration_api.h @@ -0,0 +1,38 @@ +/* + * Copyright 2024 OpenTTD project + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Although all the source-files created by OpenTTD are licensed under the + * GPL-v2, this file is an exception. This file is part of the API for + * social integration plugins, and licensed under the MIT license, to allow + * for non-free implementations. + */ + +/** @file openttd_social_integration_api.h Interface definitions for plugins to report/respond to social integration. */ + +#ifndef OPENTTD_SOCIAL_INTEGRATION_API_H +#define OPENTTD_SOCIAL_INTEGRATION_API_H + +#include "openttd_social_integration_api_v1.h" + +#endif /* OPENTTD_SOCIAL_INTEGRATION_API_H */ diff --git a/src/3rdparty/openttd_social_integration_api/openttd_social_integration_api_v1.h b/src/3rdparty/openttd_social_integration_api/openttd_social_integration_api_v1.h new file mode 100644 index 0000000000..fcf9dcc8a7 --- /dev/null +++ b/src/3rdparty/openttd_social_integration_api/openttd_social_integration_api_v1.h @@ -0,0 +1,157 @@ +/* + * Copyright 2024 OpenTTD project + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Although all the source-files created by OpenTTD are licensed under the + * GPL-v2, this file is an exception. This file is part of the API for + * social integration plugins, and licensed under the MIT license, to allow + * for non-free implementations. + */ + +/** @file v1.h Version 1 definition of the OpenTTD Social Integration Plugin API. */ + +#ifndef OPENTTD_SOCIAL_INTEGRATION_API_V1_H +#define OPENTTD_SOCIAL_INTEGRATION_API_V1_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** Pointers supplied by the plugin for OpenTTD to use. */ +struct OpenTTD_SocialIntegration_v1_PluginInfo { + /** + * The Social Platform this plugin is for. + * + * UTF-8, nul-terminated. The plugin is and remains the owner of the memory. + * + * As there can only be one plugin active for each Social Platform, this + * value is used to determine which plugin to use. + * + * A complete list of names can be found here: + * https://wiki.openttd.org/en/Development/Social%20Integration + * + * Please use names from that list, including capitalization. + * + * If you create a plugin for a new Social Platform, please add it to the + * wiki page. + */ + const char *social_platform; + + const char *name; ///< Full name of the plugin. UTF-8, nul-terminated. The plugin is and remains the owner of the memory. + const char *version; ///< Version of the plugin. UTF-8, nul-terminated. The plugin is and remains the owner of the memory. +}; + +/** Pointers supplied by the plugin for OpenTTD to use. */ +struct OpenTTD_SocialIntegration_v1_PluginApi { + /** + * OpenTTD tells the plugin to shut down. + * + * The plugin should free any resources it allocated, and must not call any of the callback functions after this call. + */ + void (*shutdown)(); + + /** + * OpenTTD calls this function at regular intervals, to handle any callbacks the plugin might have. + * + * It is also safe to call the OpenTTD_SocialIntegrationCallbacks functions here. + * + * @return True if the plugin wants to be called again, false if the plugin wants to be unloaded. + */ + bool (*run_callbacks)(); + + /** + * The player has entered the main menu. + */ + void (*event_enter_main_menu)(); + + /** + * The player has entered the Scenario Editor. + * + * @param map_width The width of the map in tiles. + * @param map_height The height of the map in tiles. + */ + void (*event_enter_scenario_editor)(unsigned int map_width, unsigned int map_height); + + /** + * The player has entered a singleplayer game. + * + * @param map_width The width of the map in tiles. + * @param map_height The height of the map in tiles. + */ + void (*event_enter_singleplayer)(unsigned int map_width, unsigned int map_height); + + /** + * The player has entered a multiplayer game. + * + * @param map_width The width of the map in tiles. + * @param map_height The height of the map in tiles. + */ + void (*event_enter_multiplayer)(unsigned int map_width, unsigned int map_height); + + /** + * The player is joining a multiplayer game. + * + * This is followed by event_enter_multiplayer() if the join was successful. + */ + void (*event_joining_multiplayer)(); +}; + +/** Pointers supplied by OpenTTD, for the plugin to use. */ +struct OpenTTD_SocialIntegration_v1_OpenTTDInfo { + const char *openttd_version; ///< Version of OpenTTD. UTF-8, nul-terminated. OpenTTD is and remains the owner of the memory. +}; + +/** The result of the initialization. */ +enum OpenTTD_SocialIntegration_v1_InitResult : int { + OTTD_SOCIAL_INTEGRATION_V1_INIT_SUCCESS = 1, ///< Plugin initialized successfully. + OTTD_SOCIAL_INTEGRATION_V1_INIT_FAILED = -1, ///< Plugin failed to initialize (generic error). + OTTD_SOCIAL_INTEGRATION_V1_INIT_PLATFORM_NOT_RUNNING = -2, ///< The Social Platform is not running. +}; + +/** + * Type of the Init function the plugin is expected to export from its dynamic library. + * + * The plugin has to export the implementation of this function as "SocialIntegration_vN_Init", where N is the API version this entry point is for. + * A single plugin can have multiple versions implemented. + * + * @param[out] plugin_api Structure the plugin must fill with pointers. Can contain nullptr if the plugin does not support a feature. The plugin is owner of the memory. + * @param[in] openttd_info Structure that OpenTTD filled with pointers. All pointers will remain valid until shutdown(). OpenTTD is owner of the memory. + * @return The status of the initialization. + */ +typedef OpenTTD_SocialIntegration_v1_InitResult (*OpenTTD_SocialIntegration_v1_Init)(OpenTTD_SocialIntegration_v1_PluginApi *plugin_api, const OpenTTD_SocialIntegration_v1_OpenTTDInfo *openttd_info); + +/** + * Type of the GetInfo function the plugin is expected to export from its dynamic library. + * + * The plugin has to export the implementation of this function as "SocialIntegration_vN_GetInfo", where N is the API version this entry point is for. + * A single plugin can have multiple versions implemented. + * + * @param[out] plugin_info Structure the plugin must fill with pointers. The plugin is owner of the memory. + */ +typedef void (*OpenTTD_SocialIntegration_v1_GetInfo)(OpenTTD_SocialIntegration_v1_PluginInfo *plugin_info); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* OPENTTD_SOCIAL_INTEGRATION_API_V1_H */ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2a6275cd35..ebb946ae4e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -382,6 +382,8 @@ add_files( signal.cpp signal_func.h signal_type.h + signature.cpp + signature.h signs.cpp signs_base.h signs_cmd.cpp @@ -393,6 +395,8 @@ add_files( slope_type.h smallmap_gui.cpp smallmap_gui.h + social_integration.cpp + social_integration.h sortlist_type.h sound.cpp sound_func.h diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 9c72b8fe3e..d47e0cdc5a 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -2141,6 +2141,7 @@ DEF_CONSOLE_CMD(ConListDirs) { SAVE_DIR, "save", true }, { AUTOSAVE_DIR, "autosave", true }, { SCREENSHOT_DIR, "screenshot", true }, + { SOCIAL_INTEGRATION_DIR, "social_integration", true }, }; if (argc != 2) { diff --git a/src/crashlog.cpp b/src/crashlog.cpp index 682d35f7c1..eae4a3bef8 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -122,6 +122,9 @@ void CrashLog::FillCrashLog() if (!this->TryExecute("libraries", [&info]() { SurveyLibraries(info["libraries"]); return true; })) { info["libraries"] = "crashed while gathering information"; } + if (!this->TryExecute("plugins", [&info]() { SurveyPlugins(info["plugins"]); return true; })) { + info["plugins"] = "crashed while gathering information"; + } } { diff --git a/src/fileio.cpp b/src/fileio.cpp index 05aa8718b7..26792fa596 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -52,6 +52,7 @@ static const char * const _subdirs[] = { "game" PATHSEP, "game" PATHSEP "library" PATHSEP, "screenshot" PATHSEP, + "social_integration" PATHSEP, }; static_assert(lengthof(_subdirs) == NUM_SUBDIRS); @@ -1054,7 +1055,7 @@ void DeterminePaths(const char *exe, bool only_local_path) Debug(misc, 1, "{} found as personal directory", _personal_dir); static const Subdirectory default_subdirs[] = { - SAVE_DIR, AUTOSAVE_DIR, SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR, GAME_DIR, GAME_LIBRARY_DIR, SCREENSHOT_DIR + SAVE_DIR, AUTOSAVE_DIR, SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR, GAME_DIR, GAME_LIBRARY_DIR, SCREENSHOT_DIR, SOCIAL_INTEGRATION_DIR }; for (uint i = 0; i < lengthof(default_subdirs); i++) { @@ -1068,7 +1069,7 @@ void DeterminePaths(const char *exe, bool only_local_path) FillValidSearchPaths(only_local_path); /* Create the directory for each of the types of content */ - const Subdirectory dirs[] = { SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR, GAME_DIR, GAME_LIBRARY_DIR }; + const Subdirectory dirs[] = { SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR, GAME_DIR, GAME_LIBRARY_DIR, SOCIAL_INTEGRATION_DIR }; for (uint i = 0; i < lengthof(dirs); i++) { FioCreateDirectory(FioGetDirectory(SP_AUTODOWNLOAD_DIR, dirs[i])); } diff --git a/src/fileio_type.h b/src/fileio_type.h index 66d502d88a..c871c1c14b 100644 --- a/src/fileio_type.h +++ b/src/fileio_type.h @@ -121,6 +121,7 @@ enum Subdirectory { GAME_DIR, ///< Subdirectory for all game scripts GAME_LIBRARY_DIR, ///< Subdirectory for all GS libraries SCREENSHOT_DIR, ///< Subdirectory for all screenshots + SOCIAL_INTEGRATION_DIR, ///< Subdirectory for all social integration plugins NUM_SUBDIRS, ///< Number of subdirectories NO_DIRECTORY, ///< A path without any base directory }; diff --git a/src/lang/english.txt b/src/lang/english.txt index 35600f0b19..af9418d5b1 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -943,6 +943,8 @@ STR_GAME_OPTIONS_TAB_GRAPHICS :Graphics STR_GAME_OPTIONS_TAB_GRAPHICS_TT :{BLACK}Choose graphics settings STR_GAME_OPTIONS_TAB_SOUND :Sound STR_GAME_OPTIONS_TAB_SOUND_TT :{BLACK}Choose sound and music settings +STR_GAME_OPTIONS_TAB_SOCIAL :Social +STR_GAME_OPTIONS_TAB_SOCIAL_TT :{BLACK}Choose social integration settings STR_GAME_OPTIONS_VOLUME :Volume STR_GAME_OPTIONS_SFX_VOLUME :Sound effects @@ -1082,6 +1084,20 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Base mus STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Select the base music set to use STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Additional information about the base music set +STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :{LTBLUE}(no plugins to integrate with social platforms installed) + +STR_GAME_OPTIONS_SOCIAL_PLUGIN_TITLE :{BLACK}{RAW_STRING} ({RAW_STRING}) +STR_GAME_OPTIONS_SOCIAL_PLUGIN_PLATFORM :{BLACK}Platform: +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE :{BLACK}Plugin state: + +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_RUNNING :{GREEN}Running +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_FAILED :{RED}Failed to initialize +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_PLATFORM_NOT_RUNNING :{ORANGE}{RAW_STRING} not running +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_UNLOADED :{RED}Unloaded +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_DUPLICATE :{RED}Duplicated plugin +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_UNSUPPORTED_API :{RED}Unsupported version +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_INVALID_SIGNATURE :{RED}Invalid signature + STR_BASESET_STATUS :{RAW_STRING} {RED}({NUM} missing/corrupted file{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Failed to retrieve a list of supported resolutions diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 1a177e87d3..008fe64294 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -31,6 +31,7 @@ #include "network_gamelist.h" #include "../core/backup_type.hpp" #include "../thread.h" +#include "../social_integration.h" #include "table/strings.h" @@ -845,6 +846,8 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE(Packet SetLocalCompany(_network_join.company); } + SocialIntegration::EventEnterMultiplayer(Map::SizeX(), Map::SizeY()); + return NETWORK_RECV_STATUS_OKAY; } diff --git a/src/network/network_survey.cpp b/src/network/network_survey.cpp index 5e73ffb0b0..59d9b22d60 100644 --- a/src/network/network_survey.cpp +++ b/src/network/network_survey.cpp @@ -61,6 +61,7 @@ std::string NetworkSurveyHandler::CreatePayload(Reason reason, bool for_preview) SurveyFont(info["font"]); SurveyCompiler(info["compiler"]); SurveyLibraries(info["libraries"]); + SurveyPlugins(info["plugins"]); } { diff --git a/src/openttd.cpp b/src/openttd.cpp index 50521ab663..f49f0792b8 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -75,6 +75,7 @@ #include "timer/timer_game_economy.h" #include "timer/timer_game_realtime.h" #include "timer/timer_game_tick.h" +#include "social_integration.h" #include "linkgraph/linkgraphschedule.h" @@ -288,6 +289,7 @@ static void ShutdownGame() if (_network_available) NetworkShutDown(); // Shut down the network and close any open connections + SocialIntegration::Shutdown(); DriverFactoryBase::ShutdownDrivers(); UnInitWindowSystem(); @@ -752,6 +754,7 @@ int openttd_main(int argc, char *argv[]) /* The video driver is now selected, now initialise GUI zoom */ AdjustGUIZoom(false); + SocialIntegration::Initialize(); NetworkStartUp(); // initialize network-core if (!HandleBootstrap()) { @@ -997,6 +1000,28 @@ bool SafeLoad(const std::string &filename, SaveLoadOperation fop, DetailedFileTy return false; } +static void UpdateSocialIntegration(GameMode game_mode) +{ + switch (game_mode) { + case GM_BOOTSTRAP: + case GM_MENU: + SocialIntegration::EventEnterMainMenu(); + break; + + case GM_NORMAL: + if (_networking) { + SocialIntegration::EventEnterMultiplayer(Map::SizeX(), Map::SizeY()); + } else { + SocialIntegration::EventEnterSingleplayer(Map::SizeX(), Map::SizeY()); + } + break; + + case GM_EDITOR: + SocialIntegration::EventEnterScenarioEditor(Map::SizeX(), Map::SizeY()); + break; + } +} + void SwitchToMode(SwitchMode new_mode) { /* If we are saving something, the network stays in its current state */ @@ -1044,6 +1069,8 @@ void SwitchToMode(SwitchMode new_mode) case SM_EDITOR: // Switch to scenario editor MakeNewEditorWorld(); GenerateSavegameId(); + + UpdateSocialIntegration(GM_EDITOR); break; case SM_RELOADGAME: // Reload with what-ever started the game @@ -1061,12 +1088,16 @@ void SwitchToMode(SwitchMode new_mode) MakeNewGame(false, new_mode == SM_NEWGAME); GenerateSavegameId(); + + UpdateSocialIntegration(GM_NORMAL); break; case SM_RESTARTGAME: // Restart --> 'Random game' with current settings case SM_NEWGAME: // New Game --> 'Random game' MakeNewGame(false, new_mode == SM_NEWGAME); GenerateSavegameId(); + + UpdateSocialIntegration(GM_NORMAL); break; case SM_LOAD_GAME: { // Load game, Play Scenario @@ -1084,6 +1115,8 @@ void SwitchToMode(SwitchMode new_mode) /* Decrease pause counter (was increased from opening load dialog) */ Command::Post(PM_PAUSED_SAVELOAD, false); } + + UpdateSocialIntegration(GM_NORMAL); break; } @@ -1091,6 +1124,8 @@ void SwitchToMode(SwitchMode new_mode) case SM_START_HEIGHTMAP: // Load a heightmap and start a new game from it MakeNewGame(true, new_mode == SM_START_HEIGHTMAP); GenerateSavegameId(); + + UpdateSocialIntegration(GM_NORMAL); break; case SM_LOAD_HEIGHTMAP: // Load heightmap from scenario editor @@ -1099,6 +1134,8 @@ void SwitchToMode(SwitchMode new_mode) GenerateWorld(GWM_HEIGHTMAP, 1 << _settings_game.game_creation.map_x, 1 << _settings_game.game_creation.map_y); GenerateSavegameId(); MarkWholeScreenDirty(); + + UpdateSocialIntegration(GM_NORMAL); break; case SM_LOAD_SCENARIO: { // Load scenario from scenario editor @@ -1112,12 +1149,16 @@ void SwitchToMode(SwitchMode new_mode) SetDParamStr(0, GetSaveLoadErrorString()); ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_CRITICAL); } + + UpdateSocialIntegration(GM_NORMAL); break; } case SM_JOIN_GAME: // Join a multiplayer game LoadIntroGame(); NetworkClientJoinGame(); + + SocialIntegration::EventJoiningMultiplayer(); break; case SM_MENU: // Switch to game intro menu @@ -1134,6 +1175,8 @@ void SwitchToMode(SwitchMode new_mode) ShowNetworkAskSurvey(); } } + + UpdateSocialIntegration(GM_MENU); break; case SM_SAVE_GAME: // Save game. @@ -1544,4 +1587,5 @@ void GameLoop() SoundDriver::GetInstance()->MainLoop(); MusicLoop(); + SocialIntegration::RunCallbacks(); } diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 15519b62f5..aca64de902 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -46,6 +46,7 @@ #include "network/network_gui.h" #include "network/network_survey.h" #include "video/video_driver.hpp" +#include "social_integration.h" #include "safeguards.h" @@ -170,6 +171,184 @@ static const std::map _volume_labels = { { 127, STR_GAME_OPTIONS_VOLUME_100 }, }; +static const NWidgetPart _nested_social_plugins_widgets[] = { + NWidget(NWID_HORIZONTAL), + NWidget(WWT_FRAME, COLOUR_GREY, WID_GO_SOCIAL_PLUGIN_TITLE), SetDataTip(STR_JUST_STRING2, STR_NULL), + NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0), + NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_SOCIAL_PLUGIN_PLATFORM, STR_NULL), + NWidget(WWT_TEXT, COLOUR_GREY, WID_GO_SOCIAL_PLUGIN_PLATFORM), SetMinimalSize(100, 12), SetDataTip(STR_JUST_RAW_STRING, STR_NULL), SetAlignment(SA_RIGHT), + EndContainer(), + NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0), + NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE, STR_NULL), + NWidget(WWT_TEXT, COLOUR_GREY, WID_GO_SOCIAL_PLUGIN_STATE), SetMinimalSize(100, 12), SetDataTip(STR_JUST_STRING1, STR_NULL), SetAlignment(SA_RIGHT), + EndContainer(), + EndContainer(), + EndContainer(), +}; + +static const NWidgetPart _nested_social_plugins_none_widgets[] = { + NWidget(NWID_HORIZONTAL), + NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE, STR_NULL), + EndContainer(), +}; + +class NWidgetSocialPlugins : public NWidgetVertical { +public: + NWidgetSocialPlugins() + { + this->plugins = SocialIntegration::GetPlugins(); + + if (this->plugins.empty()) { + auto widget = MakeNWidgets(std::begin(_nested_social_plugins_none_widgets), std::end(_nested_social_plugins_none_widgets), nullptr); + this->Add(std::move(widget)); + } else { + for (size_t i = 0; i < this->plugins.size(); i++) { + auto widget = MakeNWidgets(std::begin(_nested_social_plugins_widgets), std::end(_nested_social_plugins_widgets), nullptr); + this->Add(std::move(widget)); + } + } + + this->SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0); + } + + void FillWidgetLookup(WidgetLookup &widget_lookup) override + { + widget_lookup[WID_GO_SOCIAL_PLUGINS] = this; + NWidgetVertical::FillWidgetLookup(widget_lookup); + } + + void SetupSmallestSize(Window *w) override + { + this->current_index = -1; + NWidgetVertical::SetupSmallestSize(w); + } + + /** + * Find of all the plugins the one where the member is the widest (in pixels). + * + * @param member The member to check with. + * @return The plugin that has the widest value (in pixels) for the given member. + */ + template + std::string &GetWidestPlugin(T SocialIntegrationPlugin::*member) const + { + std::string *longest = &(this->plugins[0]->*member); + int longest_length = 0; + + for (auto *plugin : this->plugins) { + int length = GetStringBoundingBox(plugin->*member).width; + if (length > longest_length) { + longest_length = length; + longest = &(plugin->*member); + } + } + + return *longest; + } + + void SetStringParameters(int widget) const + { + switch (widget) { + case WID_GO_SOCIAL_PLUGIN_TITLE: + /* For SetupSmallestSize, use the longest string we have. */ + if (this->current_index < 0) { + SetDParamStr(0, GetWidestPlugin(&SocialIntegrationPlugin::name)); + SetDParamStr(1, GetWidestPlugin(&SocialIntegrationPlugin::version)); + break; + } + + if (this->plugins[this->current_index]->name.empty()) { + SetDParam(0, STR_JUST_RAW_STRING); + SetDParamStr(1, this->plugins[this->current_index]->basepath); + } else { + SetDParam(0, STR_GAME_OPTIONS_SOCIAL_PLUGIN_TITLE); + SetDParamStr(1, this->plugins[this->current_index]->name); + SetDParamStr(2, this->plugins[this->current_index]->version); + } + break; + + case WID_GO_SOCIAL_PLUGIN_PLATFORM: + /* For SetupSmallestSize, use the longest string we have. */ + if (this->current_index < 0) { + SetDParamStr(0, GetWidestPlugin(&SocialIntegrationPlugin::social_platform)); + break; + } + + SetDParamStr(0, this->plugins[this->current_index]->social_platform); + break; + + case WID_GO_SOCIAL_PLUGIN_STATE: { + static const std::pair state_to_string[] = { + { SocialIntegrationPlugin::RUNNING, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_RUNNING }, + { SocialIntegrationPlugin::FAILED, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_FAILED }, + { SocialIntegrationPlugin::PLATFORM_NOT_RUNNING, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_PLATFORM_NOT_RUNNING }, + { SocialIntegrationPlugin::UNLOADED, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_UNLOADED }, + { SocialIntegrationPlugin::DUPLICATE, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_DUPLICATE }, + { SocialIntegrationPlugin::UNSUPPORTED_API, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_UNSUPPORTED_API }, + { SocialIntegrationPlugin::INVALID_SIGNATURE, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_INVALID_SIGNATURE }, + }; + + /* For SetupSmallestSize, use the longest string we have. */ + if (this->current_index < 0) { + auto longest_plugin = GetWidestPlugin(&SocialIntegrationPlugin::social_platform); + + /* Set the longest plugin when looking for the longest status. */ + SetDParamStr(0, longest_plugin); + + StringID longest = STR_NULL; + int longest_length = 0; + for (auto state : state_to_string) { + int length = GetStringBoundingBox(state.second).width; + if (length > longest_length) { + longest_length = length; + longest = state.second; + } + } + + SetDParam(0, longest); + SetDParamStr(1, longest_plugin); + break; + } + + auto plugin = this->plugins[this->current_index]; + + /* Default string, in case no state matches. */ + SetDParam(0, STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_FAILED); + SetDParamStr(1, plugin->social_platform); + + /* Find the string for the state. */ + for (auto state : state_to_string) { + if (plugin->state == state.first) { + SetDParam(0, state.second); + break; + } + } + } + break; + } + } + + void Draw(const Window *w) override + { + this->current_index = 0; + + for (auto &wid : this->children) { + wid->Draw(w); + this->current_index++; + } + } + +private: + int current_index = -1; + std::vector plugins; +}; + +/** Construct nested container widget for managing the list of social plugins. */ +std::unique_ptr MakeNWidgetSocialPlugins() +{ + return std::make_unique(); +} + struct GameOptionsWindow : Window { GameSettings *opt; bool reload; @@ -348,6 +527,16 @@ struct GameOptionsWindow : Window { } break; } + + case WID_GO_SOCIAL_PLUGIN_TITLE: + case WID_GO_SOCIAL_PLUGIN_PLATFORM: + case WID_GO_SOCIAL_PLUGIN_STATE: { + const NWidgetSocialPlugins *plugin = this->GetWidget(WID_GO_SOCIAL_PLUGINS); + assert(plugin != nullptr); + + plugin->SetStringParameters(widget); + break; + } } } @@ -390,7 +579,7 @@ struct GameOptionsWindow : Window { void SetTab(WidgetID widget) { - this->SetWidgetsLoweredState(false, WID_GO_TAB_GENERAL, WID_GO_TAB_GRAPHICS, WID_GO_TAB_SOUND); + this->SetWidgetsLoweredState(false, WID_GO_TAB_GENERAL, WID_GO_TAB_GRAPHICS, WID_GO_TAB_SOUND, WID_GO_TAB_SOCIAL); this->LowerWidget(widget); GameOptionsWindow::active_tab = widget; @@ -399,6 +588,7 @@ struct GameOptionsWindow : Window { case WID_GO_TAB_GENERAL: pane = 0; break; case WID_GO_TAB_GRAPHICS: pane = 1; break; case WID_GO_TAB_SOUND: pane = 2; break; + case WID_GO_TAB_SOCIAL: pane = 3; break; default: NOT_REACHED(); } @@ -493,6 +683,7 @@ struct GameOptionsWindow : Window { case WID_GO_TAB_GENERAL: case WID_GO_TAB_GRAPHICS: case WID_GO_TAB_SOUND: + case WID_GO_TAB_SOCIAL: this->SetTab(widget); break; @@ -814,6 +1005,7 @@ static constexpr NWidgetPart _nested_game_options_widgets[] = { NWidget(WWT_TEXTBTN, COLOUR_YELLOW, WID_GO_TAB_GENERAL), SetMinimalTextLines(2, 0), SetDataTip(STR_GAME_OPTIONS_TAB_GENERAL, STR_GAME_OPTIONS_TAB_GENERAL_TT), SetFill(1, 0), NWidget(WWT_TEXTBTN, COLOUR_YELLOW, WID_GO_TAB_GRAPHICS), SetMinimalTextLines(2, 0), SetDataTip(STR_GAME_OPTIONS_TAB_GRAPHICS, STR_GAME_OPTIONS_TAB_GRAPHICS_TT), SetFill(1, 0), NWidget(WWT_TEXTBTN, COLOUR_YELLOW, WID_GO_TAB_SOUND), SetMinimalTextLines(2, 0), SetDataTip(STR_GAME_OPTIONS_TAB_SOUND, STR_GAME_OPTIONS_TAB_SOUND_TT), SetFill(1, 0), + NWidget(WWT_TEXTBTN, COLOUR_YELLOW, WID_GO_TAB_SOCIAL), SetMinimalTextLines(2, 0), SetDataTip(STR_GAME_OPTIONS_TAB_SOCIAL, STR_GAME_OPTIONS_TAB_SOCIAL_TT), SetFill(1, 0), EndContainer(), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY), @@ -969,6 +1161,11 @@ static constexpr NWidgetPart _nested_game_options_widgets[] = { EndContainer(), EndContainer(), EndContainer(), + + /* Social tab */ + NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.sparse), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), + NWidgetFunction(MakeNWidgetSocialPlugins), + EndContainer(), EndContainer(), EndContainer(), }; diff --git a/src/signature.cpp b/src/signature.cpp new file mode 100644 index 0000000000..a329410e35 --- /dev/null +++ b/src/signature.cpp @@ -0,0 +1,279 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file signature.cpp Implementation of signature validation routines. */ + +#include "stdafx.h" + +#include "signature.h" + +#include "debug.h" +#include "fileio_func.h" +#include "string_func.h" + +#include "3rdparty/monocypher/monocypher.h" +#include "3rdparty/monocypher/monocypher-ed25519.h" +#include "3rdparty/nlohmann/json.hpp" + +#include "safeguards.h" + +/** The public keys used for signature validation. */ +static const std::initializer_list> _public_keys_v1 = { + /* 2024-01-20 - Public key for Social Integration Plugins. */ + { 0xed, 0x5d, 0x57, 0x47, 0x21, 0x99, 0x8b, 0x02, 0xdf, 0x6e, 0x3d, 0x69, 0xe1, 0x87, 0xca, 0xd0, 0x0e, 0x88, 0xc3, 0xe2, 0xb2, 0xa6, 0x7b, 0xc0, 0x42, 0xc8, 0xd6, 0x4b, 0x65, 0xe6, 0x48, 0xf7 }, +}; + +/** + * Calculate the 32-byte blake2b hash of a file. + * + * @param filename The filename to calculate the hash of. + * @return The 32-byte blake2b hash of the file, hex-encoded. + */ +static std::string CalculateHashV1(const std::string &filename) +{ + FILE *f = FioFOpenFile(filename, "rb", NO_DIRECTORY); + if (f == nullptr) { + return ""; + } + + std::array digest; + crypto_blake2b_ctx ctx; + crypto_blake2b_init(&ctx, digest.size()); + + while (!feof(f)) { + std::array buf; + size_t len = fread(buf.data(), 1, buf.size(), f); + + crypto_blake2b_update(&ctx, buf.data(), len); + } + fclose(f); + + crypto_blake2b_final(&ctx, digest.data()); + return FormatArrayAsHex(digest); +} + +/** + * Validate whether the checksum of a file is the same. + * + * @param filename The filename to validate the checksum of. + * @param checksum The expected checksum. + * @return True iff the checksum of the file is the same as the expected checksum. + */ +static bool ValidateChecksum(const std::string &filename, const std::string &checksum) +{ + /* Checksums are "$". Split out the version. */ + auto pos = checksum.find('$'); + assert(pos != std::string::npos); // Already validated by ValidateSchema(). + const std::string version = checksum.substr(0, pos); + const std::string hash = checksum.substr(pos + 1); + + /* Calculate the checksum over the file. */ + std::string calculated_hash; + if (version == "1") { + calculated_hash = CalculateHashV1(filename); + } else { + Debug(misc, 0, "Failed to validate signature: unknown checksum version: {}", filename); + return false; + } + + /* Validate the checksum is the same. */ + if (calculated_hash.empty()) { + Debug(misc, 0, "Failed to validate signature: couldn't calculate checksum for: {}", filename); + return false; + } + if (calculated_hash != hash) { + Debug(misc, 0, "Failed to validate signature: checksum mismatch for: {}", filename); + return false; + } + + return true; +} + +/** + * Validate whether the signature is valid for this set of files. + * + * @param signature The signature to validate. + * @param files The files to validate the signature against. + * @param filename The filename of the signatures file (for error-reporting). + * @return True iff the signature is valid for this set of files. + */ +static bool ValidateSignature(const std::string &signature, const nlohmann::json &files, const std::string &filename) +{ + /* Signatures are "$". Split out the version. */ + auto pos = signature.find('$'); + assert(pos != std::string::npos); // Already validated by ValidateSchema(). + const std::string version = signature.substr(0, pos); + const std::string sig_value = signature.substr(pos + 1); + + /* Create the message we are going to validate. */ + std::string message = files.dump(-1); + + /* Validate the signature. */ + if (version == "1") { + std::array sig; + if (sig_value.size() != 128 || !ConvertHexToBytes(sig_value, sig)) { + Debug(misc, 0, "Failed to validate signature: invalid signature: {}", filename); + return false; + } + + for (auto &pk_value : _public_keys_v1) { + /* Check if the message is valid with this public key. */ + auto res = crypto_ed25519_check(sig.data(), pk_value.data(), reinterpret_cast(message.data()), message.size()); + if (res == 0) { + return true; + } + } + + Debug(misc, 0, "Failed to validate signature: signature validation failed: {}", filename); + return false; + } else { + Debug(misc, 0, "Failed to validate signature: unknown signature version: {}", filename); + return false; + } + + return true; +} + +/** + * Validate the signatures file complies with the JSON schema. + * + * @param signatures The signatures JSON to validate. + * @param filename The filename of the signatures file (for error-reporting). + * @return True iff the signatures file complies with the JSON schema. + */ +static bool ValidateSchema(const nlohmann::json &signatures, const std::string &filename) +{ + if (signatures["files"].is_null()) { + Debug(misc, 0, "Failed to validate signature: no files found: {}", filename); + return false; + } + + if (signatures["signature"].is_null()) { + Debug(misc, 0, "Failed to validate signature: no signature found: {}", filename); + return false; + } + + for (auto &signature : signatures["files"]) { + if (signature["filename"].is_null() || signature["checksum"].is_null()) { + Debug(misc, 0, "Failed to validate signature: invalid entry in files: {}", filename); + return false; + } + + const std::string sig_filename = signature["filename"]; + const std::string sig_checksum = signature["checksum"]; + + if (sig_filename.empty() || sig_checksum.empty()) { + Debug(misc, 0, "Failed to validate signature: invalid entry in files: {}", filename); + return false; + } + + auto pos = sig_checksum.find('$'); + if (pos == std::string::npos) { + Debug(misc, 0, "Failed to validate signature: invalid checksum format: {}", filename); + return false; + } + } + + const std::string signature = signatures["signature"]; + auto pos = signature.find('$'); + if (pos == std::string::npos) { + Debug(misc, 0, "Failed to validate signature: invalid signature format: {}", filename); + return false; + } + + return true; +} + +/** + * Validate that the signatures mentioned in the signature file are matching + * the files in question. + * + * @return True iff the files in the signature file passed validation. + */ +static bool _ValidateSignatureFile(const std::string &filename) +{ + size_t filesize; + FILE *f = FioFOpenFile(filename, "rb", NO_DIRECTORY, &filesize); + if (f == nullptr) { + Debug(misc, 0, "Failed to validate signature: file not found: {}", filename); + return false; + } + + std::string text(filesize, '\0'); + size_t len = fread(text.data(), filesize, 1, f); + if (len != 1) { + Debug(misc, 0, "Failed to validate signature: failed to read file: {}", filename); + return false; + } + + nlohmann::json signatures; + try { + signatures = nlohmann::json::parse(text); + } catch (nlohmann::json::exception &) { + Debug(misc, 0, "Failed to validate signature: not a valid JSON file: {}", filename); + return false; + } + + /* + * The JSON file should look like: + * + * { + * "files": [ + * { + * "checksum": "version$hash" + * "filename": "filename", + * }, + * ... + * ], + * "signature": "version$signature" + * } + * + * The signature is a signed message of the content of "files", dumped as + * JSON without spaces / newlines, keys in the order as indicated above. + */ + + if (!ValidateSchema(signatures, filename)) { + return false; + } + + if (!ValidateSignature(signatures["signature"], signatures["files"], filename)) { + return false; + } + + std::string dirname = std::filesystem::path(filename).parent_path().string(); + + for (auto &signature : signatures["files"]) { + const std::string sig_filename = dirname + PATHSEPCHAR + signature["filename"].get(); + const std::string sig_checksum = signature["checksum"]; + + if (!ValidateChecksum(sig_filename, sig_checksum)) { + return false; + } + } + + return true; +} + +/** + * Validate that the signatures mentioned in the signature file are matching + * the files in question. + * + * @note if ALLOW_INVALID_SIGNATURE is defined, this function will always + * return true (but will still report any errors in the console). + * + * @return True iff the files in the signature file passed validation. + */ +bool ValidateSignatureFile(const std::string &filename) +{ + auto res = _ValidateSignatureFile(filename);; +#if defined(ALLOW_INVALID_SIGNATURE) + (void)res; // Ignore the result. + return true; +#else + return res; +#endif +} diff --git a/src/signature.h b/src/signature.h new file mode 100644 index 0000000000..769aeee591 --- /dev/null +++ b/src/signature.h @@ -0,0 +1,15 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file signature.h Routines to validate signature files. */ + +#ifndef SIGNATURE_H +#define SIGNATURE_H + +bool ValidateSignatureFile(const std::string &filename); + +#endif /* SIGNATURE_H */ diff --git a/src/social_integration.cpp b/src/social_integration.cpp new file mode 100644 index 0000000000..18e8e44eb7 --- /dev/null +++ b/src/social_integration.cpp @@ -0,0 +1,246 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file social_integration.cpp Base implementation of social integration support. */ + +#include "stdafx.h" + +#include "social_integration.h" +#include "3rdparty/openttd_social_integration_api/openttd_social_integration_api.h" + +#include "debug.h" +#include "fileio_func.h" +#include "library_loader.h" +#include "rev.h" +#include "string_func.h" +#include "signature.h" + +#include "safeguards.h" + +/** + * Container to track information per plugin. + */ +class InternalSocialIntegrationPlugin { +public: + InternalSocialIntegrationPlugin(const std::string &filename, const std::string &basepath) : library(nullptr), external(basepath) + { + openttd_info.openttd_version = _openttd_revision; + + if (!ValidateSignatureFile(fmt::format("{}.sig", filename))) { + external.state = SocialIntegrationPlugin::INVALID_SIGNATURE; + return; + } + + this->library = std::make_unique(filename); + } + + OpenTTD_SocialIntegration_v1_PluginInfo plugin_info = {}; ///< Information supplied by plugin. + OpenTTD_SocialIntegration_v1_PluginApi plugin_api = {}; ///< API supplied by plugin. + OpenTTD_SocialIntegration_v1_OpenTTDInfo openttd_info = {}; ///< Information supplied by OpenTTD. + + std::unique_ptr library = nullptr; ///< Library handle. + + SocialIntegrationPlugin external; ///< Information of the plugin to be used by other parts of our codebase. +}; + +static std::vector> _plugins; ///< List of loaded plugins. +static std::set _loaded_social_platform; ///< List of Social Platform plugins already loaded. Used to prevent loading a plugin for the same Social Platform twice. + +/** Helper for scanning for files with SocialIntegration as extension */ +class SocialIntegrationFileScanner : FileScanner { +public: + void Scan() + { +#ifdef _WIN32 + std::string extension = "-social.dll"; +#elif defined(__APPLE__) + std::string extension = "-social.dylib"; +#else + std::string extension = "-social.so"; +#endif + + this->FileScanner::Scan(extension.c_str(), SOCIAL_INTEGRATION_DIR, false); + } + + bool AddFile(const std::string &filename, size_t basepath_length, const std::string &) override + { + std::string basepath = filename.substr(basepath_length); + Debug(misc, 1, "[Social Integration: {}] Loading ...", basepath); + + auto &plugin = _plugins.emplace_back(std::make_unique(filename, basepath)); + + /* Validation failed, so no library was loaded. */ + if (plugin->library == nullptr) { + return false; + } + + if (plugin->library->HasError()) { + plugin->external.state = SocialIntegrationPlugin::FAILED; + + Debug(misc, 0, "[Social Integration: {}] Failed to load library: {}", basepath, plugin->library->GetLastError()); + return false; + } + + OpenTTD_SocialIntegration_v1_GetInfo getinfo_func = plugin->library->GetFunction("SocialIntegration_v1_GetInfo"); + if (plugin->library->HasError()) { + plugin->external.state = SocialIntegrationPlugin::UNSUPPORTED_API; + + Debug(misc, 0, "[Social Integration: {}] Failed to find symbol SocialPlugin_v1_GetInfo: {}", basepath, plugin->library->GetLastError()); + return false; + } + + OpenTTD_SocialIntegration_v1_Init init_func = plugin->library->GetFunction("SocialIntegration_v1_Init"); + if (plugin->library->HasError()) { + plugin->external.state = SocialIntegrationPlugin::UNSUPPORTED_API; + + Debug(misc, 0, "[Social Integration: {}] Failed to find symbol SocialPlugin_v1_Init: {}", basepath, plugin->library->GetLastError()); + return false; + } + + getinfo_func(&plugin->plugin_info); + /* Setup the information for the outside world to see. */ + plugin->external.social_platform = plugin->plugin_info.social_platform; + plugin->external.name = plugin->plugin_info.name; + plugin->external.version = plugin->plugin_info.version; + + /* Lowercase the string for comparison. */ + std::string lc_social_platform = plugin->plugin_info.social_platform; + strtolower(lc_social_platform); + + /* Prevent more than one plugin for a certain Social Platform to be loaded, as that never ends well. */ + if (_loaded_social_platform.find(lc_social_platform) != _loaded_social_platform.end()) { + plugin->external.state = SocialIntegrationPlugin::DUPLICATE; + + Debug(misc, 0, "[Social Integration: {}] Another plugin for {} is already loaded", basepath, plugin->plugin_info.social_platform); + return false; + } + _loaded_social_platform.insert(lc_social_platform); + + auto state = init_func(&plugin->plugin_api, &plugin->openttd_info); + switch (state) { + case OTTD_SOCIAL_INTEGRATION_V1_INIT_SUCCESS: + plugin->external.state = SocialIntegrationPlugin::RUNNING; + + Debug(misc, 1, "[Social Integration: {}] Loaded for {}: {} ({})", basepath, plugin->plugin_info.social_platform, plugin->plugin_info.name, plugin->plugin_info.version); + return true; + + case OTTD_SOCIAL_INTEGRATION_V1_INIT_FAILED: + plugin->external.state = SocialIntegrationPlugin::FAILED; + + Debug(misc, 0, "[Social Integration: {}] Failed to initialize", basepath); + return false; + + case OTTD_SOCIAL_INTEGRATION_V1_INIT_PLATFORM_NOT_RUNNING: + plugin->external.state = SocialIntegrationPlugin::PLATFORM_NOT_RUNNING; + + Debug(misc, 1, "[Social Integration: {}] Failed to initialize: {} is not running", basepath, plugin->plugin_info.social_platform); + return false; + + default: + NOT_REACHED(); + } + } +}; + +std::vector SocialIntegration::GetPlugins() +{ + std::vector plugins; + + for (auto &plugin : _plugins) { + plugins.push_back(&plugin->external); + } + + return plugins; +} + +void SocialIntegration::Initialize() +{ + SocialIntegrationFileScanner fs; + fs.Scan(); +} + +/** + * Wrapper to call a function pointer of a plugin if it isn't a nullptr. + * + * @param plugin Plugin to call the function pointer on. + * @param func Function pointer to call. + */ +template +static void PluginCall(std::unique_ptr &plugin, T func, Ts... args) +{ + if (plugin->external.state != SocialIntegrationPlugin::RUNNING) { + return; + } + + if (func != nullptr) { + func(args...); + } +} + +void SocialIntegration::Shutdown() +{ + for (auto &plugin : _plugins) { + PluginCall(plugin, plugin->plugin_api.shutdown); + } + + _plugins.clear(); + _loaded_social_platform.clear(); +} + +void SocialIntegration::RunCallbacks() +{ + for (auto &plugin : _plugins) { + if (plugin->external.state != SocialIntegrationPlugin::RUNNING) { + continue; + } + + if (plugin->plugin_api.run_callbacks != nullptr) { + if (!plugin->plugin_api.run_callbacks()) { + Debug(misc, 1, "[Social Plugin: {}] Requested to be unloaded", plugin->external.basepath); + + _loaded_social_platform.erase(plugin->plugin_info.social_platform); + plugin->external.state = SocialIntegrationPlugin::UNLOADED; + PluginCall(plugin, plugin->plugin_api.shutdown); + } + } + } +} + +void SocialIntegration::EventEnterMainMenu() +{ + for (auto &plugin : _plugins) { + PluginCall(plugin, plugin->plugin_api.event_enter_main_menu); + } +} + +void SocialIntegration::EventEnterScenarioEditor(uint map_width, uint map_height) +{ + for (auto &plugin : _plugins) { + PluginCall(plugin, plugin->plugin_api.event_enter_scenario_editor, map_width, map_height); + } +} + +void SocialIntegration::EventEnterSingleplayer(uint map_width, uint map_height) +{ + for (auto &plugin : _plugins) { + PluginCall(plugin, plugin->plugin_api.event_enter_singleplayer, map_width, map_height); + } +} + +void SocialIntegration::EventEnterMultiplayer(uint map_width, uint map_height) +{ + for (auto &plugin : _plugins) { + PluginCall(plugin, plugin->plugin_api.event_enter_multiplayer, map_width, map_height); + } +} + +void SocialIntegration::EventJoiningMultiplayer() +{ + for (auto &plugin : _plugins) { + PluginCall(plugin, plugin->plugin_api.event_joining_multiplayer); + } +} diff --git a/src/social_integration.h b/src/social_integration.h new file mode 100644 index 0000000000..b3c9b092c2 --- /dev/null +++ b/src/social_integration.h @@ -0,0 +1,85 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file social_integration.h Interface definitions for game to report/respond to social integration. */ + +#ifndef SOCIAL_INTEGRATION_H +#define SOCIAL_INTEGRATION_H + +class SocialIntegrationPlugin { +public: + enum State { + RUNNING, ///< The plugin is successfully loaded and running. + + FAILED, ///< The plugin failed to initialize. + PLATFORM_NOT_RUNNING, ///< The plugin failed to initialize because the Social Platform is not running. + UNLOADED, ///< The plugin is unloaded upon request. + DUPLICATE, ///< Another plugin of the same Social Platform is already loaded. + UNSUPPORTED_API, ///< The plugin does not support the current API version. + INVALID_SIGNATURE, ///< The signature of the plugin is invalid. + }; + + std::string basepath; ///< Base path of the plugin. + + std::string social_platform = "unknown"; ///< Social platform this plugin is for. + std::string name = ""; ///< Name of the plugin. + std::string version = ""; ///< Version of the plugin. + + State state = FAILED; ///< Result of the plugin's init function. + + SocialIntegrationPlugin(const std::string &basepath) : basepath(basepath) {} +}; + +class SocialIntegration { +public: + /** + * Get the list of loaded social integration plugins. + */ + static std::vector GetPlugins(); + + /** + * Initialize the social integration system, loading any social integration plugins that are available. + */ + static void Initialize(); + + /** + * Shutdown the social integration system, and all social integration plugins that are loaded. + */ + static void Shutdown(); + + /** + * Allow any social integration library to handle their own events. + */ + static void RunCallbacks(); + + /** + * Event: user entered the main menu. + */ + static void EventEnterMainMenu(); + + /** + * Event: user entered the Scenario Editor. + */ + static void EventEnterScenarioEditor(uint map_width, uint map_height); + + /** + * Event: user entered a singleplayer game. + */ + static void EventEnterSingleplayer(uint map_width, uint map_height); + + /** + * Event: user entered a multiplayer game. + */ + static void EventEnterMultiplayer(uint map_width, uint map_height); + + /** + * Event: user is joining a multiplayer game. + */ + static void EventJoiningMultiplayer(); +}; + +#endif /* SOCIAL_INTEGRATION_H */ diff --git a/src/survey.cpp b/src/survey.cpp index 6f71c869bb..89a57fc717 100644 --- a/src/survey.cpp +++ b/src/survey.cpp @@ -34,6 +34,8 @@ #include "base_media_base.h" #include "blitter/factory.hpp" +#include "social_integration.h" + #ifdef WITH_ALLEGRO # include #endif /* WITH_ALLEGRO */ @@ -81,6 +83,17 @@ NLOHMANN_JSON_SERIALIZE_ENUM(GRFStatus, { {GRFStatus::GCS_ACTIVATED, "activated"}, }) +NLOHMANN_JSON_SERIALIZE_ENUM(SocialIntegrationPlugin::State, { + {SocialIntegrationPlugin::State::RUNNING, "running"}, + {SocialIntegrationPlugin::State::FAILED, "failed"}, + {SocialIntegrationPlugin::State::PLATFORM_NOT_RUNNING, "platform_not_running"}, + {SocialIntegrationPlugin::State::UNLOADED, "unloaded"}, + {SocialIntegrationPlugin::State::DUPLICATE, "duplicate"}, + {SocialIntegrationPlugin::State::UNSUPPORTED_API, "unsupported_api"}, + {SocialIntegrationPlugin::State::INVALID_SIGNATURE, "invalid_signature"}, +}) + + /** Lookup table to convert a VehicleType to a string. */ static const std::string _vehicle_type_to_string[] = { "train", @@ -435,6 +448,26 @@ void SurveyLibraries(nlohmann::json &survey) #endif } +/** + * Convert plugin information to JSON. + * + * @param survey The JSON object. + */ +void SurveyPlugins(nlohmann::json &survey) +{ + auto _plugins = SocialIntegration::GetPlugins(); + + for (auto &plugin : _plugins) { + auto &platform = survey[plugin->social_platform]; + platform.push_back({ + {"name", plugin->name}, + {"version", plugin->version}, + {"basepath", plugin->basepath}, + {"state", plugin->state}, + }); + } +} + /** * Change the bytes of memory into a textual version rounded up to the biggest unit. * diff --git a/src/survey.h b/src/survey.h index aae16d4bf4..0e74641a27 100644 --- a/src/survey.h +++ b/src/survey.h @@ -21,6 +21,7 @@ void SurveyFont(nlohmann::json &survey); void SurveyGameScript(nlohmann::json &survey); void SurveyGrfs(nlohmann::json &survey); void SurveyLibraries(nlohmann::json &survey); +void SurveyPlugins(nlohmann::json &survey); void SurveyOpenTTD(nlohmann::json &survey); void SurveySettings(nlohmann::json &survey, bool skip_if_default); void SurveyTimers(nlohmann::json &survey); diff --git a/src/widgets/settings_widget.h b/src/widgets/settings_widget.h index 4c40f1e0a0..fccba67a2b 100644 --- a/src/widgets/settings_widget.h +++ b/src/widgets/settings_widget.h @@ -15,6 +15,7 @@ enum GameOptionsWidgets : WidgetID { WID_GO_TAB_GENERAL, ///< General tab. WID_GO_TAB_GRAPHICS, ///< Graphics tab. WID_GO_TAB_SOUND, ///< Sound tab. + WID_GO_TAB_SOCIAL, ///< Social tab. WID_GO_TAB_SELECTION, ///< Background of the tab selection. WID_GO_CURRENCY_DROPDOWN, ///< Currency dropdown. WID_GO_DISTANCE_DROPDOWN, ///< Measuring unit dropdown. @@ -53,6 +54,10 @@ enum GameOptionsWidgets : WidgetID { WID_GO_SURVEY_PARTICIPATE_BUTTON, ///< Toggle for participating in the automated survey. WID_GO_SURVEY_LINK_BUTTON, ///< Button to open browser to go to the survey website. WID_GO_SURVEY_PREVIEW_BUTTON, ///< Button to open a preview window with the survey results + WID_GO_SOCIAL_PLUGINS, ///< Main widget handling the social plugins. + WID_GO_SOCIAL_PLUGIN_TITLE, ///< Title of the frame of the social plugin. + WID_GO_SOCIAL_PLUGIN_PLATFORM, ///< Platform of the social plugin. + WID_GO_SOCIAL_PLUGIN_STATE, ///< State of the social plugin. }; /** Widgets of the #GameSettingsWindow class. */ From 11d4f1b2bd6537de298b630e3e5872f1c5298a50 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Mon, 22 Jan 2024 22:28:00 +0100 Subject: [PATCH 05/52] Fix d3b2a576: LOAD_HEIGHTMAP / LOAD_SCENARIO are Scenario Editor modes (#11868) --- src/openttd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openttd.cpp b/src/openttd.cpp index f49f0792b8..58af9ba69f 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1135,7 +1135,7 @@ void SwitchToMode(SwitchMode new_mode) GenerateSavegameId(); MarkWholeScreenDirty(); - UpdateSocialIntegration(GM_NORMAL); + UpdateSocialIntegration(GM_EDITOR); break; case SM_LOAD_SCENARIO: { // Load scenario from scenario editor @@ -1150,7 +1150,7 @@ void SwitchToMode(SwitchMode new_mode) ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_CRITICAL); } - UpdateSocialIntegration(GM_NORMAL); + UpdateSocialIntegration(GM_EDITOR); break; } From bf3fd6526bde6a52e64ddb5b980f67a70edc171d Mon Sep 17 00:00:00 2001 From: Kuhnovic <68320206+Kuhnovic@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:06:42 +0100 Subject: [PATCH 06/52] Fix: use correct size parameter type in TileArea constructors (#11869) --- src/tilearea_type.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tilearea_type.h b/src/tilearea_type.h index 04c1e1a1d6..1cd29ec1bb 100644 --- a/src/tilearea_type.h +++ b/src/tilearea_type.h @@ -26,7 +26,7 @@ struct OrthogonalTileArea { * @param w the width * @param h the height */ - OrthogonalTileArea(TileIndex tile = INVALID_TILE, uint8_t w = 0, uint8_t h = 0) : tile(tile), w(w), h(h) + OrthogonalTileArea(TileIndex tile = INVALID_TILE, uint16_t w = 0, uint16_t h = 0) : tile(tile), w(w), h(h) { } @@ -79,7 +79,7 @@ struct DiagonalTileArea { * @param a The "x" extent. * @param b The "y" estent. */ - DiagonalTileArea(TileIndex tile = INVALID_TILE, int8_t a = 0, int8_t b = 0) : tile(tile), a(a), b(b) + DiagonalTileArea(TileIndex tile = INVALID_TILE, int16_t a = 0, int16_t b = 0) : tile(tile), a(a), b(b) { } From 090616b4c9e1b554f1c8e33f108f668ed526d172 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Mon, 22 Jan 2024 23:35:25 +0100 Subject: [PATCH 07/52] Add: allow loading heightmaps from command-line (#11870) If you want to load a file from tar, you have to give the file inside the tar in order for it to work: //.png --- docs/openttd.6 | 10 +++++----- src/fios.cpp | 7 ++----- src/fios.h | 2 ++ src/genworld.cpp | 9 +++++++-- src/heightmap.cpp | 6 ++++-- src/heightmap.h | 2 +- src/landscape.cpp | 7 +++++-- src/landscape.h | 2 +- src/openttd.cpp | 40 ++++++++++++++++++++++++++++----------- src/video/dedicated_v.cpp | 4 ++-- 10 files changed, 58 insertions(+), 31 deletions(-) diff --git a/docs/openttd.6 b/docs/openttd.6 index c1cbd88791..0319f98cc8 100644 --- a/docs/openttd.6 +++ b/docs/openttd.6 @@ -13,7 +13,7 @@ .Op Fl c Ar config_file .Op Fl d Op Ar level | Ar cat Ns = Ns Ar lvl Ns Op , Ns Ar ... .Op Fl D Oo Ar host Oc Ns Op : Ns Ar port -.Op Fl g Op Ar savegame +.Op Fl g Op Ar file .Op Fl G Ar seed .Op Fl I Ar graphicsset .Op Fl m Ar driver @@ -62,11 +62,11 @@ Start in world editor mode. .It Fl f Fork into background (dedicated server only, see .Fl D ) . -.It Fl g Op Ar savegame +.It Fl g Op Ar file Load -.Ar savegame -at start or start a new game if omitted. -.Ar savegame +.Ar file +(can be either a savegame, scenario, or heightmap) at start or start a new game if omitted. +.Ar file must be either an absolute path or one relative to the current path or one of the search paths. .It Fl G Ar seed diff --git a/src/fios.cpp b/src/fios.cpp index 3b7efd822e..48e0466eea 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -447,9 +447,6 @@ std::tuple FiosGetSavegameListCallback(SaveLoadOperation * .SV1 Transport Tycoon Deluxe (Patch) saved game * .SV2 Transport Tycoon Deluxe (Patch) saved 2-player game */ - /* Don't crash if we supply no extension */ - if (ext.empty()) return { FIOS_TYPE_INVALID, {} }; - if (StrEqualsIgnoreCase(ext, ".sav")) { return { FIOS_TYPE_FILE, GetFileTitle(file, SAVE_DIR) }; } @@ -490,7 +487,7 @@ void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list) * @see FiosGetFileList * @see FiosGetScenarioList */ -static std::tuple FiosGetScenarioListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext) +std::tuple FiosGetScenarioListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext) { /* Show scenario files * .SCN OpenTTD style scenario file @@ -530,7 +527,7 @@ void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list) FiosGetFileList(fop, &FiosGetScenarioListCallback, subdir, file_list); } -static std::tuple FiosGetHeightmapListCallback(SaveLoadOperation, const std::string &file, const std::string_view ext) +std::tuple FiosGetHeightmapListCallback(SaveLoadOperation, const std::string &file, const std::string_view ext) { /* Show heightmap files * .PNG PNG Based heightmap files diff --git a/src/fios.h b/src/fios.h index 8c727c2e32..5827538e46 100644 --- a/src/fios.h +++ b/src/fios.h @@ -117,6 +117,8 @@ std::string FiosMakeHeightmapName(const char *name); std::string FiosMakeSavegameName(const char *name); std::tuple FiosGetSavegameListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext); +std::tuple FiosGetScenarioListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext); +std::tuple FiosGetHeightmapListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext); void ScanScenarios(); const char *FindScenario(const ContentInfo *ci, bool md5sum); diff --git a/src/genworld.cpp b/src/genworld.cpp index 762cc9a69e..c5d5f10df8 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -103,8 +103,14 @@ static void _GenerateWorld() /* Must start economy early because of the costs. */ StartupEconomy(); + bool landscape_generated = false; + /* Don't generate landscape items when in the scenario editor. */ - if (_gw.mode == GWM_EMPTY) { + if (_gw.mode != GWM_EMPTY) { + landscape_generated = GenerateLandscape(_gw.mode); + } + + if (!landscape_generated) { SetGeneratingWorldProgress(GWP_OBJECT, 1); /* Make sure the tiles at the north border are void tiles if needed. */ @@ -121,7 +127,6 @@ static void _GenerateWorld() _settings_game.game_creation.snow_line_height = DEF_SNOWLINE_HEIGHT; } else { - GenerateLandscape(_gw.mode); GenerateClearTile(); /* Only generate towns, tree and industries in newgame mode. */ diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 7352ceaabb..230a090bad 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -520,14 +520,14 @@ bool GetHeightmapDimensions(DetailedFileType dft, const char *filename, uint *x, * @param dft Type of image file. * @param filename of the heightmap file to be imported */ -void LoadHeightmap(DetailedFileType dft, const char *filename) +bool LoadHeightmap(DetailedFileType dft, const char *filename) { uint x, y; byte *map = nullptr; if (!ReadHeightMap(dft, filename, &x, &y, &map)) { free(map); - return; + return false; } GrayscaleToMapHeights(x, y, map); @@ -535,6 +535,8 @@ void LoadHeightmap(DetailedFileType dft, const char *filename) FixSlopes(); MarkWholeScreenDirty(); + + return true; } /** diff --git a/src/heightmap.h b/src/heightmap.h index 9c3e71bbee..d7c431c2e4 100644 --- a/src/heightmap.h +++ b/src/heightmap.h @@ -22,7 +22,7 @@ enum HeightmapRotation { }; bool GetHeightmapDimensions(DetailedFileType dft, const char *filename, uint *x, uint *y); -void LoadHeightmap(DetailedFileType dft, const char *filename); +bool LoadHeightmap(DetailedFileType dft, const char *filename); void FlatEmptyWorld(byte tile_height); void FixSlopes(); diff --git a/src/landscape.cpp b/src/landscape.cpp index 5437995a4d..9202253a1b 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -1557,7 +1557,7 @@ static uint8_t CalculateDesertLine() return CalculateCoverageLine(100 - _settings_game.game_creation.desert_coverage, 4); } -void GenerateLandscape(byte mode) +bool GenerateLandscape(byte mode) { /** Number of steps of landscape generation */ enum GenLandscapeSteps { @@ -1571,7 +1571,9 @@ void GenerateLandscape(byte mode) if (mode == GWM_HEIGHTMAP) { SetGeneratingWorldProgress(GWP_LANDSCAPE, steps + GLS_HEIGHTMAP); - LoadHeightmap(_file_to_saveload.detail_ftype, _file_to_saveload.name.c_str()); + if (!LoadHeightmap(_file_to_saveload.detail_ftype, _file_to_saveload.name.c_str())) { + return false; + } IncreaseGeneratingWorldProgress(GWP_LANDSCAPE); } else if (_settings_game.game_creation.land_generator == LG_TERRAGENESIS) { SetGeneratingWorldProgress(GWP_LANDSCAPE, steps + GLS_TERRAGENESIS); @@ -1657,6 +1659,7 @@ void GenerateLandscape(byte mode) } CreateRivers(); + return true; } void OnTick_Town(); diff --git a/src/landscape.h b/src/landscape.h index e6e00a8e43..249dcc9efa 100644 --- a/src/landscape.h +++ b/src/landscape.h @@ -139,6 +139,6 @@ void DoClearSquare(TileIndex tile); void RunTileLoop(); void InitializeLandscape(); -void GenerateLandscape(byte mode); +bool GenerateLandscape(byte mode); #endif /* LANDSCAPE_H */ diff --git a/src/openttd.cpp b/src/openttd.cpp index 58af9ba69f..9a6db6259d 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -165,7 +165,7 @@ static void ShowHelp() " -t year = Set starting year\n" " -d [[fac=]lvl[,...]]= Debug mode\n" " -e = Start Editor\n" - " -g [savegame] = Start new/save game immediately\n" + " -g [savegame|scenario|heightmap] = Start new/savegame/scenario/heightmap immediately\n" " -G seed = Set random seed\n" " -n host[:port][#company]= Join network game\n" " -p password = Password to join server\n" @@ -577,21 +577,37 @@ int openttd_main(int argc, char *argv[]) if (mgo.opt != nullptr) SetDebugString(mgo.opt, ShowInfoI); break; } - case 'e': _switch_mode = (_switch_mode == SM_LOAD_GAME || _switch_mode == SM_LOAD_SCENARIO ? SM_LOAD_SCENARIO : SM_EDITOR); break; + case 'e': + /* Allow for '-e' before or after '-g'. */ + switch (_switch_mode) { + case SM_MENU: _switch_mode = SM_EDITOR; break; + case SM_LOAD_GAME: _switch_mode = SM_LOAD_SCENARIO; break; + case SM_START_HEIGHTMAP: _switch_mode = SM_LOAD_HEIGHTMAP; break; + default: break; + } + break; case 'g': if (mgo.opt != nullptr) { _file_to_saveload.name = mgo.opt; - bool is_scenario = _switch_mode == SM_EDITOR || _switch_mode == SM_LOAD_SCENARIO; - _switch_mode = is_scenario ? SM_LOAD_SCENARIO : SM_LOAD_GAME; - _file_to_saveload.SetMode(SLO_LOAD, is_scenario ? FT_SCENARIO : FT_SAVEGAME, DFT_GAME_FILE); - - /* if the file doesn't exist or it is not a valid savegame, let the saveload code show an error */ - auto t = _file_to_saveload.name.find_last_of('.'); - if (t != std::string::npos) { - auto [ft, _] = FiosGetSavegameListCallback(SLO_LOAD, _file_to_saveload.name, _file_to_saveload.name.substr(t)); - if (ft != FIOS_TYPE_INVALID) _file_to_saveload.SetMode(ft); + + std::string extension = std::filesystem::path(_file_to_saveload.name).extension().string(); + auto [ft, _] = FiosGetSavegameListCallback(SLO_LOAD, _file_to_saveload.name, extension); + if (ft == FIOS_TYPE_INVALID) { + std::tie(ft, _) = FiosGetScenarioListCallback(SLO_LOAD, _file_to_saveload.name, extension); + } + if (ft == FIOS_TYPE_INVALID) { + std::tie(ft, _) = FiosGetHeightmapListCallback(SLO_LOAD, _file_to_saveload.name, extension); } + /* Allow for '-e' before or after '-g'. */ + switch (GetAbstractFileType(ft)) { + case FT_SAVEGAME: _switch_mode = (_switch_mode == SM_EDITOR ? SM_LOAD_SCENARIO : SM_LOAD_GAME); break; + case FT_SCENARIO: _switch_mode = (_switch_mode == SM_EDITOR ? SM_LOAD_SCENARIO : SM_LOAD_GAME); break; + case FT_HEIGHTMAP: _switch_mode = (_switch_mode == SM_EDITOR ? SM_LOAD_HEIGHTMAP : SM_START_HEIGHTMAP); break; + default: break; + } + + _file_to_saveload.SetMode(SLO_LOAD, GetAbstractFileType(ft), GetDetailedFileType(ft)); break; } @@ -1131,6 +1147,8 @@ void SwitchToMode(SwitchMode new_mode) case SM_LOAD_HEIGHTMAP: // Load heightmap from scenario editor SetLocalCompany(OWNER_NONE); + _game_mode = GM_EDITOR; + GenerateWorld(GWM_HEIGHTMAP, 1 << _settings_game.game_creation.map_x, 1 << _settings_game.game_creation.map_y); GenerateSavegameId(); MarkWholeScreenDirty(); diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index f891be2402..e2613f2313 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -204,8 +204,8 @@ void VideoDriver_Dedicated::MainLoop() _network_dedicated = true; _current_company = _local_company = COMPANY_SPECTATOR; - /* If SwitchMode is SM_LOAD_GAME, it means that the user used the '-g' options */ - if (_switch_mode != SM_LOAD_GAME) { + /* If SwitchMode is SM_LOAD_GAME / SM_START_HEIGHTMAP, it means that the user used the '-g' options */ + if (_switch_mode != SM_LOAD_GAME && _switch_mode != SM_START_HEIGHTMAP) { StartNewGameWithoutGUI(GENERATE_NEW_SEED); } From 76499b96fb2a89985f2c16550219b6cd51f72026 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Mon, 22 Jan 2024 18:17:26 -0500 Subject: [PATCH 08/52] Fix fa479c4: Typo in vehicle list tooltip (#11871) --- src/lang/english.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lang/english.txt b/src/lang/english.txt index af9418d5b1..efb91fd431 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -4036,9 +4036,9 @@ STR_CARGO_TYPE_FILTER_NONE :None ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide this vehicle type -STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide of the vehicle type -STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list. Click on ship for information. Ctrl+Click to show/hide of the ship type -STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list. Click on aircraft for information. Ctrl+Click to show/hide of the aircraft type +STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide this vehicle type +STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list. Click on ship for information. Ctrl+Click to show/hide this ship type +STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list. Click on aircraft for information. Ctrl+Click to show/hide this aircraft type ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Buy Vehicle From a1487ce620bf99bb9a63c3a31fb484acf12c0503 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 23 Jan 2024 14:01:25 +0100 Subject: [PATCH 09/52] Add: list_[scenario|heightmap] and load_[scenario|height] console commands (#11867) --- src/console_cmds.cpp | 128 +++++++++++++++++++++++++++++++++++++------ src/fios.cpp | 33 ++++++----- src/fios.h | 8 +-- src/fios_gui.cpp | 2 +- 4 files changed, 134 insertions(+), 37 deletions(-) diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index d47e0cdc5a..6609ef91db 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -56,9 +56,8 @@ static uint _script_current_depth; ///< Depth of scripts running (used to abort /** File list storage for the console, for caching the last 'ls' command. */ class ConsoleFileList : public FileList { public: - ConsoleFileList() : FileList() + ConsoleFileList(AbstractFileType abstract_filetype, bool show_dirs) : FileList(), abstract_filetype(abstract_filetype), show_dirs(show_dirs) { - this->file_list_valid = false; } /** Declare the file storage cache as being invalid, also clears all stored files. */ @@ -75,15 +74,19 @@ public: void ValidateFileList(bool force_reload = false) { if (force_reload || !this->file_list_valid) { - this->BuildFileList(FT_SAVEGAME, SLO_LOAD); + this->BuildFileList(this->abstract_filetype, SLO_LOAD, this->show_dirs); this->file_list_valid = true; } } - bool file_list_valid; ///< If set, the file list is valid. + AbstractFileType abstract_filetype; ///< The abstract file type to list. + bool show_dirs; ///< Whether to show directories in the file list. + bool file_list_valid = false; ///< If set, the file list is valid. }; -static ConsoleFileList _console_file_list; ///< File storage cache for the console. +static ConsoleFileList _console_file_list_savegame{FT_SAVEGAME, true}; ///< File storage cache for savegames. +static ConsoleFileList _console_file_list_scenario{FT_SCENARIO, false}; ///< File storage cache for scenarios. +static ConsoleFileList _console_file_list_heightmap{FT_HEIGHTMAP, false}; ///< File storage cache for heightmaps. /* console command defines */ #define DEF_CONSOLE_CMD(function) static bool function([[maybe_unused]] byte argc, [[maybe_unused]] char *argv[]) @@ -424,8 +427,8 @@ DEF_CONSOLE_CMD(ConLoad) if (argc != 2) return false; const char *file = argv[1]; - _console_file_list.ValidateFileList(); - const FiosItem *item = _console_file_list.FindItem(file); + _console_file_list_savegame.ValidateFileList(); + const FiosItem *item = _console_file_list_savegame.FindItem(file); if (item != nullptr) { if (GetAbstractFileType(item->type) == FT_SAVEGAME) { _switch_mode = SM_LOAD_GAME; @@ -440,6 +443,57 @@ DEF_CONSOLE_CMD(ConLoad) return true; } +DEF_CONSOLE_CMD(ConLoadScenario) +{ + if (argc == 0) { + IConsolePrint(CC_HELP, "Load a scenario by name or index. Usage: 'load_scenario '."); + return true; + } + + if (argc != 2) return false; + + const char *file = argv[1]; + _console_file_list_scenario.ValidateFileList(); + const FiosItem *item = _console_file_list_scenario.FindItem(file); + if (item != nullptr) { + if (GetAbstractFileType(item->type) == FT_SCENARIO) { + _switch_mode = SM_LOAD_GAME; + _file_to_saveload.Set(*item); + } else { + IConsolePrint(CC_ERROR, "'{}' is not a scenario.", file); + } + } else { + IConsolePrint(CC_ERROR, "'{}' cannot be found.", file); + } + + return true; +} + +DEF_CONSOLE_CMD(ConLoadHeightmap) +{ + if (argc == 0) { + IConsolePrint(CC_HELP, "Load a heightmap by name or index. Usage: 'load_heightmap '."); + return true; + } + + if (argc != 2) return false; + + const char *file = argv[1]; + _console_file_list_heightmap.ValidateFileList(); + const FiosItem *item = _console_file_list_heightmap.FindItem(file); + if (item != nullptr) { + if (GetAbstractFileType(item->type) == FT_HEIGHTMAP) { + _switch_mode = SM_START_HEIGHTMAP; + _file_to_saveload.Set(*item); + } else { + IConsolePrint(CC_ERROR, "'{}' is not a heightmap.", file); + } + } else { + IConsolePrint(CC_ERROR, "'{}' cannot be found.", file); + } + + return true; +} DEF_CONSOLE_CMD(ConRemove) { @@ -451,8 +505,8 @@ DEF_CONSOLE_CMD(ConRemove) if (argc != 2) return false; const char *file = argv[1]; - _console_file_list.ValidateFileList(); - const FiosItem *item = _console_file_list.FindItem(file); + _console_file_list_savegame.ValidateFileList(); + const FiosItem *item = _console_file_list_savegame.FindItem(file); if (item != nullptr) { if (unlink(item->name.c_str()) != 0) { IConsolePrint(CC_ERROR, "Failed to delete '{}'.", item->name); @@ -461,7 +515,7 @@ DEF_CONSOLE_CMD(ConRemove) IConsolePrint(CC_ERROR, "'{}' could not be found.", file); } - _console_file_list.InvalidateFileList(); + _console_file_list_savegame.InvalidateFileList(); return true; } @@ -474,9 +528,41 @@ DEF_CONSOLE_CMD(ConListFiles) return true; } - _console_file_list.ValidateFileList(true); - for (uint i = 0; i < _console_file_list.size(); i++) { - IConsolePrint(CC_DEFAULT, "{}) {}", i, _console_file_list[i].title); + _console_file_list_savegame.ValidateFileList(true); + for (uint i = 0; i < _console_file_list_savegame.size(); i++) { + IConsolePrint(CC_DEFAULT, "{}) {}", i, _console_file_list_savegame[i].title); + } + + return true; +} + +/* List all the scenarios */ +DEF_CONSOLE_CMD(ConListScenarios) +{ + if (argc == 0) { + IConsolePrint(CC_HELP, "List all loadable scenarios. Usage: 'list_scenarios'."); + return true; + } + + _console_file_list_scenario.ValidateFileList(true); + for (uint i = 0; i < _console_file_list_scenario.size(); i++) { + IConsolePrint(CC_DEFAULT, "{}) {}", i, _console_file_list_scenario[i].title); + } + + return true; +} + +/* List all the heightmaps */ +DEF_CONSOLE_CMD(ConListHeightmaps) +{ + if (argc == 0) { + IConsolePrint(CC_HELP, "List all loadable heightmaps. Usage: 'list_heightmaps'."); + return true; + } + + _console_file_list_heightmap.ValidateFileList(true); + for (uint i = 0; i < _console_file_list_heightmap.size(); i++) { + IConsolePrint(CC_DEFAULT, "{}) {}", i, _console_file_list_heightmap[i].title); } return true; @@ -493,8 +579,8 @@ DEF_CONSOLE_CMD(ConChangeDirectory) if (argc != 2) return false; const char *file = argv[1]; - _console_file_list.ValidateFileList(true); - const FiosItem *item = _console_file_list.FindItem(file); + _console_file_list_savegame.ValidateFileList(true); + const FiosItem *item = _console_file_list_savegame.FindItem(file); if (item != nullptr) { switch (item->type) { case FIOS_TYPE_DIR: case FIOS_TYPE_DRIVE: case FIOS_TYPE_PARENT: @@ -506,7 +592,7 @@ DEF_CONSOLE_CMD(ConChangeDirectory) IConsolePrint(CC_ERROR, "{}: No such file or directory.", file); } - _console_file_list.InvalidateFileList(); + _console_file_list_savegame.InvalidateFileList(); return true; } @@ -518,8 +604,8 @@ DEF_CONSOLE_CMD(ConPrintWorkingDirectory) } /* XXX - Workaround for broken file handling */ - _console_file_list.ValidateFileList(true); - _console_file_list.InvalidateFileList(); + _console_file_list_savegame.ValidateFileList(true); + _console_file_list_savegame.InvalidateFileList(); IConsolePrint(CC_DEFAULT, FiosGetCurrentPath()); return true; @@ -2531,10 +2617,16 @@ void IConsoleStdLibRegister() IConsole::CmdRegister("scrollto", ConScrollToTile); IConsole::CmdRegister("alias", ConAlias); IConsole::CmdRegister("load", ConLoad); + IConsole::CmdRegister("load_save", ConLoad); + IConsole::CmdRegister("load_scenario", ConLoadScenario); + IConsole::CmdRegister("load_heightmap", ConLoadHeightmap); IConsole::CmdRegister("rm", ConRemove); IConsole::CmdRegister("save", ConSave); IConsole::CmdRegister("saveconfig", ConSaveConfig); IConsole::CmdRegister("ls", ConListFiles); + IConsole::CmdRegister("list_saves", ConListFiles); + IConsole::CmdRegister("list_scenarios", ConListScenarios); + IConsole::CmdRegister("list_heightmaps", ConListHeightmaps); IConsole::CmdRegister("cd", ConChangeDirectory); IConsole::CmdRegister("pwd", ConPrintWorkingDirectory); IConsole::CmdRegister("clear", ConClearBuffer); diff --git a/src/fios.cpp b/src/fios.cpp index 48e0466eea..ec1f3de3b2 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -65,8 +65,9 @@ bool FiosItem::operator< (const FiosItem &other) const * Construct a file list with the given kind of files, for the stated purpose. * @param abstract_filetype Kind of files to collect. * @param fop Purpose of the collection, either #SLO_LOAD or #SLO_SAVE. + * @param show_dirs Whether to show directories. */ -void FileList::BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop) +void FileList::BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop, bool show_dirs) { this->clear(); @@ -76,15 +77,15 @@ void FileList::BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperati break; case FT_SAVEGAME: - FiosGetSavegameList(fop, *this); + FiosGetSavegameList(fop, show_dirs, *this); break; case FT_SCENARIO: - FiosGetScenarioList(fop, *this); + FiosGetScenarioList(fop, show_dirs, *this); break; case FT_HEIGHTMAP: - FiosGetHeightmapList(fop, *this); + FiosGetHeightmapList(fop, show_dirs, *this); break; default: @@ -337,11 +338,12 @@ bool FiosFileScanner::AddFile(const std::string &filename, size_t, const std::st /** * Fill the list of the files in a directory, according to some arbitrary rule. * @param fop Purpose of collecting the list. + * @param show_dirs Whether to list directories. * @param callback_proc The function that is called where you need to do the filtering. * @param subdir The directory from where to start (global) searching. * @param file_list Destination of the found files. */ -static void FiosGetFileList(SaveLoadOperation fop, FiosGetTypeAndNameProc *callback_proc, Subdirectory subdir, FileList &file_list) +static void FiosGetFileList(SaveLoadOperation fop, bool show_dirs, FiosGetTypeAndNameProc *callback_proc, Subdirectory subdir, FileList &file_list) { struct stat sb; struct dirent *dirent; @@ -354,7 +356,7 @@ static void FiosGetFileList(SaveLoadOperation fop, FiosGetTypeAndNameProc *callb assert(_fios_path != nullptr); /* A parent directory link exists if we are not in the root directory */ - if (!FiosIsRoot(*_fios_path)) { + if (show_dirs && !FiosIsRoot(*_fios_path)) { fios = &file_list.emplace_back(); fios->type = FIOS_TYPE_PARENT; fios->mtime = 0; @@ -364,7 +366,7 @@ static void FiosGetFileList(SaveLoadOperation fop, FiosGetTypeAndNameProc *callb } /* Show subdirectories */ - if ((dir = ttd_opendir(_fios_path->c_str())) != nullptr) { + if (show_dirs && (dir = ttd_opendir(_fios_path->c_str())) != nullptr) { while ((dirent = readdir(dir)) != nullptr) { std::string d_name = FS2OTTD(dirent->d_name); @@ -384,7 +386,7 @@ static void FiosGetFileList(SaveLoadOperation fop, FiosGetTypeAndNameProc *callb } /* Sort the subdirs always by name, ascending, remember user-sorting order */ - { + if (show_dirs) { SortingBits order = _savegame_sort_order; _savegame_sort_order = SORT_BY_NAME | SORT_ASCENDING; std::sort(file_list.begin(), file_list.end()); @@ -464,10 +466,11 @@ std::tuple FiosGetSavegameListCallback(SaveLoadOperation /** * Get a list of savegames. * @param fop Purpose of collecting the list. + * @param show_dirs Whether to show directories. * @param file_list Destination of the found files. * @see FiosGetFileList */ -void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list) +void FiosGetSavegameList(SaveLoadOperation fop, bool show_dirs, FileList &file_list) { static std::optional fios_save_path; @@ -475,7 +478,7 @@ void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list) _fios_path = &(*fios_save_path); - FiosGetFileList(fop, &FiosGetSavegameListCallback, NO_DIRECTORY, file_list); + FiosGetFileList(fop, show_dirs, &FiosGetSavegameListCallback, NO_DIRECTORY, file_list); } /** @@ -510,10 +513,11 @@ std::tuple FiosGetScenarioListCallback(SaveLoadOperation /** * Get a list of scenarios. * @param fop Purpose of collecting the list. + * @param show_dirs Whether to show directories. * @param file_list Destination of the found files. * @see FiosGetFileList */ -void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list) +void FiosGetScenarioList(SaveLoadOperation fop, bool show_dirs, FileList &file_list) { static std::optional fios_scn_path; @@ -524,7 +528,7 @@ void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list) std::string base_path = FioFindDirectory(SCENARIO_DIR); Subdirectory subdir = (fop == SLO_LOAD && base_path == *_fios_path) ? SCENARIO_DIR : NO_DIRECTORY; - FiosGetFileList(fop, &FiosGetScenarioListCallback, subdir, file_list); + FiosGetFileList(fop, show_dirs, &FiosGetScenarioListCallback, subdir, file_list); } std::tuple FiosGetHeightmapListCallback(SaveLoadOperation, const std::string &file, const std::string_view ext) @@ -570,9 +574,10 @@ std::tuple FiosGetHeightmapListCallback(SaveLoadOperation /** * Get a list of heightmaps. * @param fop Purpose of collecting the list. + * @param show_dirs Whether to show directories. * @param file_list Destination of the found files. */ -void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list) +void FiosGetHeightmapList(SaveLoadOperation fop, bool show_dirs, FileList &file_list) { static std::optional fios_hmap_path; @@ -582,7 +587,7 @@ void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list) std::string base_path = FioFindDirectory(HEIGHTMAP_DIR); Subdirectory subdir = base_path == *_fios_path ? HEIGHTMAP_DIR : NO_DIRECTORY; - FiosGetFileList(fop, &FiosGetHeightmapListCallback, subdir, file_list); + FiosGetFileList(fop, show_dirs, &FiosGetHeightmapListCallback, subdir, file_list); } /** diff --git a/src/fios.h b/src/fios.h index 5827538e46..0bfc9f7640 100644 --- a/src/fios.h +++ b/src/fios.h @@ -87,7 +87,7 @@ struct FiosItem { /** List of file information. */ class FileList : public std::vector { public: - void BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop); + void BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop, bool show_dirs); const FiosItem *FindItem(const std::string_view file); }; @@ -104,9 +104,9 @@ extern SortingBits _savegame_sort_order; void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop); -void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list); -void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list); -void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list); +void FiosGetSavegameList(SaveLoadOperation fop, bool show_dirs, FileList &file_list); +void FiosGetScenarioList(SaveLoadOperation fop, bool show_dirs, FileList &file_list); +void FiosGetHeightmapList(SaveLoadOperation fop, bool show_dirs, FileList &file_list); bool FiosBrowseTo(const FiosItem *item); diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 26b182184c..041189711f 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -829,7 +829,7 @@ public: if (!gui_scope) break; _fios_path_changed = true; - this->fios_items.BuildFileList(this->abstract_filetype, this->fop); + this->fios_items.BuildFileList(this->abstract_filetype, this->fop, true); this->selected = nullptr; _load_check_data.Clear(); From bbdbf9a5896fbfa14c2bb9ac445c2930891e3516 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Tue, 23 Jan 2024 10:42:10 -0500 Subject: [PATCH 10/52] Add: AI/GS Time Mode to choose between economy (default) and calendar time (#11603) --- src/script/api/CMakeLists.txt | 2 ++ src/script/api/ai_changelog.hpp | 1 + src/script/api/game_changelog.hpp | 1 + src/script/api/script_date.cpp | 31 ++++++++++++++++---- src/script/api/script_object.cpp | 10 +++++++ src/script/api/script_object.hpp | 14 ++++++++++ src/script/api/script_timemode.cpp | 29 +++++++++++++++++++ src/script/api/script_timemode.hpp | 45 ++++++++++++++++++++++++++++++ src/script/script_storage.hpp | 2 ++ 9 files changed, 130 insertions(+), 5 deletions(-) create mode 100644 src/script/api/script_timemode.cpp create mode 100644 src/script/api/script_timemode.hpp diff --git a/src/script/api/CMakeLists.txt b/src/script/api/CMakeLists.txt index f41efd068c..6a8cb66d9c 100644 --- a/src/script/api/CMakeLists.txt +++ b/src/script/api/CMakeLists.txt @@ -151,6 +151,7 @@ add_files( script_basestation.hpp script_bridge.hpp script_bridgelist.hpp + script_timemode.hpp script_cargo.hpp script_cargolist.hpp script_cargomonitor.hpp @@ -225,6 +226,7 @@ add_files( script_basestation.cpp script_bridge.cpp script_bridgelist.cpp + script_timemode.cpp script_cargo.cpp script_cargolist.cpp script_cargomonitor.cpp diff --git a/src/script/api/ai_changelog.hpp b/src/script/api/ai_changelog.hpp index 0a35d43ed4..6af41d52a4 100644 --- a/src/script/api/ai_changelog.hpp +++ b/src/script/api/ai_changelog.hpp @@ -18,6 +18,7 @@ * This version is not yet released. The following changes are not set in stone yet. * * API additions: + * \li AITimeMode * \li AITown::ROAD_LAYOUT_RANDOM * \li AIVehicle::IsPrimaryVehicle * diff --git a/src/script/api/game_changelog.hpp b/src/script/api/game_changelog.hpp index 0dfb08c2e5..570e8c589b 100644 --- a/src/script/api/game_changelog.hpp +++ b/src/script/api/game_changelog.hpp @@ -22,6 +22,7 @@ * \li GSAsyncMode * \li GSCompanyMode::IsValid * \li GSCompanyMode::IsDeity + * \li GSTimeMode * \li GSTown::ROAD_LAYOUT_RANDOM * \li GSVehicle::IsPrimaryVehicle * \li GSOrder::SetOrderJumpTo diff --git a/src/script/api/script_date.cpp b/src/script/api/script_date.cpp index 4d3a3866cf..076f196cd4 100644 --- a/src/script/api/script_date.cpp +++ b/src/script/api/script_date.cpp @@ -9,7 +9,9 @@ #include "../../stdafx.h" #include "script_date.hpp" +#include "script_timemode.hpp" #include "../../timer/timer_game_calendar.h" +#include "../../timer/timer_game_economy.h" #include @@ -22,14 +24,21 @@ /* static */ ScriptDate::Date ScriptDate::GetCurrentDate() { - return (ScriptDate::Date)TimerGameCalendar::date.base(); + if (ScriptTimeMode::IsCalendarMode()) return (ScriptDate::Date)TimerGameCalendar::date.base(); + + return (ScriptDate::Date)TimerGameEconomy::date.base(); } /* static */ SQInteger ScriptDate::GetYear(ScriptDate::Date date) { if (date < 0) return DATE_INVALID; - ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + if (ScriptTimeMode::IsCalendarMode()) { + ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + return ymd.year.base(); + } + + ::TimerGameEconomy::YearMonthDay ymd = ::TimerGameEconomy::ConvertDateToYMD(date); return ymd.year.base(); } @@ -37,7 +46,12 @@ { if (date < 0) return DATE_INVALID; - ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + if (ScriptTimeMode::IsCalendarMode()) { + ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + return ymd.month + 1; + } + + ::TimerGameEconomy::YearMonthDay ymd = ::TimerGameEconomy::ConvertDateToYMD(date); return ymd.month + 1; } @@ -45,7 +59,12 @@ { if (date < 0) return DATE_INVALID; - ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + if (ScriptTimeMode::IsCalendarMode()) { + ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + return ymd.day; + } + + ::TimerGameEconomy::YearMonthDay ymd = ::TimerGameEconomy::ConvertDateToYMD(date); return ymd.day; } @@ -55,7 +74,9 @@ if (day_of_month < 1 || day_of_month > 31) return DATE_INVALID; if (year < 0 || year > CalendarTime::MAX_YEAR) return DATE_INVALID; - return (ScriptDate::Date)::TimerGameCalendar::ConvertYMDToDate(year, month - 1, day_of_month).base(); + if (ScriptTimeMode::IsCalendarMode()) return (ScriptDate::Date)::TimerGameCalendar::ConvertYMDToDate(year, month - 1, day_of_month).base(); + + return (ScriptDate::Date)::TimerGameEconomy::ConvertYMDToDate(year, month - 1, day_of_month).base(); } /* static */ SQInteger ScriptDate::GetSystemTime() diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index 8e3a684240..9b0f6bd259 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -200,6 +200,16 @@ ScriptObject::ActiveInstance::~ActiveInstance() return GetStorage()->allow_do_command; } +/* static */ void ScriptObject::SetTimeMode(bool calendar) +{ + GetStorage()->time_mode = calendar; +} + +/* static */ bool ScriptObject::IsCalendarTimeMode() +{ + return GetStorage()->time_mode; +} + /* static */ void ScriptObject::SetCompany(CompanyID company) { if (GetStorage()->root_company == INVALID_OWNER) GetStorage()->root_company = company; diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index 28cac81d59..c9bf1a4fb4 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -244,6 +244,20 @@ protected: */ static bool GetAllowDoCommand(); + /** + * Set if the script is running in calendar time or economy time mode. + * Calendar time is used by OpenTTD for technology like vehicle introductions and expiration, and variable snowline. It can be sped up or slowed down by the player. + * Economy time always runs at the same pace and handles things like cargo production, everything related to money, etc. + * @param Calendar Should we use calendar time mode? (Set to false for economy time mode.) + */ + static void SetTimeMode(bool calendar); + + /** + * Check if the script is operating in calendar time mode, or in economy time mode. See SetTimeMode() for more information. + * @return True if we are in calendar time mode, false if we are in economy time mode. + */ + static bool IsCalendarTimeMode(); + /** * Set the current company to execute commands for or request * information about. diff --git a/src/script/api/script_timemode.cpp b/src/script/api/script_timemode.cpp new file mode 100644 index 0000000000..f927368f8a --- /dev/null +++ b/src/script/api/script_timemode.cpp @@ -0,0 +1,29 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file script_timemode.cpp Implementation of ScriptTimeMode. */ + +#include "../../stdafx.h" +#include "script_timemode.hpp" + +#include "../../safeguards.h" + +ScriptTimeMode::ScriptTimeMode(bool calendar) +{ + this->last_time_mode = ScriptObject::IsCalendarTimeMode(); + ScriptObject::SetTimeMode(calendar); +} + +ScriptTimeMode::~ScriptTimeMode() +{ + ScriptObject::SetTimeMode(this->last_time_mode); +} + +/* static */ bool ScriptTimeMode::IsCalendarMode() +{ + return ScriptObject::IsCalendarTimeMode(); +} diff --git a/src/script/api/script_timemode.hpp b/src/script/api/script_timemode.hpp new file mode 100644 index 0000000000..eb03b0b3f9 --- /dev/null +++ b/src/script/api/script_timemode.hpp @@ -0,0 +1,45 @@ +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file script_timemode.hpp Switch the time mode. */ + +#ifndef SCRIPT_TIMEMODE_HPP +#define SCRIPT_TIMEMODE_HPP + +#include "script_object.hpp" + +/** + * Class to switch the current time. + * If you create an instance of this class, the mode will be switched to either calendar time or economy time mode. + * @note Destroying this object will restore the previous time mode. + * @api ai game + */ +class ScriptTimeMode : public ScriptObject { +private: + bool last_time_mode; ///< The last time mode we were using. +public: + /** + * Creating an instance of this class switches the time mode used for queries and commands. + * Calendar time is used by OpenTTD for technology like vehicle introductions and expiration, and variable snowline. It can be sped up or slowed down by the player. + * Economy time always runs at the same pace and handles things like cargo production, everything related to money, etc. + * @param Calendar Should we use calendar time mode? (Set to false for economy time mode.) + */ + ScriptTimeMode(bool calendar); + + /** + * Destroying this instance resets the time mode to the mode it was in when the instance was created. + */ + ~ScriptTimeMode(); + + /** + * Check if the script is operating in calendar time mode, or in economy time mode. See ScriptTimeMode() for more information. + * @return True if we are in calendar time mode, false if we are in economy time mode. + */ + static bool IsCalendarMode(); +}; + +#endif /* SCRIPT_TIMEMODE_HPP */ diff --git a/src/script/script_storage.hpp b/src/script/script_storage.hpp index 6f856908d5..a2d7d91dc2 100644 --- a/src/script/script_storage.hpp +++ b/src/script/script_storage.hpp @@ -41,6 +41,7 @@ private: class ScriptObject *mode_instance; ///< The instance belonging to the current build mode. ScriptAsyncModeProc *async_mode; ///< The current command async mode we are in. class ScriptObject *async_mode_instance; ///< The instance belonging to the current command async mode. + bool time_mode; ///< True if we in calendar time mode, or false (default) if we are in economy time mode. CompanyID root_company; ///< The root company, the company that the script really belongs to. CompanyID company; ///< The current company. @@ -70,6 +71,7 @@ public: mode_instance (nullptr), async_mode (nullptr), async_mode_instance (nullptr), + time_mode (false), root_company (INVALID_OWNER), company (INVALID_OWNER), delay (1), From fd9e72a7e75da05f871cf8e0f22a6475918749fd Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Tue, 23 Jan 2024 11:36:09 -0500 Subject: [PATCH 11/52] Feature: Use real-time "wallclock" timekeeping units (#11341) --- src/cheat_gui.cpp | 4 +- src/company_gui.cpp | 8 +- src/graph_gui.cpp | 91 +++++++++++---- src/lang/english.txt | 148 ++++++++++++++---------- src/misc.cpp | 10 +- src/order_cmd.cpp | 16 ++- src/order_func.h | 7 ++ src/saveload/afterload.cpp | 3 + src/saveload/saveload.h | 1 + src/settings_gui.cpp | 1 + src/settings_table.cpp | 32 ++++- src/settings_type.h | 7 ++ src/strgen/strgen_base.cpp | 27 +++++ src/strings.cpp | 109 ++++++++++++++--- src/subsidy_gui.cpp | 20 +++- src/table/control_codes.h | 6 + src/table/settings/company_settings.ini | 8 +- src/table/settings/economy_settings.ini | 14 +++ src/table/settings/gui_settings.ini | 2 + src/table/strgen_tables.h | 8 ++ src/timer/timer_game_calendar.cpp | 24 ++++ src/timer/timer_game_calendar.h | 2 + src/timer/timer_game_common.cpp | 13 ++- src/timer/timer_game_common.h | 4 +- src/timer/timer_game_economy.cpp | 47 ++++++++ src/timer/timer_game_economy.h | 9 +- src/timetable_gui.cpp | 6 + src/vehicle.cpp | 15 ++- src/vehicle_gui.cpp | 34 +++++- src/widgets/graph_widget.h | 2 + 30 files changed, 542 insertions(+), 136 deletions(-) diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index d5f6d6ca25..e63e70b386 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -116,7 +116,9 @@ static int32_t ClickChangeDateCheat(int32_t new_value, int32_t) /* Now it's safe to actually change the date. */ TimerGameCalendar::SetDate(new_calendar_date, TimerGameCalendar::date_fract); - TimerGameEconomy::SetDate(new_economy_date, TimerGameEconomy::date_fract); + + /* If not using wallclock units, we keep economy date in sync with calendar date and must change it also. */ + if (!TimerGameEconomy::UsingWallclockUnits()) TimerGameEconomy::SetDate(new_economy_date, TimerGameEconomy::date_fract); CalendarEnginesMonthlyLoop(); SetWindowDirty(WC_STATUS_BAR, 0); diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 600666e3d7..fe105d6c2a 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -138,7 +138,7 @@ static uint GetTotalCategoriesHeight() */ static uint GetMaxCategoriesWidth() { - uint max_width = 0; + uint max_width = GetStringBoundingBox(STR_FINANCES_YEAR_CAPTION).width; /* Loop through categories to check max widths. */ for (const ExpensesList &list : _expenses_list_types) { @@ -173,8 +173,10 @@ static void DrawCategory(const Rect &r, int start_y, const ExpensesList &list) */ static void DrawCategories(const Rect &r) { - /* Start with an empty space in the year row, plus the blockspace under the year. */ - int y = r.top + GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_wide; + int y = r.top; + /* Draw description of 12-minute economic period. */ + DrawString(r.left, r.right, y, (STR_FINANCES_YEAR_CAPTION), TC_FROMSTRING, SA_LEFT, true); + y += GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_wide; for (const ExpensesList &list : _expenses_list_types) { /* Draw category title and advance y */ diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 61c4bfb647..53c9851296 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -170,6 +170,9 @@ protected: static const int GRAPH_ZERO_LINE_COLOUR = GREY_SCALE(8); static const int GRAPH_YEAR_LINE_COLOUR = GREY_SCALE(5); static const int GRAPH_NUM_MONTHS = 24; ///< Number of months displayed in the graph. + static const int PAYMENT_GRAPH_X_STEP_DAYS = 20; ///< X-axis step label for cargo payment rates "Days in transit". + static const int PAYMENT_GRAPH_X_STEP_SECONDS = 10; ///< X-axis step label for cargo payment rates "Seconds in transit". + static const int ECONOMY_QUARTER_MINUTES = 3; ///< Minutes per economic quarter. static const TextColour GRAPH_AXIS_LABEL_COLOUR = TC_BLACK; ///< colour of the graph axis label. @@ -336,8 +339,13 @@ protected: /* Don't draw the first line, as that's where the axis will be. */ x = r.left + x_sep; - for (int i = 0; i < this->num_vert_lines; i++) { - GfxFillRect(x, r.top, x, r.bottom, GRAPH_GRID_COLOUR); + int grid_colour = GRAPH_GRID_COLOUR; + for (int i = 1; i < this->num_vert_lines + 1; i++) { + /* If using wallclock units, we separate periods with a lighter line. */ + if (TimerGameEconomy::UsingWallclockUnits()) { + grid_colour = (i % 4 == 0) ? GRAPH_YEAR_LINE_COLOUR : GRAPH_GRID_COLOUR; + } + GfxFillRect(x, r.top, x, r.bottom, grid_colour); x += x_sep; } @@ -399,7 +407,7 @@ protected: x += x_sep; } } else { - /* Draw x-axis labels for graphs not based on quarterly performance (cargo payment rates). */ + /* Draw x-axis labels for graphs not based on quarterly performance (cargo payment rates, and all graphs when using wallclock units). */ x = r.left; y = r.bottom + ScaleGUITrad(2); uint16_t label = this->x_values_start; @@ -622,6 +630,12 @@ struct OperatingProfitGraphWindow : BaseGraphWindow { OperatingProfitGraphWindow(WindowDesc *desc, WindowNumber window_number) : BaseGraphWindow(desc, WID_CV_GRAPH, STR_JUST_CURRENCY_SHORT) { + this->num_on_x_axis = GRAPH_NUM_MONTHS; + this->num_vert_lines = GRAPH_NUM_MONTHS; + this->x_values_start = ECONOMY_QUARTER_MINUTES; + this->x_values_increment = ECONOMY_QUARTER_MINUTES; + this->draw_dates = !TimerGameEconomy::UsingWallclockUnits(); + this->InitializeWindow(window_number); } @@ -641,10 +655,12 @@ static constexpr NWidgetPart _nested_operating_profit_widgets[] = { NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, WID_CV_BACKGROUND), - NWidget(NWID_HORIZONTAL), + NWidget(NWID_VERTICAL), NWidget(WWT_EMPTY, COLOUR_BROWN, WID_CV_GRAPH), SetMinimalSize(576, 160), SetFill(1, 1), SetResize(1, 1), - NWidget(NWID_VERTICAL), - NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1), + NWidget(NWID_HORIZONTAL), + NWidget(NWID_SPACER), SetMinimalSize(12, 0), SetFill(1, 0), SetResize(1, 0), + NWidget(WWT_TEXT, COLOUR_BROWN, WID_CV_FOOTER), SetMinimalSize(0, 6), SetPadding(2, 0, 2, 0), SetDataTip(STR_GRAPH_LAST_72_MINUTES_TIME_LABEL, STR_NULL), + NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_RESIZEBOX, COLOUR_BROWN, WID_CV_RESIZE), SetDataTip(RWV_HIDE_BEVEL, STR_TOOLTIP_RESIZE), EndContainer(), EndContainer(), @@ -673,6 +689,12 @@ struct IncomeGraphWindow : BaseGraphWindow { IncomeGraphWindow(WindowDesc *desc, WindowNumber window_number) : BaseGraphWindow(desc, WID_CV_GRAPH, STR_JUST_CURRENCY_SHORT) { + this->num_on_x_axis = GRAPH_NUM_MONTHS; + this->num_vert_lines = GRAPH_NUM_MONTHS; + this->x_values_start = ECONOMY_QUARTER_MINUTES; + this->x_values_increment = ECONOMY_QUARTER_MINUTES; + this->draw_dates = !TimerGameEconomy::UsingWallclockUnits(); + this->InitializeWindow(window_number); } @@ -692,10 +714,12 @@ static constexpr NWidgetPart _nested_income_graph_widgets[] = { NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, WID_CV_BACKGROUND), - NWidget(NWID_HORIZONTAL), + NWidget(NWID_VERTICAL), NWidget(WWT_EMPTY, COLOUR_BROWN, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1), - NWidget(NWID_VERTICAL), - NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1), + NWidget(NWID_HORIZONTAL), + NWidget(NWID_SPACER), SetMinimalSize(12, 0), SetFill(1, 0), SetResize(1, 0), + NWidget(WWT_TEXT, COLOUR_BROWN, WID_CV_FOOTER), SetMinimalSize(0, 6), SetPadding(2, 0, 2, 0), SetDataTip(STR_GRAPH_LAST_72_MINUTES_TIME_LABEL, STR_NULL), + NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_RESIZEBOX, COLOUR_BROWN, WID_CV_RESIZE), SetDataTip(RWV_HIDE_BEVEL, STR_TOOLTIP_RESIZE), EndContainer(), EndContainer(), @@ -722,6 +746,12 @@ struct DeliveredCargoGraphWindow : BaseGraphWindow { DeliveredCargoGraphWindow(WindowDesc *desc, WindowNumber window_number) : BaseGraphWindow(desc, WID_CV_GRAPH, STR_JUST_COMMA) { + this->num_on_x_axis = GRAPH_NUM_MONTHS; + this->num_vert_lines = GRAPH_NUM_MONTHS; + this->x_values_start = ECONOMY_QUARTER_MINUTES; + this->x_values_increment = ECONOMY_QUARTER_MINUTES; + this->draw_dates = !TimerGameEconomy::UsingWallclockUnits(); + this->InitializeWindow(window_number); } @@ -741,10 +771,12 @@ static constexpr NWidgetPart _nested_delivered_cargo_graph_widgets[] = { NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, WID_CV_BACKGROUND), - NWidget(NWID_HORIZONTAL), + NWidget(NWID_VERTICAL), NWidget(WWT_EMPTY, COLOUR_BROWN, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1), - NWidget(NWID_VERTICAL), - NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1), + NWidget(NWID_HORIZONTAL), + NWidget(NWID_SPACER), SetMinimalSize(12, 0), SetFill(1, 0), SetResize(1, 0), + NWidget(WWT_TEXT, COLOUR_BROWN, WID_CV_FOOTER), SetMinimalSize(0, 6), SetPadding(2, 0, 2, 0), SetDataTip(STR_GRAPH_LAST_72_MINUTES_TIME_LABEL, STR_NULL), + NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_RESIZEBOX, COLOUR_BROWN, WID_CV_RESIZE), SetDataTip(RWV_HIDE_BEVEL, STR_TOOLTIP_RESIZE), EndContainer(), EndContainer(), @@ -771,6 +803,12 @@ struct PerformanceHistoryGraphWindow : BaseGraphWindow { PerformanceHistoryGraphWindow(WindowDesc *desc, WindowNumber window_number) : BaseGraphWindow(desc, WID_PHG_GRAPH, STR_JUST_COMMA) { + this->num_on_x_axis = GRAPH_NUM_MONTHS; + this->num_vert_lines = GRAPH_NUM_MONTHS; + this->x_values_start = ECONOMY_QUARTER_MINUTES; + this->x_values_increment = ECONOMY_QUARTER_MINUTES; + this->draw_dates = !TimerGameEconomy::UsingWallclockUnits(); + this->InitializeWindow(window_number); } @@ -797,10 +835,12 @@ static constexpr NWidgetPart _nested_performance_history_widgets[] = { NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, WID_PHG_BACKGROUND), - NWidget(NWID_HORIZONTAL), + NWidget(NWID_VERTICAL), NWidget(WWT_EMPTY, COLOUR_BROWN, WID_PHG_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1), - NWidget(NWID_VERTICAL), - NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1), + NWidget(NWID_HORIZONTAL), + NWidget(NWID_SPACER), SetMinimalSize(12, 0), SetFill(1, 0), SetResize(1, 0), + NWidget(WWT_TEXT, COLOUR_BROWN, WID_PHG_FOOTER), SetMinimalSize(0, 6), SetPadding(2, 0, 2, 0), SetDataTip(STR_GRAPH_LAST_72_MINUTES_TIME_LABEL, STR_NULL), + NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_RESIZEBOX, COLOUR_BROWN, WID_PHG_RESIZE), SetDataTip(RWV_HIDE_BEVEL, STR_TOOLTIP_RESIZE), EndContainer(), EndContainer(), @@ -827,6 +867,12 @@ struct CompanyValueGraphWindow : BaseGraphWindow { CompanyValueGraphWindow(WindowDesc *desc, WindowNumber window_number) : BaseGraphWindow(desc, WID_CV_GRAPH, STR_JUST_CURRENCY_SHORT) { + this->num_on_x_axis = GRAPH_NUM_MONTHS; + this->num_vert_lines = GRAPH_NUM_MONTHS; + this->x_values_start = ECONOMY_QUARTER_MINUTES; + this->x_values_increment = ECONOMY_QUARTER_MINUTES; + this->draw_dates = !TimerGameEconomy::UsingWallclockUnits(); + this->InitializeWindow(window_number); } @@ -846,10 +892,12 @@ static constexpr NWidgetPart _nested_company_value_graph_widgets[] = { NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, WID_CV_BACKGROUND), - NWidget(NWID_HORIZONTAL), + NWidget(NWID_VERTICAL), NWidget(WWT_EMPTY, COLOUR_BROWN, WID_CV_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1), - NWidget(NWID_VERTICAL), - NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1), + NWidget(NWID_HORIZONTAL), + NWidget(NWID_SPACER), SetMinimalSize(12, 0), SetFill(1, 0), SetResize(1, 0), + NWidget(WWT_TEXT, COLOUR_BROWN, WID_CV_FOOTER), SetMinimalSize(0, 6), SetPadding(2, 0, 2, 0), SetDataTip(STR_GRAPH_LAST_72_MINUTES_TIME_LABEL, STR_NULL), + NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_RESIZEBOX, COLOUR_BROWN, WID_CV_RESIZE), SetDataTip(RWV_HIDE_BEVEL, STR_TOOLTIP_RESIZE), EndContainer(), EndContainer(), @@ -883,8 +931,9 @@ struct PaymentRatesGraphWindow : BaseGraphWindow { this->num_on_x_axis = 20; this->num_vert_lines = 20; this->draw_dates = false; - this->x_values_start = 10; - this->x_values_increment = 10; + /* The x-axis is labeled in either seconds or days. A day is two seconds, so we adjust the label if needed. */ + this->x_values_start = (TimerGameEconomy::UsingWallclockUnits() ? PAYMENT_GRAPH_X_STEP_SECONDS : PAYMENT_GRAPH_X_STEP_DAYS); + this->x_values_increment = (TimerGameEconomy::UsingWallclockUnits() ? PAYMENT_GRAPH_X_STEP_SECONDS : PAYMENT_GRAPH_X_STEP_DAYS); this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_CPR_MATRIX_SCROLLBAR); @@ -1085,7 +1134,7 @@ static constexpr NWidgetPart _nested_cargo_payment_rates_widgets[] = { EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(12, 0), SetFill(1, 0), SetResize(1, 0), - NWidget(WWT_TEXT, COLOUR_BROWN, WID_CPR_FOOTER), SetMinimalSize(0, 6), SetPadding(2, 0, 2, 0), SetDataTip(STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL, STR_NULL), + NWidget(WWT_TEXT, COLOUR_BROWN, WID_CPR_FOOTER), SetMinimalSize(0, 6), SetPadding(2, 0, 2, 0), SetDataTip(STR_GRAPH_CARGO_PAYMENT_RATES_TIME_LABEL, STR_NULL), NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_RESIZEBOX, COLOUR_BROWN, WID_CPR_RESIZE), SetDataTip(RWV_HIDE_BEVEL, STR_TOOLTIP_RESIZE), EndContainer(), diff --git a/src/lang/english.txt b/src/lang/english.txt index efb91fd431..812a0c94af 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -214,7 +214,8 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Same As Primary STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}tiles/day +STR_UNITS_VELOCITY_GAMEUNITS_DAY :{DECIMAL}{NBSP}tiles/day +STR_UNITS_VELOCITY_GAMEUNITS_SEC :{DECIMAL}{NBSP}tiles/sec STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knots STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -255,10 +256,17 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}day{P "" s} STR_UNITS_SECONDS :{COMMA}{NBSP}second{P "" s} STR_UNITS_TICKS :{COMMA}{NBSP}tick{P "" s} +STR_UNITS_MONTHS :{NUM}{NBSP}month{P "" s} +STR_UNITS_MINUTES :{NUM}{NBSP}minute{P "" s} + +STR_UNITS_YEARS :{NUM}{NBSP}year{P "" s} +STR_UNITS_PERIODS :{NUM}{NBSP}period{P "" s} + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: STR_LIST_FILTER_OSKTITLE :{BLACK}Enter one or more keywords to filter the list for @@ -323,8 +331,8 @@ STR_SORT_BY_PRODUCTION :Production STR_SORT_BY_TYPE :Type STR_SORT_BY_TRANSPORTED :Transported STR_SORT_BY_NUMBER :Number -STR_SORT_BY_PROFIT_LAST_YEAR :Profit last year -STR_SORT_BY_PROFIT_THIS_YEAR :Profit this year +STR_SORT_BY_PROFIT_LAST_YEAR :Profit last {TKM year period} +STR_SORT_BY_PROFIT_THIS_YEAR :Profit this {TKM year period} STR_SORT_BY_AGE :Age STR_SORT_BY_RELIABILITY :Reliability STR_SORT_BY_TOTAL_CAPACITY_PER_CARGOTYPE :Total capacity per cargo type @@ -351,10 +359,10 @@ STR_SORT_BY_RANGE :Range STR_SORT_BY_POPULATION :Population STR_SORT_BY_RATING :Rating STR_SORT_BY_NUM_VEHICLES :Number of vehicles -STR_SORT_BY_TOTAL_PROFIT_LAST_YEAR :Total profit last year -STR_SORT_BY_TOTAL_PROFIT_THIS_YEAR :Total profit this year -STR_SORT_BY_AVERAGE_PROFIT_LAST_YEAR :Average profit last year -STR_SORT_BY_AVERAGE_PROFIT_THIS_YEAR :Average profit this year +STR_SORT_BY_TOTAL_PROFIT_LAST_YEAR :Total profit last {TKM year period} +STR_SORT_BY_TOTAL_PROFIT_THIS_YEAR :Total profit this {TKM year period} +STR_SORT_BY_AVERAGE_PROFIT_LAST_YEAR :Average profit last {TKM year period} +STR_SORT_BY_AVERAGE_PROFIT_THIS_YEAR :Average profit this {TKM year period} # Group by options for vehicle list STR_GROUP_BY_NONE :None @@ -615,8 +623,10 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Units of STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Company performance ratings (maximum rating=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Company Value Graph +STR_GRAPH_LAST_72_MINUTES_TIME_LABEL :{TINY_FONT}{BLACK}{TKM "" "Last 72 minutes"} + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cargo Payment Rates -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Days in transit +STR_GRAPH_CARGO_PAYMENT_RATES_TIME_LABEL :{TINY_FONT}{BLACK}{TKM Days Seconds} in transit STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Payment for delivering 10 units (or 10,000 litres) of cargo a distance of 20 squares STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Enable all STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Disable all @@ -665,9 +675,9 @@ STR_PERFORMANCE_DETAIL_LOAN :{BLACK}Loan: STR_PERFORMANCE_DETAIL_TOTAL :{BLACK}Total: ###length 10 -STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP :{BLACK}Number of vehicles that turned a profit last year. This includes road vehicles, trains, ships and aircraft +STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP :{BLACK}Number of vehicles that turned a profit last {TKM year period}. This includes road vehicles, trains, ships and aircraft STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}Number of recently-serviced stations. Train stations, bus stops, airports and so on are counted separately even if they belong to the same station -STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP :{BLACK}The profit of the vehicle with the lowest income (only vehicles older than two years are considered) +STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP :{BLACK}The profit of the vehicle with the lowest income (only vehicles older than two {TKM years periods} are considered) STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP :{BLACK}Amount of cash made in the quarter with the lowest profit of the last 12 quarters STR_PERFORMANCE_DETAIL_MAX_INCOME_TOOLTIP :{BLACK}Amount of cash made in the quarter with the highest profit of the last 12 quarters STR_PERFORMANCE_DETAIL_DELIVERED_TOOLTIP :{BLACK}Units of cargo delivered in the last four quarters @@ -899,7 +909,7 @@ STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD_AND :{WHITE}{VEHICLE} is getting very old and urgently needs replacing STR_NEWS_TRAIN_IS_STUCK :{WHITE}{VEHICLE} can't find a path to continue STR_NEWS_VEHICLE_IS_LOST :{WHITE}{VEHICLE} is lost -STR_NEWS_VEHICLE_IS_UNPROFITABLE :{WHITE}{VEHICLE}'s profit last year was {CURRENCY_LONG} +STR_NEWS_VEHICLE_IS_UNPROFITABLE :{WHITE}{VEHICLE}'s profit last {TKM year period} was {CURRENCY_LONG} STR_NEWS_AIRCRAFT_DEST_TOO_FAR :{WHITE}{VEHICLE} can't get to the next destination because it is out of range STR_NEWS_ORDER_REFIT_FAILED :{WHITE}{VEHICLE} stopped because an ordered refit failed @@ -916,16 +926,16 @@ STR_NEWS_STATION_NOW_ACCEPTS_CARGO_LIST :{WHITE}{STATION STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Offer of subsidy expired:{}{}{STRING} from {STRING2} to {STRING2} will now not attract a subsidy STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidy withdrawn:{}{}{STRING} service from {STRING2} to {STRING2} is no longer subsidised -STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Service subsidy offered:{}{}First {STRING} from {STRING2} to {STRING2} will attract a {NUM} year subsidy from the local authority! +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Service subsidy offered:{}{}First {STRING} from {STRING2} to {STRING2} will attract a {UNITS_YEARS_OR_MINUTES} subsidy from the local authority! ###length 4 -STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay 50% extra for the next {NUM} year{P "" s}! -STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay double rates for the next {NUM} year{P "" s}! -STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay triple rates for the next {NUM} year{P "" s}! -STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay quadruple rates for the next {NUM} year{P "" s}! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay 50% extra for the next {UNITS_YEARS_OR_MINUTES}! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay double rates for the next {UNITS_YEARS_OR_MINUTES}! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay triple rates for the next {UNITS_YEARS_OR_MINUTES}! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} from {STRING2} to {STRING2} will pay quadruple rates for the next {UNITS_YEARS_OR_MINUTES}! -STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Traffic chaos in {TOWN}!{}{}Road rebuilding programme funded by {RAW_STRING} brings 6 months of misery to motorists! +STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Traffic chaos in {TOWN}!{}{}Road rebuilding programme funded by {RAW_STRING} brings 6 {TKM months minutes} of misery to motorists! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Transport monopoly! -STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLACK}Local authority of {TOWN} signs contract with {RAW_STRING} for one year of exclusive transport rights! +STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLACK}Local authority of {TOWN} signs contract with {RAW_STRING} for 12 {TKM months minutes} of exclusive transport rights! # Extra view window STR_EXTRA_VIEWPORT_TITLE :{WHITE}Viewport {COMMA} @@ -1286,9 +1296,9 @@ STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER :Subsidy multipl STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER_HELPTEXT :Set how much is paid for subsidised connections STR_CONFIG_SETTING_SUBSIDY_DURATION :Subsidy duration: {STRING2} -STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT :Set the number of years for which a subsidy is awarded +STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT :Set the number of {TKM years periods} for which a subsidy is awarded -STR_CONFIG_SETTING_SUBSIDY_DURATION_VALUE :{NUM} year{P "" s} +STR_CONFIG_SETTING_SUBSIDY_DURATION_VALUE :{UNITS_YEARS_OR_PERIODS} ###setting-zero-is-special STR_CONFIG_SETTING_SUBSIDY_DURATION_DISABLED :No subsidies @@ -1296,7 +1306,7 @@ STR_CONFIG_SETTING_CONSTRUCTION_COSTS :Construction co STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Set level of construction and purchase costs STR_CONFIG_SETTING_RECESSIONS :Recessions: {STRING2} -STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :If enabled, recessions may occur every few years. During a recession all production is significantly lower (it returns to previous level when the recession is over) +STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :If enabled, recessions may occur periodically. During a recession all production is significantly lower (it returns to previous level when the recession is over) STR_CONFIG_SETTING_TRAIN_REVERSING :Disallow train reversing in stations: {STRING2} STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT :If enabled, trains will not reverse in non-terminus stations, even if there is a shorter path to their next destination when reversing @@ -1384,8 +1394,8 @@ STR_CONFIG_SETTING_SIGNALSIDE_LEFT :On the left STR_CONFIG_SETTING_SIGNALSIDE_DRIVING_SIDE :On the driving side STR_CONFIG_SETTING_SIGNALSIDE_RIGHT :On the right -STR_CONFIG_SETTING_SHOWFINANCES :Show finances window at the end of the year: {STRING2} -STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT :If enabled, the finances window pops up at the end of each year to allow easy inspection of the financial status of the company +STR_CONFIG_SETTING_SHOWFINANCES :Show finances window at the end of the {TKM year period}: {STRING2} +STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT :If enabled, the finances window pops up at the end of each {TKM year period} to allow easy inspection of the financial status of the company STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :New orders are 'non-stop' by default: {STRING2} STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Normally, a vehicle will stop at every station it passes. By enabling this setting, it will drive through all station on the way to its final destination without stopping. Note, that this setting only defines a default value for new orders. Individual orders can be set explicitly to either behaviour nevertheless @@ -1406,10 +1416,10 @@ STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT :Main viewport STR_CONFIG_SETTING_AUTOSCROLL_EVERY_VIEWPORT :Every viewport STR_CONFIG_SETTING_BRIBE :Allow bribing of the local authority: {STRING2} -STR_CONFIG_SETTING_BRIBE_HELPTEXT :Allow companies to try bribing the local town authority. If the bribe is noticed by an inspector, the company will not be able to act in the town for six months +STR_CONFIG_SETTING_BRIBE_HELPTEXT :Allow companies to try bribing the local town authority. If the bribe is noticed by an inspector, the company will not be able to act in the town for six {TKM months minutes} STR_CONFIG_SETTING_ALLOW_EXCLUSIVE :Allow buying exclusive transport rights: {STRING2} -STR_CONFIG_SETTING_ALLOW_EXCLUSIVE_HELPTEXT :If a company buys exclusive transport rights for a town, opponents' stations (passenger and cargo) won't receive any cargo for a whole year +STR_CONFIG_SETTING_ALLOW_EXCLUSIVE_HELPTEXT :If a company buys exclusive transport rights for a town, opponents' stations (passenger and cargo) won't receive any cargo for twelve {TKM months minutes} STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS :Allow funding buildings: {STRING2} STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS_HELPTEXT :Allow companies to give money to towns for funding new houses @@ -1466,11 +1476,17 @@ STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT :Yes, but exclud STR_CONFIG_SETTING_ORDER_REVIEW_ON :Of all vehicles STR_CONFIG_SETTING_WARN_INCOME_LESS :Warn if a vehicle's income is negative: {STRING2} -STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a news message gets sent when a vehicle has not made any profit within a calendar year +STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a news message gets sent when a vehicle has not made any profit within a {TKM year period} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicles never expire: {STRING2} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :When enabled, all vehicle models remain available forever after their introduction +STR_CONFIG_SETTING_TIMEKEEPING_UNITS :Timekeeping: {STRING2} +STR_CONFIG_SETTING_TIMEKEEPING_UNITS_HELPTEXT :Select the timekeeping units of the game. This cannot be changed later.{}{}Calendar-based is the classic OpenTTD experience, with a year consisting of 12 months, and each month having 28-31 days.{}{}In Wallclock-based time, vehicle movement, cargo production, and financials are instead based on one-minute increments, which is about as long as a 30 day month takes in Calendar-based mode. These are grouped into 12-minute periods, equivalent to a year in Calendar-based mode.{}{}In either mode there is always a classic calendar, which is used for introduction dates of vehicles, houses, and other infrastructure. +###length 2 +STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendar +STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Wallclock + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenew vehicle when it gets old: {STRING2} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :When enabled, a vehicle nearing its end of life gets automatically replaced when the renew conditions are fulfilled @@ -1723,8 +1739,8 @@ STR_CONFIG_SETTING_SOUND_TICKER_HELPTEXT :Play sound for STR_CONFIG_SETTING_SOUND_NEWS :Newspaper: {STRING2} STR_CONFIG_SETTING_SOUND_NEWS_HELPTEXT :Play sound upon display of newspapers -STR_CONFIG_SETTING_SOUND_NEW_YEAR :End of year: {STRING2} -STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT :Play sound at the end of a year summarising the company's performance during the year compared to the previous year +STR_CONFIG_SETTING_SOUND_NEW_YEAR :End of {TKM year period}: {STRING2} +STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT :Play sound at the end of a {TKM year period} summarising the company's performance during the {TKM year period} compared to the previous {TKM year period} STR_CONFIG_SETTING_SOUND_CONFIRM :Construction: {STRING2} STR_CONFIG_SETTING_SOUND_CONFIRM_HELPTEXT :Play sound on successful constructions or other actions @@ -1792,7 +1808,7 @@ STR_CONFIG_SETTING_SERVINT_AIRCRAFT :Default service STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Set the default service interval for new aircraft, if no explicit service interval is set for the vehicle STR_CONFIG_SETTING_SERVINT_SHIPS :Default service interval for ships: {STRING2} STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Set the default service interval for new ships, if no explicit service interval is set for the vehicle -STR_CONFIG_SETTING_SERVINT_VALUE :{COMMA}{NBSP}day{P 0 "" s}/% +STR_CONFIG_SETTING_SERVINT_VALUE :{COMMA}{NBSP}Day{P 0 "" s}/Minute{P 0 "" s}/% ###setting-zero-is-special STR_CONFIG_SETTING_SERVINT_DISABLED :Disabled @@ -2026,7 +2042,7 @@ STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT :Whenever a spee STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL :Imperial (mph) STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_METRIC :Metric (km/h) STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_SI :SI (m/s) -STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_GAMEUNITS :Game units (tiles/day) +STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_GAMEUNITS :Game units ({TKM "tiles/day" "tiles/sec"}) STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_KNOTS :Knots STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER :Vehicle power units: {STRING2} @@ -2712,9 +2728,9 @@ STR_LINKGRAPH_LEGEND_SATURATED :{TINY_FONT}{BLA STR_LINKGRAPH_LEGEND_OVERLOADED :{TINY_FONT}{BLACK}overloaded # Linkgraph tooltip -STR_LINKGRAPH_STATS_TOOLTIP :{BLACK}{CARGO_LONG} to be transported per month from {STATION} to {STATION} ({COMMA}% of capacity){RAW_STRING} +STR_LINKGRAPH_STATS_TOOLTIP :{BLACK}{CARGO_LONG} to be transported per {TKM month minute} from {STATION} to {STATION} ({COMMA}% of capacity){RAW_STRING} STR_LINKGRAPH_STATS_TOOLTIP_RETURN_EXTENSION :{}{CARGO_LONG} to be transported back ({COMMA}% of capacity) -STR_LINKGRAPH_STATS_TOOLTIP_TIME_EXTENSION :{}Average travel time: {NUM}{NBSP}day{P "" s} +STR_LINKGRAPH_STATS_TOOLTIP_TIME_EXTENSION :{}Average travel time: {UNITS_DAYS_OR_SECONDS} # Base for station construction window(s) STR_STATION_BUILD_COVERAGE_AREA_TITLE :{BLACK}Coverage area highlight @@ -2724,7 +2740,7 @@ STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP :{BLACK}Don't hi STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP :{BLACK}Highlight coverage area of proposed site STR_STATION_BUILD_ACCEPTS_CARGO :{BLACK}Accepts: {GOLD}{CARGO_LIST} STR_STATION_BUILD_SUPPLIES_CARGO :{BLACK}Supplies: {GOLD}{CARGO_LIST} -STR_STATION_BUILD_INFRASTRUCTURE_COST :{BLACK}Maintenance cost: {GOLD}{CURRENCY_SHORT}/yr +STR_STATION_BUILD_INFRASTRUCTURE_COST :{BLACK}Maintenance cost: {GOLD}{CURRENCY_SHORT}/{TKM year period} # Join station window STR_JOIN_STATION_CAPTION :{WHITE}Join station @@ -3571,15 +3587,15 @@ STR_TOWN_POPULATION :{BLACK}World po STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Population: {ORANGE}{COMMA}{BLACK} Houses: {ORANGE}{COMMA} -STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} last {TKM month minute}: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Cargo needed for town growth: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} required STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} required in winter STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED_GENERAL :{ORANGE}{STRING}{GREEN} delivered STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{RED} (still required) STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{GREEN} (delivered) -STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK}{NBSP}day{P "" s} -STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK}{NBSP}day{P "" s} (funded) +STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Town grows every {ORANGE}{UNITS_DAYS_OR_SECONDS} +STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Town grows every {ORANGE}{UNITS_DAYS_OR_SECONDS} (funded) STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}Town is {RED}not{BLACK} growing STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Noise limit in town: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centre the main view on town location. Ctrl+Click to open a new viewport on town location @@ -3619,10 +3635,10 @@ STR_LOCAL_AUTHORITY_ACTION_BRIBE :Bribe the local STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_SMALL_ADVERTISING :{PUSH_COLOUR}{YELLOW}Initiate a small local advertising campaign, to attract more passengers and cargo to your transport services.{}Provides a temporary boost to station rating in a small radius around the town centre.{}{POP_COLOUR}Cost: {CURRENCY_LONG} STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_MEDIUM_ADVERTISING :{PUSH_COLOUR}{YELLOW}Initiate a medium local advertising campaign, to attract more passengers and cargo to your transport services.{}Provides a temporary boost to station rating in a medium radius around the town centre.{}{POP_COLOUR}Cost: {CURRENCY_LONG} STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_LARGE_ADVERTISING :{PUSH_COLOUR}{YELLOW}Initiate a large local advertising campaign, to attract more passengers and cargo to your transport services.{}Provides a temporary boost to station rating in a large radius around the town centre.{}{POP_COLOUR}Cost: {CURRENCY_LONG} -STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_ROAD_RECONSTRUCTION :{PUSH_COLOUR}{YELLOW}Fund the reconstruction of the urban road network.{}Causes considerable disruption to road traffic for up to 6 months.{}{POP_COLOUR}Cost: {CURRENCY_LONG} +STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_ROAD_RECONSTRUCTION :{PUSH_COLOUR}{YELLOW}Fund the reconstruction of the urban road network.{}Causes considerable disruption to road traffic for up to 6 {TKM months minutes}.{}{POP_COLOUR}Cost: {CURRENCY_LONG} STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_STATUE_OF_COMPANY :{PUSH_COLOUR}{YELLOW}Build a statue in honour of your company.{}Provides a permanent boost to station rating in this town.{}{POP_COLOUR}Cost: {CURRENCY_LONG} STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_NEW_BUILDINGS :{PUSH_COLOUR}{YELLOW}Fund the construction of new buildings in the town.{}Provides a temporary boost to town growth in this town.{}{POP_COLOUR}Cost: {CURRENCY_LONG} -STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_EXCLUSIVE_TRANSPORT :{PUSH_COLOUR}{YELLOW}Buy 1 year's exclusive transport rights in town.{}Town authority will not allow passengers and cargo to use your competitors' stations. A successful bribe from a competitor will cancel this contract.{}{POP_COLOUR}Cost: {CURRENCY_LONG} +STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_EXCLUSIVE_TRANSPORT :{PUSH_COLOUR}{YELLOW}Buy exclusive transport rights in town for 12 {TKM months minutes}.{}Town authority will not allow passengers and cargo to use your competitors' stations. A successful bribe from a competitor will cancel this contract.{}{POP_COLOUR}Cost: {CURRENCY_LONG} STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_BRIBE :{PUSH_COLOUR}{YELLOW}Bribe the local authority to increase your rating and abort a competitor's exclusive transport rights, at the risk of a severe penalty if caught.{}{POP_COLOUR}Cost: {CURRENCY_LONG} # Goal window @@ -3669,11 +3685,15 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Close # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidies STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidies on offer for services taking: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} (by {DATE_SHORT}) +STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} ({STRING1}) STR_SUBSIDIES_NONE :{ORANGE}- None - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidised: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT}) +STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} ({COMPANY}{YELLOW}, {STRING1}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click to open a new viewport on industry/town location +STR_SUBSIDIES_OFFERED_EXPIRY_DATE :by {DATE_SHORT} +STR_SUBSIDIES_OFFERED_EXPIRY_TIME :within {UNITS_MONTHS_OR_MINUTES} +STR_SUBSIDIES_SUBSIDISED_EXPIRY_DATE :until {DATE_SHORT} +STR_SUBSIDIES_SUBSIDISED_EXPIRY_TIME :{UNITS_MONTHS_OR_MINUTES} remaining # Story book window STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Story Book @@ -3713,7 +3733,7 @@ STR_STATION_VIEW_EXCLUSIVE_RIGHTS_COMPANY :{YELLOW}{COMPAN STR_STATION_VIEW_RATINGS_BUTTON :{BLACK}Ratings STR_STATION_VIEW_RATINGS_TOOLTIP :{BLACK}Show station ratings -STR_STATION_VIEW_SUPPLY_RATINGS_TITLE :{BLACK}Monthly supply and local rating: +STR_STATION_VIEW_SUPPLY_RATINGS_TITLE :{BLACK}Supply per {TKM month minute} and local rating: STR_STATION_VIEW_CARGO_SUPPLY_RATING :{WHITE}{STRING}: {YELLOW}{COMMA} / {STRING} ({COMMA}%) STR_STATION_VIEW_GROUP :{BLACK}Group by @@ -3774,6 +3794,7 @@ STR_EDIT_WAYPOINT_NAME :{WHITE}Edit way # Finances window STR_FINANCES_CAPTION :{WHITE}{COMPANY} Finances {BLACK}{COMPANY_NUM} STR_FINANCES_YEAR :{WHITE}{NUM} +STR_FINANCES_YEAR_CAPTION :{WHITE}{TKM Year Period} ###length 3 STR_FINANCES_REVENUE_TITLE :{WHITE}Revenue @@ -3875,7 +3896,7 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Canals STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Stations: STR_COMPANY_INFRASTRUCTURE_VIEW_STATIONS :{WHITE}Station tiles STR_COMPANY_INFRASTRUCTURE_VIEW_AIRPORTS :{WHITE}Airports -STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENCY_LONG}/yr +STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENCY_LONG}/{TKM year period} # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industries @@ -3894,7 +3915,7 @@ STR_INDUSTRY_DIRECTORY_FILTER_NONE :None # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} -STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Production last month: +STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Production last {TKM month minute}: STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{RAW_STRING}{BLACK} ({COMMA}% transported) STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre the main view on industry location. Ctrl+Click to open a new viewport on industry location STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% @@ -3935,7 +3956,7 @@ STR_VEHICLE_LIST_MANAGE_LIST_TOOLTIP :{BLACK}Send ins STR_VEHICLE_LIST_REPLACE_VEHICLES :Replace vehicles STR_VEHICLE_LIST_SEND_FOR_SERVICING :Send for servicing STR_VEHICLE_LIST_CREATE_GROUP :Create group -STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR :{TINY_FONT}{BLACK}Profit this year: {CURRENCY_LONG} (last year: {CURRENCY_LONG}) +STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR :{TINY_FONT}{BLACK}Profit this {TKM year period}: {CURRENCY_LONG} (last {TKM year period}: {CURRENCY_LONG}) STR_VEHICLE_LIST_CARGO :[{CARGO_LIST}] STR_VEHICLE_LIST_NAME_AND_CARGO :{STRING1} {STRING1} @@ -3980,8 +4001,8 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Remove all vehi STR_GROUP_RENAME_CAPTION :{BLACK}Rename a group -STR_GROUP_PROFIT_THIS_YEAR :Profit this year: -STR_GROUP_PROFIT_LAST_YEAR :Profit last year: +STR_GROUP_PROFIT_THIS_YEAR :Profit this {TKM year period}: +STR_GROUP_PROFIT_LAST_YEAR :Profit last {TKM year period}: STR_GROUP_OCCUPANCY :Current usage: STR_GROUP_OCCUPANCY_VALUE :{NUM}% @@ -4008,7 +4029,7 @@ STR_PURCHASE_INFO_SPEED_POWER :{BLACK}Speed: { STR_PURCHASE_INFO_SPEED :{BLACK}Speed: {GOLD}{VELOCITY} STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}Speed on ocean: {GOLD}{VELOCITY} STR_PURCHASE_INFO_SPEED_CANAL :{BLACK}Speed on canal/river: {GOLD}{VELOCITY} -STR_PURCHASE_INFO_RUNNINGCOST :{BLACK}Running Cost: {GOLD}{CURRENCY_LONG}/yr +STR_PURCHASE_INFO_RUNNINGCOST :{BLACK}Running Cost: {GOLD}{CURRENCY_LONG}/{TKM year period} STR_PURCHASE_INFO_CAPACITY :{BLACK}Capacity: {GOLD}{CARGO_LONG} {STRING} STR_PURCHASE_INFO_REFITTABLE :(refittable) STR_PURCHASE_INFO_DESIGNED_LIFE :{BLACK}Designed: {GOLD}{NUM}{BLACK} Life: {GOLD}{COMMA} year{P "" s} @@ -4201,13 +4222,13 @@ STR_ENGINE_PREVIEW_TRAM_VEHICLE :tramway vehicle STR_ENGINE_PREVIEW_AIRCRAFT :aircraft STR_ENGINE_PREVIEW_SHIP :ship -STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Cost: {CURRENCY_LONG} Weight: {WEIGHT_SHORT}{}Speed: {VELOCITY} Power: {POWER}{}Running Cost: {CURRENCY_LONG}/yr{}Capacity: {CARGO_LONG} -STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Cost: {0:CURRENCY_LONG} Weight: {1:WEIGHT_SHORT}{}Speed: {2:VELOCITY} Power: {3:POWER} Max. T.E.: {6:FORCE}{}Running Cost: {4:CURRENCY_LONG}/yr{}Capacity: {5:CARGO_LONG} -STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr -STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING}{}Capacity: {CARGO_LONG}, {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr -STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING}{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr -STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING} Range: {COMMA} tiles{}Capacity: {CARGO_LONG}, {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr -STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING} Range: {COMMA} tiles{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr +STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Cost: {CURRENCY_LONG} Weight: {WEIGHT_SHORT}{}Speed: {VELOCITY} Power: {POWER}{}Running Cost: {CURRENCY_LONG}/{TKM year period}{}Capacity: {CARGO_LONG} +STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Cost: {0:CURRENCY_LONG} Weight: {1:WEIGHT_SHORT}{}Speed: {2:VELOCITY} Power: {3:POWER} Max. T.E.: {6:FORCE}{}Running Cost: {4:CURRENCY_LONG}/{TKM year period}{}Capacity: {5:CARGO_LONG} +STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/{TKM year period} +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING}{}Capacity: {CARGO_LONG}, {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/{TKM year period} +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING}{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/{TKM year period} +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING} Range: {COMMA} tiles{}Capacity: {CARGO_LONG}, {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/{TKM year period} +STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Aircraft type: {STRING} Range: {COMMA} tiles{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/{TKM year period} # Autoreplace window STR_REPLACE_VEHICLES_WHITE :{WHITE}Replace {STRING} - {STRING1} @@ -4350,9 +4371,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Name roa STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Name ship STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Name aircraft -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Age: {LTBLUE}{STRING2}{BLACK} Running Cost: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_AGE :{COMMA} year{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} year{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Age: {LTBLUE}{STRING2}{BLACK} Running Cost: {LTBLUE}{CURRENCY_LONG}/{TKM year period} STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. speed: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. speed: {LTBLUE}{VELOCITY} {BLACK}Aircraft type: {LTBLUE}{STRING} @@ -4360,8 +4381,8 @@ STR_VEHICLE_INFO_MAX_SPEED_TYPE_RANGE :{BLACK}Max. spe STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Weight: {LTBLUE}{WEIGHT_SHORT} {BLACK}Power: {LTBLUE}{POWER}{BLACK} Max. speed: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Weight: {LTBLUE}{WEIGHT_SHORT} {BLACK}Power: {LTBLUE}{POWER}{BLACK} Max. speed: {LTBLUE}{VELOCITY} {BLACK}Max. T.E.: {LTBLUE}{FORCE} -STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Profit this year: {LTBLUE}{CURRENCY_LONG} (last year: {CURRENCY_LONG}) -STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR_MIN_PERFORMANCE :{BLACK}Profit this year: {LTBLUE}{CURRENCY_LONG} (last year: {CURRENCY_LONG}) {BLACK}Min. performance: {LTBLUE}{POWER_TO_WEIGHT} +STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Profit this {TKM year period}: {LTBLUE}{CURRENCY_LONG} (last {TKM year period}: {CURRENCY_LONG}) +STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR_MIN_PERFORMANCE :{BLACK}Profit this {TKM year period}: {LTBLUE}{CURRENCY_LONG} (last {TKM year period}: {CURRENCY_LONG}) {BLACK}Min. performance: {LTBLUE}{POWER_TO_WEIGHT} STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS :{BLACK}Reliability: {LTBLUE}{COMMA}% {BLACK}Breakdowns since last service: {LTBLUE}{COMMA} STR_VEHICLE_INFO_BUILT_VALUE :{LTBLUE}{ENGINE} {BLACK}Built: {LTBLUE}{NUM}{BLACK} Value: {LTBLUE}{CURRENCY_LONG} @@ -4372,14 +4393,17 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacity STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer Credits: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} Last service: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} Last service: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by 10. Ctrl+Click to increase servicing interval by 5 -STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by 10. Ctrl+Click to decrease servicing interval by 5 +STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} {STRING1} +STR_VEHICLE_DETAILS_SERVICING_INTERVAL_MINUTES :{BLACK}Servicing interval: {LTBLUE}{COMMA}{NBSP}minutes{BLACK} {STRING1} +STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} {STRING1} +STR_VEHICLE_DETAILS_LAST_SERVICE_DATE :Last service: {LTBLUE}{DATE_LONG} +STR_VEHICLE_DETAILS_LAST_SERVICE_MINUTES_AGO :Last service: {LTBLUE}{NUM} minutes ago +STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by {TKM 10 5}. Ctrl+Click to increase servicing interval by {TKM 5 1} +STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by {TKM 10 5}. Ctrl+Click to decrease servicing interval by {TKM 5 1} STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type STR_VEHICLE_DETAILS_DEFAULT :Default -STR_VEHICLE_DETAILS_DAYS :Days +STR_VEHICLE_DETAILS_TIME :{TKM Days Minutes} STR_VEHICLE_DETAILS_PERCENT :Percentage ###length VEHICLE_TYPES diff --git a/src/misc.cpp b/src/misc.cpp index 0dee94f470..dd95950dda 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -112,8 +112,14 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin if (reset_date) { TimerGameCalendar::Date new_date = TimerGameCalendar::ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1); TimerGameCalendar::SetDate(new_date, 0); - /* Keep the economy date synced with the calendar date. */ - TimerGameEconomy::SetDate(new_date.base(), 0); + + if (TimerGameEconomy::UsingWallclockUnits()) { + /* If using wallclock units, start at year 1. */ + TimerGameEconomy::SetDate(TimerGameEconomy::ConvertYMDToDate(1, 0, 1), 0); + } else { + /* Otherwise, we always keep the economy date synced with the calendar date. */ + TimerGameEconomy::SetDate(new_date.base(), 0); + } InitializeOldNames(); } diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 04ada61c7b..1594065a10 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1845,13 +1845,21 @@ void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist, bool reset_order_indic /** * Clamp the service interval to the correct min/max. The actual min/max values - * depend on whether it's in percent or days. - * @param interval proposed service interval - * @return Clamped service interval + * depend on whether it's in days, minutes, or percent. + * @param interval The proposed service interval. + * @param ispercent Whether the interval is a percent. + * @return The service interval clamped to use the chosen units. */ uint16_t GetServiceIntervalClamped(int interval, bool ispercent) { - return ispercent ? Clamp(interval, MIN_SERVINT_PERCENT, MAX_SERVINT_PERCENT) : Clamp(interval, MIN_SERVINT_DAYS, MAX_SERVINT_DAYS); + /* Service intervals are in percents. */ + if (ispercent) return Clamp(interval, MIN_SERVINT_PERCENT, MAX_SERVINT_PERCENT); + + /* Service intervals are in minutes. */ + if (TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU)) return Clamp(interval, MIN_SERVINT_MINUTES, MAX_SERVINT_MINUTES); + + /* Service intervals are in days. */ + return Clamp(interval, MIN_SERVINT_DAYS, MAX_SERVINT_DAYS); } /** diff --git a/src/order_func.h b/src/order_func.h index f8771b09dc..12f7d4684a 100644 --- a/src/order_func.h +++ b/src/order_func.h @@ -33,6 +33,13 @@ static const uint DEF_SERVINT_DAYS_SHIPS = 360; static const uint MIN_SERVINT_DAYS = 30; static const uint MAX_SERVINT_DAYS = 800; +static const uint DEF_SERVINT_MINUTES_TRAINS = 5; +static const uint DEF_SERVINT_MINUTES_ROADVEH = 5; +static const uint DEF_SERVINT_MINUTES_AIRCRAFT = 3; +static const uint DEF_SERVINT_MINUTES_SHIPS = 12; +static const uint MIN_SERVINT_MINUTES = 1; +static const uint MAX_SERVINT_MINUTES = 30; + static const uint DEF_SERVINT_PERCENT = 50; static const uint MIN_SERVINT_PERCENT = 5; static const uint MAX_SERVINT_PERCENT = 90; diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index cbebf87329..31052fcc52 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -735,6 +735,9 @@ bool AfterLoadGame() * must be done before loading sprites as some newgrfs check it */ TimerGameCalendar::SetDate(TimerGameCalendar::date, TimerGameCalendar::date_fract); + /* Only new games can use wallclock units. */ + if (IsSavegameVersionBefore(SLV_ECONOMY_MODE_TIMEKEEPING_UNITS)) _settings_game.economy.timekeeping_units = TKU_CALENDAR; + /* Update economy year. If we don't have a separate economy date saved, follow the calendar date. */ if (IsSavegameVersionBefore(SLV_ECONOMY_DATE)) { TimerGameEconomy::SetDate(TimerGameCalendar::date.base(), TimerGameCalendar::date_fract); diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 97625fb482..912aac6c97 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -369,6 +369,7 @@ enum SaveLoadVersion : uint16_t { SLV_WATER_REGION_EVAL_SIMPLIFIED, ///< 325 PR#11750 Simplified Water Region evaluation. SLV_ECONOMY_DATE, ///< 326 PR#10700 Split calendar and economy timers and dates. + SLV_ECONOMY_MODE_TIMEKEEPING_UNITS, ///< 327 PR#11341 Mode to display economy measurements in wallclock units. SL_MAX_VERSION, ///< Highest possible saveload version }; diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index aca64de902..43b03c1266 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -2212,6 +2212,7 @@ static SettingsContainer &GetSettingsTree() { SettingsPage *time = environment->Add(new SettingsPage(STR_CONFIG_SETTING_ENVIRONMENT_TIME)); { + time->Add(new SettingEntry("economy.timekeeping_units")); time->Add(new SettingEntry("game_creation.ending_year")); time->Add(new SettingEntry("gui.pause_on_newgame")); time->Add(new SettingEntry("gui.fast_forward_speed_limit")); diff --git a/src/settings_table.cpp b/src/settings_table.cpp index d4c41b59f7..38573339db 100644 --- a/src/settings_table.cpp +++ b/src/settings_table.cpp @@ -130,7 +130,7 @@ static void UpdateConsists(int32_t) /** * Check and update if needed all vehicle service intervals. - * @param new_value Contains 0 if service intervals are in days, otherwise intervals use percents. + * @param new_value Contains 0 if service intervals are in time (days or real-world minutes), otherwise intervals use percents. */ static void UpdateAllServiceInterval(int32_t new_value) { @@ -150,6 +150,12 @@ static void UpdateAllServiceInterval(int32_t new_value) vds->servint_roadveh = DEF_SERVINT_PERCENT; vds->servint_aircraft = DEF_SERVINT_PERCENT; vds->servint_ships = DEF_SERVINT_PERCENT; + } else if (TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU)) { + /* Service intervals are in minutes. */ + vds->servint_trains = DEF_SERVINT_MINUTES_TRAINS; + vds->servint_roadveh = DEF_SERVINT_MINUTES_ROADVEH; + vds->servint_aircraft = DEF_SERVINT_MINUTES_AIRCRAFT; + vds->servint_ships = DEF_SERVINT_MINUTES_SHIPS; } else { /* Service intervals are in days. */ vds->servint_trains = DEF_SERVINT_DAYS_TRAINS; @@ -483,4 +489,28 @@ static void UpdateClientConfigValues() } } +/** + * Callback for when the player changes the timekeeping units. + * @param Unused. + */ +static void ChangeTimekeepingUnits(int32_t) +{ + /* If service intervals are in time units (calendar days or real-world minutes), reset them to the correct defaults. */ + if (!_settings_client.company.vehicle.servint_ispercent) { + UpdateAllServiceInterval(0); + } + + InvalidateWindowClassesData(WC_GAME_OPTIONS, 0); +} + +/** + * Pre-callback check when trying to change the timetable mode. This is locked to Seconds when using wallclock units. + * @param Unused. + * @return True if we allow changing the timetable mode. + */ +static bool CanChangeTimetableMode(int32_t &) +{ + return !TimerGameEconomy::UsingWallclockUnits(); +} + /* End - Callback Functions */ diff --git a/src/settings_type.h b/src/settings_type.h index b90eaacab3..82efe5fd39 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -64,6 +64,12 @@ enum IndustryDensity { ID_END, ///< Number of industry density settings. }; +/** Possible values for the "timekeeping_units" setting. */ +enum TimekeepingUnits : uint8_t { + TKU_CALENDAR = 0, + TKU_WALLCLOCK, +}; + /** Possible values for "use_relay_service" setting. */ enum UseRelayService : uint8_t { URS_NEVER = 0, @@ -551,6 +557,7 @@ struct EconomySettings { uint16_t town_noise_population[4]; ///< population to base decision on noise evaluation (@see town_council_tolerance) bool allow_town_level_crossings; ///< towns are allowed to build level crossings bool infrastructure_maintenance; ///< enable monthly maintenance fee for owner infrastructure + TimekeepingUnits timekeeping_units; ///< time units to use for the game economy, either calendar or wallclock }; struct LinkGraphSettings { diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index 8edcfb3d52..f4d888c2b2 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -377,6 +377,33 @@ void EmitPlural(Buffer *buffer, char *buf, int) EmitWordList(buffer, words, nw); } +/** + * Handle the selection of timekeeping units based on the timekeeping setting. + * This uses the string control character {TKM [value if calendar] [value if wallclock]}, e.g. {TKM month minute}. + * @param buffer The output buffer + * @param buf The input buffer + * @param Unused + */ +void EmitTKM(Buffer* buffer, char* buf, int) +{ + /* The correct number of words is 2, but we'll check for more in case of typos. */ + std::vector words(3, nullptr); + + /* Parse each string. */ + uint nw = 0; + for (nw = 0; nw < 3; nw++) { + words[nw] = ParseWord(&buf); + if (words[nw] == nullptr) break; + } + + /* Warn about the wrong number of parameters. */ + if (nw != 2) { + StrgenFatal("%s: Invalid number of TKM options. Expecting %d, found %d.", _cur_ident, 2, nw); + } + + buffer->AppendUtf8(SCC_TIMEKEEPING_MODE_LIST); + EmitWordList(buffer, words, 2); +} void EmitGender(Buffer *buffer, char *buf, int) { diff --git a/src/strings.cpp b/src/strings.cpp index ba12476434..bbf02aaf83 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -746,12 +746,21 @@ struct UnitsLong { }; /** Unit conversions for velocity. */ -static const Units _units_velocity[] = { - { { 1.0 }, STR_UNITS_VELOCITY_IMPERIAL, 0 }, - { { 1.609344 }, STR_UNITS_VELOCITY_METRIC, 0 }, - { { 0.44704 }, STR_UNITS_VELOCITY_SI, 0 }, - { { 0.578125 }, STR_UNITS_VELOCITY_GAMEUNITS, 1 }, - { { 0.868976 }, STR_UNITS_VELOCITY_KNOTS, 0 }, +static const Units _units_velocity_calendar[] = { + { { 1.0 }, STR_UNITS_VELOCITY_IMPERIAL, 0 }, + { { 1.609344 }, STR_UNITS_VELOCITY_METRIC, 0 }, + { { 0.44704 }, STR_UNITS_VELOCITY_SI, 0 }, + { { 0.578125 }, STR_UNITS_VELOCITY_GAMEUNITS_DAY, 1 }, + { { 0.868976 }, STR_UNITS_VELOCITY_KNOTS, 0 }, +}; + +/** Unit conversions for velocity. */ +static const Units _units_velocity_realtime[] = { + { { 1.0 }, STR_UNITS_VELOCITY_IMPERIAL, 0 }, + { { 1.609344 }, STR_UNITS_VELOCITY_METRIC, 0 }, + { { 0.44704 }, STR_UNITS_VELOCITY_SI, 0 }, + { { 0.289352 }, STR_UNITS_VELOCITY_GAMEUNITS_SEC, 1 }, + { { 0.868976 }, STR_UNITS_VELOCITY_KNOTS, 0 }, }; /** Unit conversions for power. */ @@ -802,16 +811,45 @@ static const Units _units_height[] = { { { 1.0 }, STR_UNITS_HEIGHT_SI, 0 }, }; +/** Unit conversions for time in calendar days or wallclock seconds */ +static const Units _units_time_days_or_seconds[] = { + { { 1 }, STR_UNITS_DAYS, 0 }, + { { 2 }, STR_UNITS_SECONDS, 0 }, +}; + +/** Unit conversions for time in calendar months or wallclock minutes */ +static const Units _units_time_months_or_minutes[] = { + { { 1 }, STR_UNITS_MONTHS, 0 }, + { { 1 }, STR_UNITS_MINUTES, 0 }, +}; + +/** Unit conversions for time in calendar years or economic periods */ +static const Units _units_time_years_or_periods[] = { + { { 1 }, STR_UNITS_YEARS, 0 }, + { { 1 }, STR_UNITS_PERIODS, 0 }, +}; + +/** Unit conversions for time in calendar years or wallclock minutes */ +static const Units _units_time_years_or_minutes[] = { + { { 1 }, STR_UNITS_YEARS, 0 }, + { { 12 }, STR_UNITS_MINUTES, 0 }, +}; + /** - * Get index for velocity conversion units for a vehicle type. + * Get the correct velocity units depending on the vehicle type and whether we're using real-time units. * @param type VehicleType to convert velocity for. - * @return Index within velocity conversion units for vehicle type. + * @return The Units for the proper vehicle and time mode. */ -static byte GetVelocityUnits(VehicleType type) +static const Units GetVelocityUnits(VehicleType type) { - if (type == VEH_SHIP || type == VEH_AIRCRAFT) return _settings_game.locale.units_velocity_nautical; + byte setting = (type == VEH_SHIP || type == VEH_AIRCRAFT) ? _settings_game.locale.units_velocity_nautical : _settings_game.locale.units_velocity; + + assert(setting < lengthof(_units_velocity_calendar)); + assert(setting < lengthof(_units_velocity_realtime)); - return _settings_game.locale.units_velocity; + if (TimerGameEconomy::UsingWallclockUnits()) return _units_velocity_realtime[setting]; + + return _units_velocity_calendar[setting]; } /** @@ -824,7 +862,7 @@ uint ConvertSpeedToDisplaySpeed(uint speed, VehicleType type) /* For historical reasons we don't want to mess with the * conversion for speed. So, don't round it and keep the * original conversion factors instead of the real ones. */ - return _units_velocity[GetVelocityUnits(type)].c.ToDisplay(speed, false); + return GetVelocityUnits(type).c.ToDisplay(speed, false); } /** @@ -834,7 +872,7 @@ uint ConvertSpeedToDisplaySpeed(uint speed, VehicleType type) */ uint ConvertDisplaySpeedToSpeed(uint speed, VehicleType type) { - return _units_velocity[GetVelocityUnits(type)].c.FromDisplay(speed); + return GetVelocityUnits(type).c.FromDisplay(speed); } /** @@ -844,7 +882,7 @@ uint ConvertDisplaySpeedToSpeed(uint speed, VehicleType type) */ uint ConvertKmhishSpeedToDisplaySpeed(uint speed, VehicleType type) { - return _units_velocity[GetVelocityUnits(type)].c.ToDisplay(speed * 10, false) / 16; + return GetVelocityUnits(type).c.ToDisplay(speed * 10, false) / 16; } /** @@ -854,7 +892,7 @@ uint ConvertKmhishSpeedToDisplaySpeed(uint speed, VehicleType type) */ uint ConvertDisplaySpeedToKmhishSpeed(uint speed, VehicleType type) { - return _units_velocity[GetVelocityUnits(type)].c.FromDisplay(speed * 16, true, 10); + return GetVelocityUnits(type).c.FromDisplay(speed * 16, true, 10); } /** @@ -1334,9 +1372,7 @@ static void FormatString(StringBuilder &builder, const char *str_arg, StringPara int64_t arg = args.GetNextParameter(); // Unpack vehicle type from packed argument to get desired units. VehicleType vt = static_cast(GB(arg, 56, 8)); - byte units = GetVelocityUnits(vt); - assert(units < lengthof(_units_velocity)); - const auto &x = _units_velocity[units]; + const auto &x = GetVelocityUnits(vt); auto tmp_params = MakeParameters(ConvertKmhishSpeedToDisplaySpeed(GB(arg, 0, 56), vt), x.decimal_places); FormatString(builder, GetStringPtr(x.s), tmp_params); break; @@ -1374,6 +1410,43 @@ static void FormatString(StringBuilder &builder, const char *str_arg, StringPara break; } + case SCC_UNITS_DAYS_OR_SECONDS: { // {UNITS_DAYS_OR_SECONDS} + uint8_t realtime = TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU); + const auto &x = _units_time_days_or_seconds[realtime]; + auto tmp_params = MakeParameters(x.c.ToDisplay(args.GetNextParameter()), x.decimal_places); + FormatString(builder, GetStringPtr(x.s), tmp_params); + break; + } + + case SCC_UNITS_MONTHS_OR_MINUTES: { // {UNITS_MONTHS_OR_MINUTES} + uint8_t realtime = TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU); + const auto &x = _units_time_months_or_minutes[realtime]; + auto tmp_params = MakeParameters(x.c.ToDisplay(args.GetNextParameter()), x.decimal_places); + FormatString(builder, GetStringPtr(x.s), tmp_params); + break; + } + + case SCC_UNITS_YEARS_OR_PERIODS: { // {UNITS_YEARS_OR_PERIODS} + uint8_t realtime = TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU); + const auto &x = _units_time_years_or_periods[realtime]; + auto tmp_params = MakeParameters(x.c.ToDisplay(args.GetNextParameter()), x.decimal_places); + FormatString(builder, GetStringPtr(x.s), tmp_params); + break; + } + + case SCC_UNITS_YEARS_OR_MINUTES: { // {UNITS_YEARS_OR_MINUTES} + uint8_t realtime = TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU); + const auto &x = _units_time_years_or_minutes[realtime]; + auto tmp_params = MakeParameters(x.c.ToDisplay(args.GetNextParameter()), x.decimal_places); + FormatString(builder, GetStringPtr(x.s), tmp_params); + break; + } + + case SCC_TIMEKEEPING_MODE_LIST: { // {TKM} + str = ParseStringChoice(str, (uint8_t)TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU), builder); + break; + } + case SCC_COMPANY_NAME: { // {COMPANY} const Company *c = Company::GetIfValid(args.GetNextParameter()); if (c == nullptr) break; diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index c0d5c0eeff..9e72fe203e 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -159,7 +159,15 @@ struct SubsidyListWindow : Window { if (IsInsideMM(pos, 0, cap)) { /* Displays the two offered towns */ SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui); - SetDParam(7, TimerGameEconomy::date - ymd.day + s->remaining * 32); + /* If using wallclock units, show minutes remaining. Otherwise show the date when the subsidy ends. */ + if (TimerGameEconomy::UsingWallclockUnits()) { + SetDParam(7, STR_SUBSIDIES_OFFERED_EXPIRY_TIME); + SetDParam(8, s->remaining + 1); // We get the rest of the current economy month for free, since the expiration is checked on each new month. + } else { + SetDParam(7, STR_SUBSIDIES_OFFERED_EXPIRY_DATE); + SetDParam(8, TimerGameEconomy::date - ymd.day + s->remaining * 32); + } + DrawString(tr.left, tr.right, tr.top + pos * GetCharacterHeight(FS_NORMAL), STR_SUBSIDIES_OFFERED_FROM_TO); } pos++; @@ -183,7 +191,15 @@ struct SubsidyListWindow : Window { if (IsInsideMM(pos, 0, cap)) { SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui); SetDParam(7, s->awarded); - SetDParam(8, TimerGameEconomy::date - ymd.day + s->remaining * 32); + /* If using wallclock units, show minutes remaining. Otherwise show the date when the subsidy ends. */ + if (TimerGameEconomy::UsingWallclockUnits()) { + SetDParam(8, STR_SUBSIDIES_SUBSIDISED_EXPIRY_TIME); + SetDParam(9, s->remaining); + } + else { + SetDParam(8, STR_SUBSIDIES_SUBSIDISED_EXPIRY_DATE); + SetDParam(9, TimerGameEconomy::date - ymd.day + s->remaining * 32); + } /* Displays the two connected stations */ DrawString(tr.left, tr.right, tr.top + pos * GetCharacterHeight(FS_NORMAL), STR_SUBSIDIES_SUBSIDISED_FROM_TO); diff --git a/src/table/control_codes.h b/src/table/control_codes.h index 5ef2b02a60..c79264a265 100644 --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -65,6 +65,12 @@ enum StringControlCode { SCC_VELOCITY, SCC_HEIGHT, + SCC_UNITS_DAYS_OR_SECONDS, + SCC_UNITS_MONTHS_OR_MINUTES, + SCC_UNITS_YEARS_OR_PERIODS, + SCC_UNITS_YEARS_OR_MINUTES, + SCC_TIMEKEEPING_MODE_LIST, + SCC_DATE_TINY, SCC_DATE_SHORT, SCC_DATE_LONG, diff --git a/src/table/settings/company_settings.ini b/src/table/settings/company_settings.ini index c712b7b0a8..c00dbdee34 100644 --- a/src/table/settings/company_settings.ini +++ b/src/table/settings/company_settings.ini @@ -84,7 +84,7 @@ var = vehicle.servint_trains type = SLE_UINT16 flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL def = DEF_SERVINT_DAYS_TRAINS -min = MIN_SERVINT_PERCENT +min = MIN_SERVINT_MINUTES max = MAX_SERVINT_DAYS interval = 1 str = STR_CONFIG_SETTING_SERVINT_TRAINS @@ -98,7 +98,7 @@ var = vehicle.servint_roadveh type = SLE_UINT16 flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL def = DEF_SERVINT_DAYS_ROADVEH -min = MIN_SERVINT_PERCENT +min = MIN_SERVINT_MINUTES max = MAX_SERVINT_DAYS interval = 1 str = STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES @@ -112,7 +112,7 @@ var = vehicle.servint_ships type = SLE_UINT16 flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL def = DEF_SERVINT_DAYS_SHIPS -min = MIN_SERVINT_PERCENT +min = MIN_SERVINT_MINUTES max = MAX_SERVINT_DAYS interval = 1 str = STR_CONFIG_SETTING_SERVINT_SHIPS @@ -126,7 +126,7 @@ var = vehicle.servint_aircraft type = SLE_UINT16 flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL def = DEF_SERVINT_DAYS_AIRCRAFT -min = MIN_SERVINT_PERCENT +min = MIN_SERVINT_MINUTES max = MAX_SERVINT_DAYS interval = 1 str = STR_CONFIG_SETTING_SERVINT_AIRCRAFT diff --git a/src/table/settings/economy_settings.ini b/src/table/settings/economy_settings.ini index 8456fa6030..f824c50fe0 100644 --- a/src/table/settings/economy_settings.ini +++ b/src/table/settings/economy_settings.ini @@ -9,6 +9,7 @@ [pre-amble] static void TownFoundingChanged(int32_t new_value); +static void ChangeTimekeepingUnits(int32_t new_value); static const SettingVariant _economy_settings_table[] = { [post-amble] @@ -280,3 +281,16 @@ str = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE strhelp = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT post_cb = [](auto) { InvalidateWindowClassesData(WC_COMPANY_INFRASTRUCTURE); } cat = SC_BASIC + +[SDT_VAR] +var = economy.timekeeping_units +type = SLE_UINT8 +flags = SF_GUI_DROPDOWN | SF_NEWGAME_ONLY | SF_SCENEDIT_TOO +def = TKU_CALENDAR +min = TKU_CALENDAR +max = TKU_WALLCLOCK +str = STR_CONFIG_SETTING_TIMEKEEPING_UNITS +strval = STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR +strhelp = STR_CONFIG_SETTING_TIMEKEEPING_UNITS_HELPTEXT +post_cb = ChangeTimekeepingUnits +cat = SC_BASIC diff --git a/src/table/settings/gui_settings.ini b/src/table/settings/gui_settings.ini index 79359d3ffb..a4b41da886 100644 --- a/src/table/settings/gui_settings.ini +++ b/src/table/settings/gui_settings.ini @@ -7,6 +7,7 @@ ; GUI settings as stored in the main configuration file ("openttd.cfg"). [pre-amble] +static bool CanChangeTimetableMode(int32_t &new_value); static void v_PositionMainToolbar(int32_t new_value); static void v_PositionStatusbar(int32_t new_value); static void RedrawSmallmap(int32_t new_value); @@ -430,6 +431,7 @@ max = 2 str = STR_CONFIG_SETTING_TIMETABLE_MODE strhelp = STR_CONFIG_SETTING_TIMETABLE_MODE_HELPTEXT strval = STR_CONFIG_SETTING_TIMETABLE_MODE_DAYS +pre_cb = CanChangeTimetableMode post_cb = [](auto) { InvalidateWindowClassesData(WC_VEHICLE_TIMETABLE, VIWD_MODIFY_ORDERS); } cat = SC_ADVANCED diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index 60fcf80060..4685eaa627 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -30,6 +30,7 @@ struct CmdStruct { }; extern void EmitSingleChar(Buffer *buffer, char *buf, int value); +extern void EmitTKM(Buffer* buffer, char* buf, int value); extern void EmitPlural(Buffer *buffer, char *buf, int value); extern void EmitGender(Buffer *buffer, char *buf, int value); @@ -88,6 +89,13 @@ static const CmdStruct _cmd_structs[] = { {"VELOCITY", EmitSingleChar, SCC_VELOCITY, 1, 0, C_NONE}, {"HEIGHT", EmitSingleChar, SCC_HEIGHT, 1, 0, C_NONE}, + {"UNITS_DAYS_OR_SECONDS", EmitSingleChar, SCC_UNITS_DAYS_OR_SECONDS, 1, 0, C_NONE}, + {"UNITS_MONTHS_OR_MINUTES", EmitSingleChar, SCC_UNITS_MONTHS_OR_MINUTES, 1, 0, C_NONE}, + {"UNITS_YEARS_OR_PERIODS", EmitSingleChar, SCC_UNITS_YEARS_OR_PERIODS, 1, 0, C_NONE}, + {"UNITS_YEARS_OR_MINUTES", EmitSingleChar, SCC_UNITS_YEARS_OR_MINUTES, 1, 0, C_NONE}, + + {"TKM", EmitTKM, 0, 0, -1, C_DONTCOUNT}, // Timekeeping mode string selection, e.g. "{TKM month minute}" + {"P", EmitPlural, 0, 0, -1, C_DONTCOUNT}, // plural specifier {"G", EmitGender, 0, 0, -1, C_DONTCOUNT}, // gender specifier diff --git a/src/timer/timer_game_calendar.cpp b/src/timer/timer_game_calendar.cpp index 87f0ca81cf..1dcc1c79ee 100644 --- a/src/timer/timer_game_calendar.cpp +++ b/src/timer/timer_game_calendar.cpp @@ -33,6 +33,30 @@ TimerGameCalendar::Month TimerGameCalendar::month = {}; TimerGameCalendar::Date TimerGameCalendar::date = {}; TimerGameCalendar::DateFract TimerGameCalendar::date_fract = {}; +/** + * Converts a Date to a Year, Month & Day. + * @param date the date to convert from + * @returns YearMonthDay representation of the Date. + */ +/* static */ TimerGameCalendar::YearMonthDay TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::Date date) +{ + /* This wrapper function only exists because economy time sometimes does things differently, when using wallclock units. */ + return CalendarConvertDateToYMD(date); +} + +/** + * Converts a tuple of Year, Month and Day to a Date. + * @param year is a number between 0..MAX_YEAR + * @param month is a number between 0..11 + * @param day is a number between 1..31 + * @returns The equivalent date. + */ +/* static */ TimerGameCalendar::Date TimerGameCalendar::ConvertYMDToDate(TimerGameCalendar::Year year, TimerGameCalendar::Month month, TimerGameCalendar::Day day) +{ + /* This wrapper function only exists because economy time sometimes does things differently, when using wallclock units. */ + return CalendarConvertYMDToDate(year, month, day); +} + /** * Set the date. * @param date New date diff --git a/src/timer/timer_game_calendar.h b/src/timer/timer_game_calendar.h index 3ec2b66fdd..7994b57fa7 100644 --- a/src/timer/timer_game_calendar.h +++ b/src/timer/timer_game_calendar.h @@ -34,6 +34,8 @@ public: static Date date; ///< Current date in days (day counter). static DateFract date_fract; ///< Fractional part of the day. + static YearMonthDay ConvertDateToYMD(Date date); + static Date ConvertYMDToDate(Year year, Month month, Day day); static void SetDate(Date date, DateFract fract); }; diff --git a/src/timer/timer_game_common.cpp b/src/timer/timer_game_common.cpp index 13bd9bf5e1..cc145d6380 100644 --- a/src/timer/timer_game_common.cpp +++ b/src/timer/timer_game_common.cpp @@ -63,7 +63,7 @@ static constexpr uint16_t _accum_days_for_month[] = { * @returns YearMonthDay representation of the Date. */ template -/* static */ typename TimerGame::YearMonthDay TimerGame::ConvertDateToYMD(Date date) +/* static */ typename TimerGame::YearMonthDay TimerGame::CalendarConvertDateToYMD(Date date) { /* Year determination in multiple steps to account for leap * years. First do the large steps, then the smaller ones. @@ -118,9 +118,10 @@ template * @param year is a number between 0..MAX_YEAR * @param month is a number between 0..11 * @param day is a number between 1..31 + * @returns The equivalent date. */ template -/* static */ typename TimerGame::Date TimerGame::ConvertYMDToDate(Year year, Month month, Day day) +/* static */ typename TimerGame::Date TimerGame::CalendarConvertYMDToDate(Year year, Month month, Day day) { /* Day-offset in a leap year */ int days = _accum_days_for_month[month] + day - 1; @@ -133,8 +134,8 @@ template /* Create instances of the two template variants that we have. * This is needed, as this templated functions are not in a header-file. */ -template TimerGame::YearMonthDay TimerGame::ConvertDateToYMD(Date date); -template TimerGame::YearMonthDay TimerGame::ConvertDateToYMD(Date date); +template TimerGame::YearMonthDay TimerGame::CalendarConvertDateToYMD(Date date); +template TimerGame::YearMonthDay TimerGame::CalendarConvertDateToYMD(Date date); -template TimerGame::Date TimerGame::ConvertYMDToDate(Year year, Month month, Day day); -template TimerGame::Date TimerGame::ConvertYMDToDate(Year year, Month month, Day day); +template TimerGame::Date TimerGame::CalendarConvertYMDToDate(Year year, Month month, Day day); +template TimerGame::Date TimerGame::CalendarConvertYMDToDate(Year year, Month month, Day day); diff --git a/src/timer/timer_game_common.h b/src/timer/timer_game_common.h index f807359e1c..1481f9581f 100644 --- a/src/timer/timer_game_common.h +++ b/src/timer/timer_game_common.h @@ -66,8 +66,8 @@ public: return year_as_int % 4 == 0 && (year_as_int % 100 != 0 || year_as_int % 400 == 0); } - static YearMonthDay ConvertDateToYMD(Date date); - static Date ConvertYMDToDate(Year year, Month month, Day day); + static YearMonthDay CalendarConvertDateToYMD(Date date); + static Date CalendarConvertYMDToDate(Year year, Month month, Day day); /** * Calculate the year of a given date. diff --git a/src/timer/timer_game_economy.cpp b/src/timer/timer_game_economy.cpp index 28ef7b4c70..474fcfd461 100644 --- a/src/timer/timer_game_economy.cpp +++ b/src/timer/timer_game_economy.cpp @@ -38,6 +38,41 @@ TimerGameEconomy::Month TimerGameEconomy::month = {}; TimerGameEconomy::Date TimerGameEconomy::date = {}; TimerGameEconomy::DateFract TimerGameEconomy::date_fract = {}; +/** + * Converts a Date to a Year, Month & Day. + * @param date the date to convert from + * @returns YearMonthDay representation of the Date. + */ +/* static */ TimerGameEconomy::YearMonthDay TimerGameEconomy::ConvertDateToYMD(TimerGameEconomy::Date date) +{ + /* If we're not using wallclock units, we keep the economy date in sync with the calendar. */ + if (!UsingWallclockUnits()) return CalendarConvertDateToYMD(date); + + /* If we're using wallclock units, economy months have 30 days and an economy year has 360 days. */ + TimerGameEconomy::YearMonthDay ymd; + ymd.year = TimerGameEconomy::date.base() / EconomyTime::DAYS_IN_ECONOMY_YEAR; + ymd.month = (TimerGameEconomy::date.base() % EconomyTime::DAYS_IN_ECONOMY_YEAR) / EconomyTime::DAYS_IN_ECONOMY_MONTH; + ymd.day = TimerGameEconomy::date.base() % EconomyTime::DAYS_IN_ECONOMY_MONTH; + return ymd; +} + +/** + * Converts a tuple of Year, Month and Day to a Date. + * @param year is a number between 0..MAX_YEAR + * @param month is a number between 0..11 + * @param day is a number between 1..31 + * @returns The equivalent date. + */ +/* static */ TimerGameEconomy::Date TimerGameEconomy::ConvertYMDToDate(TimerGameEconomy::Year year, TimerGameEconomy::Month month, TimerGameEconomy::Day day) +{ + /* If we're not using wallclock units, we keep the economy date in sync with the calendar. */ + if (!UsingWallclockUnits()) return CalendarConvertYMDToDate(year, month, day); + + /* If we're using wallclock units, economy months have 30 days and an economy year has 360 days. */ + const int total_months = (year.base() * EconomyTime::MONTHS_IN_YEAR) + month; + return (total_months * EconomyTime::DAYS_IN_ECONOMY_MONTH) + day - 1; // Day is 1-indexed but Date is 0-indexed, hence the - 1. +} + /** * Set the date. * @param date The new date @@ -54,6 +89,18 @@ TimerGameEconomy::DateFract TimerGameEconomy::date_fract = {}; TimerGameEconomy::month = ymd.month; } +/** + * Check if we are using wallclock units. + * @param newgame Should we check the settings for a new game (since we are in the main menu)? + * @return True if the game is using wallclock units, or false if the game is using calendar units. + */ +/* static */ bool TimerGameEconomy::UsingWallclockUnits(bool newgame) +{ + if (newgame) return (_settings_newgame.economy.timekeeping_units == TKU_WALLCLOCK); + + return (_settings_game.economy.timekeeping_units == TKU_WALLCLOCK); +} + template<> void IntervalTimer::Elapsed(TimerGameEconomy::TElapsed trigger) { diff --git a/src/timer/timer_game_economy.h b/src/timer/timer_game_economy.h index 14a693e512..81df5ff179 100644 --- a/src/timer/timer_game_economy.h +++ b/src/timer/timer_game_economy.h @@ -37,12 +37,19 @@ public: static Date date; ///< Current date in days (day counter). static DateFract date_fract; ///< Fractional part of the day. + static YearMonthDay ConvertDateToYMD(Date date); + static Date ConvertYMDToDate(Year year, Month month, Day day); static void SetDate(Date date, DateFract fract); + static bool UsingWallclockUnits(bool newgame = false); }; /** * Storage class for Economy time constants. */ -class EconomyTime : public TimerGameConst {}; +class EconomyTime : public TimerGameConst { +public: + static constexpr int DAYS_IN_ECONOMY_YEAR = 360; ///< Days in an economy year, when in wallclock timekeeping mode. + static constexpr int DAYS_IN_ECONOMY_MONTH = 30; ///< Days in an economy month, when in wallclock timekeeping mode. +}; #endif /* TIMER_GAME_ECONOMY_H */ diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 01d7aa9496..961e25eda2 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -215,6 +215,12 @@ struct TimetableWindow : Window { { this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_VT_SCROLLBAR); + + /* When using wallclock units, we must ensure the client displays timetables in seconds. */ + if (TimerGameEconomy::UsingWallclockUnits()) { + _settings_client.gui.timetable_mode = TimetableMode::Seconds; + } + this->UpdateSelectionStates(); this->FinishInitNested(window_number); diff --git a/src/vehicle.cpp b/src/vehicle.cpp index b2f5e37c90..fabf14ce13 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -195,10 +195,17 @@ bool Vehicle::NeedsServicing() const /* Are we ready for the next service cycle? */ const Company *c = Company::Get(this->owner); - if (this->ServiceIntervalIsPercent() ? - (this->reliability >= this->GetEngine()->reliability * (100 - this->GetServiceInterval()) / 100) : - (this->date_of_last_service + this->GetServiceInterval() >= TimerGameEconomy::date)) { - return false; + + /* Service intervals can be measured in different units, which we handle individually. */ + if (this->ServiceIntervalIsPercent()) { + /* Service interval is in percents. */ + if (this->reliability >= this->GetEngine()->reliability * (100 - this->GetServiceInterval()) / 100) return false; + } else if (TimerGameEconomy::UsingWallclockUnits()) { + /* Service interval is in minutes. */ + if (this->date_of_last_service + (this->GetServiceInterval() * EconomyTime::DAYS_IN_ECONOMY_MONTH) >= TimerGameEconomy::date) return false; + } else { + /* Service interval is in days. */ + if (this->date_of_last_service + this->GetServiceInterval() >= TimerGameEconomy::date) return false; } /* If we're servicing anyway, because we have not disabled servicing when diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 3fb3e02895..00e6938a25 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -2299,7 +2299,7 @@ extern void DrawAircraftDetails(const Aircraft *v, const Rect &r); static StringID _service_interval_dropdown[] = { STR_VEHICLE_DETAILS_DEFAULT, - STR_VEHICLE_DETAILS_DAYS, + STR_VEHICLE_DETAILS_TIME, STR_VEHICLE_DETAILS_PERCENT, INVALID_STRING_ID, }; @@ -2431,7 +2431,17 @@ struct VehicleDetailsWindow : Window { case WID_VD_SERVICING_INTERVAL: SetDParamMaxValue(0, MAX_SERVINT_DAYS); // Roughly the maximum interval - SetDParamMaxValue(1, TimerGameEconomy::DateAtStartOfYear(EconomyTime::MAX_YEAR)); // Roughly the maximum year + + /* Do we show the last serviced value as a date or minutes since service? */ + if (TimerGameEconomy::UsingWallclockUnits()) { + SetDParam(1, STR_VEHICLE_DETAILS_LAST_SERVICE_MINUTES_AGO); + /*/ Vehicle was last serviced at year 0, and we're at max year */ + SetDParamMaxValue(2, EconomyTime::MONTHS_IN_YEAR * EconomyTime::MAX_YEAR.base()); + } else { + SetDParam(1, STR_VEHICLE_DETAILS_LAST_SERVICE_DATE); + /*/ Vehicle was last serviced at year 0, and we're at max year */ + SetDParamMaxValue(2, TimerGameEconomy::DateAtStartOfYear(EconomyTime::MAX_YEAR)); + } size->width = std::max( GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT).width, GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS).width @@ -2572,8 +2582,22 @@ struct VehicleDetailsWindow : Window { case WID_VD_SERVICING_INTERVAL: { /* Draw service interval text */ Rect tr = r.Shrink(WidgetDimensions::scaled.framerect); + SetDParam(0, v->GetServiceInterval()); - SetDParam(1, v->date_of_last_service); + + /* We're using wallclock units. Show minutes since last serviced. */ + if (TimerGameEconomy::UsingWallclockUnits()) { + int minutes_since_serviced = (TimerGameEconomy::date - v->date_of_last_service).base() / EconomyTime::DAYS_IN_ECONOMY_MONTH; + SetDParam(1, STR_VEHICLE_DETAILS_LAST_SERVICE_MINUTES_AGO); + SetDParam(2, minutes_since_serviced); + DrawString(tr.left, tr.right, CenterBounds(r.top, r.bottom, GetCharacterHeight(FS_NORMAL)), + v->ServiceIntervalIsPercent() ? STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT : STR_VEHICLE_DETAILS_SERVICING_INTERVAL_MINUTES); + break; + } + + /* We're using calendar dates. Show the date of last service. */ + SetDParam(1, STR_VEHICLE_DETAILS_LAST_SERVICE_DATE); + SetDParam(2, v->date_of_last_service); DrawString(tr.left, tr.right, CenterBounds(r.top, r.bottom, GetCharacterHeight(FS_NORMAL)), v->ServiceIntervalIsPercent() ? STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT : STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS); break; @@ -2597,7 +2621,7 @@ struct VehicleDetailsWindow : Window { WID_VD_DECREASE_SERVICING_INTERVAL); StringID str = v->ServiceIntervalIsCustom() ? - (v->ServiceIntervalIsPercent() ? STR_VEHICLE_DETAILS_PERCENT : STR_VEHICLE_DETAILS_DAYS) : + (v->ServiceIntervalIsPercent() ? STR_VEHICLE_DETAILS_PERCENT : STR_VEHICLE_DETAILS_TIME) : STR_VEHICLE_DETAILS_DEFAULT; this->GetWidget(WID_VD_SERVICE_INTERVAL_DROPDOWN)->widget_data = str; @@ -2609,7 +2633,7 @@ struct VehicleDetailsWindow : Window { switch (widget) { case WID_VD_INCREASE_SERVICING_INTERVAL: // increase int case WID_VD_DECREASE_SERVICING_INTERVAL: { // decrease int - int mod = _ctrl_pressed ? 5 : 10; + int mod = TimerGameEconomy::UsingWallclockUnits() ? (_ctrl_pressed ? 1 : 5) : (_ctrl_pressed ? 5 : 10); const Vehicle *v = Vehicle::Get(this->window_number); mod = (widget == WID_VD_DECREASE_SERVICING_INTERVAL) ? -mod : mod; diff --git a/src/widgets/graph_widget.h b/src/widgets/graph_widget.h index 3d155ec565..fe7a5efc7e 100644 --- a/src/widgets/graph_widget.h +++ b/src/widgets/graph_widget.h @@ -27,6 +27,7 @@ enum CompanyValueWidgets : WidgetID { WID_CV_BACKGROUND, ///< Background of the window. WID_CV_GRAPH, ///< Graph itself. WID_CV_RESIZE, ///< Resize button. + WID_CV_FOOTER, ///< Footer. }; /** Widget of the #PerformanceHistoryGraphWindow class. */ @@ -36,6 +37,7 @@ enum PerformanceHistoryGraphWidgets : WidgetID { WID_PHG_BACKGROUND, ///< Background of the window. WID_PHG_GRAPH, ///< Graph itself. WID_PHG_RESIZE, ///< Resize button. + WID_PHG_FOOTER, ///< Footer. }; /** Widget of the #PaymentRatesGraphWindow class. */ From be8ed26db6f2116d9d66a36f6caf11eb416f46a4 Mon Sep 17 00:00:00 2001 From: translators Date: Tue, 23 Jan 2024 18:40:53 +0000 Subject: [PATCH 12/52] Update: Translations from eints norwegian (nynorsk): 5 changes by translators slovenian: 5 changes by translators faroese: 5 changes by translators hebrew: 5 changes by translators afrikaans: 5 changes by translators urdu: 5 changes by translators persian: 5 changes by translators bulgarian: 5 changes by translators belarusian: 5 changes by translators basque: 5 changes by translators russian: 23 changes by Ln-Wolf finnish: 1 change by hpiirai malay: 5 changes by translators scottish gaelic: 5 changes by translators croatian: 5 changes by translators latin: 5 changes by translators french: 49 changes by glx22, 8 changes by ottdfevr portuguese (brazilian): 80 changes by pasantoro icelandic: 5 changes by translators --- src/lang/afrikaans.txt | 22 ++-- src/lang/arabic_egypt.txt | 18 ++-- src/lang/basque.txt | 22 ++-- src/lang/belarusian.txt | 22 ++-- src/lang/brazilian_portuguese.txt | 174 +++++++++++++++--------------- src/lang/bulgarian.txt | 22 ++-- src/lang/catalan.txt | 18 ++-- src/lang/chuvash.txt | 9 ++ src/lang/croatian.txt | 22 ++-- src/lang/czech.txt | 18 ++-- src/lang/danish.txt | 18 ++-- src/lang/dutch.txt | 18 ++-- src/lang/english_AU.txt | 18 ++-- src/lang/english_US.txt | 18 ++-- src/lang/esperanto.txt | 19 ++-- src/lang/estonian.txt | 18 ++-- src/lang/faroese.txt | 22 ++-- src/lang/finnish.txt | 20 ++-- src/lang/french.txt | 132 ++++++++++++----------- src/lang/frisian.txt | 15 +-- src/lang/gaelic.txt | 22 ++-- src/lang/galician.txt | 18 ++-- src/lang/german.txt | 18 ++-- src/lang/greek.txt | 18 ++-- src/lang/hebrew.txt | 22 ++-- src/lang/hindi.txt | 9 ++ src/lang/hungarian.txt | 18 ++-- src/lang/icelandic.txt | 22 ++-- src/lang/ido.txt | 9 ++ src/lang/indonesian.txt | 18 ++-- src/lang/irish.txt | 18 ++-- src/lang/italian.txt | 18 ++-- src/lang/japanese.txt | 18 ++-- src/lang/korean.txt | 18 ++-- src/lang/latin.txt | 22 ++-- src/lang/latvian.txt | 18 ++-- src/lang/lithuanian.txt | 18 ++-- src/lang/luxembourgish.txt | 18 ++-- src/lang/macedonian.txt | 11 +- src/lang/malay.txt | 22 ++-- src/lang/maltese.txt | 9 ++ src/lang/marathi.txt | 10 +- src/lang/norwegian_bokmal.txt | 18 ++-- src/lang/norwegian_nynorsk.txt | 22 ++-- src/lang/persian.txt | 18 +++- src/lang/polish.txt | 18 ++-- src/lang/portuguese.txt | 18 ++-- src/lang/romanian.txt | 18 ++-- src/lang/russian.txt | 64 +++++------ src/lang/serbian.txt | 18 ++-- src/lang/simplified_chinese.txt | 18 ++-- src/lang/slovak.txt | 18 ++-- src/lang/slovenian.txt | 22 ++-- src/lang/spanish.txt | 18 ++-- src/lang/spanish_MX.txt | 18 ++-- src/lang/swedish.txt | 18 ++-- src/lang/tamil.txt | 18 ++-- src/lang/thai.txt | 17 +-- src/lang/traditional_chinese.txt | 18 ++-- src/lang/turkish.txt | 18 ++-- src/lang/ukrainian.txt | 18 ++-- src/lang/urdu.txt | 15 ++- src/lang/vietnamese.txt | 18 ++-- src/lang/welsh.txt | 17 +-- 64 files changed, 867 insertions(+), 597 deletions(-) diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt index 4ce522557d..af3c2644e1 100644 --- a/src/lang/afrikaans.txt +++ b/src/lang/afrikaans.txt @@ -228,6 +228,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter string: @@ -572,8 +575,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Eenheide STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Maatskappy prestasie graderings (maksimum gradering=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Maatskappywaarde + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Vragbetalingstariewe -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dae in deurtog STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Inkomste vir aflewering van 10 eenhede (of 10,000 liter) vrag oor 'n afstand van 20 teëls STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Skakel alles aan STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Skakel alles af @@ -867,7 +870,12 @@ STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP :{BLACK}Maak die STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Subsidie-aanbod het verval:{}{}{STRING} van {STRING} tot {STRING} sal nou nie 'n subsidie aantrek nie. STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidie onttrek:{}{}{STRING} diens van {STRING} tot {STRING} is nie meer gesubsideieer nie. +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Diens subsidie aanbod:{}{}Eerste {STRING} diens van {STRING} tot {STRING} sal 'n jaar se subsidie van die plaaslike raad kry! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Diens subsidie toeken aan {STRING}!{}{}{STRING} Diens van {STRING} tot {STRING} sal nou 50% extra vir die volgende jaar betaal! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Diens subsidie toeken aan {STRING}!{}{}{STRING} diens van {STRING} tot {STRING} sal nou dubbel pryse vir die volgende jaar betaal! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Diens subsidie toeken aan {STRING}!{}{}{STRING} diens van {STRING} tot {STRING} sal nou driemaal pryse vir die volgende jaar betaal! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Diens subsidie toeken aan {STRING}!{}{}{STRING} diens van {STRING} tot {STRING} sal nou viervoud pryse vir die volgende jaar betaal! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Verkeer warboel in {TOWN}!{}{}Pad heropbou program befonds deur {STRING} bring 6 maande van ellende na motoriste! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Vervoer monopoly! @@ -971,6 +979,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Kies die STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Addisionele informasie oor die basis musiek stel + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Kon nie 'n lys van beskikbare skermresolusies bepaal nie STR_ERROR_FULLSCREEN_FAILED :{WHITE}Volskerm metode gedop @@ -1320,6 +1331,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :As dit geaktive STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Voertuie verval nooit nie: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :As dit geaktiveer is, sal voertuig modelle altyd beskikbaar bly, na die bekendstelling daarvan +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Outohernuwe voertuig as hy oud raak: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :As dit geaktiveer is, word 'n voertuig wat naby die einde van sy werkslewe kom outomaties vervang, wanneer die hernu voorwaardes vervul is. @@ -3231,10 +3244,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Maak toe # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidies STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidies op aanbod vir diens opneming: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} van {STRING} na {STRING}{YELLOW} (voor {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Geen - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Dienste reeds gesubsidieer: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} van {STRING} tot {STRING}{YELLOW} ({COMPANY}{YELLOW}, tot {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik op aanbieding om skerm na nywerheid/dorp te skuif. Ctrl+klik maak 'n nuwe venster vir die nywerheid/dorp oop # Story book window @@ -3867,9 +3878,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Benoem p STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Benoem skip STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Benoem vliegtuig -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ouderdom: {LTBLUE}{STRING}{BLACK} Lopende koste: {LTBLUE}{CURRENCY_LONG}/jaar STR_VEHICLE_INFO_AGE :{COMMA} ja{P ar re} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ja{P ar re} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ouderdom: {LTBLUE}{STRING}{BLACK} Lopende koste: {LTBLUE}{CURRENCY_LONG}/jaar STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Maks. spoed: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maks. spoed: {LTBLUE}{VELOCITY} {BLACK}Vliegtuig tipe: {LTBLUE}{STRING} @@ -3888,14 +3899,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapasite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Oordragkrediet: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Diens tussentyd: {LTBLUE}{COMMA}{NBSP}dae{BLACK} Laaste diens: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Diens tussentyd: {LTBLUE}{COMMA}%{BLACK} Laaste diens: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Vermeeder diensinterval met 10 dae. Ctrl+klik om interval met 5 dae te vermeerder STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Verminder diensinterval met 10. Ctrl+klik om interval met 5 dae te verminder STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Verander instandhoudings-interval tipe STR_VEHICLE_DETAILS_DEFAULT :Verstek -STR_VEHICLE_DETAILS_DAYS :Dae STR_VEHICLE_DETAILS_PERCENT :Persentasie ###length VEHICLE_TYPES diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index cad329a0bc..c60aa87112 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -196,7 +196,6 @@ STR_COLOUR_WHITE :ابيض STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}ميل/س STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}كم/س STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}م/ث -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}مربعات/ اليوم STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}حصان STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}حصان @@ -229,6 +228,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}م STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP} متر +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}تصفية القائمة: @@ -574,8 +576,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}عدد STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}تقييم الأداء العام للشركة ---- اقصى اداء = 1000 STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}قيمة الشركة + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}النسبة التنازلية لقيمة نقل البضائع -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}يوم في النقل STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}الدخل من نقل 10 وحدات (او 10,000 لتر) من البضاعة مسافة 20 مربع STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}فعل الكل STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}اوقف الكل @@ -979,6 +981,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}اختر STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}معلومات اضافية عن الموسيقى الاساسية + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}فشل في استرداد قائمة الدقة المدعومة STR_ERROR_FULLSCREEN_FAILED :{WHITE}فشل تشغيل نمط الشاشة الكاملة @@ -1261,6 +1266,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :عند التم STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :المركبات لا تنتهي صلاحيتها ابدا : {STRING} +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :جدد العربات عندما تصبح قديمة : {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :عند التمكين ، يتم استبدال العربة التي اقتربت من نهاية عمرها عند اكتمال شروط التجديد @@ -3025,10 +3032,8 @@ STR_GOAL_QUESTION_BUTTON_SURRENDER :استسلام # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}العروض STR_SUBSIDIES_OFFERED_TITLE :{BLACK}العروض المتاحة للخدمة: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} من {STRING} الى {STRING}{YELLOW} - حتى {DATE_SHORT} - STR_SUBSIDIES_NONE :{ORANGE}بدون STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}العروض المأخوذة -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} من {STRING} الى {STRING}{YELLOW} - {COMPANY}{YELLOW}, حتى {DATE_SHORT}- STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}اضغط على الخدمة لتوسيط الخريطة على المصنع/المدينة. اضغط + كنترول لفتح شاشة عرض جديدة للمدينة. # Story book window @@ -3620,9 +3625,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}تسمي STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}تسمية السفينة STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK} تسمية الطائرة -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK} العمر {LTBLUE}{STRING}{BLACK} تكلفة التشغيل {LTBLUE}{CURRENCY_LONG} / سنة STR_VEHICLE_INFO_AGE :{COMMA}سنة ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA}سنة ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK} العمر {LTBLUE}{STRING}{BLACK} تكلفة التشغيل {LTBLUE}{CURRENCY_LONG} / سنة STR_VEHICLE_INFO_MAX_SPEED :{BLACK} السرعة القصوى {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK} الوزن {LTBLUE}{WEIGHT_SHORT} {BLACK} الطاقة {LTBLUE}{POWER}{BLACK} السرعى القصوى {LTBLUE}{VELOCITY} @@ -3639,13 +3644,10 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK} الس STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}مقدار التحويل: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}فترات الصيانة: {LTBLUE}{COMMA}{NBSP} يوم {BLACK} اخر صيانة: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}فترات الصيانة: {LTBLUE}{COMMA}% {BLACK} الصيانة الأخيرة: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}زيادة فترات الصيانة بقدر 10. ومع مفتاح كنترول بمقدار 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK} انقاص فترات الصيانة بمعدل 10. Ctrl+ الضغط الانقاص بمعدل 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}تغيير نوع الفاصل الزمني للصيانة -STR_VEHICLE_DETAILS_DAYS :الأيام STR_VEHICLE_DETAILS_PERCENT :النسبة المئوية ###length VEHICLE_TYPES diff --git a/src/lang/basque.txt b/src/lang/basque.txt index 21a98abb8c..9e43f7c665 100644 --- a/src/lang/basque.txt +++ b/src/lang/basque.txt @@ -226,6 +226,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Lokarri iragazkia: @@ -558,8 +561,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Emandako STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Konpaniako performantzia balorazioak (balorazio handiena=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Konpania balioak + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Zama Salneurriak -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Iraganbide egunak STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Ordainketa 10 unitate entregatzeagatik (edo 10,000 litro) 20 karratuko distatziako karga bategatik STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Dena gaitu STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Dena desgaitu @@ -843,7 +846,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Subsidio eskaintza agortu egin da:{}{}{STRING} {STRING}tik {STRING}ra doanarentzat ez dago subsidiorik orain. STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidioa kenduta:{}{}{STRING} Ez dago subsidiorik {STRING}(e)tik {STRING}(e)ra garraiatzeagatik. +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Diru-laguntza eskaintza:{}{} {STRING} {STRING}tik {STRING}ra doan lehenengoari bertako udalak diru-laguntza emango dio urte batetan zehar! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Diru-laguntza{STRING}entzako!{}{}{STRING} {STRING}tik {STRING}ra egindako serbitzuak %50-a gehiago irabaziko dute hurrengo urtean zehar! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Diru-laguntza {STRING}entzako da!{}{}{STRING} {STRING}tik {STRING}ra egiten duen serbitzuak bikoitza irabaziko du hurrengo urtean zehar! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Diru-laguntza {STRING}entzako da!{}{}{STRING} {STRING}tik {STRING}ra doan serbitzuak hirukoitza irabaziko du hurrengo urtean zehar! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Diru-laguntza {STRING}entzako da!{}{}{STRING} {STRING}tik {STRING}ra doan zerbitzuak laukoitza irabaziko du hurrengo urtean zehar! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK} Trafiko nahaste-borrastea {TOWN}en!{}{} {STRING}k ordaindutako errepideen konponketa plana sei hilabeterako arazoak esanguratzen die gidariei! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Garraio monopolia!! @@ -942,6 +950,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Aukeratu STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Musika paketearen informazio gehiago + + + STR_ERROR_FULLSCREEN_FAILED :{WHITE}Pantaila osoko moduak huts egin du # Custom currency window @@ -1276,6 +1287,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Gaitua dagoenea STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Ibilgailuei inoiz ez zaie epea amaitzen: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Gaitua dagoenean, ibilgailu modelo ezberdinak betirako egongo dira erabilgarri +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Ibilgailu bat zahartzen denean automatikoki berritu: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Gaitua dagoenean, Ibilgailuek bere lan-bizitza amaitzear dutenean eta beharrezko baldintzak betetzen badira automatikoki berrituko dira @@ -3053,10 +3066,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Itxi # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidioak STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subentzioa jasoko duten garraioak: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} {STRING}tik {STRING}{YELLOW}ra ({DATE_SHORT} baino lehenago) STR_SUBSIDIES_NONE :{ORANGE}- Ezer ez - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Subentzioa jasotzen ari duten goarraioak: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} {STRING}tik {STRING}{YELLOW}ra ({COMPANY}{YELLOW}, {DATE_SHORT} arte) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikatu garraio zerbitzuan ikuspegi nagusia industria/herrian zentratzeko. Ktrl+Klik ikuspegi lehio berria irekiko du indutri/herriaren kokapenean # Story book window @@ -3634,9 +3645,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Errepide STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Itsasontzia izendatu STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Hegazkina izendatu -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Adina: {LTBLUE}{STRING}{BLACK} Mantenimendua: {LTBLUE}{CURRENCY_LONG}/urtero STR_VEHICLE_INFO_AGE :{COMMA} urte ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} urte ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Adina: {LTBLUE}{STRING}{BLACK} Mantenimendua: {LTBLUE}{CURRENCY_LONG}/urtero STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Gehienezko abiadura: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Pisua: {LTBLUE}{WEIGHT_SHORT} {BLACK}Potentzia: {LTBLUE}{POWER}{BLACK} Gehienezko abiadura: {LTBLUE}{VELOCITY} @@ -3653,13 +3664,10 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Edukiera STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transferentzia kredituak: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Mantenimendu tartea: {LTBLUE}{COMMA}egun{BLACK} Azken mantenimendua: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Mantenimendu tartea: {LTBLUE}{COMMA}%{BLACK} Azken mantenimendua: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Mantenimendu tartea 10 puntutan igo. Ktrl+klik mantenimendu tartea 5 puntutan igo STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Mantenimendu tartea 10 puntutan gutxitu. Ktrl+klik mantenimendu tartea 5 puntutan gutxitu STR_VEHICLE_DETAILS_DEFAULT :Lehenetsia -STR_VEHICLE_DETAILS_DAYS :Egunak STR_VEHICLE_DETAILS_PERCENT :Ehunekoa ###length VEHICLE_TYPES diff --git a/src/lang/belarusian.txt b/src/lang/belarusian.txt index 4ba5ddd541..d07567aeee 100644 --- a/src/lang/belarusian.txt +++ b/src/lang/belarusian.txt @@ -539,6 +539,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}м STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}м +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Фільтар: @@ -881,8 +884,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Коль STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Рэйтынґ кампаніі (макс. = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Вартасьць кампаніі + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Тарыфы на перавозку грузаў -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Дзён у дарозе STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Плата за дастаўку 10 адзінак (альбо 10.000 літраў) грузу на адлегласьць ў 20 квадратаў STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Паказаць усё STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Схаваць усё @@ -1176,7 +1179,12 @@ STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP :{BLACK}Адчы STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Прапанова субсыдыі мінула:{}{}Перавозка {STRING.gen} па маршруце {STRING} — {STRING} субсыдыявацца больш ня будзе. STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Тэрмін субсыдыі сышоў:{}{}Перавозка {STRING.gen} па маршруце {STRING} — {STRING} больш не субсыдуецца. +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Прапанова субсыдыі:{}{}Першая кампанія, якая павязе {STRING.acc} па маршруце {STRING} — {STRING}, атрымае гадавую субсыдыю ад мясцовых уладаў! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Кампанія «{STRING}» атрымала субсыдыю!{}{}Перавозка {STRING.gen} па маршруце {STRING} — {STRING} будзе аплочана ў паўтарачным памеры на працягу года! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Кампанія «{STRING}» атрымала субсыдыю!{}{}Перавозка {STRING.gen} па маршруце {STRING} — {STRING} будзе аплочана ў падвоеным памеры на працягу года! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Кампанія «{STRING}» атрымала субсыдыю!{}{}Перавозка {STRING.gen} па маршруце {STRING} — {STRING} будзе аплочана ў патроеным памеры на працягу года! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Кампанія «{STRING}» атрымала субсыдыю!{}{}Перавозка {STRING.gen} па маршруце {STRING} — {STRING} будзе аплочана ў чатырохразовым памеры на працягу года! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Хаос на дарогах г. {NBSP}{TOWN}!{}{}Рэканструкцыя дарогаў, прафінансаваная {STRING}, прынясе кіроўцам 6 месяцаў пакут! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Транспартная манаполія! @@ -1281,6 +1289,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Выбе STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Дадатковая інфармацыя аб базавым музычным наборы + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Не атрымалася атрымаць сьпіс падтрымліваемых разрозненьняў экрана STR_ERROR_FULLSCREEN_FAILED :{WHITE}Памылка поўнаэкраннага рэжыму @@ -1632,6 +1643,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Калі ўкл STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Транспарт ніколі не выходзіць з ужытку: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Калі ўключана, усе мадэлі транспартных сродкаў пасьля з'яўленьня застануцца даступнымі назаўжды. +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Аўтазамена старых транспартных сродкаў: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Калі ўключана, транспарт напрыканцы свайго пэўнага тэрміна службы будзе аўтаматычна заменены, калі ўмовы замены будуць выкананыя. @@ -3583,10 +3596,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Закрыць # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Субсыдыі: STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Прапанаваныя субсыдыі: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} па маршруце з {STRING} у {STRING}{YELLOW} (па {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Няма - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Маршруты, якія ўжо субсыдуюцца: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} па маршруце з {STRING} у {STRING}{YELLOW} ({COMPANY}{YELLOW}, да {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Націсьніце на маршрут для адлюстраваньня прадпрыемства/горада. Ctrl+пстрычка паказвае ў дадатковым вакне. # Story book window @@ -4228,9 +4239,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Пера STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Перайменаваць карабель STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Перайменаваць паветранае судна -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Узрост: {LTBLUE}{STRING}{BLACK} Кошт абслугоўваньня: {LTBLUE}{CURRENCY_LONG}/год STR_VEHICLE_INFO_AGE :{COMMA} г{P од ады адоў} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} г{P од ады адоў} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Узрост: {LTBLUE}{STRING}{BLACK} Кошт абслугоўваньня: {LTBLUE}{CURRENCY_LONG}/год STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Макс. хуткасьць: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Макс. хуткасць: {LTBLUE}{VELOCITY} {BLACK}Тып паветр. судна: {LTBLUE}{STRING} @@ -4249,14 +4260,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Ёмiс STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Выручка перавозкі: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Агляд кожныя {LTBLUE}{COMMA}{NBSP}дзён{BLACK} Апошнi раз: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Агляд кожныя {LTBLUE}{COMMA}%{BLACK} Апошнi раз: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Павялiчыць інтэрвал абслугоўваньня на 10. Ctrl+клік — павялічыць інтэрвал абслугоўваньня на 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Зьменшыць інтэрвал абслугоўваньня на 10. Ctrl+клік — паменшыць інтэрвал абслугоўваньня на 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Зьмяніць прынцып разьліку інтэрвалу абслугоўваньня STR_VEHICLE_DETAILS_DEFAULT :Па змоўчаньні -STR_VEHICLE_DETAILS_DAYS :У днях STR_VEHICLE_DETAILS_PERCENT :У адсотках ###length VEHICLE_TYPES diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index 741e69b569..29c6a57814 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Igual à primá STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}quadrados/dia STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}nós STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -256,10 +255,15 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}dia{P "" s} STR_UNITS_SECONDS :{COMMA}{NBSP}sedundo{P "" s} STR_UNITS_TICKS :{COMMA}{NBSP}tique{P "" s} +STR_UNITS_MINUTES :{NUM}{NBSP}minuto{P "" s} + +STR_UNITS_PERIODS :{NUM}{NBSP}período{P "" s} + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtro: STR_LIST_FILTER_OSKTITLE :{BLACK}Insira uma ou mais palavras-chave para filtrar a lista @@ -283,7 +287,7 @@ STR_TOOLTIP_RESIZE :{BLACK}Clique e STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Alternar entre janela de tamanho grande/pequena STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Barra de rolagem - rola a lista acima/abaixo STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Barra de rolagem - rola a lista para esquerda/direita -STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolir edifícios etc. num quadrado de terreno. Ctrl seleciona a área diagonalmente. Shift alterna construção/mostrar estimativa de preço +STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolir edifícios etc. num quadrado de terreno. Ctrl seleciona a área diagonalmente. Shift alterna construir/mostrar estimativa de custo # Show engines button ###length VEHICLE_TYPES @@ -371,32 +375,32 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Pausar j STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Acelerar o jogo STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Opções e definições STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Salvar, carregar ou abandonar o jogo, sair do jogo -STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Exibir mapa, janela de exibição extra, fluxo de carga ou lista de sinais -STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Exibir lista de cidades +STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Exibir mapa, visualizador extra, fluxo de cargas ou lista de sinais +STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Mostrar lista de localidades STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Exibir subsídios STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Exibir lista de estações da empresa -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Exibir informações financeiras da empresa +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Mostrar informações financeiras da empresa STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Exibir informações gerais da empresa -STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Exibe o livro de histórias +STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Mostrar livro de histórias STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Exibie a lista de objetivos STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Exibir gráficos da empresa e taxas de pagamento de carga STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Exibir tabela de classificação das empresas STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Examina indústrias ou financia a construção de uma nova indústria STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Exibir lista de trens da empresa. Ctrl+Clique alterna a abertura da lista de grupos/veículos -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Exibir lista de veículos rodoviários da empresa. Ctrl+Clique alterna a abertura da lista de grupos/veículos -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Exibir lista de embarcações da empresa. Ctrl+Clique alterna a abertura da lista de grupos/veículos +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Exibir lista de veículos rodoviários da empresa. Ctrl+Clique alterna abrir a lista de grupos/veículos +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Mostrar lista de navios da empresa. Ctrl+Clique alterna entre abrir a lista de grupos/veículos STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Exibir lista de aeronaves da empresa. Ctrl+Clique alterna a abertura da lista de grupos/veículos STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Ampliar a visão STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Reduzir a visão STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construir linha ferroviária STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Construir rodovias -STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Construir bondes +STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Construir trilhos para bondes STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Construir docas STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Construir aeroportos -STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Abrir a barra de paisagismo para elevar ou abaixar terreno, plantar árvores, etc. +STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Abra a barra de modelação ambiental para elevar ou baixar terreno, plantar árvores, etc. STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Exibir janela de som/música STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Mostrar a última mensagem/notícia, histórico de mensagens ou apagar todas as mensagens -STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Informações da área de terreno, captura de tela, sobre o OpenTTD e ferramentas de desenvolvedor +STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Informações do terreno, captura de tela, sobre o OpenTTD e ferramentas de desenvolvedor STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Trocar a barra de ferramentas # Extra tooltips for the scenario editor toolbar @@ -411,8 +415,8 @@ STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Geraçã STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Geração de cidades STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Geração de indústria STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Contrução de rodovias -STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Construção de trilho de bonde -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plantar árvores. Ctrl seleciona a área na diagonal. Shift alterna construir/mostrar estimativa de custo +STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Construir infraestrutura de bondes +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plantar árvores. Ctrl seleciona a área diagonalmente. Shift alterna construir/mostrar custo estimado STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Colocar placa STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Colocar objeto. Ctrl seleciona a área na diagonal. Shift alterna construir/mostrar estimativa de custo @@ -616,8 +620,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unidades STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Avaliações de desempenho da empresa (avaliação máxima=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Gráfico de Valor da Empresa + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Taxa de Pagamento de Carga -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dias em trânsito STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pagamento por entregar 10 unidades (ou 10 000 litros) de carga numa distância de 20 quadrados STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Habilitar tudo STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Desabilitar tudo @@ -1083,6 +1087,10 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Conjunto STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selecionar o conjunto de músicas base para usar STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informação adicional sobre o conjunto de músicas base + + +STR_GAME_OPTIONS_SOCIAL_PLUGIN_STATE_DUPLICATE :{RED}Plugin duplicado + STR_BASESET_STATUS :{STRING} {RED}({NUM} arquivo{P "" s} em falta/corrompido{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Falha ao obter a lista de resoluções suportadas @@ -1335,7 +1343,7 @@ STR_CONFIG_SETTING_FORBID_90_DEG :Proibir trens e STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Curvas em 90 graus ocorrem quando um trilho horizontal é seguido imediatamente por um trilho vertical, fazendo com que o trem vire 90 graus, ao invés dos 45 graus padrão para as outras combinações de trilhos. Isso também afeta as embarcações STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Permitie unir estações não adjacentes: {STRING} -STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Permite adicionar partes a uma estação sem que aquelas encostem diretamente nestas. Pressione Ctrl+clique para fazer isso +STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Permite adicionar partes a uma estação sem tocar nas partes já existentes. Precisa usar Ctrl+Clique quando for adicionar partes novas STR_CONFIG_SETTING_INFLATION :Inflação: {STRING} STR_CONFIG_SETTING_INFLATION_HELPTEXT :Ativa inflação na economia, de forma que custos sobem um pouco mais do que recebidos @@ -1456,6 +1464,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Se ativado, uma STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Veículos nunca saem de linha: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Quanto ativado, mantém todos os modelos de veículos disponíveis após serem introduzidos +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Auto-renovação de veículos quando ficam velhos: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Quando ativado, os veículos próximos do fim da vida útil são automaticamente substituídos quando as condições forem atingidas @@ -1875,7 +1885,7 @@ STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :Construir sinal STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Seleciona o ano a partir do qual semáforos substituirão sinais. Antes desse ano, serão utilizados sinais de placa (diferença puramente estética) STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Tipo de sinal a ser exibido: {STRING} -STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Selecione quais tipos de sinais mostrar quando Ctrl+Clicar em uma placa de Construir com a ferramenta de Sinal +STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Selecione quais os tipos de sinais mostrar ao usar Ctrl+Clique num sinal existente com a ferramenta de sinais ###length 2 STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :De trajeto apenas STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :Todos visíveis @@ -2149,10 +2159,10 @@ STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Selecion STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Selecionar cenário do estilo 'toyland' STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Exibir opções de jogo -STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Exibe as pontuações +STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Mostrar tabela de classificações STR_INTRO_TOOLTIP_HELP :{BLACK}Obter acesso à documentação e recursos online -STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Config. de exibição -STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Exibir configs. dos NewGRF +STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Mostrar configurações +STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Mostrar definições de NewGRF STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Checar por conteúdo novo e atualizado para baixar STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Mostrar definições de IA STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Mostrar definições de Script do Jogo @@ -2214,7 +2224,7 @@ STR_LIVERY_ROAD_VEHICLE_GROUP_TOOLTIP :{BLACK}Exibir c STR_LIVERY_SHIP_GROUP_TOOLTIP :{BLACK}Exibir cores de grupos de embarcações STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP :{BLACK}Exibir cores dos grupos de aeronaves STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Escolha a cor principal para o esquema selecionado. Ctrl+Clique seleciona essa cor para todos os esquemas -STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Escolha a cor secundária para o esquema selecionado. Ctrl+Clique seleciona essa cor para todos os esquemas +STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Escolha a cor secundária para o esquema selecionado. Ctrl+Clique aplica essa cor para todos os esquemas STR_LIVERY_PANEL_TOOLTIP :{BLACK}Selecionar um esquema de cores para mudar, ou múltiplos esquemas com CTRL+clique. Marque a opção para utilizar o esquema STR_LIVERY_TRAIN_GROUP_EMPTY :Não há grupos de trens configurados STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY :Não há grupos de veículos configurados @@ -2733,9 +2743,9 @@ STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Construi STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Construir ponto de controle na rodovia. Ctrl permite unir pontos de controle. Shift alterna construir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Construir estação ferroviária. Ctrl permite a união de estações. Shift altera construção/preço estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Construir sinais na ferrovia. Ctrl alterna entre a construção de semáforos/sinais{}Clicar e arrastar constrói sinais ao longo de uma linha de trilhos. Ctrl constrói sinais até a próxima junção ou sinal{}Ctrl+Clique abre a janela de seleção de sinais. Shift alterna construir/mostrar custo estimado -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Construir ponte ferroviária. Shift altera construção/preço estimado +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Construir ponte ferroviária. Shift alterna construir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Construir túnel ferroviário. Shift altera construção/preço estimado -STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Alternar construir/remover ferrovias, sinais, pontos de controle e estações. Segure ctrl para remover os trilhos de estações e pontos de controle. +STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Alternar entre construir/remover linha férrea, sinais, pontos de passagem e estações. Manter Ctrl pressionado também remove a linha férrea de pontos de passagem e estações STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Converter/Atualizar tipo de linha. Shift altera construção/preço estimado STR_RAIL_NAME_RAILROAD :Ferrovia @@ -2786,7 +2796,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Sinal de STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Sinal Combo (elétrico){}O sinal combo funciona tanto como um sinal de entrada quanto de saída. Permite construir várias ramificações de pré-sinais STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Sinal de trajeto (Elétrico){}Um sinal de trajeto permite mais de um trem entrar em um bloco de sinal ao mesmo tempo, se o trem puder reservar um trajeto para um ponto seguro de parada. Sinais de trajeto padrões podem ser passados pelo lado de trás STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Sinal avançado de mão única(Elétrico){}Um sinal de trajeto permite mais de um trem em um bloco de ferrovia, Se o trem no bloco puder reservar um local seguro para parar, o sinal de trajeto já permite a passada do próximo, porém não permite a passagem na via contrária -STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Converter sinal{}Quando selecionado, clicar num sinal existente converte-o para o tipo selecionado e suas variantes. Ctrl+Clique muda a variante atual. Shift+Clique mostra o preço estimado da conversão +STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Converter sinal{}Quando selecionado, clicar num sinal existente converte-o para o tipo selecionado e suas variantes. Ctrl+Clique muda a variante atual. Shift+Clique mostra o custo estimado da conversão STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densidade dos sinais ao clicar e arrastar STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Diminuir a densidade dos sinais STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar a densidade dos sinais @@ -2812,25 +2822,25 @@ STR_BRIDGE_TUBULAR_SILICON :Tubular, Silíc # Road construction toolbar STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Construir rodovias STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Construção de Bonde -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Construir trecho rodoviário. Ctrl alterna entre construção/remoção de estradas. Shift altera construção/preço estimado -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Construir linha de bonde. Ctrl alterna entre construção/remoçao de linhas. Shift altera construção/preço estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Construir trecho de estrada. Ctrl alterna construir/remover estradas. Shift alterna construir/mostrar custo estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Construir linha de bonde. Ctrl alterna entre construir/remover linhas. Shift altera construir/mostrar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Construir estradas usando o modo Autoestrada. Ctrl alterna entre a construção/remoção de estradas. Shift altera construção/preço estimado -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Construir linha de bonde usando o modo Automático. Ctrl alterna entre a construção/remoção de linhas de bonde. Shift altera construção/preço estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Construir linha de bonde usando o modo Automático. Ctrl alterna construir/remover linhas de bonde. Shift alterna construir/mostrar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Construir garagem (para compra e manutenção de automóveis). Shift altera construção/preço estimado -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Construir depósito de bonde (para compra e manutenção de bondes). Shift altera construção/preço estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Construir depósito para bondes (para compra e manutenção de bondes). Shift alterna construir/mostrar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Construir estação de ônibus. Ctrl permite a união de estações. Shift altera construção/preço estimado -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Constuir estação de bonde para passageiros. Ctrl permite a união de estações. Shift altera construção/preço estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Constuir estação de bonde para passageiros. Ctrl permite unir estações. Shift altera construir/mostrar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Construir estação de caminhões. Ctrl permite unir estações. Shift alterna construir/mostrar custo estimado -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Constuir estação de bonde para carga. Ctrl permite a união de estações. Shift altera construção/preço estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Constuir estação para bondes de carga. Ctrl permite unir estações. Shift altera construir/mostrar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Ativar/Desativar vias de mão única -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Construir ponte rodoviária. Shift altera construção/preço estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Construir ponte rodoviária. Shift alterna construir/mostrar cutso estimado STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Construir ponte de bonde. Shift altera construção/preço estimado -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Construir túnel rodoviário. Shift altera construção/preço estimado -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Construir túnel de bonde. Shift altera construção/preço estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Construir túnel rodoviário. Shift alterna construir/mostrar custo estimado +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Construir túnel para bondes. Shift alterna construir/mostar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Alternar construir/remover para contrução rodoviária STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Alternar construir/remover linhas de bonde e sinais STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Converter/atualizar o tipo de estrada. Shift altera construção/exibição de estimativa de custo -STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Converter/Melhorar o tipo de bonde. Shift troca construção/amostra custo estimado +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Converter/Atualizar o tipo de bonde. Shift alterna construir/mostrar custo estimado STR_ROAD_NAME_ROAD :Estrada STR_ROAD_NAME_TRAM :Bonde @@ -2854,12 +2864,12 @@ STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Selecion # Waterways toolbar (last two for SE only) STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Construção de Hidrovias STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Hidrovias -STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Construir canais. Shift altera construção/preço estimado -STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Construir eclusas. Shift altera construção/preço estimado +STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Construir canais. Shift alterna construir/mostrar custo estimado +STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Construir eclusas. Shift alterna construir/mostrar custo estimado STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Construir depósito naval (para a compra e manutenção de embarcações). Shift altera construção/preço estimado -STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Construir doca naval. Ctrl permite a união de estações. Shift altera construção/preço estimado -STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Posicione a bóia, que pode ser usada como ponto de rota. Shift altera construção/preço estimado -STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Construir aqueduto. Shift altera construção/preço estimado +STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Construir doca naval. Ctrl permite unir estações. Shift alterna construir/mostrar custo estimado +STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Colocar uma bóia que pode ser usada como ponto de passagem. Shift alterna construir/mostrar custo estimado +STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Construir aqueduto. Shift alterna construir/mostrar custo estimado STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Define área com água.{}Faz um canal, a menos se CTRL for pressionado ao nível do mar, neste caso inundará ao redor STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Criar rios. Ctrl seleciona a área na diagonal @@ -2899,14 +2909,14 @@ STR_STATION_BUILD_NOISE :{BLACK}Ruído g # Landscaping toolbar STR_LANDSCAPING_TOOLBAR :{WHITE}Terreno -STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Baixar um canto do terreno. Arrastar abaixa o primeiro canto selecionado e nivela a área selecionada à altura do novo canto. CTRL seleciona a área diagonalmente. Shift alterna construção/preço estimado +STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Rebaixar um canto do terreno. Arrastar abaixa o primeiro canto selecionado e nivela a área selecionada à altura do novo canto. Ctrl seleciona a área diagonalmente. Shift alterna construir/mostrar custo estimado STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK} Elevar um canto do terreno. Arrastar eleva o primeiro canto selecionado e nivela a área selecionada à nova altura do canto. Ctrl seleciona a área diagonalmente. Shift alterna contrução/preço estimado -STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Nivelar uma área do terreno à altura do primeiro canto selecionado. Ctrl seleciona uma área diagonalmente. Shift alterna contrução/preço estimado -STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Comprar terreno para uso futuro. Ctrl seleciona a área na diagonal. Shift alterna construir/mostrar estimativa de custo +STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Nivelar uma área do terreno à altura do primeiro canto selecionado. Ctrl seleciona uma área diagonalmente. Shift alterna construir/mostrar custo estimado +STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Comprar terreno para uso futuro. Ctrl seleciona a área diagonalmente. Shift alterna entre construir/mostrar custo estimado # Object construction window STR_OBJECT_BUILD_CAPTION :{WHITE}Seleção de Objeto -STR_OBJECT_BUILD_TOOLTIP :{BLACK}Selecione o objeto para construir. Ctrl seleciona a área na diagonal. Shift alterna construir/mostrar estimativa de custo +STR_OBJECT_BUILD_TOOLTIP :{BLACK}Selecione o objeto para construir. Ctrl seleciona a área diagonalmente. Shift alterna construir/mostrar estimativa de custo STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Selecione uma categoria de objeto para construir STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Pré-visualização do objeto STR_OBJECT_BUILD_SIZE :{BLACK}Tamanho: {GOLD}{NUM} x {NUM} quadrados @@ -2931,7 +2941,7 @@ STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Plantar # Land generation window (SE) STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Gerar Terreno STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Coloca rochas no terreno -STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define área desértica.{} Segure Ctrl para removê-la +STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Definir área de deserto.{}Manter Ctrl pressionada para remover STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Aumenta área de terreno a baixar/levantar STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Diminui área de terreno a baixar/levantar STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Gera terreno aleatório @@ -2945,7 +2955,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Tem cert # Town generation window (SE) STR_FOUND_TOWN_CAPTION :{WHITE}Gerar Cidades STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}Nova Cidade -STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Funda nova cidade. Shift+Clique apenas mosta o preço estimado +STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Fundar nova localidade. Shift+Clique mostra apenas o custo estimado STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Cidade Aleatória STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Constrói cidade num local aleatório STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Várias cidades aleatórias @@ -3011,7 +3021,7 @@ STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Selecion # Land area window STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Informações do Terreno -STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Centraliza a janela no local da área de terreno. Ctrl+Clique abre uma nova janela no local da área de terreno +STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do quadrado. Ctrl+Clique abre uma nova janela de visualização nesse local. STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Preço para limpar: {LTBLUE}N/D STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Preço para limpar: {RED}{CURRENCY_LONG} STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Ganhos pela limpeza: {LTBLUE}{CURRENCY_LONG} @@ -3538,7 +3548,7 @@ STR_SIGN_LIST_MATCH_CASE_TOOLTIP :{BLACK}Ativa/De # Sign window STR_EDIT_SIGN_CAPTION :{WHITE}Editar texto da placa -STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Centraliza janela no local da placa. Ctrl+Clique abre uma nova janela no local da placa +STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Centrar a visualização na localização da placa. Ctrl+Clique abre um novo visualizador na localização da placa STR_EDIT_SIGN_NEXT_SIGN_TOOLTIP :{BLACK}Próxima Placa STR_EDIT_SIGN_PREVIOUS_SIGN_TOOLTIP :{BLACK}Placa anterior @@ -3567,7 +3577,7 @@ STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Cidade c STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Cidade cresce a cada {ORANGE}{COMMA}{BLACK}{NBSP}dia{P "" s} (patrocinado) STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}A cidade {RED}não{BLACK} está crescendo STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Limite de ruído na cidade: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} -STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visão no local da cidade. Ctrl+Clique abre uma nova janela no local da cidade +STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visualização na localidade. Ctrl+Clique abre um novo visualizador na posição da localidade STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Autoridade Local STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP :{BLACK}Exibir informações sobre a prefeitura STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Renomear cidade @@ -3622,7 +3632,7 @@ STR_GOALS_TEXT :{ORANGE}{STRING STR_GOALS_NONE :{G=m}{ORANGE}- Nenhum - STR_GOALS_PROGRESS :{ORANGE}{STRING} STR_GOALS_PROGRESS_COMPLETE :{GREEN}{STRING} -STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Clique num objetivo para centralizar a visualização principal numa indústria/cidade.Ctrl+Clique abre uma nova janela na localização da indústria/cidade +STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Clique no objetivo para centrar a vista principal na indústria/localidade/quadrado. Ctrl+Clique abre uma nova vista na localização da indústria/localidade/quadrado # Goal question window STR_GOAL_QUESTION_CAPTION_QUESTION :{BLACK}Pergunta @@ -3654,11 +3664,10 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Fechar # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsídios STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Ofertas de transporte subsidiados -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} de {STRING} para {STRING}{YELLOW} (em {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Nenhum - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Transporte subsidiados: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} de {STRING} para {STRING}{YELLOW} ({COMPANY}{YELLOW}, até {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Clique num serviço para centralizar a visualização principal numa indústria/cidade.Ctrl+Clique abre uma nova janela na localização da indústria/cidade +STR_SUBSIDIES_SUBSIDISED_EXPIRY_DATE :até {DATE_SHORT} # Story book window STR_STORY_BOOK_CAPTION :{WHITE}Livro de Histórias de {COMPANY} @@ -3734,7 +3743,7 @@ STR_CARGO_RATING_VERY_GOOD :Muito Bom STR_CARGO_RATING_EXCELLENT :Excelente STR_CARGO_RATING_OUTSTANDING :Proeminente -STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visão no local da estação. Ctrl+Clique abre uma nova janela no local da estação +STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visualização na localização da estação. Ctrl+Clique abre um novo visualizador na localização da estação STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Alterar o nome da estação STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Exibir todos os trens que possuem esta estação nas ordens de serviço @@ -3751,7 +3760,7 @@ STR_STATION_VIEW_CLOSE_AIRPORT_TOOLTIP :{BLACK}Impedir STR_WAYPOINT_VIEW_CAPTION :{WHITE}{WAYPOINT} STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visão no local do ponto de caminho. Ctrl+Clique abre uma nova janela no local do ponto de caminho STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME :{BLACK}Renomear ponto de controle -STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Centraliza janela no local da bóia. Ctrl+Clique abre uma nova janela no local da bóia +STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visualização na localização da bóia. Ctrl+Clique abre um novo visualizador na localização da bóia STR_BUOY_VIEW_CHANGE_BUOY_NAME :{BLACK}Renomear bóia STR_EDIT_WAYPOINT_NAME :{WHITE}Editar nome do ponto de controle @@ -3794,7 +3803,7 @@ STR_FINANCES_MAX_LOAN :{WHITE}Emprést STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG} STR_FINANCES_BANK_BALANCE :{WHITE}{CURRENCY_LONG} STR_FINANCES_BORROW_BUTTON :{BLACK}Pedir {CURRENCY_LONG} -STR_FINANCES_BORROW_TOOLTIP :{BLACK}Pedir empréstimo. Ctrl+Clique pede o máximo possível +STR_FINANCES_BORROW_TOOLTIP :{BLACK}Aumentar o empréstimo. Ctrl+Clique solicita o máximo possível STR_FINANCES_REPAY_BUTTON :{BLACK}Pagar {CURRENCY_LONG} STR_FINANCES_REPAY_TOOLTIP :{BLACK}Pagar parte do empréstimo. Ctrl+Clique paga o máximo possível STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infraestrutura @@ -3871,7 +3880,7 @@ STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUST STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} e {NUM} mais... -STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nomes das indústrias - clique no nome para centralizar a visçao principal na indústria. Ctrl+Clique abre uma nova janela na localização da indústria +STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nomes das indústrias - clique no nome para centralizar a visão na indústria. Ctrl+Clique abre um novo visualizador na localização da indústria STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER :{BLACK}Carga aceita: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_PRODUCED_CARGO_FILTER :{BLACK}Carga produzida: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_FILTER_ALL_TYPES :Todos os tipos de carga @@ -3881,7 +3890,7 @@ STR_INDUSTRY_DIRECTORY_FILTER_NONE :Nenhum STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produção no mês passado: STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado) -STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar visão no local da indústria.Ctrl+Clique abre uma nova janela no local da indústria +STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização da indústria. Ctrl+Clique abre um novo visualizador na localização da indústria STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou fechamento iminente! @@ -4020,10 +4029,10 @@ STR_CARGO_TYPE_FILTER_FREIGHT :Frete STR_CARGO_TYPE_FILTER_NONE :Nenhum ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Lista de trens - clique num trem para informações. Cltr+Clique para alterar a visibilidade do tipo de trem -STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Lista de automóveis - clique num automóvel para informações. Cltr+Clique para alterar a visibilidade do tipo de automóvel +STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Lista de seleção de trens. Clique em um trem para informações. Cltr+Clique para alterar a visibilidade do tipo de trem +STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Lista de seleção de automóveis. Clique em um automóvel para informações. Cltr+Clique para alterar a visibilidade do tipo de automóvel STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Lista de embarcações - clique numa embarcação para informações. Cltr+Clique para alterar a visibilidade do tipo de navio -STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Lista de aeronaves - clique numa aeronave para informações. Cltr+Clique para alterar a visibilidade do tipo de aeronave +STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Lista de seleção de aeronaves. Clique em uma aeronave para informações. Cltr+Clique para alterar a visibilidade do tipo de aeronave ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Comprar Veículo @@ -4038,15 +4047,15 @@ STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e reequipar aeronaves ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Compra o veículo ferroviário selecionado. Shift+Clique mostra preço estimado +STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar o veículo ferroviário selecionado. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Compra o veículo selecionado. Shift+Clique mostra preço estimado -STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Compra a embarcação selecionada. Shift+Clique mostra preço estimado sem a compra +STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar a embarcação selecionada. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Compra a aeronave selecionada. Shift+Clique mostra o preço estimado sem a compra ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Compra e troque o trem destacado. Shift+Click mostra o custo estimado -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Compra e reequipa o automóvel destacado. Shift+Clique mostra o custo estimado -STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :Compre e reequipa o navio selecionado. Shift+Clique mostra o custo estimado +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Comprar e converter veículo rodoviário selecionado. Shift+Clique mostra estimativa de custo, sem comprar +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Comprar e converter navio selecionado. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Compra e reequipa a aeronave selecionada. Shift+Clique mostra o custo estimado ###length VEHICLE_TYPES @@ -4097,7 +4106,7 @@ STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} ve STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT}) ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trens - arraste um veículo para adicionar/remover do trem, clique com o botão direito num trem para informações. Segurar Ctrl aplica ambas funções na composição +STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Comboios - arraste o veículo com o botão esquerdo do mouse para acrescentar/remover do comboio, clique com o botão direito para informações. Manter Ctrl pressionado para aplicar ambas as funções ao grupo seguinte STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Veículos - clique com o botão direito num veículo para informações STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Embarcações - clique com o botão direito numa embarcação para informações STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aeronave - cliquecomo botão direito na aeronave para informações @@ -4140,15 +4149,15 @@ STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Clonar A ###length VEHICLE_TYPES STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Isso irá comprar uma cópia do trem incluindo todos os vagões. Clique neste botão e depois em um trem dentro ou fora do depósito. Ctrl+Clique compartilhará as ordens. Shift+Clique mostra o preço estimado sem a compra -STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Isso irá comprar uma cópia do automóvel. Clique neste botão e depois em um automóvel dentro ou fora da garagem. Ctrl+Clique compartilhará as ordens. Shift+Clique mostra o preço estimado sem a compra +STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Esta ação irá comprar uma cópia de um veículo rodoviário. Clique neste botão e depois em um veículo rodoviário que está dentro ou fora da garagem. Ctrl+Clique irá compartilhar as ordens. Shift+Clique mostra o custo estimado, sem comprar STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Isso irá comprar uma cópia da embarcação. Clique neste botão e depois em uma embarcação dentro ou fora do depósito naval. Ctrl+Clique irá compartilhar as ordens. Shift+Clique mostra preço estimado sem a compra -STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Isso irá comprar uma cópia de uma aeronave. Clique nesse botão e depois em uma aeronave dentro ou fora do hangar. Ctrl+Clique compartilhará as ordens. Shift+Clique mostra o preço estimado sem a compra +STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Esta ação irá comprar uma cópia de uma aeronave. Clique neste botão e depois em uma aeronave que está dentro ou fora do hangar. Ctrl+Clique irá compartilhar as ordens. Shift+Clique mostra a estimativa de custo, sem comprar ###length VEHICLE_TYPES -STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centrar visão no local de um depósito ferroviário. Ctrl+Clique abre uma nova janela no local do depósito de trem +STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do depósito ferroviário. Ctrl+Clique abre um novo visualizador na localização do depósito ferroviário STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centraliza a janela na localização da garagem. Ctrl+Clique abre uma nova janela na localização da garagem. STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centraliza visão no local do depósito naval. Ctrl+Clique abre uma nova janela no local do depósito naval -STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centraliza a janela no local do hangar. Ctrl+Clique abre uma nova janela no local do hangar +STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do hangar. Ctrl+Clique abre um novo visualizador na localização do hangar ###length VEHICLE_TYPES STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Obtém uma lista de todos os trens com este depósito em suas ordens @@ -4249,22 +4258,22 @@ STR_REPLACE_REMOVE_WAGON_GROUP_HELP :{STRING}. Ctrl+ STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE} ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Centraliza a janela na localização do trem. Clique duplo para seguir o trem. Ctrl+Clique abre uma nova janela na localização do trem -STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Centraliza a janela na localização do veículo. Clique duplo para seguir o veículo. Ctrl+Clique abre uma nova janela na localização do veículo. -STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Centraliza a janela na localização do navio. Clique duplo para seguir o navio. Ctrl+Clique para abrir uma nova janela na localização do navio. +STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Centrar a visualização na localização do trem. Clique duplo para seguir o trem na visualização principal. Ctrl+Clique abre um novo visualizador na localização do trem +STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Centrar a visualização na localização do veículo. Clique duplo seguirá o veículo na visualização principal. Ctrl+Clique abre um novo visualizador na localização do veículo +STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Centrar a visualização principal na localização do navio. Clique duplo seguirá o navio na visualização principal. Ctrl+Clique abre uma nova janela de visualização na localização do navio STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Centraliza a janela na localização da aeronave. Clique duplo para seguir a aeronave. Ctrl+Clique abre uma nova janela na localização da aeronave. ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Enviar trem para o depósito -STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Enviar veículo para a garagem. CTRL+clique irá apenas reparar -STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Enviar embarcação para o depósito. CTRL+clique fará apenas manutenção -STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Enviar aeronave para o hangar +STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Enviar trem para o depósito. Ctrl+Clique fará apenas manutenção +STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Mandar veículo para a garagem. Ctrl+Clique fará apenas manutenção +STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Enviar embarcação para o depósito. Ctrl+clique fará apenas manutenção +STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Enviar aeronave para o hangar. Ctrl+Clique fará apenas manutenção ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Isso irá comprar uma cópia do trem, incluindo todos os vagões. Ctrl+Clique compartilhará as ordens. Shift+Clique mostra preço estimado sem a compra -STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Isso irá comprar uma cópia do automóvel. Ctrl+Clique compartilhará as ordens. Shift+Clique mostra preço estimado sem a compra -STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Isso irá comprar uma cópia da embarcação. Ctrl+Clique compartilhará as ordens. Shift+Clique mostra preço estimado sem a compra -STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Isso irá comprar uma cópia da aeronave. Ctrl+Clique compartilhará as ordens. Shift+Clique mostra preço estimado sem a compra +STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Esta ação comprará uma cópia do comboio, incluindo todos os vagões. Ctrl+Clique irá compartilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar +STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Esta ação comprará uma cópia do veículo. Ctrl+Clique para compartilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar +STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Esta ação comprará uma cópia do navio. Ctrl+Clique para compartilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar +STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Esta ação comprará uma cópia da aeronave. Ctrl+Clique para compartilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Forçar trem a prosseguir sem esperar pelo sinal STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Inverter direção do trem @@ -4335,9 +4344,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Renomear STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Renomear embarcação STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Renomear aeronave -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo de manutenção: {LTBLUE}{CURRENCY_LONG}/ano STR_VEHICLE_INFO_AGE :{COMMA} ano{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ano{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo de manutenção: {LTBLUE}{CURRENCY_LONG}/ano STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Velocidade Max: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Vel. Máx.: {LTBLUE}{VELOCITY} {BLACK}Tipo de aeronave: {LTBLUE}{STRING} @@ -4357,14 +4366,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacida STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transferir Dinheiro: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Intervalo de manutenção: {LTBLUE}{COMMA}{NBSP}dias{BLACK} Última manutenção: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervalo de serviço: {LTBLUE}{COMMA}%{BLACK} Último serviço: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Aumentar intervalo de serviço em 10. Ctrl+Clique aumenta em 5 -STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Reduzir intervalo de serviço em 10. Ctrl+Clique reduz em 5 +STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Diminuir intervalo de serviço por 10. Ctrl+Clique diminui o intervalo de serviço por 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Alterar o tipo de intervalo entre manutenções STR_VEHICLE_DETAILS_DEFAULT :Padrão -STR_VEHICLE_DETAILS_DAYS :Dias STR_VEHICLE_DETAILS_PERCENT :Porcentagem ###length VEHICLE_TYPES @@ -4634,7 +4640,7 @@ STR_TIMETABLE_CLEAR_SPEED :{BLACK}Limpa Li STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Limpar a velocidade máxima de viagem da ordem em destaque. Ctrl+Clique limpa as velocidades para todas as ordens STR_TIMETABLE_RESET_LATENESS :{BLACK}Restabelecer Contador de Atraso -STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Redefina o contador de atrasos, para que o veículo chegue no horário. Ctrl+Clique redefinirá todo o grupo para que o veículo mais recente chegue no horário e todos os outros cheguem mais cedo +STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Limpar o contador de atrasos, para que o veículo fique no horário. Ctrl+Clique para reiniciar todo o grupo para que o veículo mais recente esteja no horário e todos os outros estejam antecipados STR_TIMETABLE_AUTOFILL :{BLACK}Autopreencher STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Preencher o horário automaticamente com os valores da próxima viagem. Ctrl+Clique para tentar manter os tempos de espera diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt index b1c035a59e..91fcaa0a84 100644 --- a/src/lang/bulgarian.txt +++ b/src/lang/bulgarian.txt @@ -228,6 +228,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}м STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}м +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Филтриращ низ: @@ -564,8 +567,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Брой STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Райтинг на представянето на компанията (максимален рейтинг=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Стойност на Компанията + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Заплащане за превоз на товар -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Дни на превоз STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Заплащане на доставени 10 единици (или 10,000 литра) товар на разстояние 20 квадрата STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Пусни всичко STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Изключи всичко @@ -849,7 +852,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Нов { STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Предложението за субсидия изтече:{}{}Превозът на {STRING} от {STRING} до {STRING} повече няма да получава субсидия. STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Анулирана субсидия:{}{}Превозът на {STRING} от {STRING} до {STRING} вече не се субсидира. +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Предложена субсидия:{}{}Първият превоз на {STRING} от {STRING} до {STRING} ще спечели едногодишна субсидия от местните власти! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}{STRING} спечели субсидия!{}{}Превозът на {STRING} от {STRING} до {STRING} ще се заплаща с 50% повече през следващата година! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}{STRING} спечели субсидия!!{}{}Превозът на {STRING} от {STRING} до {STRING} ще се заплаща двойно през следващата година! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}{STRING} спечели субсидия!!{}{}Превозът на {STRING} от {STRING} до {STRING} ще се заплаща тройно през следващата година! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}{STRING} спечели субсидия!!{}{}Превозът на {STRING} от {STRING} до {STRING} ще се заплаща четворно през следващата година! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Хаос на трафика в {TOWN}!{}{}Програмата за пътна реконструкция, финансирана от {STRING}, доведе до 6 месеца мизерия за мотористите! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Монополист на транспорта! @@ -950,6 +958,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Избе STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Допълнителна информация за пакетът базовата музика + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Неуспешно извличане на списък с поддържаните резолюции STR_ERROR_FULLSCREEN_FAILED :{WHITE}Проблем при включване на режим "цял екран" @@ -1299,6 +1310,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Ако тази STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :ПС не губят валидност: {STRING.n} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ако тази опция бъде активирана, всички модели на превозните средства, ще бъдат възможни за производство завинаги +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Автоматично поднови превозното средство, когато остарее: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Ако тази опция бъде активирана, дадено превозно средство ще бъде автоматично заменено когато е към края на своя живот, стига условията за това да са налице @@ -3110,10 +3123,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Затвори # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Субсидии STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Субсидии за превоз на: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} от {STRING} до {STRING}{YELLOW} (от{DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Николко - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Субсидирани превози на: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} от {STRING} до {STRING}{YELLOW} ({COMPANY}{YELLOW}, до {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Натисни върху услугата за да се фокусира върху индустрията/града. Ctrl отваря нов изглед към индустрията/града # Story book window @@ -3707,9 +3718,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Преи STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Наименувай кораба STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Име на самолет -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Години: {LTBLUE}{STRING}{BLACK} Експлоатационни разходи: {LTBLUE}{CURRENCY_LONG}/год. STR_VEHICLE_INFO_AGE :{COMMA} годин{P а и} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} годин{P а и} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Години: {LTBLUE}{STRING}{BLACK} Експлоатационни разходи: {LTBLUE}{CURRENCY_LONG}/год. STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Макс. скорост: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Тегло: {LTBLUE}{WEIGHT_SHORT} {BLACK}Мощност: {LTBLUE}{POWER}{BLACK} Макс. Скорост: {LTBLUE}{VELOCITY} @@ -3726,14 +3737,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Капа STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Сума за преместване: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Дни на обслужване: {LTBLUE}{COMMA}{NBSP}дни{BLACK} Последно облужване: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Интервал на сервиз: {LTBLUE}{COMMA}%{BLACK} Последен сервиз: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Удължава периода за сервиз с 10. Ctrl-click удължава периода за сервиз с 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Намалява периода за сервиз с 10. Ctrl-click намалява периода за сервиз с 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Промяна на сервизният интервал STR_VEHICLE_DETAILS_DEFAULT :По подразбиране -STR_VEHICLE_DETAILS_DAYS :Дни STR_VEHICLE_DETAILS_PERCENT :Процент ###length VEHICLE_TYPES diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt index 4487fdb8a1..6f20ccffca 100644 --- a/src/lang/catalan.txt +++ b/src/lang/catalan.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :El mateix que e STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}cel·les/dia STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}{P nus nusos} STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}cv @@ -256,10 +255,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{G=Masculin}{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}di{P a es} STR_UNITS_SECONDS :{COMMA}{NBSP}segon{P "" s} STR_UNITS_TICKS :{COMMA}{NBSP}tic{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtre: STR_LIST_FILTER_OSKTITLE :{BLACK}Introduïu una o més paraules per a filtrar la llista de @@ -616,8 +618,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unitats STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Ratis de rendiment de la companyia (rati màxim: 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Gràfic del valor de les companyies + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tarifes de pagament de càrregues -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dies en trànsit STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pagament per entregar 10 unitats (o 10.000 litres) de càrrega a una distància de 20 caselles STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Activa-ho tot STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Desactiva-ho tot @@ -1083,6 +1085,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Conjunt STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selecciona el conjunt de peces de música base a utilitzar STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informació addicional sobre el conjunt de peces de música base + + + STR_BASESET_STATUS :{STRING} {RED}(hi ha {NUM} fitxer{P " que fa falta o està corromput" "s que fan falta o estan corromputs"}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}No s'ha pogut obtenir la llista de resolucions permeses @@ -1456,6 +1461,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Quan està acti STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Els vehicles mai caduquen: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Quan està activat, tots els models de vehicles continuen disponibles per sempre després de la seva introducció +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenova el vehicle quan sigui vell: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Quan està activat, un vehicle que arriba al final de la seva vida útil és automàticament substituït quan es compleixen les condicions d'autorenovació. @@ -3654,10 +3661,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Tanca # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvencions STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subvencions per prestació de serveis oferts: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} de {STRING} a {STRING}{YELLOW} (per {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Cap - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Serveis ja subvencionats: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} des de {STRING} fins a {STRING}{YELLOW} ({COMPANY}{YELLOW}, fins a {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Clica al servei per centrar la vista a la indústria/població. Ctrl+Clic obre una nova vista al lloc de la indústria/població # Story book window @@ -4335,9 +4340,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Anomena STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Anomena vaixell STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Anomena avió -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Anys: {LTBLUE}{STRING}{BLACK} Cost d'utilització: {LTBLUE}{CURRENCY_LONG}/any STR_VEHICLE_INFO_AGE :{COMMA} any{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} any{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Anys: {LTBLUE}{STRING}{BLACK} Cost d'utilització: {LTBLUE}{CURRENCY_LONG}/any STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Vel. màx.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Velocitat màx.: {LTBLUE}{VELOCITY} {BLACK}Tipus d'aeronau: {LTBLUE}{STRING} @@ -4357,14 +4362,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacita STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transferir crèdits: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Interval de les revisions: {LTBLUE}{COMMA}{NBSP}dies{BLACK} Darrera revisió: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Interval de les revisions: {LTBLUE}{COMMA}%{BLACK} Darrera revisió: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Augmenta l'interval de les revisions en 10. Ctrl+Clic augmenta l'interval de les revisions en 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Disminueix l'interval de les revisions en 10. Ctrl+Clic disminueix l'interval de les revisions en 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Canvia el tipus d'interval de les revisions STR_VEHICLE_DETAILS_DEFAULT :{G=Masculin}Predeterminat -STR_VEHICLE_DETAILS_DAYS :{G=Masculin}Dies STR_VEHICLE_DETAILS_PERCENT :Percentatge ###length VEHICLE_TYPES diff --git a/src/lang/chuvash.txt b/src/lang/chuvash.txt index fd680f834f..ed847ec190 100644 --- a/src/lang/chuvash.txt +++ b/src/lang/chuvash.txt @@ -167,6 +167,9 @@ STR_UNITS_POWER_SI :{DECIMAL}кВт +# Time units used in string control characters + + # Common window strings @@ -357,6 +360,7 @@ STR_GRAPH_Y_LABEL :{TINY_FONT}{STR STR_GRAPH_Y_LABEL_NUMBER :{TINY_FONT}{COMMA} + STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING} @@ -505,6 +509,9 @@ STR_GAME_OPTIONS_RESOLUTION_OTHER :расна + + + # Custom currency window @@ -642,6 +649,8 @@ STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аэропор +###length 2 + ###length 2 diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index 8c38f759cb..d67d4363b2 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -323,6 +323,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtriraj niz: @@ -670,8 +673,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Dostavlj STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Ocjena učinka tvrtke (najveća ocjena = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Vrijednosti tvrtke + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Isplatne rate tereta -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dana u tranzitu STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Plaćanje za dostavu 10 jedinica (ili 10.000 litara) tereta za udaljenost od 20 kvadrata STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Uključi sve STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Isključi sve @@ -966,7 +969,12 @@ STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP :{BLACK}Otvori p STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Istekla je ponuda za poticaje:{}{}prijevoz {STRING.gen} od {STRING} do {STRING} više neće biti potican STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subvencija je povučena:{}{}prijevoz {STRING.gen} od {STRING} do {STRING} više nije subvencioniran +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Ponuđen je poticaj:{}{}Prvi koji preveze {STRING.aku} od {STRING} do {STRING} primat će jednogodišnji poticaj lokalne samouprave! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Subvencija je dodijeljena tvrtki {STRING}!{}{}Prijevoz {STRING.gen} od postaje {STRING} do postaje {STRING} plaćat će se 50% više sljedećih godinu dana! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Subvencija je dodijeljena tvrtki {STRING}!{}{}Prijevoz {STRING.gen} od postaje {STRING} do postaje {STRING} plaćat će se dvostruko sljedećih godinu dana! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Poticaj je dodijeljen tvrtki {STRING}!{}{}Prijevoz {STRING.gen} od postaje {STRING} do postaje {STRING} plaćat će se trostruko sljedećih godinu dana! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Poticaj je dodijeljen tvrtki {STRING}!{}{}Prijevoz {STRING.gen} od postaje {STRING} do postaje {STRING} plaćat će se četverostruko sljedećih godinu dana! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Grad {TOWN} zahvatio je prometni kaos!{}{}Program rekonstrukcije cesta koji financira tvrtka {STRING} sljedećih će 6 mjeseci zadavati glavobolje motoriziranima! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Monopol transporta! @@ -1073,6 +1081,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Odaberi STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Dodatne informacije o setu osnovne glazbe + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Povlačenje liste podržanih rezolucija nije uspjelo STR_ERROR_FULLSCREEN_FAILED :{WHITE}Prikaz na cijelom zaslonu nije uspio @@ -1424,6 +1435,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Kada je uključ STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vozila ne zastarjevaju: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Kada je uključeno, svi modeli vozila zauvijek ostaju dostupni nakon njihovog uvođenja +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automatski obnovi vozilo kada postane staro: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Kada je uključeno, vozilo kojem se bliži kraj vijeka trajanja se automatski obnavlja ukoliko su uvjeti za obnavljanje ispunjeni @@ -3406,10 +3419,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Zatvori # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvencije STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Ponuđene subvencije za pružanje usluga: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} od {STRING} do {STRING}{YELLOW} (do {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ništa - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Usluge koje su već subvencionirane: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} iz {STRING} prema {STRING}{YELLOW} ({COMPANY}{YELLOW}, do {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikni na uslugu za centriranje pogleda na industriju/grad. Ctrl+klik otvara novi prozor sa lokacijom industrije/grada # Story book window @@ -4053,9 +4064,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Imenuj c STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Imenuj brod STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Imenuj zrakoplov -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Godine: {LTBLUE}{STRING}{BLACK} Trošak uporabe: {LTBLUE}{CURRENCY_LONG}/god STR_VEHICLE_INFO_AGE :{COMMA} godin{P a e a} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} godin{P a e a} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Godine: {LTBLUE}{STRING}{BLACK} Trošak uporabe: {LTBLUE}{CURRENCY_LONG}/god STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Najveća brzina: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maks. brzina: {LTBLUE}{VELOCITY} {BLACK}Vrsta zrakoplova: {LTBLUE}{STRING} @@ -4074,14 +4085,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Nosivost STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Prebaci novac: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servisni interval: {LTBLUE}{COMMA}{NBSP}dana{BLACK} Zadnji servis: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servisni interval: {LTBLUE}{COMMA}%{BLACK} Zadnji servis: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Povećaj servisni interval za 10. Ctrl+klik povećava servisni interval za 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Smanji servisni interval za 10. Ctrl+klik smanjuje servisni interval za 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Izmijeni vrstu servisnog intervala STR_VEHICLE_DETAILS_DEFAULT :Osnovno -STR_VEHICLE_DETAILS_DAYS :Dani STR_VEHICLE_DETAILS_PERCENT :Postotak ###length VEHICLE_TYPES diff --git a/src/lang/czech.txt b/src/lang/czech.txt index bc429c53cb..ec600b118c 100644 --- a/src/lang/czech.txt +++ b/src/lang/czech.txt @@ -276,7 +276,6 @@ STR_COLOUR_SECONDARY_WHITE :Bílá STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}m{P íle íle il}/h STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}políčka/den STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}hp @@ -316,6 +315,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtrovat řetězec: @@ -683,8 +685,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Doručen STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Hodnocení společností (nejvyšší hodnocení je 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Hodnota společností + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Ceny za přepravu nákladu -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Doba přepravy ve dnech STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Platba za doručeni 10 jednotek (nebo 10 000 litru) nákladu do vzdálenosti 20 čtverecků STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Zobraz vše STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Vypni vše @@ -1131,6 +1133,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Vyberte STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Další informace o základním hudebním setu + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nepodařilo se získat seznam podporovaných rozlišení STR_ERROR_FULLSCREEN_FAILED :{WHITE}Selhalo přepnutí na celou obrazovku @@ -1497,6 +1502,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Pokud je zapnut STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vozidlům se nikdy nezastaví výroba ('nezastarají'): {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Pokud je zapnuto, všechny modely vlaků zůstanou po uvedení dostupné napořád. (nezastarají) +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automaticky nahradit dopravní prostředek, když zestárne: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Pokud je zapnuto, vozidla na konci své plánované životnosti budou automaticky nahrazena, když jsou splněny podmínky pro automatické obnovení. @@ -3648,10 +3655,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Zavřít # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Dotace STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Nabídnuté dotace pro službu: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING.big} z{NBSP}{STRING.gen} do {STRING.gen}{YELLOW} (do {DATE_SHORT.gen}) STR_SUBSIDIES_NONE :{ORANGE}- Nic - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Již přiznané dotace: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING.big} z{NBSP}{STRING.gen} do {STRING.gen}{YELLOW} ({COMPANY}{YELLOW}, do {DATE_SHORT.gen}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Kliknutím na dotaci zaměříš pohled na průmysl/město. Při stisknutém Ctrl otevřeš nový pohled # Story book window @@ -4327,9 +4332,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Pojmenov STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Pojmenovat loď STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Pojmenovat letadlo -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Stáří: {LTBLUE}{STRING}{BLACK} Cena provozu: {LTBLUE}{CURRENCY_LONG} ročně STR_VEHICLE_INFO_AGE :{COMMA} {P rok roky let} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} {P rok roky let} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Stáří: {LTBLUE}{STRING}{BLACK} Cena provozu: {LTBLUE}{CURRENCY_LONG} ročně STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. rychlost: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. rychlost: {LTBLUE}{VELOCITY} {BLACK}Typ letadla: {LTBLUE}{STRING} @@ -4349,14 +4354,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapacita STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Podíl za převoz: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Interval servisů: {LTBLUE}{COMMA}{NBSP}d{P en ny ní}{BLACK} Naposledy v servisu: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Interval servisů: {LTBLUE}{COMMA}%{BLACK} Naposledy v servisu: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Prodloužit interval servisů o 10. S Ctrl prodloužit o 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Zkrátit interval servisů o 10. S Ctrl zkrátit o 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Změnit typ servisního intervalu STR_VEHICLE_DETAILS_DEFAULT :Defaultní -STR_VEHICLE_DETAILS_DAYS :Dnů STR_VEHICLE_DETAILS_PERCENT :Procent ###length VEHICLE_TYPES diff --git a/src/lang/danish.txt b/src/lang/danish.txt index defc099a3e..73f2ce62ab 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Samme som Prim STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL} miles/t STR_UNITS_VELOCITY_METRIC :{DECIMAL} km/t STR_UNITS_VELOCITY_SI :{DECIMAL} m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}felter/dag STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knob STR_UNITS_POWER_IMPERIAL :{DECIMAL}hk @@ -255,10 +254,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} fod STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}dag{P "" s} STR_UNITS_SECONDS :{COMMA}{NBSP}sekund{P "" er} STR_UNITS_TICKS :{COMMA}{NBSP}tick{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtrer udtryk: STR_LIST_FILTER_OSKTITLE :{BLACK}Indtast filterstreng @@ -615,8 +617,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Aflevere STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Selskabets præstationsrang (maksimal rang=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Selskabsværdier + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Lastudbetalingsrater -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Antal dage undervejs STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Betaling for at transportere 10 enheder (eller 10,000 liter) last en distance på 20 enheder. STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Slå alt til STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Slå alt fra @@ -1082,6 +1084,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Basis-mu STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Vælg basismusik-sæt STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Yderligere information om basismusik-sættet + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} manglende/beskadiget fil{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Det lykkedes ikke at hente en liste over understøttede opløsninger @@ -1455,6 +1460,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Når aktiveret, STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Køretøjernes levealder udløber aldrig: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Når aktiveret, forbliver alle biltyper tilgængelige for evigt efter indførelse +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automatisk fornyelse af gamle køretøjer: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Når aktiveret, bliver et køretøjder nærmer sig sin afslutning af livet automatisk udskiftet, når betingelserne er opfyldt @@ -3653,10 +3660,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Luk # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Tilskudsordninger STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Tilskudsordninger i licitation: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} fra {STRING} til {STRING}{YELLOW} (inden {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ingen - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Tilskudsordninger der allerede er vundet: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} fra {STRING} til {STRING}{YELLOW} ({COMPANY}{YELLOW}, indtil {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik på servicen for at centrere skærmen over industrien/byen. Ctrl+Klik åbner et nyt vindue ved industriens/byens lokalitet. # Story book window @@ -4334,9 +4339,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Giv kør STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Giv skibet et navn STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Navngiv flyet -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftsomkostninger: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_AGE :{COMMA} år ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} år ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftsomkostninger: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Maks. hast.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. hastighed: {LTBLUE}{VELOCITY} {BLACK}Fly type: {LTBLUE}{STRING} @@ -4356,14 +4361,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapacite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Værdi af overført fragt: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Serviceinterval: {LTBLUE}{COMMA}dage{BLACK} Sidste service: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Serviceinterval: {LTBLUE}{COMMA}%{BLACK} Sidste service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Forøg serviceintervallet med 10. Ctrl+Klik forøger serviceintervallet med 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Sænk serviceintervallet med 10. Ctrl+Klik nedsætter serviceintervallet med 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Ændre serviceintervallets type STR_VEHICLE_DETAILS_DEFAULT :Standard -STR_VEHICLE_DETAILS_DAYS :Dage STR_VEHICLE_DETAILS_PERCENT :Procent ###length VEHICLE_TYPES diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt index 2505e8f216..1aafbe39d9 100644 --- a/src/lang/dutch.txt +++ b/src/lang/dutch.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Zelfde als prim STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/u STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}tegels/dag STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knopen STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}pk @@ -255,10 +254,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}dag{P "" en} STR_UNITS_SECONDS :{COMMA}{NBSP}seconde{P "" n} STR_UNITS_TICKS :{COMMA}{NBSP}tik{P "" ken} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: STR_LIST_FILTER_OSKTITLE :{BLACK}Voer een of meer woorden in waarop de lijst wordt gefilterd @@ -615,8 +617,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Aantal e STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Bedrijfsprestatiescore (maximale score = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Grafiek bedrijfswaarde + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Vrachtprijzen -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dagen onderweg STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Betaling voor het leveren van 10 eenheden (of 10.000 liter) vracht over een afstand van 20 vakjes STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Alles aan STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Alles uit @@ -1078,6 +1080,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Basisset STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selecteer de te gebruiken basisset voor muziek STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Aanvullende informatie over the basisset voor muziek + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} {P "ontbrekend/beschadigd bestand" "ontbrekende/beschadigde bestanden"}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Mislukt om een lijst met ondersteunde resoluties op te halen @@ -1451,6 +1456,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Wanneer ingesch STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Voertuigen verlopen niet: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Wanneer ingeschakeld, alle voertuig modellen blijven voor altijd beschikbaar na hun introductie +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Voertuig automatisch vernieuwen wanneer dit oud wordt: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Wanneer ingeschakeld, wordt een voertuig dat het einde van zijn levensduur nadert automatisch vervangen als aan de voorwaarden voor vernieuwing wordt voldaan @@ -3649,10 +3656,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Sluiten # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidies STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Beschikbare subsidies: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} van {STRING} naar {STRING}{YELLOW} (voor {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE} Geen STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Bestaande subsidies: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} van {STRING} naar {STRING}{YELLOW} ({COMPANY}{YELLOW}, tot {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik op de dienst om het dorp/industrie te centreren. Ctrl+klik opent een nieuw venster op de locatie van het dorp/industrie # Story book window @@ -4330,9 +4335,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Wegvoert STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Schip hernoemen STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Vliegtuig hernoemen -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Leeftijd: {LTBLUE}{STRING}{BLACK} Gebruikskosten: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_AGE :{COMMA} ja{P ar ren} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ja{P ar ren} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Leeftijd: {LTBLUE}{STRING}{BLACK} Gebruikskosten: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max.snelheid: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max.snelheid: {LTBLUE}{VELOCITY} {BLACK}Vliegtuigtype: {LTBLUE}{STRING} @@ -4352,14 +4357,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Geldoverdracht: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Onderhoudstermijn: {LTBLUE}{COMMA}{NBSP}dagen{BLACK} Laatste onderhoud: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Onderhoudstermijn: {LTBLUE}{COMMA}%{BLACK} Laatste onderhoud: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Onderhoudstermijn met 10 verlengen. Ctrl+klik verlengt termijn met 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Onderhoudstermijn met 10 verkorten. Ctrl+klik verkort termijn met 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Wijzig onderhoudsintervaltype STR_VEHICLE_DETAILS_DEFAULT :Standaard -STR_VEHICLE_DETAILS_DAYS :Dagen STR_VEHICLE_DETAILS_PERCENT :Percentage ###length VEHICLE_TYPES diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index 79749d427b..6257a72c87 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Same As Primary STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}tiles/day STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knots STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -255,10 +254,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}day{P "" s} STR_UNITS_SECONDS :{COMMA}{NBSP}second{P "" s} STR_UNITS_TICKS :{COMMA}{NBSP}tick{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: STR_LIST_FILTER_OSKTITLE :{BLACK}Enter one or more keywords to filter the list for @@ -615,8 +617,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Units of STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Company performance ratings (maximum rating=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Company Value Graph + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cargo Payment Rates -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Days in transit STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Payment for delivering 10 units (or 10,000 litres) of cargo a distance of 20 squares STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Enable all STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Disable all @@ -1082,6 +1084,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Base mus STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Select the base music set to use STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Additional information about the base music set + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} missing/corrupted file{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Failed to retrieve a list of supported resolutions @@ -1455,6 +1460,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicles never expire: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :When enabled, all vehicle models remain available forever after their introduction +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenew vehicle when it gets old: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :When enabled, a vehicle nearing its end of life gets replaced automatically when the renew conditions are fulfilled @@ -3653,10 +3660,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Close # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidies STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidies on offer for services taking: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} from {STRING} to {STRING}{YELLOW} (by {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- None - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidised: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING} to {STRING}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click to open a new viewport on industry/town location # Story book window @@ -4334,9 +4339,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Name roa STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Name ship STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Name aircraft -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Age: {LTBLUE}{STRING}{BLACK} Running Cost: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_AGE :{COMMA} year{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} year{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Age: {LTBLUE}{STRING}{BLACK} Running Cost: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. speed: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. speed: {LTBLUE}{VELOCITY} {BLACK}Aircraft type: {LTBLUE}{STRING} @@ -4356,14 +4361,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacity STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer Credits: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} Last service: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} Last service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by 10. Ctrl+Click to increase servicing interval by 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by 10. Ctrl+Click to decrease servicing interval by 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type STR_VEHICLE_DETAILS_DEFAULT :Default -STR_VEHICLE_DETAILS_DAYS :Days STR_VEHICLE_DETAILS_PERCENT :Percentage ###length VEHICLE_TYPES diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index 5091b63231..28b81ba7fa 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Same As Primary STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}tiles/day STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knots STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -255,10 +254,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}day{P "" s} STR_UNITS_SECONDS :{COMMA}{NBSP}second{P "" s} STR_UNITS_TICKS :{COMMA}{NBSP}tick{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: STR_LIST_FILTER_OSKTITLE :{BLACK}Enter one or more keywords to filter the list for @@ -615,8 +617,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Units of STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Company performance ratings (maximum rating=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Company Value Graph + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cargo Payment Rates -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Days in transit STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Payment for delivering 10 units (or 10,000 liters) of cargo a distance of 20 squares STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Enable all STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Disable all @@ -1082,6 +1084,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Base mus STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Select the base music set to use STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Additional information about the base music set + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} missing/corrupted file{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Failed to retrieve a list of supported resolutions @@ -1455,6 +1460,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicles never expire: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :When enabled, all vehicle models remain available forever after their introduction +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenew vehicle when it gets old: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :When enabled, a vehicle nearing its end of life gets automatically replaced when the renew conditions are fulfilled @@ -3653,10 +3660,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Close # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidies STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidies on offer for services taking: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} from {STRING} to {STRING}{YELLOW} (by {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- None - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidized: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING} to {STRING}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to center main view on industry/town. Ctrl+Click to open a new viewport on industry/town location # Story book window @@ -4334,9 +4339,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Name roa STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Name ship STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Name aircraft -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Age: {LTBLUE}{STRING}{BLACK} Running Cost: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_AGE :{COMMA} year{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} year{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Age: {LTBLUE}{STRING}{BLACK} Running Cost: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. speed: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. speed: {LTBLUE}{VELOCITY} {BLACK}Aircraft type: {LTBLUE}{STRING} @@ -4356,14 +4361,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacity STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer Credits: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Maintenance interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} Last maintenance: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Maintenance interval: {LTBLUE}{COMMA}%{BLACK} Last maintenance: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase maintenance interval by 10. Ctrl+Click to increase maintenance interval by 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease maintenance interval by 10. Ctrl+Click to decrease maintenance interval by 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type STR_VEHICLE_DETAILS_DEFAULT :Default -STR_VEHICLE_DETAILS_DAYS :Days STR_VEHICLE_DETAILS_PERCENT :Percentage ###length VEHICLE_TYPES diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt index 66750d936d..a4d8d271bb 100644 --- a/src/lang/esperanto.txt +++ b/src/lang/esperanto.txt @@ -275,8 +275,6 @@ STR_COLOUR_RANDOM :Hazarda STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}kaheloj tage -STR_UNITS_VELOCITY_GAMEUNITS.n :{DECIMAL}{NBSP}kahelojn tage STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knotoj STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}ĉp @@ -321,6 +319,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtroteksto: @@ -673,8 +674,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Kiom da STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Kompania rendimento (maksimumo=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Kompaniaj valoroj + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Ŝarĝpagaj Tarifoj -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Tagoj en transporto STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pago por liveri 10 unuojn (aŭ 10,000 litrojn) da ŝarĝo trans 20 kvadratoj STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Aktivu ĉiujn STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Malaktivu ĉiujn @@ -1122,6 +1123,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Elekti b STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Pluaj informoj pri la baza muzikaro. + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Ne eblis akiri liston de subtenataj distingivoj STR_ERROR_FULLSCREEN_FAILED :{WHITE}Plenekrana moduso fiaskis @@ -1481,6 +1485,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Kiam tiu ĉi ag STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Veturiloj neniam eluziĝas: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Se tiu ĉi agordo estas aktiva, ĉiuj modeloj de veturiloj restos aĉeteblaj por ĉiam post ekhaveblo +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Aŭtomate anstataŭu veturilon se malnoviĝas: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Se tiu ĉi agordo estas aktiva, veturilo kiu alproksimiĝas al la fino de sia vivdaŭro estos aŭtomate anstataŭigita kiam la renovigkondiĉoj estas plenumitaj @@ -3534,10 +3540,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Fermu # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvencioj STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subvencioj haveblas por jenaj servoj: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} de {STRING} al {STRING}{YELLOW} (antaŭ {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Neniu - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Servoj subvenciataj: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} de {STRING} al {STRING}{YELLOW} ({COMPANY}{YELLOW}, ĝis {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klaku servon por centri vidpunkto ĉe la industrio/urbo. Ctrl+Klak por malfermi novan vidujon ĉe la loko # Story book window @@ -4204,9 +4208,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nomi str STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nomu ŝipon STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nomu aviadilon -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aĝo: {LTBLUE}{STRING}{BLACK} Irkosto: {LTBLUE}{CURRENCY_LONG}/jaro STR_VEHICLE_INFO_AGE :{COMMA} jaro{P "" j} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} jaro{P "" j} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aĝo: {LTBLUE}{STRING}{BLACK} Irkosto: {LTBLUE}{CURRENCY_LONG}/jaro STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Maks. rapido: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maks. rapideco: {LTBLUE}{VELOCITY} {BLACK}Tipo de aviadilo: {LTBLUE}{STRING} @@ -4226,14 +4230,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Enhaveco STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transigaj Kreditoj: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Prizorga intervalo: {LTBLUE}{COMMA}{NBSP}tagoj{BLACK} Plej malfrua prizorgo: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Prizorga intervalo: {LTBLUE}{COMMA}%{BLACK} Lasta prizorgo: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Multoblas prizorgintervalon po 10. Ctrl+klak multoblas prizorgintervalon po 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Malpliigu prizorgintervalon po 10. Ctrl-klak malpliigas prizorgintervalon po 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Ŝanĝi la tipo de servon intervalon STR_VEHICLE_DETAILS_DEFAULT :Defaŭlto -STR_VEHICLE_DETAILS_DAYS :Tagoj STR_VEHICLE_DETAILS_PERCENT :Procentaĵo ###length VEHICLE_TYPES diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt index d906dbcae5..6e4dfa5066 100644 --- a/src/lang/estonian.txt +++ b/src/lang/estonian.txt @@ -254,7 +254,6 @@ STR_COLOUR_RANDOM :Suvaline STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL} miili tunnis STR_UNITS_VELOCITY_METRIC :{DECIMAL} km/h STR_UNITS_VELOCITY_SI :{DECIMAL} m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}ruutu/päev STR_UNITS_POWER_IMPERIAL :{DECIMAL}hj STR_UNITS_POWER_METRIC :{DECIMAL}hj @@ -294,6 +293,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} meete STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Märksõna: @@ -649,8 +651,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Äraveet STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Ettevõtte tegevushinnang (suurim hinnang saab olla 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Firmaväärtused + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Veotariifid -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Teelolekuaeg päevades STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Tasu 10 ühiku (või 10 000 liitri) kauba äraveo eest üle 20 ruudu STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Kõik sisse STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Kõik välja @@ -1082,6 +1084,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Valib ka STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Rohkem teavet lähtemuusikakogu kohta + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Ei õnnestunud tuvastada toetatud resulutsioone STR_ERROR_FULLSCREEN_FAILED :{WHITE}Täisekraanrežiim ebaõnnestus @@ -1447,6 +1452,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Kui on aktiveer STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Sõidukid ei aegu: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Kui on aktiveeritud, siis jäävad kõik sõidukite tüübid igavesti avatuks +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Vananenud sõidukite uuendamine: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Kui on sisse lülitatud, siis uuendatalse kõik kasutusaja lõpu lähedal olevad sõidukid automaatselt, järgides uuendamise tingimusi @@ -3579,10 +3586,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Sulge # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Toetused STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Pakutavad toetused teenusepakkumise eest: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} kohast {STRING} kohta {STRING}{YELLOW} (kuni {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}Mitte ühtegi STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Juba toetatavad veoteenused: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} kohast {STRING} kohta {STRING}{YELLOW} ({COMPANY}{YELLOW}, kuni {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Vajuta pakkumisele, et keskendada vaade tööstusele/asustusele. Ctrl+klõps avab uue vaate ettevõtte/asustuse asukohas # Story book window @@ -4254,9 +4259,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nimeta m STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nimeta laev STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nimeta õhusõiduk -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vanus: {LTBLUE}{STRING}{BLACK} Käituskulud: {LTBLUE}{CURRENCY_LONG}/a STR_VEHICLE_INFO_AGE :{COMMA} aasta{P "" t} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} aasta{P "" t} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vanus: {LTBLUE}{STRING}{BLACK} Käituskulud: {LTBLUE}{CURRENCY_LONG}/a STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Tippkiirus: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Tippkiirus: {LTBLUE}{VELOCITY} {BLACK}Õhusõiduki liik: {LTBLUE}{STRING} @@ -4276,14 +4281,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kandevõ STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Ülekantud tulu: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Hooldusvälp: {LTBLUE}{COMMA}päeva{BLACK} Viimati hooldatud: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Hooldusvälp: {LTBLUE}{COMMA}%{BLACK} Viimati hooldatud: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Suurenda hooldusvahemiku 10 võrra. Ctrl-klahviga suurendatakse hooldusvahemiku 5 võrra. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Vähenda hooldusvahemiku 10 võrra. Ctrl+Klõps vähendab hooldusvahemikku 5 võrra. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Muuda hooldusvälba liiki STR_VEHICLE_DETAILS_DEFAULT :Esialgne -STR_VEHICLE_DETAILS_DAYS :Päevad STR_VEHICLE_DETAILS_PERCENT :Protsendid ###length VEHICLE_TYPES diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt index 0016999e76..5a13672e05 100644 --- a/src/lang/faroese.txt +++ b/src/lang/faroese.txt @@ -219,6 +219,9 @@ STR_UNITS_FORCE_SI :{DECIMAL} kN STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ft STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtur strong: @@ -541,8 +544,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Eindir a STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Avriks meting av fyritøku (hægsta meting=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Virðir hjá fyritøku + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Farma gjald takstur -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dagar á ferð STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Útgjald fyri útflyggjan av 10 eindum (ella 10,000 litrum) av farmi við fjarstøðu av 20 puntum STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Gilda alt STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Ógilda alt @@ -823,7 +826,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nýtt {S STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Tilboð um stuðul útgingi:{}{}{STRING} frá {STRING} til {STRING} fær nú ongan stuðul STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Stuðul tikin aftur:{}{}{STRING} flutningur frá {STRING} til {STRING} er ikki stuðla longur +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Tilboð um flutnings stuðul:{}{}Fyrsti {STRING} flutningur frá {STRING} til {STRING} fær stuðul í eitt ár frá mynduleikanum á staðnum! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Flutnings stuðul handaður {STRING}!{}{}{STRING} flutningur frá {STRING} til {STRING} gevur 50% eyka úrtøku í eitt ár! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Flutnings stuðul handaður {STRING}!{}{}{STRING} flutningur frá {STRING} til {STRING} hevur tvífaldaða úrtøku í eitt ár! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Flutnings stuðul handaður {STRING}!{}{}{STRING} flutningur frá {STRING} til {STRING} hevur trýfaldaða úrtøku í eitt ár! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Flutnings stuðul handaður {STRING}!{}{}{STRING} flutningur frá {STRING} til {STRING} hevur ferfaldaða úrtøku í eitt ár! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Ferðslu ruðuleiki í {TOWN}!{}{}Umvæling av vega kervi fíggja av {STRING} førir við sær 6 mánaðir av neyð fyri bilførarar! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Flutnings einahandil! @@ -922,6 +930,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Vel ta b STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Meira kunning um base tónleika setti + + + STR_ERROR_FULLSCREEN_FAILED :{WHITE}Eydnaðist ikki at brúka fullan skerm # Custom currency window @@ -1255,6 +1266,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Um gilda, fær STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Flutningstól ganga ongantíð út: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Um gilda, eru øll sløg av flutningstólum altíð tøk eftir tey eru komin í nýtslu +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Sjálvendurnýggja flutningstól tá ta gerst gamalt: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Um gilda, verður eitt flutningstól tá tað nærkast endanum á sínum lívi sjálvirkandi umbýtt tá endurnýggjanar treytirnar eru nøktaðar @@ -2826,10 +2839,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Lat aftur # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Stuðulsflutningur STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Stuðulsflutningur í boði fyri tænastur ið flyta: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} frá {STRING} til {STRING}{YELLOW} (áðrenn {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Einki - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Flutningur ið longu fær stuðul: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} frá {STRING} til {STRING}{YELLOW} ({COMPANY}{YELLOW}, inntil {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Trýst á eina tænastu fyri at savna høvuðs sýni á ídnaðin/bygdina. Ctrl+trýst letur upp ein nýggjan sýnisglugga á ídnaðin/bygdina # Story book window @@ -3340,9 +3351,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Gev akfa STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Gev skipinum eitt navn STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Gev flogfarinum eitt navn -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aldur: {LTBLUE}{STRING}{BLACK} Rakstrar kostnaður: {LTBLUE}{CURRENCY_LONG}/ár STR_VEHICLE_INFO_AGE :{COMMA} ár ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ár ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aldur: {LTBLUE}{STRING}{BLACK} Rakstrar kostnaður: {LTBLUE}{CURRENCY_LONG}/ár STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Maks. ferð: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Vekt: {LTBLUE}{WEIGHT_SHORT} {BLACK}Megi: {LTBLUE}{POWER}{BLACK} Maks. ferð: {LTBLUE}{VELOCITY} @@ -3359,14 +3370,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Pláss: STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Umskipanar góðskriving: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Eftilits títtleiki: {LTBLUE}{COMMA}dagar{BLACK} Síðsta eftirlit: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Eftirlits títtleiki: {LTBLUE}{COMMA}%{BLACK} Síðsta eftirlit: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Vaks eftirlits títtleika vi 10. Ctrl+trýst vaksir eftirlits títtleika vi 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Minka eftirlits títtleika vi 10. Ctrl+trýst minkar eftirlits títtleika vi 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Broyt eftirlits interval typu STR_VEHICLE_DETAILS_DEFAULT :Vanligt -STR_VEHICLE_DETAILS_DAYS :Dagar STR_VEHICLE_DETAILS_PERCENT :Prosent ###length VEHICLE_TYPES diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index 2f8895e397..53c79f71a7 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Sama kuin ensis STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}ruutua/vrk STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}solmua STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hv @@ -255,10 +254,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}vrk STR_UNITS_SECONDS :{COMMA}{NBSP}sekunti{P "" a} STR_UNITS_TICKS :{COMMA}{NBSP}räpäys{P "" tä} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Suodatin: STR_LIST_FILTER_OSKTITLE :{BLACK}Syötä yksi tai useampi avainsana listan suodattamiseksi @@ -615,8 +617,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Rahtia k STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Yhtiön suoritearvio (enimmäisarvio=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Yhtiöiden arvot kuvaajana + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Rahtitaksat -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Päivää kauttakulussa STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Maksu 10 yksikön (tai 10 000 litran) rahdin kuljettamisesta 20 ruudun päähän STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Ota kaikki käyttöön STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Poista kaikki käytöstä @@ -1082,6 +1084,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Musiikki STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Valitse käytettävä musiikkipaketti STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Lisätietoja musiikkipaketista + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} puuttuvaa tai vioittunutta tiedosto{P "" a}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Tuettujen näyttötarkkuuksien hakeminen epäonnistui @@ -1455,6 +1460,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Mikäli käytö STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Kulkuneuvot eivät vanhene: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Mikäli käytössä, kaikki kulkuneuvot ovat saatavilla ikuisesti niiden julkistamisen jälkeen +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Uudista kulkuneuvo automaattisesti, kun se vanhenee: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Mikäli käytössä, lähellä käyttöikänsä loppua oleva kulkuneuvo korvataan automaattisesti @@ -2731,7 +2738,7 @@ STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Rakenna STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Rakenna veturitalli (junien ostamista ja huoltoa varten). Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Rakenna reittipiste rautatielle. Ctrl mahdollistaa reittipisteiden yhdistämisen. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Rakenna rautatieasema. Ctrl liittää asemat. Shift vaihtaa rakennustilan ja kustannusarvion välillä -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Rakenna opastin rautatielle. Ctrl vaihtaa siipi- ja valo-opastimien välillä{}Vetäminen rakentaa opastimia suoralle rataosuudelle. Ctrl rakentaa opastimia seuraavaan risteykseen tai opastimeen saakka{}Ctrl+napsautus avaa opastimenvalintaikkunan. Shift vaihtaa rakennustilan ja kustannusarvion välillä +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Rakenna opastin rautatielle. Ctrl+napsautus rakentaa vaihtoehtoista opastintyyliä{}Ctrl+veto täyttää valitun rataosuuden opastimilla määrätyin välein. Ctrl+napsautus+veto täyttää seuraavaan risteykseen, asemaan tai opastimeen asti. Paina lisäksi Shiftiä nähdäksesi vain kustannusarvion STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Rakenna rautatiesilta. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Rakenna rautatietunneli. Shift vaihtaa rakennustilan ja kustannusarvion välillä STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Rautatien, opastimien, reittipisteiden ja asemien rakentaminen/poisto päälle/pois. Pidä pohjassa Ctrl-näppäintä poistaaksesi myös aseman tai reittipisteen alla olevat raiteet @@ -3653,10 +3660,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Sulje # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Tuet STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Tarjotut tuet: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} välille {STRING}-{STRING}{YELLOW} ({DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ei mitään - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Käytetyt tuet: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} välille {STRING}-{STRING}{YELLOW} ({COMPANY}{YELLOW}, {DATE_SHORT} asti) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Napsauta kuljetusyhteyttä keskittääksesi päänäkymän laitokseen/kuntaan. Ctrl+napsautus avaa uuden näkymäikkunan laitoksen/kunnan sijaintiin. # Story book window @@ -4334,9 +4339,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nimeä a STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nimeä laiva STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nimeä ilma-alus -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ikä: {LTBLUE}{STRING}{BLACK} Käyttökustannukset: {LTBLUE}{CURRENCY_LONG}/v STR_VEHICLE_INFO_AGE :{COMMA} vuo{P si tta} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} vuo{P si tta} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ikä: {LTBLUE}{STRING}{BLACK} Käyttökustannukset: {LTBLUE}{CURRENCY_LONG}/v STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Huippunopeus: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Huippunopeus: {LTBLUE}{VELOCITY} {BLACK}Ilma-alustyyppi: {LTBLUE}{STRING} @@ -4356,14 +4361,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapasite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Siirron arvo: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Huoltoväli: {LTBLUE}{COMMA}{NBSP}päivää{BLACK} Viimeisin huolto: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Huoltoväli: {LTBLUE}{COMMA}{NBSP}%{BLACK} Viime huolto: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Kasvata huoltoväliä kymmenellä. Ctrl+napsautus kasvattaa huoltoväliä viidellä. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Pienennä huoltoväliä kymmenellä. Ctrl+napsautus pienentää huoltoväliä viidellä. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Muuta huoltovälien tyyppiä STR_VEHICLE_DETAILS_DEFAULT :Oletus -STR_VEHICLE_DETAILS_DAYS :Päiviä STR_VEHICLE_DETAILS_PERCENT :Prosentteja ###length VEHICLE_TYPES diff --git a/src/lang/french.txt b/src/lang/french.txt index 5bcef7310e..e896581111 100644 --- a/src/lang/french.txt +++ b/src/lang/french.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Identique à la STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}cases/jour STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}nœuds STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -256,10 +255,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}jour{P "" s} STR_UNITS_SECONDS :{COMMA}{NBSP}seconde{P "" s} STR_UNITS_TICKS :{COMMA}{NBSP}tick{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtre{NBSP}: STR_LIST_FILTER_OSKTITLE :{BLACK}Entrer un ou plusieurs mot-clés pour filtrer la liste @@ -371,31 +373,31 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Mettre l STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Avance rapide du jeu STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Options et paramètres STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Sauvegarder, charger ou abandonner une partie, quitter le programme -STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Afficher la mini-carte, vue supplémentaire, le flux des marchandises ou la liste des panneaux -STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Afficher l'annuaire des villes -STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Afficher les subventions -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Afficher la liste des stations de la compagnie -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Afficher les informations financières -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Afficher les informations générales -STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Afficher le livre d'histoire -STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Afficher la liste des objectifs -STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Afficher les graphiques de compagnie et les valeurs des marchandises -STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Afficher le tableau de classement des compagnies -STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Examiner les industries ou financer la construction de nouvelles industries -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Afficher la liste des trains de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Afficher la liste des véhicules routiers de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Afficher la liste des navires de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Afficher la liste des aéronefs de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) +STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Ouvrir la mini-carte, vue supplémentaire, le flux des marchandises ou la liste des panneaux +STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Ouvrir l'annuaire des villes ou fonder une ville +STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Ouvrir la liste des subventions +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Ouvrir la liste des stations de la compagnie +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Ouvrir les informations financières +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Ouvrir les informations générales de la compagnie +STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Ouvrir le livre d'histoire +STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Ouvrir la liste des objectifs +STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Ouvrir les graphiques de compagnie et les valeurs des marchandises +STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Ouvrir le tableau de classement des compagnies +STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Ouvrir l'annuaire des industries, les chaînes des industries, ou financer la construction de nouvelles industries +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Ouvrir la liste des trains de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Ouvrir la liste des véhicules routiers de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Ouvrir la liste des navires de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Ouvrir la liste des aéronefs de la compagnie. Ctrl-clic pour ouvrir dans l'autre mode (avancé/normal) STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom avant STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom arrière -STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construction ferroviaire +STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construction d'infrastructures ferroviaires STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Construction routière STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Construction de tramways STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Construction navale STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Construction aéronautique -STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Ouvrir la barre d'outils de terraformation pour relever/abaisser du terrain, planter des arbres, etc. -STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Options son et musique -STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Afficher le dernier message/bulletin, l'historique des messages ou supprimer tous les messages +STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Ouvrir la barre d'outils de terraformation, le menu des arbres, ou placer un panneau +STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Ouvrir la fenêtre son et musique +STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Ouvrir le dernier message/bulletin, l'historique des messages ou supprimer tous les messages STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Outils d'inspection du paysage, copies d'écran, à propos d'OpenTTD et outils pour développeurs STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Changer de barre d'outils @@ -406,8 +408,8 @@ STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Éditeu STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Reculer la date de départ d'un an STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Avancer la date de départ d'un an STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Cliquer pour saisir l'année de départ -STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Afficher la carte, l'annuaire des villes -STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Création du terrain +STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Ouvrir la carte, vue supplémentaire, la liste des panneaux, ou l'annuaire des villes ou des industries +STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Ouvrir le menu de terraformation ou générer une nouvelle carte STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Création des villes STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Création des industries STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Construction routière @@ -616,8 +618,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Cargaiso STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Historique de performance (performance max. = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Graphique de la valeur de la compagnie + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Valeur des marchandises -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Jours de transit STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Prix payé pour livrer 10 unités (ou 10{NBSP}000 litres) à 20 carrés de distance STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Activer tout STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Désactiver tout @@ -1083,6 +1085,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Musique STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Sélectionner la musique de base à utiliser STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informations additionnelles sur la musique de base + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} fichier{P "" s} manquant{P "" s}/corrompu{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Échec de la récupération de la liste des résolutions prises en charge @@ -1335,7 +1340,7 @@ STR_CONFIG_SETTING_FORBID_90_DEG :Interdire aux t STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Les virages à 90° se produisent lorsqu'une voie horizontale est directement suivie par une voie verticale, impliquant que le train tourne de 90° en traversant la bordure de la case au lieu des 45° habituels pour les autres combinaisons de voies. STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Permettre de joindre des stations non adjacentes{NBSP}: {STRING} -STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Autoriser l'ajout à une station de morceaux ne touchant pas directement les morceaux existants. Un Ctrl-clic est requis pour placer les nouveaux morceaux. +STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Autoriser l'ajout à une station de morceaux ne touchant pas directement les morceaux existants, en utilisant Ctrl lors du placement des nouveaux morceaux. STR_CONFIG_SETTING_INFLATION :Inflation{NBSP}: {STRING} STR_CONFIG_SETTING_INFLATION_HELPTEXT :Activer l'inflation dans l'économie, où les coûts augmentent légèrement plus vite que les revenus. @@ -1456,6 +1461,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Quand il est ac STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Les véhicules n'expirent jamais{NBSP}: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Quand il est actif, tous les modèles de véhicule restent disponibles pour toujours après leur introduction +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Renouveler automatiquement les véhicules vieillissants{NBSP}: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Quand il est actif, un véhicule approchant de la fin de sa durée de vie est automatiquement remplacé quand les conditions du renouvellement sont remplies @@ -2148,14 +2155,14 @@ STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Sélecti STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Sélectionner l'environnement «{NBSP}Tropical{NBSP}» STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Sélectionner l'environnement «{NBSP}Monde{NBSP}des{NBSP}Jouets{NBSP}» -STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Afficher les options du jeu -STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Afficher le tableau des meilleurs scores +STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Ouvrir les options du jeu +STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Ouvrir le tableau des meilleurs scores STR_INTRO_TOOLTIP_HELP :{BLACK}Accéder à la documentation et aux ressources en ligne -STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Afficher les paramètres -STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Afficher la configuration des NewGRF +STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Ouvrir les paramètres +STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Ouvrir la configuration des NewGRF STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Vérifier les contenus nouveaux ou mis à jour téléchargeables -STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Afficher la configuration des IAs -STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Afficher la configuration du script de jeu +STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Ouvrir la configuration des IAs +STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Ouvrir la configuration du script de jeu STR_INTRO_TOOLTIP_QUIT :{BLACK}Quitter OpenTTD STR_INTRO_BASESET :{BLACK}{NUM} sprite{P "" s} manque{P "" "nt"} dans les graphiques de base actuellement sélectionnés. Veuillez vérifier les mises à jours pour les graphiques de base. @@ -2213,8 +2220,8 @@ STR_LIVERY_TRAIN_GROUP_TOOLTIP :{BLACK}Afficher STR_LIVERY_ROAD_VEHICLE_GROUP_TOOLTIP :{BLACK}Afficher les couleurs des groupes de véhicules STR_LIVERY_SHIP_GROUP_TOOLTIP :{BLACK}Afficher les couleurs des groupes de bateaux STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP :{BLACK}Afficher les couleurs des groupes d'avions -STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choisir la couleur primaire de la livrée sélectionnée. Ctrl-clic appliquera cette couleur à toutes les livrées. -STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choisir la couleur secondaire de la livrée sélectionnée. Ctrl-clic appliquera cette couleur à toutes les livrées. +STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choisir la couleur primaire de la livrée sélectionnée. Ctrl-clic pour appliquer cette couleur à toutes les livrées. +STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choisir la couleur secondaire de la livrée sélectionnée. Ctrl-clic pour appliquer cette couleur à toutes les livrées. STR_LIVERY_PANEL_TOOLTIP :{BLACK}Sélectionner la livrée à modifier ou plusieurs d'entre elles par Ctrl-clic. Cliquer sur la case à cocher pour en activer l'utilisation ou non. STR_LIVERY_TRAIN_GROUP_EMPTY :Aucun groupe de trains STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY :Aucun groupe de véhicules @@ -2727,8 +2734,8 @@ STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Construction de STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Construction de Monorail STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Construction de Maglev -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construire des rails.{}Ctrl pour inverser le mode (construire/enlever).{}Shift pour afficher seulement le coût estimé. -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Construire les rails avec le mode Auto-rail.{}Ctrl pour inverser le mode (construire/enlever).{}Shift pour afficher seulement le coût estimé. +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construire des rails.{}Ctrl pour enlever des rails.{}Shift pour afficher seulement le coût estimé. +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Construire des rails avec le mode Auto-rail.{}Ctrl pour enlever des rails.{}Shift pour afficher seulement le coût estimé. STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Construire un dépôt ferroviaire (pour acheter et entretenir des trains).{}Shift pour afficher seulement le coût estimé. STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Construire un point de contrôle sur les rails.{}Ctrl pour joindre des points de contrôle entre eux.{}Shift pour afficher seulement le coût estimé. STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Construire une gare.{}Ctrl pour joindre des stations entre elles.{}Shift pour afficher seulement le coût estimé. @@ -2786,7 +2793,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Signal d STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Signal combiné (électrique){}Le signal combiné est simplement la réunion d'un signal d'entrée et d'un signal de sortie. Cela permet de construire de larges arborescences de pré-signaux en cascade. STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Signal de chemin (électrique){}Un signal de chemin autorise plus d'un train à entrer dans un bloc de signaux en même temps, si le train peut réserver un chemin jusqu'à un point d'attente sûr. Les signaux de chemin peuvent être passés par l'arrière. STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Signal de chemin à sens unique (électrique){}Un signal de chemin autorise plus d'un train à entrer dans un bloc de signaux en même temps, si le train peut réserver un chemin jusqu'à un point d'attente sûr. Les signaux de chemin à sens unique ne peuvent pas être passés par l'arrière. -STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversion de signal.{}Si sélectionné, cliquer sur un signal existant le convertit vers le type et la variante choisis.{}Ctrl-clic pour alterner entre les variantes existantes.{}Shift pour afficher seulement le coût estimé. +STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversion de signal.{}Cliquer sur un signal existant pour le convertir en celui sélectionné. Ctrl-clic pour alterner entre les variantes existantes. Shift-clic pour afficher seulement le coût estimé. STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Intervalle entre les signaux STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Réduire l'intervalle entre les signaux STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augmenter l'intervalle entre les signaux @@ -2812,10 +2819,10 @@ STR_BRIDGE_TUBULAR_SILICON :À tubes en sil # Road construction toolbar STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Construction routière STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Construction de tramway -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Construire une section de route.{}Ctrl pour inverser le mode (construire/enlever).{}Shift pour afficher seulement le coût estimé. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Construire une section de voie de tramway.{}Ctrl pour inverser le mode (construire/enlever).{}Shift pour afficher seulement le coût estimé. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Construire une section de route avec le mode Auto-route.{}Ctrl pour inverser le mode (construire/enlever).{}Shift pour afficher seulement le coût estimé. -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Construire une section de voie de tramway avec le mode Auto-tram.{}Ctrl pour inverser le mode (construire/enlever).{}Shift pour afficher seulement le coût estimé. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Construire une section de route.{}Ctrl pour enlever une section de route.{}Shift pour afficher seulement le coût estimé. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Construire une section de voie de tramway.{}Ctrl pour enlever une section de voie de tramway.{}Shift pour afficher seulement le coût estimé. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Construire une section de route avec le mode Auto-route.{}Ctrl enlever une section de route.{}Shift pour afficher seulement le coût estimé. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Construire une section de voie de tramway avec le mode Auto-tram.{}Ctrl pour enlever une section de voie de tramway.{}Shift pour afficher seulement le coût estimé. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Construire un dépôt routier (pour acheter et entretenir des véhicules).{}Shift pour afficher seulement le coût estimé. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Construire un dépôt de tramways (pour acheter et entretenir des véhicules).{}Shift pour afficher seulement le coût estimé. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Construire un arrêt d'autobus.{}Ctrl pour joindre des stations entre elles.{}Shift pour afficher seulement le coût estimé. @@ -2860,8 +2867,8 @@ STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Construi STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Construire un port.{}Ctrl pour joindre des stations entre elles.{}Shift pour afficher seulement le coût estimé. STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Placer une bouée pouvant servir de guide aux navires.{}Shift pour afficher seulement le coût estimé. STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Construire un aqueduc.{}Shift pour afficher seulement le coût estimé. -STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Définir une zone d'eau.{}Construire un canal, sauf si Ctrl est enfoncé au niveau de la mer{NBSP}: dans ce cas, le voisinage sera inondé. -STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Placer des rivières. Presser Ctrl pour sélectionner en diagonale +STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Construire un canal. Ctrl-clic au niveau de la mer pour inonder avec de l'eau de mer +STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Placer des rivières.{}Ctrl pour sélectionner en diagonale # Ship depot construction window STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Orientation du dépôt @@ -2931,7 +2938,7 @@ STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Planter # Land generation window (SE) STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Création du terrain STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Placer des zones rocheuses sur le terrain -STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Définir une zone désertique.{}Ctrl pour la retirer. +STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Définir une zone désertique.{}Ctrl-clic pour retirer une zone désertique STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Augmenter la superficie du terrain à modifier STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Diminuer la superficie du terrain à modifier STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Créer un monde aléatoire @@ -3258,11 +3265,11 @@ STR_MAPGEN_VARIETY :{BLACK}Variét STR_MAPGEN_GENERATE :{WHITE}Créer STR_MAPGEN_GENERATE_TOOLTIP :{BLACK}Créer la carte et jouer à OpenTTD ! STR_MAPGEN_NEWGRF_SETTINGS :{BLACK}Paramètres NewGRF -STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Afficher la configuration des NewGRF +STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Ouvrir la configuration des NewGRF STR_MAPGEN_AI_SETTINGS :{BLACK}Paramètres des IAs -STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Afficher la configuration des IAs +STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Ouvrir la configuration des IAs STR_MAPGEN_GS_SETTINGS :{BLACK}Configuration du script de jeu -STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Afficher la configuration du script de jeu +STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Ouvrir la configuration du script de jeu ###length 21 STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH :Anglais (originaux) @@ -3654,10 +3661,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Fermer # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subventions STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Offres de subvention pour le transport de{NBSP}: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} de {STRING} à {STRING}{YELLOW} (avant {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}− Aucune − STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Subventions déjà accordées{NBSP}: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} de {STRING} à {STRING}{YELLOW} ({COMPANY}{YELLOW}, jusqu'à {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Cliquer sur le service pour centrer la vue principale sur l'industrie ou la ville. Ctrl-clic pour ouvrir une nouvelle vue sur l'industrie ou la ville. # Story book window @@ -3675,7 +3680,7 @@ STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Référenc # Station list window STR_STATION_LIST_TOOLTIP :{BLACK}Nom des stations - Cliquer sur un nom pour centrer la vue principale sur la station. Ctrl-clic pour ouvrir une nouvelle vue sur la station. -STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Ctrl-clic pour sélectionner plus d'un élément +STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Ctrl-clic pour sélectionner plusieurs éléments STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} station{P 1 "" s} STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATION_FEATURES} STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT} @@ -4020,10 +4025,10 @@ STR_CARGO_TYPE_FILTER_FREIGHT :Fret STR_CARGO_TYPE_FILTER_NONE :Aucun ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Choix du véhicule. Cliquer sur un véhicule pour obtenir des informations. Ctrl-clic pour basculer le masquage du type de véhicule -STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Choix du véhicule routier. Cliquer sur un véhicule pour obtenir des informations. Ctrl-clic pour basculer le masquage du type de véhicule -STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Choix du navire. Cliquer sur un navire pour obtenir des informations. Ctrl-clic pour basculer le masquage du type de navire -STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Choix de l'aéronef. Cliquer sur un aéronef pour obtenir des informations. Ctrl-clic pour basculer le masquage du type d'aéronef +STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Choix du véhicule. Cliquer sur un véhicule pour obtenir des informations. Ctrl-clic pour afficher/masquer le type de véhicule +STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Choix du véhicule routier. Cliquer sur un véhicule pour obtenir des informations. Ctrl-clic pour afficher/masquer le type de véhicule +STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Choix du navire. Cliquer sur un navire pour obtenir des informations. Ctrl-clic pour afficher/masquer le type de navire +STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Choix de l'aéronef. Cliquer sur un aéronef pour obtenir des informations. Ctrl-clic pour afficher/masquer le type d'aéronef ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Acheter @@ -4039,7 +4044,7 @@ STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Acheter ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Acheter le véhicule sélectionné.{}Shift-clic pour afficher seulement le coût estimé. -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Acheter le véhicule sélectionné.{}Shift-clic pour afficher seulement le coût estimé. +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Acheter le véhicule sélectionné. Utiliser Shift pour afficher le coût estimé seulement. STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Acheter le navire sélectionné.{}Shift-clic pour afficher seulement le coût estimé. STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Acheter l'aéronef sélectionné.{}Shift-clic pour afficher seulement le coût estimé. @@ -4141,7 +4146,7 @@ STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Copier u ###length VEHICLE_TYPES STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Acheter une copie d'un train et de ses wagons. Cliquer ici puis sur un train dans ou hors d'un dépôt.{}Ctrl-clic pour partager les ordres.{}Shift-clic pour afficher seulement le coût estimé. STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Acheter une copie d'un véhicule routier. Cliquer ici puis sur un véhicule routier dans ou hors d'un dépôt.{}Ctrl-clic pour partager les ordres.{}Shift-clic pour afficher seulement le coût estimé. -STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Acheter une copie d'un navire. Cliquer ici puis sur un navire dans ou hors d'un dépôt.{}Ctrl-clic pour partager les ordres.{}Shift-clic pour afficher seulement le coût estimé. +STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Acheter une copie du bateau. Cliquer sur ce bouton et sur un bateau dans ou en dehors du dépôt. Ctrl+Clic pour partager les ordres. Utiliser Shift pour afficher le coût estimé seulement. STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Acheter une copie d'un aéronef. Cliquer ici puis sur un aéronef dans ou hors d'un hangar.{}Ctrl-clic pour partager les ordres.{}Shift-clic pour afficher seulement le coût estimé. ###length VEHICLE_TYPES @@ -4255,10 +4260,10 @@ STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Centrer STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Centrer la vue sur l'aéronef. Double clic pour le suivre dans la vue principale. Ctrl-clic pour ouvrir une nouvelle vue sur l'aéronef ###length VEHICLE_TYPES -STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer le train au dépôt.{}Ctrl-clic pour un entretien seul. -STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer le véhicule au dépôt.{}Ctrl-clic pour un entretien seul. -STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer le navire au dépôt.{}Ctrl-clic pour un entretien seul. -STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer l'aéronef au hangar.{}Ctrl-clic pour un entretien seul. +STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer le train au dépôt. Ctrl-clic pour un entretien seul. +STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer le véhicule au dépôt. Ctrl-clic pour un entretien seul. +STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer le navire au dépôt. Ctrl-clic pour un entretien seul. +STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Envoyer l'aéronef au hangar. Ctrl-clic pour un entretien seul. ###length VEHICLE_TYPES STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Acheter une copie du train et de ses wagons.{}Ctrl-clic pour partager les ordres.{}Shift-clic pour afficher seulement le coût estimé. @@ -4335,9 +4340,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Renommer STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Rebaptiser le navire STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Renommer l'aéronef -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Âge{NBSP}: {LTBLUE}{STRING}{BLACK} − Coûts d'entretien{NBSP}: {LTBLUE}{CURRENCY_LONG}/an STR_VEHICLE_INFO_AGE :{COMMA} an{P "" nées} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} an{P "" nées} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Âge{NBSP}: {LTBLUE}{STRING}{BLACK} − Coûts d'entretien{NBSP}: {LTBLUE}{CURRENCY_LONG}/an STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Vitesse max.{NBSP}: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Vitesse max.{NBSP}: {LTBLUE}{VELOCITY}{BLACK} - Type d'aéronef{NBSP}: {LTBLUE}{STRING} @@ -4357,14 +4362,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacit STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Crédits de transfert{NBSP}: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Intervalle d'entretien{NBSP}: {LTBLUE}{COMMA}{NBSP}jours{BLACK} Dernier entretien{NBSP}: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervalle d'entretien{NBSP}: {LTBLUE}{COMMA}{NBSP}%{BLACK} − Dernier entretien{NBSP}: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Augmenter l'intervalle d'entretien de 10.{}Ctrl-clic pour l'augmenter de 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Diminuer l'intervalle d'entretien de 10.{}Ctrl-clic pour le diminuer de 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Modifier le type d’intervalle d'entretien STR_VEHICLE_DETAILS_DEFAULT :Défaut -STR_VEHICLE_DETAILS_DAYS :Jours STR_VEHICLE_DETAILS_PERCENT :Pourcentage ###length VEHICLE_TYPES @@ -4498,7 +4500,7 @@ STR_ORDER_CONDITIONAL_VALUE_TOOLTIP :{BLACK}La valeu STR_ORDER_CONDITIONAL_VALUE_CAPT :{WHITE}Entrer la valeur à comparer STR_ORDERS_SKIP_BUTTON :{BLACK}Suivant -STR_ORDERS_SKIP_TOOLTIP :{BLACK}Sauter l'ordre courant et passer au suivant.{}Ctrl-clic pour sauter à l'ordre sélectionné. +STR_ORDERS_SKIP_TOOLTIP :{BLACK}Sauter l'ordre courant et passer au suivant. Ctrl-clic pour sauter à l'ordre sélectionné. STR_ORDERS_DELETE_BUTTON :{BLACK}Supprimer STR_ORDERS_DELETE_TOOLTIP :{BLACK}Supprimer l'ordre sélectionné @@ -4511,7 +4513,7 @@ STR_ORDER_GO_TO_NEAREST_DEPOT :Aller au dépô STR_ORDER_GO_TO_NEAREST_HANGAR :Aller au hangar le plus proche STR_ORDER_CONDITIONAL :Saut conditionnel d'ordre STR_ORDER_SHARE :Partager les ordres -STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insérer un nouvel ordre avant l'ordre sélectionné, ou l'ajouter à la fin. Avec Ctrl, les ordres de station sont «{NBSP}Chargement complet par un seul type{NBSP}», les ordres de point de contrôle sont «{NBSP}sans arrêt{NBSP}» et les ordres de dépôt sont «{NBSP}entretien{NBSP}». «{NBSP}Partager les ordres{NBSP}» ou Ctrl fait que ce véhicule partage ses ordres avec le véhicule sélectionné. Cliquer sur un véhicule copie les ordres de ce véhicule. Un ordre de dépôt désactive l'entretien automatique du véhicule +STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insérer un nouvel ordre avant l'ordre sélectionné, ou l'ajouter à la fin. Ctrl-clic sur une station pour «{NBSP}Chargement complet par un seul type{NBSP}», sur un point de contrôle pour «{NBSP}sans arrêt{NBSP}» ou sur un dépôt pour «{NBSP}entretien{NBSP}». Cliquer sur un véhicule pour copier ses ordres ou Ctrl-clic pour les partager. Un ordre de dépôt désactive l'entretien automatique du véhicule STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Afficher tous les véhicules partageant ce programme @@ -4617,7 +4619,7 @@ STR_TIMETABLE_STATUS_START_AT_DATE :{BLACK}Cet hora STR_TIMETABLE_STATUS_START_IN_SECONDS :{BLACK}Cet horaire commencera dans {COMMA} seconde{P "" s} STR_TIMETABLE_START :{BLACK}Démarrer l'horaire -STR_TIMETABLE_START_TOOLTIP :{BLACK}Sélectionner quand l'horaire doit démarrer. Ctrl-clic pourra donner l'ordre de démarrer l'horaire aux véhicules qui le partagent, seulement si leurs ordres sont complètement définis dans leurs horaires respectifs +STR_TIMETABLE_START_TOOLTIP :{BLACK}Sélectionner quand l'horaire doit démarrer. Ctrl-clic pour éventuellement donner l'ordre de démarrer l'horaire aux véhicules qui le partagent, seulement si leurs ordres sont complètement définis dans leurs horaires respectifs. STR_TIMETABLE_START_SECONDS_QUERY :Nombre de secondes avant que l'horaire ne commence diff --git a/src/lang/frisian.txt b/src/lang/frisian.txt index 0a84eb5941..d309112776 100644 --- a/src/lang/frisian.txt +++ b/src/lang/frisian.txt @@ -225,6 +225,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: @@ -564,8 +567,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Stiks fr STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Bedriuwsprestaasjewurdearring (maksimale wurdearring=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Bedriuwswearden + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Frachtpriizen -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dagen ûnderweis STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Betelling foar levering fan 10 ienheiden (of 10,000 liter) fracht oer in ôfstân fan 20 hokjes STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Alles oansette STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Alles ûtsette @@ -969,6 +972,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selektea STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Oanfoljende ynformaasje oer de basisset foar musyk + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Koe gjin list mei brûkbere resolúsjes ophelje STR_ERROR_FULLSCREEN_FAILED :{WHITE}Folslein skermmodus mislearre @@ -1317,6 +1323,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :By ynskeakeljen STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Fiertugen ferinne nea: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :By ynskeakeljen bliuwe alle fiertugen foar ivich beskikber +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Ferfang âlde fiertugen automatysk: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :By ynskeakeljen wurden fiertugen dy't hast op harren ein binne automatyske ferfongen @@ -3022,10 +3030,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Slute # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsydzjes STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsydzjes dy't oanbean wurde: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} fan {STRING} nei {STRING}{YELLOW} (foar {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Gjin - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Tsjinsten dy't al subsydzje krije: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} fan {STRING} nei {STRING}{YELLOW} ({COMPANY}{YELLOW}, oant {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik om te sentrearen op yndusty/stêd. Ctrl+klick iepent in nij sichtber diel op yndustry/stêd lokaasje # Story book window @@ -3553,14 +3559,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapasite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Wikselje kredyt: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Underhâldsinterval: {LTBLUE}{COMMA}{NBSP}dagen{BLACK} Lêste underhâld: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Underhâldsinterval: {LTBLUE}{COMMA}%{BLACK} Lêste underhâld: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Underhâldsinterval ferheegje mei 10. Ctrl+Klik ferheegt underhâldsinterval mei 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Tiid tusken ûnderhâldsbeurten ferleegje mei 10. Ctrl+Klik ferleegt de tiid tusken ûnderhâldsbeurten mei 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Feroarje tiid tusken ûnderhâldsbeurten STR_VEHICLE_DETAILS_DEFAULT :Standert -STR_VEHICLE_DETAILS_DAYS :Dagen STR_VEHICLE_DETAILS_PERCENT :Persintaazje ###length VEHICLE_TYPES diff --git a/src/lang/gaelic.txt b/src/lang/gaelic.txt index 0a577702cc..c828ba2f44 100644 --- a/src/lang/gaelic.txt +++ b/src/lang/gaelic.txt @@ -413,6 +413,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Sreang criathraige: @@ -761,8 +764,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Aonadan STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Rangachaidhean dèanadais na companaidh (rangachadh as motha=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Luachan na companaidh + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Reataichean pàighidh carago -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Làithean a' siubhal STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pàigheadh airson lìbhrigeadh dhe 10 aonadan (no 10,000 liotair) dhe charago le astar dhe 20 ceàrnag STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Cuir a h-uile an comas STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Cuir a h-uile à comas @@ -1056,7 +1059,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Tha {STR STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Dh'fhalbh an ùine air tairgse tarrail:{}{}Chan fhaighear tarrail airson {STRING} a thoirt bho {STRING} gu {STRING} a-nis STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Chaidh tarrail a tharraing:{}{}Chan fhaigh seirbheis {STRING} bho {STRING} gu {STRING} tarrail a-nis +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Chaidh tarrail seirbheise a thairgsinn:{}{}Gheibh a' chiad seirbheis {STRING} bho {STRING} gu {STRING} tarrail fad bliadhna bhon ùghdarras ionadail! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Bhuannaich {STRING} tarrail seirbheise!{}{}Pàighidh seirbheis {STRING} bho {STRING} gu {STRING} 50% a bharrachd fad bliadhna! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Bhuannaich {STRING} tarrail seirbheise!{}{}Pàighidh seirbheis {STRING} bho {STRING} gu {STRING} reataichean dà-fhillte fad bliadhna! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Bhuannaich {STRING} tarrail seirbheise!{}{}Pàighidh seirbheis {STRING} bho {STRING} gu {STRING} reataichean trì-fillte fad bliadhna! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Bhuannaich {STRING} tarrail seirbheise!{}{}Pàighidh seirbheis {STRING} bho {STRING} gu {STRING} reataichean ceithir-fillte fad bliadhna! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Bùrach trafaig ann am baile {TOWN}!{}{}Bheir prògram leasachadh rathaidean maoinichte le {STRING} dòlam dha dhraibhearan fad 6 mìosan! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Aon-mhargadh giùlain! @@ -1155,6 +1163,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Tagh an STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Barrachd fiosrachaidh mun t-seata chiùil bhunasach + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Cha deach leinn liosta dhe na dùmhlaidhean-breacaidh ris an cuirear taic fhaighinn STR_ERROR_FULLSCREEN_FAILED :{WHITE}Dh'fhàillig leis a' mhodh làn-sgrìn @@ -1502,6 +1513,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Nuair a bhios s STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Chan fhalbh an ùine air carbadan gu bràth: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ma tha seo air, bidh a h-uile modail dhe charbad ri làimh gu bràth tuilleadh an dèidh an tionnsgnadh +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Fèin-nuadhaich carbad nuair a bhios e air fàs aosta: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Nuair a bhios seo air, nuair a bhios carbad air fàs ro aosta, thèid fear ùr a chur na àite gu fèin-obrachail ma dh'fhreagras e ri cumhan an fhèin-nuadhachaidh @@ -3414,10 +3427,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Dùin # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Tarrailean STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Tarrailean gan tairgsinn airson seirbheisean a bheir: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} bho {STRING} gu {STRING}{YELLOW} (ron {DATE_SHORT.dat}) STR_SUBSIDIES_NONE :{ORANGE}- Chan eil gin - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Seirbheisean a gheibh tarrail mu thràth: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} bho {STRING} gu {STRING}{YELLOW} ({COMPANY}{YELLOW}, gu ruige {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Briog air an t-seirbheis gus am prìomh-shealladh a mheadhanachadh air a' ghnìomhachas/bhaile. Fosglaidh Ctrl+briogadh port-seallaidh ùr air ionad a' ghnìomhachais/a' bhaile # Story book window @@ -4018,9 +4029,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Thoir ai STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Thoir ainm air long STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Thoir ainm air carbad-adhair -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aois: {LTBLUE}{STRING}{BLACK} Cosgaisean ruith: {LTBLUE}{CURRENCY_LONG}/bliadhna STR_VEHICLE_INFO_AGE :{COMMA} {P bhliadhna bhliadhna bliadhna bliadhna} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} {P bhliadhna bhliadhna bliadhna bliadhna} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aois: {LTBLUE}{STRING}{BLACK} Cosgaisean ruith: {LTBLUE}{CURRENCY_LONG}/bliadhna STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Luaths as motha: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Luaths as motha: {LTBLUE}{VELOCITY} {BLACK}Seòrsa carbaid-adhair: {LTBLUE}{STRING} @@ -4039,14 +4050,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Tomhas-l STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Creideas tar-aisig: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Tricead na h-obrach-glèidhidh: {LTBLUE}{COMMA}{NBSP}{P latha latha làithean latha}{BLACK} An obair-ghlèidhidh mu dheireadh: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Tricead na h-obrach-glèidhidh: {LTBLUE}{COMMA}%{BLACK} An obair-ghlèidhidh mu dheireadh: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Meudaich tricead na h-obrach-glèidhidh le 10. Meudaichidh Ctrl+briogadh tricead na h-obrach-glèidhidh le 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Lùghdaich tricead na h-obrach-glèidhidh le 10. Lùghdaichidh Ctrl+briogadh tricead na h-obrach-glèidhidh le 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Atharraich seòrsa dhe thricead na h-obrach-glèidhidh STR_VEHICLE_DETAILS_DEFAULT :Tùsail -STR_VEHICLE_DETAILS_DAYS :Latha STR_VEHICLE_DETAILS_PERCENT :Ceudad ###length VEHICLE_TYPES diff --git a/src/lang/galician.txt b/src/lang/galician.txt index 2592df8b1e..772320cf81 100644 --- a/src/lang/galician.txt +++ b/src/lang/galician.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Igual que o pri STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL} mph STR_UNITS_VELOCITY_METRIC :{DECIMAL} km/h STR_UNITS_VELOCITY_SI :{DECIMAL} m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}cadros/día STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}nudos STR_UNITS_POWER_IMPERIAL :{DECIMAL}cv @@ -256,8 +255,11 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} pés STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters STR_UNITS_TICKS :{COMMA}{NBSP}tick{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtrar: STR_LIST_FILTER_OSKTITLE :{BLACK}Introducir unha ou máis palabras clave pola que filtrar a lista @@ -614,8 +616,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unidades STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Puntuación de rendemento da compañía (máximo=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Gráfico do valor da compañía + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Taxas de pago por carga -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Días en tránsito STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pagamento por transportar 10 unidades (ou 1.000 litros) de carga unha distancia de 20 cadros STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Activar todo STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Desactivar todo @@ -1075,6 +1077,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Conxunto STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selecciona o conxunto de música base a empregar STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Información adicional sobre o conxunto de música base + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} ficheiro{P "" s} perdido{P "" s} ou corrupto{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Erro ao obter a lista de resolucións soportadas @@ -1448,6 +1453,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Cando se activa STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Os vehículos nunca caducan: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Cando se activa, tódolos modelos de vehículos seguen a estar dispoñíbeis para sempre dende a súa aparición +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenova-los vehículos cando vaian vellos: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Cando se activa, un vehículo que se achega ao fin da súa vida útil é reemprazado automáticamente se se cumplen as condicións de renovación @@ -3626,10 +3633,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Pechar # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvencións STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subvencións ofrecidas para sevizos que transporten: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} dende {STRING} ata {STRING}{YELLOW} (antes de {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ningunha - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Servizos que xa teñen subvención: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} dende {STRING} ata {STRING}{YELLOW} ({COMPANY}{YELLOW}, ata {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Pincha no servizo para centrar a vista na industria/cidade. CTRL+Click abre unha nova fiestra na localización da industria/cidade # Story book window @@ -4307,9 +4312,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Renomear STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Renomear barco STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Renomear avión -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo operativo: {LTBLUE}{CURRENCY_LONG}/ano STR_VEHICLE_INFO_AGE :{COMMA} ano{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ano{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo operativo: {LTBLUE}{CURRENCY_LONG}/ano STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Velocidade máxima: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Vel. máxima: {LTBLUE}{VELOCITY} {BLACK}Tipo de aeronave: {LTBLUE}{STRING} @@ -4329,14 +4334,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacida STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Créditos de transferencia: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Intervalo de servizo: {LTBLUE}{COMMA}días{BLACK} Último servizo: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervalo de servizo: {LTBLUE}{COMMA}%{BLACK} Último servizo: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Incrementa-lo intervalo dos servizos en 10. Ctrl+Click increméntao en 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Diminuí-lo intervalo dos servizos en 10. Ctrl+click diminúeo en 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Mudar tipo de intervalo de servizo STR_VEHICLE_DETAILS_DEFAULT :Por defecto -STR_VEHICLE_DETAILS_DAYS :Días STR_VEHICLE_DETAILS_PERCENT :Porcentaxe ###length VEHICLE_TYPES diff --git a/src/lang/german.txt b/src/lang/german.txt index 074bf8548e..654c10b24a 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Wie primär STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}Kacheln/Tag STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}Knoten STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}PS @@ -256,6 +255,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: @@ -613,8 +615,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Beförde STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Bewertung der Firmenleistung (Höchstwert: 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Firmenwertdiagramm + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Frachtbeförderungspreise -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Tage unterwegs STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Zahlung für 10 gelieferte Einheiten (oder 10.000 Liter) Fracht über eine Strecke von 20 Feldern STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Alle auswählen STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Alle abwählen @@ -1074,6 +1076,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Basismus STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Ein Basismusikset auswählen STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Zusätzliche Informationen über das Basismusikset + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} fehlende/beschädigte Datei{P "" en}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Eine Liste unterstützter Auflösungen konnte nicht ermittelt werden @@ -1447,6 +1452,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Zeige Nachricht STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Fahrzeuge veralten nie: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Erlauben, dass Fahrzeuge nach ihrem Einführungsdatum ewig verfügbar bleiben +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Fahrzeuge automatisch erneuern, wenn sie alt werden: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Erneuere Fahrzeuge automatisch gemäß der Regeln für Erneuerung, wenn sie ihr Maximalalter erreicht haben. @@ -3616,10 +3623,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Schließen # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subventionen STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subventionsangebot für: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} von {STRING} nach {STRING}{YELLOW} (bis {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Keine - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Bereits vergebene Subventionen: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} von {STRING} nach {STRING}{YELLOW} ({COMPANY}{YELLOW}, bis {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klick auf subventionierte Dienstleistung zentriert Hauptansicht auf die Industrie/Stadt. Strg+Klick öffnet neue Zusatzansicht zentriert auf die Industrie/Stadt # Story book window @@ -4297,9 +4302,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Name des STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Name des Schiffs STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Name des Flugzeugs -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alter: {LTBLUE}{STRING}{BLACK} Betriebskosten: {LTBLUE}{CURRENCY_LONG}/Jahr STR_VEHICLE_INFO_AGE :{COMMA} Jahr{P "" e} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} Jahr{P "" e} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alter: {LTBLUE}{STRING}{BLACK} Betriebskosten: {LTBLUE}{CURRENCY_LONG}/Jahr STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. Geschw.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. Geschw.: {LTBLUE}{VELOCITY} {BLACK}Flugzeugtyp: {LTBLUE}{STRING} @@ -4319,14 +4324,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapazit STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer-Einnahmen: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Wartungsintervall: {LTBLUE}{COMMA}{NBSP}Tag{P "" e} {BLACK} Letzte Wartung: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Wartungsintervall: {LTBLUE}{COMMA}%{BLACK} Letzte Wartung: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Wartungsintervall um 10 erhöhen. Strg+Klick erhöht um 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Wartungsintervall um 10 verringern. Strg+Klick verringert um 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Art des Wartungsintervalls ändern STR_VEHICLE_DETAILS_DEFAULT :Standard -STR_VEHICLE_DETAILS_DAYS :Tage STR_VEHICLE_DETAILS_PERCENT :Prozent ###length VEHICLE_TYPES diff --git a/src/lang/greek.txt b/src/lang/greek.txt index 81a004f608..3c05691394 100644 --- a/src/lang/greek.txt +++ b/src/lang/greek.txt @@ -258,7 +258,6 @@ STR_COLOUR_RANDOM :Τυχαία STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}μίλια/ώρα STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}χλμ/ώρα STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}τετραγωνίδια/ημέρα STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}hp @@ -297,6 +296,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}μ STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Φιλτράρισμα λίστας: @@ -698,8 +700,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Μονά STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Ποσοστά απόδοσης εταιρίας (μέγιστη τιμή=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Αξία εταιρίας + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Ποσοστά Πληρωμής Φορτίων -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Μέρες σε μεταφορά STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Πληρωμή για την παράδοση 10 μονάδων (ή 10.000 λίτρων) φορτίου σε απόσταση 20 τετραγώνων STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Ενεργοποιήση όλων STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Απενεργοποιήση όλων @@ -1132,6 +1134,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Επιλ STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Επιπλέον πληροφορίες σχετικά με το βασικό σετ μουσικής + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Αποτυχία ανάκτησης λίστας υποστηριζόμενων αναλύσεων STR_ERROR_FULLSCREEN_FAILED :{WHITE}Θέση του παιχνιδιού σε λειτουργία πλήρης οθόνης απέτυχε @@ -1495,6 +1500,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Όταν είν STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Τα οχήματα δεν λήγουν ποτέ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Όταν είναι ενεργοποιημένη, όλα τα μοντέλα οχημάτων παραμένουν διαθέσιμα για πάντα μετά την παρουσίασή τους +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Αυτόματη ανανέωση όταν ένα όχημα παλιώνει: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Όταν είναι ενεργοποιημένη, τα οχήματα που πλησιάζουν το τέλος της ζωής τους αντικαθίσταται αυτόματα όταν πληρούνται οι προϋποθέσεις αντικατάστασής του @@ -3619,10 +3626,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Κλείσιμ # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Χρηματοδοτήσεις STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Τρέχουσες χρηματοδοτήσεις για ανάληψη υπηρεσιών: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} από {STRING} προς {STRING}{YELLOW} (έως τις {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Καμία - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Υπηρεσίες που έχουν χρηματοδοτηθεί: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} από τον σταθμό {STRING} προς τον σταθμό {STRING}{YELLOW} ({COMPANY}{YELLOW}, έως τις {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Πατήστε στην υπηρεσία για κεντράρισμα στην βιομηχανία/πόλη. Με Ctrl+Κλικ ανοίγει νέο παράθυρο προβολής στην τοποθεσία της βιομηχανίας/πόλης # Story book window @@ -4302,9 +4307,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Ονομ STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Ονομασία πλοίου STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Ονομασία αεροσκάφους -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ηλικία: {LTBLUE}{STRING}{BLACK} Λειτουργικό Κόστος: {LTBLUE}{CURRENCY_LONG}/έτος STR_VEHICLE_INFO_AGE :{COMMA} χρόν{P ος ια} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} χρόν{P ος ια} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ηλικία: {LTBLUE}{STRING}{BLACK} Λειτουργικό Κόστος: {LTBLUE}{CURRENCY_LONG}/έτος STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Μέγ. ταχύτητα: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Μεγ. ταχύτητα: {LTBLUE}{VELOCITY} {BLACK}Τύπος αεροσκάφους: {LTBLUE}{STRING} @@ -4324,14 +4329,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Χωρη STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Έσοδα μεταφοράς: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Διάστημα μεταξύ επισκευών: {LTBLUE}{COMMA}{NBSP}μέρες{BLACK} Τελευταία επισκευή: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Διάστημα επισκευών: {LTBLUE}{COMMA}%{BLACK} Τελευταία επισκευή: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Αύξηση διαστημάτων επισκευών κατά 10. Με Ctrl+Κλικ αυξάνονται τα διαστήματα ανάμεσα των επισκευών κατά 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Μείωση διαστημάτων επισκευών κατά 10. Με Ctrl+Κλικ μειώνεται τα διαστήματα επισκευών κατά 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Αλλάξτε τον τύπο διαστήματος επισκευών STR_VEHICLE_DETAILS_DEFAULT :Προκαθορισμένο -STR_VEHICLE_DETAILS_DAYS :Ημέρες STR_VEHICLE_DETAILS_PERCENT :Ποσοστό ###length VEHICLE_TYPES diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index 7f267a0187..9454f848e5 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -240,6 +240,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} רג STR_UNITS_HEIGHT_METRIC :{DECIMAL} מ' STR_UNITS_HEIGHT_SI :{DECIMAL} מ' +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}מחרוזת סינון: @@ -580,8 +583,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}יחיד STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}(מדד הביצועים (הציון המירבי = 1000 STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}שווי החברות + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}שיעורי התשלום עבור הובלת מטענים -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}משך ההובלה בימים STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}תשלום עבור הובלת 10 יחידות (או 10,000 ליטר) למרחק 20 משבצות STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}אפשר הכל STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}בטל הכל @@ -872,7 +875,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}פג תוקף הצעת סובסידיה:{}{}סובסידיה של הובלת {STRING.plural} מ{STRING} אל {STRING} לא תזכה עוד בסיבסוד. STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}סובסידיה הוסרה:{}{}שירות הובלת {STRING.plural} מ{STRING} אל {STRING} אינו מסובסד יותר. +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}הצעה למתן סובסידיה:{}{}שירות הובלת {STRING.plural} ראשון מ{STRING} אל {STRING} יזכה לסובסידיה בת שנה מהרשות המקומית! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}סובסידיה לשירות ניתנה לחברת {STRING}!{}{}שירות הובלת {STRING.plural} מ{STRING} אל {STRING} יזכה לשיעור תשלום גדול ב-50% לשנה הקרובה +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}סובסידיה לשירות ניתנה לחברת {STRING}!{}{}שירות הובלת {STRING.plural} מ{STRING} אל {STRING} יזכה לשיעור תשלום כפול לשנה הקרובה! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}סובסידיה לשירות ניתנה לחברת {STRING}!{}{}שירות הובלת {STRING.plural} מ{STRING} אל {STRING} יזכה לשיעור תשלום משולש לשנה הקרובה! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}סובסידיה לשירות ניתנה לחברת {STRING}!{}{}שירות הובלת {STRING.plural} מ{STRING} אל {STRING} יזכה לשיעור תשלום מוכפל פי 4 לשנה הקרובה! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}פקקי תנועה ענקיים ב{TOWN}!{}{} תכנית לשיפוץ מקיף של הכבישים במימון {STRING} מביאה לקטסטרופת תנועה לשישה חודשים STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}מונופול תחבורה! @@ -981,6 +989,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}בחר STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}מידע נוסף אודות ערכת המוזיקה הבסיסית + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}שגיאה ביצירת רשימה של רזולוציות אפשריות STR_ERROR_FULLSCREEN_FAILED :{WHITE}נכשל בשינויי למסך מלא @@ -1334,6 +1345,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :כאשר מאו STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :{STRING} :בטל התיישנות כלי רכב STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :כאשר מאופשר, כל סוגי כלי הרכב נשארים זמינים לעד אחרי השקתם +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :חידוש עצמי של רכב כשהוא נהיה ישן: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :כאשר מאופשר, רכב המתקרב לסוף חייו מוחלף אוטומטית כאשר תנאי החידוש מתקיימים @@ -3281,10 +3294,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :סגור # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}סובסידיות STR_SUBSIDIES_OFFERED_TITLE :{BLACK} :סובסידיות למימון שירותי הובלה -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} מ-{STRING} אל {STRING}{YELLOW} (ב-{DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- כלום - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK} :שירותים מסובסדים -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} מ-{STRING} אל {STRING}{YELLOW} ({COMPANY}{YELLOW}, עד {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}לחץ על שירות כדי להתמקד על עיר/תעשייה. Ctrl+לחיצה פותח חלונית תצוגה חדשה על מיקום העיר/תעשייה # Story book window @@ -3913,9 +3924,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}תן ש STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}תן שם לכלי השייט STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}תן שם לכלי הטייס -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}גיל: {LTBLUE}{STRING}{BLACK} עלות שוטפת: {LTBLUE}{CURRENCY_LONG}/לשנה STR_VEHICLE_INFO_AGE :({1:COMMA}) שנים {NBSP}{0:COMMA} STR_VEHICLE_INFO_AGE_RED :{RED}({1:COMMA}) שנים {NBSP}{0:COMMA} +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}גיל: {LTBLUE}{STRING}{BLACK} עלות שוטפת: {LTBLUE}{CURRENCY_LONG}/לשנה STR_VEHICLE_INFO_MAX_SPEED :{BLACK}מהירות מקסימלית: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}מהירות מקס.: {LTBLUE}{VELOCITY} {BLACK}סוג כלי טיס: {LTBLUE}{STRING} @@ -3934,14 +3945,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}קיבו STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}העברת סכום: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{LTBLUE}{1:DATE_LONG} :טיפול אחרוןֿ {BLACK}{LTBLUE}{0:COMMA}% {BLACK} :מרווח בין טיפולים -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{LTBLUE}{1:DATE_LONG} :טיפול אחרוןֿ {BLACK}{LTBLUE}{0:COMMA}% {BLACK} :מרווח בין טיפולים STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}הגדל את מרווח הזמן עד קבלת שירות ב-10. Ctrl+לחיצה מגדיל את המרווח ב-5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}הקטן את מרווח הזמן עד קבלת שירות ב-10. Ctrl+לחיצה מקטינה את המרווח ב-5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}שנה סוג מרווח שירות STR_VEHICLE_DETAILS_DEFAULT :ברירת מחדל -STR_VEHICLE_DETAILS_DAYS :ימים STR_VEHICLE_DETAILS_PERCENT :אחוז ###length VEHICLE_TYPES diff --git a/src/lang/hindi.txt b/src/lang/hindi.txt index 0b51c6808e..36b002de14 100644 --- a/src/lang/hindi.txt +++ b/src/lang/hindi.txt @@ -80,6 +80,9 @@ STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP} +# Time units used in string control characters + + # Common window strings @@ -187,6 +190,7 @@ STR_GRAPH_Y_LABEL :{TINY_FONT}{STR STR_GRAPH_Y_LABEL_NUMBER :{TINY_FONT}{COMMA} + STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING} @@ -308,6 +312,9 @@ STR_GAME_OPTIONS_GUI_SCALE_FRAME :{BLACK}इं + + + # Custom currency window STR_CURRENCY_DECREASE_EXCHANGE_RATE_TOOLTIP :{BLACK}एक पाउंड (£) की तुलना में अपनी मुद्रा का अवमूल्यन करें @@ -437,6 +444,8 @@ STR_CONFIG_SETTING_ORDER_REVIEW_OFF :नहीं +###length 2 + ###length 2 diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt index 37298468ce..1491bb18fd 100644 --- a/src/lang/hungarian.txt +++ b/src/lang/hungarian.txt @@ -277,7 +277,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Ugyanaz mint az STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mi/h STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}mező/nap STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}csomó STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}LE @@ -318,6 +317,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Szűrő kifejezés: @@ -675,8 +677,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Elszáll STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Vállalatok teljesítménye (legjobb teljesítmény=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Vállalatok értéke grafikon + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Rakományok szállítási díja -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}ÚTON TÖLTÖTT NAPOK STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Fizetség 10 egységnyi (vagy 10000 liter) rakomány 20 négyzet távolságra való szállítsa esetén STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Bekapcsol mind STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Kikapcsol mind @@ -1138,6 +1140,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Használ STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}További információk a zenei alapcsomagról + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nem sikerült a támogatott felbontások lekérdezése STR_ERROR_FULLSCREEN_FAILED :{WHITE}Teljes képernyős módra váltás sikertelen @@ -1509,6 +1514,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Üzenetek megje STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Járművek sosem avulnak el: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Bekapcsolva minden járműmodell örökké elérhető marad bevezetése után +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automatikusan felújítja a járművet ha elöregedik: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Bekapcsolva a jármű élettartamának végén automatikusan cserére kerül, ha a lecserélési feltételek teljesülnek @@ -3678,10 +3685,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Bezár # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Támogatások STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Támogatás jár -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} szállításáért {STRING} és {STRING} között{YELLOW} ({DATE_SHORT}ig) STR_SUBSIDIES_NONE :{ORANGE}--- STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Már támogatást kap -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} szállításáért {STRING} és {STRING} között {YELLOW} ({COMPANY}{YELLOW} ({DATE_SHORT}ig) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Kattints egy sorra a város/gazdasági épület megnézéséhez. Ctrl+kattintás esetén új látképet nyit a város/gazdasági épület pozíciójára # Story book window @@ -4359,9 +4364,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Közúti STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Hajó átnevezése STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Repülőgép átnevezése -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Kor: {LTBLUE}{STRING}{BLACK} Üzemeltetés: {LTBLUE}{CURRENCY_LONG}/év STR_VEHICLE_INFO_AGE :{COMMA} év ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} év ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Kor: {LTBLUE}{STRING}{BLACK} Üzemeltetés: {LTBLUE}{CURRENCY_LONG}/év STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Végsebesség: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Sebesség: {LTBLUE}{VELOCITY} {BLACK}Típus: {LTBLUE}{STRING} @@ -4381,14 +4386,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapacit STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Szállítási díj: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Javítási időköz: {LTBLUE}{COMMA}{NBSP}nap{BLACK} Utolsó javítás: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Javítási intervallum: {LTBLUE}{COMMA}%{BLACK} Utolsó javítás: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Javítási időköz növelése 10-zel. Ctrl+kattintás 5-tel növeli STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Javítási időköz csökkentése 10-zel. Ctrl+Kattintás 5-tel csökkenti STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Javítási időköz módjának megváltoztatása STR_VEHICLE_DETAILS_DEFAULT :Alapértelmezett -STR_VEHICLE_DETAILS_DAYS :Napok STR_VEHICLE_DETAILS_PERCENT :Százalék ###length VEHICLE_TYPES diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt index 9e1ae402de..c59d9200b4 100644 --- a/src/lang/icelandic.txt +++ b/src/lang/icelandic.txt @@ -219,6 +219,9 @@ STR_UNITS_FORCE_SI :{DECIMAL} kN STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ft STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Sía: @@ -540,8 +543,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Fluttar STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Einkunn fyrirtækis (hámarkseinkunn=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Fyrirtækisvirði + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Farmgjöld -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dagar í flutningi STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Laun fyrir flutning á 10 einingum (eða 10,000 lítra) af farmi um 20 reiti STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Sýna allt STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Fela allt @@ -822,7 +825,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ný {STR STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Tilboð til samstarfssamnings runnið út:{}{}{STRING} frá {STRING} til {STRING} mun ekki vera samningsbundið. STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Samsarfssamningur gerður ógildur:{}{} {STRING}flutningur frá {STRING} til {STRING} er ekki lengur samningsbundinn. +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Nýtt tilboð til samstarfssamnings:{}{}Fyrsti {STRING}flutningur frá {STRING} til {STRING} mun stofna til eins árs samstarfssamnings við bæjaryfirvöld! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Samstarfssamningur gerður við {STRING}!{}{}{STRING}flutningur frá {STRING} til {STRING} mun borga 50% aukalega í heilt ár! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Samstarfssamningur gerður við {STRING}!{}{}{STRING}flutningur frá {STRING} til {STRING} mun borga tvöfalt í heilt ár! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Samstarfssamningur gerður við {STRING}!{}{}{STRING}flutningur frá {STRING} til {STRING} mun borga þrefalt í heilt ár! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Samstarfssamningur gerður við {STRING}!{}{}{STRING}flutningur frá {STRING} til {STRING} mun borga fjórfalt í heilt ár! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Glundroði í umferð {TOWN}!{}{}Uppbygging vega kostuð af {STRING} veldur 6 mánaða vesæld meðal ökumanna! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Flutninga einokun! @@ -921,6 +929,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Veld gru STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Auka upplýsingar um grunntónlistarsafnið + + + STR_ERROR_FULLSCREEN_FAILED :{WHITE}Skjáfyllihamur brást # Custom currency window @@ -1254,6 +1265,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Þegar þessi s STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Farartæki úreldast aldrei: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ef þessi stilling er virk, eru öll farartæki alltaf í boði eftir að þau voru fyrst kynnt til sögunnar +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Uppfæra faratæki sjálfvirkt þegar þau eldast: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Ef þessi stilling er virk, eru farartæki endurnýjuð sjálfvirkt þegar endingartími þeirra er komin @@ -2982,10 +2995,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Loka # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Samstarfssamningar STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Samstarfssamningar í boði fyrir eftirfarandi þjónustur: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} frá {STRING} til {STRING}{YELLOW} (til {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Enginn - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Samningar þegar í gildi: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} frá {STRING} til {STRING}{YELLOW} ({COMPANY}{YELLOW}, þangað til {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Ýttu á þjónustu til að færa sjónarhorn á tiltekinn iðnað/bæ. Ctrl+smelltu til að opna sjónarhorn yfir þessum iðnaði/bæ # Story book window @@ -3522,9 +3533,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nefna bi STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nefna skip STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nefna flugvélina -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aldur: {LTBLUE}{STRING}{BLACK} Rekstrarkostnaður: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_AGE :{COMMA} ár ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ár ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aldur: {LTBLUE}{STRING}{BLACK} Rekstrarkostnaður: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Hámarkshraði: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Þyngd: {LTBLUE}{WEIGHT_SHORT} {BLACK}Afl: {LTBLUE}{POWER}{BLACK} Hámarkshraði: {LTBLUE}{VELOCITY} @@ -3541,14 +3552,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Burðarg STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Flytja inneign: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Skoðanamillibil: {LTBLUE}{COMMA}dagar{BLACK} Seinasta skoðun: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Skoðanamillibil: {LTBLUE}{COMMA}%{BLACK} Seinasta skoðun: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Lengja skoðanamillibil með 10. Ctrl smelltu til að lengja skoðanamillibilið með 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Stytta skoðanamillibil með 10. Ctrl smelltu til að sytta skoðanamillibilið með 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Velja eftir hverju þjónustu á bílnum skuli háttað STR_VEHICLE_DETAILS_DEFAULT :Sjálfgefið -STR_VEHICLE_DETAILS_DAYS :Dagar STR_VEHICLE_DETAILS_PERCENT :Prósentur ###length VEHICLE_TYPES diff --git a/src/lang/ido.txt b/src/lang/ido.txt index b9c4e11b17..02b1b44633 100644 --- a/src/lang/ido.txt +++ b/src/lang/ido.txt @@ -217,6 +217,9 @@ STR_UNITS_FORCE_SI :{DECIMAL} kN STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} pd STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings @@ -351,6 +354,7 @@ STR_GRAPH_Y_LABEL_NUMBER :{TINY_FONT}{COM + # Graph key window # Company league window @@ -489,6 +493,9 @@ STR_GAME_OPTIONS_RESOLUTION_OTHER :altra + + + # Custom currency window @@ -616,6 +623,8 @@ STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :normala +###length 2 + ###length 2 diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index 29b5895848..7b90df1c9b 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Sama seperti Ut STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mil/j STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/jam STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}meter/detik -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}ubin/hari STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knots STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}dk @@ -255,6 +254,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Saring: @@ -612,8 +614,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Jumlah k STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Peringkat kinerja perusahaan (peringkat maksimal=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Nilai Perusahaan + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Daftar tarif kargo -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Hari transit STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pembayaran untuk mengirimkan 10 unit ( atau 10,000 liter ) untuk jarak 20 kotak STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Aktifkan semua STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Non-aktifkan semua @@ -1073,6 +1075,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Set Musi STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Pilih musik dasar yang akan digunakan STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informasi tambahan tentang musik dasar + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} file hilang/rusak STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Tidak bisa mendapatkan daftar resolusi layak @@ -1446,6 +1451,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Jika dinyalakan STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Kendaraan tidak pernah kadaluarsa: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Jika dinyalakan,semua model kendaraan akan ada selamanya sejak pendesainanya +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Perbarui otomatis kendaraan yang telah tua: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Jika dinyalakan, kendaraan mendekati akhir usianya akan secara otomatis diperbarui jika masih tersedia kendaraan itu @@ -3615,10 +3622,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Tutup # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidi STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Penawaran subsidi jasa transportasi: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} dari {STRING} ke {STRING}{YELLOW} (sebelum {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Tidak Ada - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Jasa transportasi bersubsidi: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} dari {STRING} ke {STRING}{YELLOW} ({COMPANY}{YELLOW}, hingga {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik pada layanan untuk mengarahkan pandangan utama pada industri/kota. Ctrl+Click akan membuka viewport baru pada lokasi industri/kota # Story book window @@ -4296,9 +4301,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nama ken STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nama kapal STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nama pesawat -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Umur: {LTBLUE}{STRING}{BLACK} Biaya operasional: {LTBLUE}{CURRENCY_LONG}/thn STR_VEHICLE_INFO_AGE :{COMMA} tahun ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} tahun ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Umur: {LTBLUE}{STRING}{BLACK} Biaya operasional: {LTBLUE}{CURRENCY_LONG}/thn STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Kec. Max: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Kecepatan Maks.: {LTBLUE}{VELOCITY} {BLACK}Jenis pesawat: {LTBLUE}{STRING} @@ -4318,14 +4323,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Daya Mua STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Nilai Transfer: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Jangka waktu perbaikan: {LTBLUE}{COMMA}{NBSP}hari{BLACK} Perbaikan terakhir: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Jangka waktu perbaikan: {LTBLUE}{COMMA} %{BLACK} Perbaikan terakhir: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Tambah jarak waktu perbaikan dengan 10. Ctrl+Click menambah jarak waktu perbaikan dengan 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Kurangi jarak waktu perbaikan dengan 10. Ctrl+Click mengurangi jarak waktu perbaikan dengan 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Ubah jenis interval perbaikan STR_VEHICLE_DETAILS_DEFAULT :Standar -STR_VEHICLE_DETAILS_DAYS :Hari STR_VEHICLE_DETAILS_PERCENT :Persentase ###length VEHICLE_TYPES diff --git a/src/lang/irish.txt b/src/lang/irish.txt index e8bfa0aa6d..c91b1984c4 100644 --- a/src/lang/irish.txt +++ b/src/lang/irish.txt @@ -197,7 +197,6 @@ STR_COLOUR_RANDOM :Randamach STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}m/u STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/u STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}{P th th th dt t}íl/lá STR_UNITS_POWER_IMPERIAL :{DECIMAL}hp STR_UNITS_POWER_METRIC :{DECIMAL}hp @@ -228,6 +227,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Teaghrán scagtha: @@ -581,8 +583,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Aonad la STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Rátálacha feidhmíochta cuideachtaí (uasrátáil=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Luachanna cuideachta + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Rátaí íocaíochta do lastas -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Laethanta faoi bhealach STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Íocaíocht as 10 n-aonad (nó 10,000 lítear) de lastas a sheachadadh fad 20 cearnóg STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Cumasaigh gach STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Díchumasaigh gach @@ -1003,6 +1005,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Roghnaig STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Faisnéis breise faoin tsraith ceoil bunaidh + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Teipeadh liosta de na taifigh a dtacaítear leo a fháil STR_ERROR_FULLSCREEN_FAILED :{WHITE}Theip ar an mód lánscáileáin @@ -1365,6 +1370,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Má dhéantar STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Ní imíonn feithiclí as dáta riamh: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Má dhéantar é a chumasú beidh gach cineál feithicle ar fáil go deo tar éis é a thabhairt isteach +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Déan uathathnuachan ar an bhfeithicil nuair a éiríonn sé sean: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Má tá sé cumasaithe, déantar feithicil atá ag teacht chuig deireadh a ré a ionadú go huathoibríoch má tá na coinníollacha athnuachana comhlíonta @@ -3453,10 +3460,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Dún # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Fóirdheontais STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Fóirdheontais le fáil do sheirbhísí chun: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} a thabhairt ó {STRING} go {STRING}{YELLOW} (roimh {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ceann ar bith - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Seirbhísí a fhaigheann fóirdheontas: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} a thabhairt ó {STRING} go {STRING}{YELLOW} ({COMPANY}{YELLOW}, go dtí {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Cliceáil ar sheirbhís chun an t-amharc a lárú ar thionscal/bhaile. Déantar amharc nua a oscailt ar shuíomh an tionscail/bhaile le Ctrl+Cliceáil # Story book window @@ -4111,9 +4116,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Ainmnigh STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Ainmnigh long STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Ainmnigh aerárthach -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aois: {LTBLUE}{STRING}{BLACK} Costas le Rith: {LTBLUE}{CURRENCY_LONG}/bl STR_VEHICLE_INFO_AGE :{COMMA} {P bhliain bhliain bliana mbliana bliana} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} {P bhliain bhliain bliana mbliana bliana} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aois: {LTBLUE}{STRING}{BLACK} Costas le Rith: {LTBLUE}{CURRENCY_LONG}/bl STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Luas uasta: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Luas Uasta: {LTBLUE}{VELOCITY} {BLACK}Cineál aerárthaigh: {LTBLUE}{STRING} @@ -4132,14 +4137,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Toillead STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Creidmheasanna Aistrithe: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Eatramh seirbhísithe: {LTBLUE}{COMMA}lá{BLACK} Seirbhísiú deiridh: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Eatramh seirbhísithe: {LTBLUE}{COMMA}%{BLACK} Seirbhísiú deiridh: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Méadaigh an t-eatramh seirbhísithe de 10. Méadaítear an t-eatramh seirbhísithe de 5 le Ctrl+Cliceáil STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Laghdaigh an t-eatramh seirbhísithe d 10. Laghdaítear an t-eatramh seirbhísithe de 5 le Ctrl+Cliceáil STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Athraigh cineál eatramh seirbhísithe STR_VEHICLE_DETAILS_DEFAULT :Réamhshocrú -STR_VEHICLE_DETAILS_DAYS :Laethanta STR_VEHICLE_DETAILS_PERCENT :Céatadán ###length VEHICLE_TYPES diff --git a/src/lang/italian.txt b/src/lang/italian.txt index 2d7c2f9490..48a423caef 100644 --- a/src/lang/italian.txt +++ b/src/lang/italian.txt @@ -216,7 +216,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Come il primari STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}caselle/giorno STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}nodi STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -257,10 +256,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}giorn{P "o" i} STR_UNITS_SECONDS :{COMMA}{NBSP}second{P "o" i} STR_UNITS_TICKS :{COMMA}{NBSP}tick{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtro: STR_LIST_FILTER_OSKTITLE :{BLACK}Immettere una o più parole chiave per filtrare dall'elenco @@ -617,8 +619,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unità d STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Valutazione prestazioni compagnie (massima valutazione=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Grafico del valore aziendale + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tariffe di pagamento carichi -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Giorni di viaggio STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pagamento per la consegna di 10 unità (o 10.000 litri) di carico alla distanza di 20 caselle STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Abilita tutti STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Disabilita tutti @@ -1079,6 +1081,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Pacchett STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Seleziona il pacchetto musicale di base da utilizzare STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informazioni aggiuntive sul pacchetto musicale di base + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} file{P "" s} mancant{P e i}/corrott{P o i}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Errore nel recupero della lista delle risoluzioni supportate @@ -1485,6 +1490,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Se abilitata, v STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :I veicoli non diventano mai obsoleti: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Se abilitata, dopo la loro introduzione, tutti i tipi di veicoli rimarranno sempre disponibili. +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Rinnova un veicolo quando diventa vecchio: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Se abilitata, un veicolo vicino alla sua età massima viene automaticamente sostituito quando si verificano le condizioni richieste per il rinnovo @@ -3676,10 +3683,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Chiudi # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Sussidi STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Sussidi offerti per la realizzazione di servizi: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} da {STRING} a {STRING}{YELLOW} (entro {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Nessuno - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Servizi già sovvenzionati: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} da {STRING} a {STRING}{YELLOW} ({COMPANY}{YELLOW}, fino al {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Fare clic su un servizio per centrare la visuale principale sull'industria o città. CTRL+clic mostra l'industria/città in una mini visuale # Story book window @@ -4357,9 +4362,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Rinomina STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Rinomina la nave STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Rinomina l'aeromobile -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Età: {LTBLUE}{STRING}{BLACK} Costo di esercizio: {LTBLUE}{CURRENCY_LONG}/anno STR_VEHICLE_INFO_AGE :{COMMA} ann{P o i} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ann{P o i} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Età: {LTBLUE}{STRING}{BLACK} Costo di esercizio: {LTBLUE}{CURRENCY_LONG}/anno STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Velocità max.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Velocità max.: {LTBLUE}{VELOCITY} {BLACK}Tipo aeromobile: {LTBLUE}{STRING} @@ -4379,14 +4384,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacit STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Crediti di trasferimento: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Manutenzione ogni: {LTBLUE}{COMMA}{NBSP}giorni{BLACK} Ultima volta: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervallo manutenzione: {LTBLUE}{COMMA}%{BLACK} Ultima il: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Aumenta l'intervallo di manutenzione di 10. CTRL+clic lo aumenta di 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Riduce l'intervallo di manutenzione di 10. CTRL+clic lo riduce di 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Cambia il tipo di intervallo di manutenzione STR_VEHICLE_DETAILS_DEFAULT :Predefinito -STR_VEHICLE_DETAILS_DAYS :Giorni STR_VEHICLE_DETAILS_PERCENT :Percentuale ###length VEHICLE_TYPES diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt index 81c4c79032..ca6571f128 100644 --- a/src/lang/japanese.txt +++ b/src/lang/japanese.txt @@ -197,7 +197,6 @@ STR_COLOUR_RANDOM :ランダム STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}タイル/日 STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}ノット STR_UNITS_POWER_IMPERIAL :{DECIMAL}英馬力 @@ -238,6 +237,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}フィ STR_UNITS_HEIGHT_METRIC :{DECIMAL}m STR_UNITS_HEIGHT_SI :{DECIMAL}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}フィルター: @@ -593,8 +595,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}貨物 STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}格付の推移(最大1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}総資産の推移 + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}運送報酬の相場 -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}輸送時間(日) STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}貨物を10単位(又は10,000リットル)を20マス運送したときの報酬 STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}すべて有効化 STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}すべて無効化 @@ -1045,6 +1047,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}使用 STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}基本音楽セットについての追加情報 + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}サポートされている解像度リストの回復に失敗しました STR_ERROR_FULLSCREEN_FAILED :{WHITE}フルスクリーンモードでの実行に失敗しました @@ -1410,6 +1415,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :有効にする STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :輸送機器の旧式化撤廃: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :有効にすると、いずれの種類の輸送機器であっても、その開発後であれば永久に購入が可能になります +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :老朽車両の自動交換: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :有効にすると、耐用年数を越えた輸送機器は自動で更新されるようになります(交換には一度格納施設に戻る必要があります)。具体的な交換時期は下の設定で変更できます。 @@ -3549,10 +3556,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :閉じる # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}助成金 STR_SUBSIDIES_OFFERED_TITLE :{BLACK}助成金が提案された経路: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING}を{STRING}から{STRING}へ{YELLOW}(有効期限: {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- なし - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}助成金が交付されている経路: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING}を{STRING}から{STRING}へ{YELLOW}({COMPANY}{YELLOW}、交付期限:{DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}指定の街/産業の場所を見るにはクリックします。Ctrl+クリックで新規のビューポートに表示します # Story book window @@ -4224,9 +4229,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}車両 STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}船舶に名前を付ける STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}航空機に名前を付ける -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}使用年数: {LTBLUE}{STRING}{BLACK} 維持費: 一年間{LTBLUE}{CURRENCY_LONG} STR_VEHICLE_INFO_AGE :{COMMA}年({COMMA}年) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA}年({COMMA}年) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}使用年数: {LTBLUE}{STRING}{BLACK} 維持費: 一年間{LTBLUE}{CURRENCY_LONG} STR_VEHICLE_INFO_MAX_SPEED :{BLACK}最高速度: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}最高速度: {LTBLUE}{VELOCITY} {BLACK}航空機のタイプ: {LTBLUE}{STRING} @@ -4246,14 +4251,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}収容 STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}転送による部分払い: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}点検周期: {LTBLUE}{COMMA}日{BLACK} 最終点検日: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}点検周期: {LTBLUE}{COMMA}%{BLACK} 最終点検日: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}点検周期を10日(%)延ばします。Ctrl+クリックで5日(%)単位になります STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}点検周期を10日(%)縮めます。Ctrl+クリックで5日(%)単位になります STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}点検周期の変更 STR_VEHICLE_DETAILS_DEFAULT :既定 -STR_VEHICLE_DETAILS_DAYS :日 STR_VEHICLE_DETAILS_PERCENT :パーセント ###length VEHICLE_TYPES diff --git a/src/lang/korean.txt b/src/lang/korean.txt index 3b89dab6d9..e36f155e11 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :주 색상과 STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}칸/일 STR_UNITS_VELOCITY_KNOTS :{DECIMAL}노트 STR_UNITS_POWER_IMPERIAL :{DECIMAL}마력 @@ -256,10 +255,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}피트 STR_UNITS_HEIGHT_METRIC :{DECIMAL}m STR_UNITS_HEIGHT_SI :{DECIMAL}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}일 STR_UNITS_SECONDS :{COMMA}초 STR_UNITS_TICKS :{COMMA}틱 + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}검색: STR_LIST_FILTER_OSKTITLE :{BLACK}검색할 단어를 하나 이상 입력하세요 @@ -616,8 +618,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}수송 STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}회사 성취도 (최고 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}회사가치 그래프 + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}화물 운송단가 비율 -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}통과시간 STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}10 단위(1만 리터)의 화물을 20칸 거리만큼 운송할 때의 운송비 지급량 STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}모두 사용 STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}모두 사용 안 함 @@ -1083,6 +1085,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}기본 STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}게임에 사용할 기본 배경 음악 세트를 선택하세요 STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}기본 배경 음악 세트에 대한 추가 정보를 봅니다. + + + STR_BASESET_STATUS :{STRING} {RED}({NUM}개의 파일이 빠졌거나 손상되었습니다) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}지원되는 해상도 목록을 불러오는데 실패하였습니다. @@ -1456,6 +1461,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :이 설정을 STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :옛날 차량을 사라지지 않고 계속 만들 수 있게 함: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :이 설정을 켜면, 오래된 차량 모델을 포함하여 모든 차량 모델을 도입 이후에 계속 사용할 수 있게 됩니다. +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :차량이 낡으면 차량을 자동으로 교체: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :이 설정을 켜면, 제한 수명에 다다른 차량이 교체 조건을 만족할 경우 자동으로 차량을 교체할 수 있게 됩니다 @@ -3654,10 +3661,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :닫기 # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}보조금 STR_SUBSIDIES_OFFERED_TITLE :{BLACK}지급 대기 중인 보조금: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{1:STRING}에서 {2:STRING}까지 {0:STRING} 수송{YELLOW} ({3:DATE_SHORT}까지) STR_SUBSIDIES_NONE :{ORANGE}없음 STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}이미 지급된 보조금: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{1:STRING}에서 {2:STRING}까지 {0:STRING} 수송{YELLOW} ({3:COMPANY}{YELLOW}, {DATE_SHORT}까지) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}산업시설/도시의 위치로 시점을 변경하려면 클릭하세요. CTRL+클릭하면 이 산업시설/도시의 위치를 기준으로 새로운 외부 화면을 엽니다 # Story book window @@ -4335,9 +4340,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}차량 STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}선박 이름 지정 STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}항공기 이름 지정 -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}연령: {LTBLUE}{STRING}{BLACK} 유지비: {LTBLUE}{CURRENCY_LONG}/년 STR_VEHICLE_INFO_AGE :{COMMA}년 ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA}년 ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}연령: {LTBLUE}{STRING}{BLACK} 유지비: {LTBLUE}{CURRENCY_LONG}/년 STR_VEHICLE_INFO_MAX_SPEED :{BLACK}최고 속력: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}최고 속력: {LTBLUE}{VELOCITY} {BLACK}항공기 종류: {LTBLUE}{STRING} @@ -4357,14 +4362,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}수송 STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}환승 수익: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}점검 간격: {LTBLUE}{COMMA}일{BLACK}마다{NBSP} 마지막 점검 날짜: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}점검 기준: {LTBLUE}{COMMA}%{BLACK} 떨어지면 마지막 점검 날짜: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}점검 기준값을 10만큼 올립니다. CTRL+클릭하면 점검 기준값을 5만큼 올립니다 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}점검 기준값을 10만큼 내립니다. CTRL+클릭하면 점검 기준값을 5만큼 내립니다 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}점검 기준 설정을 변경합니다 STR_VEHICLE_DETAILS_DEFAULT :기본 -STR_VEHICLE_DETAILS_DAYS :날짜 STR_VEHICLE_DETAILS_PERCENT :신뢰도 ###length VEHICLE_TYPES diff --git a/src/lang/latin.txt b/src/lang/latin.txt index da104fa634..fbbb05a412 100644 --- a/src/lang/latin.txt +++ b/src/lang/latin.txt @@ -415,6 +415,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Series colans: @@ -753,8 +756,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unitates STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Censiones effectus societatis (Censio maxima = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Aestimationes societatis + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Mercedes Onerum -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dies in itinere STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Merces tradendi 10 oneris unitates (aut 10,000 litra) per 20 quadra STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Omnia Monstrare STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Omnia Celare @@ -1047,7 +1050,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nov{G us STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Condicio subsidii discedit:{}{}Vectura {STRING.gen} a {STRING.abl} ad {STRING.acc} non diutius subveniatur STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidium retractum:{}{}Vectura {STRING.gen} a {STRING.abl} ad {STRING.acc} non diutius subvenietur +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Subsidium oblatum:{}{}Prima vectura {STRING.gen} a {STRING.abl} ad {STRING.acc} unum annum subveniatur ab auctoritate vicinale! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}{STRING} assignatur subsidium!{}{}Vectura {STRING.gen} a {STRING.abl} ad {STRING.acc} merebit reditum sesquiplicem anno secundo! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}{STRING} assignatur subsidium!{}{}Vectura {STRING.gen} a {STRING.abl} ad {STRING.acc} merebit reditum duplicem anno secundo! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}{STRING} assignatur subsidium!{}{}Vectura {STRING.gen} a {STRING.abl} ad {STRING.acc} merebit reditum triplicem anno secundo! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}{STRING} assignatur subsidium!{}{}Vectura {STRING.gen} a {STRING.abl} ad {STRING.acc} merebit reditum quadruplicem anno secundo! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Chaos vehicularium in {TOWN}!{}{}Reconstructio viarum, expensis a {STRING} compartis, affert miseriam autoraedariis 6 menses! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Monopolium Vecturae! @@ -1147,6 +1155,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Eligere STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Indicia additicia de hoc fundamento musico + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Non potuit repperire indicem resolutionum STR_ERROR_FULLSCREEN_FAILED :{WHITE}Mutatio ad cunctum scrinium defecit @@ -1495,6 +1506,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Electa, nuntium STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicula numquam recedunt: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Electa, omnes vehiculorum typi permanent post introductionem +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autoredimere vehicula cum veterascunt: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Electa, vehicula veterascentia automatice redimuntur, condicionibus satisfactis @@ -3387,10 +3400,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Claudere # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidia STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidia portationis oblata: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} a {STRING.abl} ad {STRING.acc}{YELLOW} (ante {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Nulla - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Itinera iam subventa: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} a {STRING} ad {STRING}{YELLOW} ({COMPANY}{YELLOW}, ad {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Preme in subsidium ut conspectus moveatur supra industriam/oppidum. Ctrl+Preme ut nova fenestra conspectus aperiatur supra industriam/oppidum # Story book window @@ -4008,9 +4019,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nominare STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nominare navem STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nominare aeroplanum -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aetas: {LTBLUE}{STRING}{BLACK} Pretium operandi: {LTBLUE}{CURRENCY_LONG} per annum STR_VEHICLE_INFO_AGE :{COMMA} ann{P us i} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ann{P us i} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Aetas: {LTBLUE}{STRING}{BLACK} Pretium operandi: {LTBLUE}{CURRENCY_LONG} per annum STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Velocitas maxima: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Velocitas maxima: {LTBLUE}{VELOCITY} {BLACK}Typus aeroplani: {LTBLUE}{STRING} @@ -4029,14 +4040,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacita STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Credita transferendi: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Intervallum ministrationis: {LTBLUE}{COMMA}{NBSP}dies{BLACK} Ministratio prior: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervallum ministrationis: {LTBLUE}{COMMA}%{BLACK} Ministratio prior: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Augere intervallum ministrationis 10. Ctrl+Preme ut augeatur 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Minuere intervallum ministrationis 10. Ctrl+Preme ut minuatur 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Eligere genus intervalli ministrationis STR_VEHICLE_DETAILS_DEFAULT :Solitus -STR_VEHICLE_DETAILS_DAYS :Diebus STR_VEHICLE_DETAILS_PERCENT :Per centum ###length VEHICLE_TYPES diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt index 9758f86843..5ce541ed9f 100644 --- a/src/lang/latvian.txt +++ b/src/lang/latvian.txt @@ -216,7 +216,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Tāds, ka prim STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}jūdzes stundā STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}lauciņi/diena STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}mezgli STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}ZS @@ -257,10 +256,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}dien{P a as ""} STR_UNITS_SECONDS :{COMMA}{NBSP}sekund{P e s ''''} STR_UNITS_TICKS :{COMMA}{NBSP}tick{P šķi šķi s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filters: STR_LIST_FILTER_OSKTITLE :{BLACK}Ievadiet vienu vai vairākus atslēgvārdus, lai filtrētu sarakstu @@ -617,8 +619,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Pārvad STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Uzņēmuma darbības vērtējumi (maksimālais ir 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Uzņēmuma vērtības diagramma + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Kravas apmaksas cenas -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dienas pārvadājumos STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Izmaksas par 10 vienību (vai 10,000 litru) kravas pārvadāšanu par 20 lauciņiem STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Iespējot visu STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Atspējot visu @@ -1080,6 +1082,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Pamata m STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Atlasīt lietošanai pamata mūzikas kopu STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Papildinformācija par pamata mūzikas kopu + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} trūkst/bojāts fail{P s i ""}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Neizdevās saņemt sarakstu ar atbalstītajām izšķirtspējām @@ -1453,6 +1458,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Ja ieslēgts, t STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Transportlīdzekļi nekad "nemirst": {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Kad ieslēgts, visi transportlīdzekļu modeļi pēc to ieviešanas vienmēr ir pieejami +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automātiski atjaunot transportlīdzekļus, kad tie ir kļuvuši veci: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Ja ieslēgts, kad ir atbilstoši atjaunošanas apstākļi, automātiski tiek nomainīti transportlīdzekļi kuru kalpošanas laiks tuvojas beigām @@ -3659,10 +3666,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Aizvērt # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsīdijas STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Piedāvājumā esošās subsīdijas par pakalpojumu nodrošināšanu: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} no {STRING} līdz {STRING}{YELLOW} (no {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Neviens - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Pašlaik subsidētie pakalpojumi: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} no {STRING} uz {STRING}{YELLOW} ({COMPANY}{YELLOW}, līdz {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikšķināt uz servisa, lai iecentrētu skatu uz rūpnīcu/pilsētu. Ctrl+klikšķis atvērs jaunu skatu lauku uz pilsētu/rūpnīcu # Story book window @@ -4341,9 +4346,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nosaukt STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nosaukt kuģi STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nosaukt lidaparātu -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vecums: {LTBLUE}{STRING}{BLACK} Izmaksas: {LTBLUE}{CURRENCY_LONG} gadā STR_VEHICLE_INFO_AGE :{COMMA} gad{P s i u} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} gad{P s i u} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vecums: {LTBLUE}{STRING}{BLACK} Izmaksas: {LTBLUE}{CURRENCY_LONG} gadā STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Maks. ātrums: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maks. ātrums: {LTBLUE}{VELOCITY} {BLACK}Lidaparāta veids: {LTBLUE}{STRING} @@ -4363,14 +4368,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Ietilpī STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Pārvadājumu ieņēmumi: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Apkopes starplaiks: {LTBLUE}{COMMA}{NBSP}dienas{BLACK} Pēdējā apkope: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Apkopes starplaiks: {LTBLUE}{COMMA}%{BLACK} Pēdējā apkope: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Palielināt apkopes starplaiku par 10. Ctrl+klikšķis palielina apkopes starplaiku par 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Samazināt apkopes starplaiku par 10. Ctrl+klikšķis samazina apkopes starplaiku par 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Mainīt apkopes starplaiku veidu STR_VEHICLE_DETAILS_DEFAULT :Noklusējuma -STR_VEHICLE_DETAILS_DAYS :Dienas STR_VEHICLE_DETAILS_PERCENT :Procenti ###length VEHICLE_TYPES diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt index d76a034512..c04c69d6dc 100644 --- a/src/lang/lithuanian.txt +++ b/src/lang/lithuanian.txt @@ -392,7 +392,6 @@ STR_COLOUR_RANDOM :Atsitiktinė STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}langeliai per dieną STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}AG STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}AG @@ -429,6 +428,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Raktažodis: @@ -783,8 +785,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Prekių STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Kompanijos pajėgumo reitingas (didžiausias=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Kompanijos vertė + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Krovinių pervežimo tarifai -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dienų kelyje STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Tarifai pervežant 10 vienetų (ar 10000 litrų) krovinių 20-ies langelių atstumu STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Įjungti viską STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Išjungti viską @@ -1221,6 +1223,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Pasirink STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Papildoma informacija apie bazinę muziką + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nepavyko gauti palaikomų ekrano raiškų sąrašo STR_ERROR_FULLSCREEN_FAILED :{WHITE}Viso ekrano nustatymas nepavyko @@ -1582,6 +1587,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Jei transporto STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Transporto priemonės niekada nepasensta: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Kartą atsiradę, transporto priemonės niekuomet nebepasens ir jas visada bus galima nusipirkti +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automatiškai atnaujinti transporto priemonę, kai ji pasensta: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Transporto priemonė, eksploatacijos laikotarpiui artėjant prie pabaigos, bus automatiškai bus atnaujinta, jei tik atnaujinimo sąlygos bus išpildytos @@ -3684,10 +3691,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Uždaryti # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidijos STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Dar nepanaudotos subsidijos: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} iš {STRING} į {STRING}{YELLOW} (iki {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Niekas - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Jau subsidijuojama: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} iš {STRING} į {STRING}{YELLOW} ({COMPANY}{YELLOW}, iki {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Paspauskite ant paslaugos, norėdami pamatyti pramonės vietą/miestą. Ctrl+Paspaudimas atidaro naują langą su pramonės vietos/miesto vaizdu # Story book window @@ -4385,9 +4390,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Pervadin STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Pervadinti laivą STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Pervardinti lėktuvą -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Amžius: {LTBLUE}{STRING}{BLACK} Eksploatavimo išlaidos: {LTBLUE}{CURRENCY_LONG} per metus STR_VEHICLE_INFO_AGE :{COMMA} met{P ai ai ų} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} met{P ai ai ų} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Amžius: {LTBLUE}{STRING}{BLACK} Eksploatavimo išlaidos: {LTBLUE}{CURRENCY_LONG} per metus STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Didž. greitis: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maks. greitis: {LTBLUE}{VELOCITY} {BLACK}Lėktuvo tipas: {LTBLUE}{STRING} @@ -4407,14 +4412,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Talpa: { STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Pervesti už tiekėjų sistemas: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Techninė apžiūra kas: {LTBLUE}{COMMA}{NBSP}dien{P ą as ų}{BLACK} Paskutinė apžiūra:{LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Siųsti techninei apžiūrai patikimumui nukritus iki: {LTBLUE}{COMMA}%{BLACK} Paskutinė apžiūra: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Padidinti techninės apžiūros intervalą 10 dienų (arba procentų). Spragtelėjus laikant nuspaustą Ctrl klavišą, intervalas bus padidintas 5 dienomis (arba procentais) STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Sumažinti techninės apžiūros intervalą 10 dienų (arba procentų). Spragtelėjus laikant nuspaustą Ctrl klavišą, intervalas bus sumažintas 5 dienomis (arba procentais) STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Techninės apžiūros intervalo tipas STR_VEHICLE_DETAILS_DEFAULT :Numatytasis -STR_VEHICLE_DETAILS_DAYS :Dienos STR_VEHICLE_DETAILS_PERCENT :Procentai ###length VEHICLE_TYPES diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt index 9738d11b17..fc064f6804 100644 --- a/src/lang/luxembourgish.txt +++ b/src/lang/luxembourgish.txt @@ -197,7 +197,6 @@ STR_COLOUR_RANDOM :Zoufälleg STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}Felder/Dag STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}bhp STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}ps @@ -237,6 +236,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: @@ -592,8 +594,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Eenheete STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Firmen Performancebewäertung (max Bewäertung=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Firmewäert + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Luedungs Bezuelraten -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Deeg am Emlaf STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Bezuelung fir Liwwerung vun 10 Eenheeten (oder 10.000 liter) Luedungen op Distanz vun 20 Felder STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}All wielen STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}All ofwielen @@ -1026,6 +1028,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Wiel de STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Méi Informatiounen iwwer de Basis Musikset + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Konnt keng Lëscht vun supportéierten Opléisunge fannen STR_ERROR_FULLSCREEN_FAILED :{WHITE}Fehler beim Vollbild @@ -1391,6 +1396,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Wann ugeschalt, STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Gefierer lafen nie of: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Wann ugeschalt, bleiwen all Modeller vu Gefierer éiweg verfügbar +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Gefier automatesch erneiere wann et al gëtt: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Wann ugeschalt, gëtt e Gefier wat u säi Lafzäitenn kënnt automatesch ausgetosch @@ -3522,10 +3529,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Zouman # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subside STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subside fir de Service: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} vun {STRING} op {STRING}{YELLOW} (bis {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Keng - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Servicer mat Subside: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} vun {STRING} op {STRING}{YELLOW} ({COMPANY}{YELLOW}, bis {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klick op de Service fir d'Usiicht op d'Industrie/Stad ze zentréieren. Ctrl+Klick erstellt eng nei Usiicht op d'Industrie/Stad # Story book window @@ -4197,9 +4202,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Stroosse STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Schëff benennen STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Fliger benennen -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alter: {LTBLUE}{STRING}{BLACK} Betribskäschten: {LTBLUE}{CURRENCY_LONG}/Joer STR_VEHICLE_INFO_AGE :{COMMA} Joer ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} Joer ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alter: {LTBLUE}{STRING}{BLACK} Betribskäschten: {LTBLUE}{CURRENCY_LONG}/Joer STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. Geschwindegkeet: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. Geschw.: {LTBLUE}{VELOCITY} {BLACK}Fliger Typ: {LTBLUE}{STRING} @@ -4219,14 +4224,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapazit STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transferts-Suen: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Revisiounsintervall: {LTBLUE}{COMMA}{NBSP}Deeg{BLACK} Lescht Revisioun: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Revisiounsintervall: {LTBLUE}{COMMA}%{BLACK} Lescht Revisioun: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Revisiounsintervall em 10 erhéijen. Ctrl+Klick erhéicht Intervall em 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Revisiounsintervall em 10 erofsetzen. Ctrl+Klick setzt den Intervall em 5 rof STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Wiesselt de Revisiounsintervall STR_VEHICLE_DETAILS_DEFAULT :Standard -STR_VEHICLE_DETAILS_DAYS :Deeg STR_VEHICLE_DETAILS_PERCENT :Prozent ###length VEHICLE_TYPES diff --git a/src/lang/macedonian.txt b/src/lang/macedonian.txt index 49ad8cc50f..649f10bb8f 100644 --- a/src/lang/macedonian.txt +++ b/src/lang/macedonian.txt @@ -218,6 +218,9 @@ STR_UNITS_FORCE_SI :{DECIMAL} kN STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ft STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_OSKTITLE :{BLACK}Внесете филтер низа @@ -535,8 +538,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Един STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Перформанси на компанијата рејтингот (максимум рејтинг = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}компанијата вредности + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Карго плаќање цени -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Денови во транзит STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Плаќање за доставување 10 единици (или 10.000 литри) на товар на растојание од 20 квадрати STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}им овозможи на сите STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Оневозможи ги сите @@ -802,6 +805,9 @@ STR_GAME_OPTIONS_CAPTION :{WHITE}Опци + + + # Custom currency window @@ -919,6 +925,8 @@ STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Инфраст +###length 2 + ###length 2 @@ -1831,7 +1839,6 @@ STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} г STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Смени тип на интервалот за сервисирање -STR_VEHICLE_DETAILS_DAYS :Дена STR_VEHICLE_DETAILS_PERCENT :Процент ###length VEHICLE_TYPES diff --git a/src/lang/malay.txt b/src/lang/malay.txt index daed0255f3..7cf67bcb47 100644 --- a/src/lang/malay.txt +++ b/src/lang/malay.txt @@ -220,6 +220,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ka STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Tapis barisan: @@ -544,8 +547,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unit kar STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Penilaian prestasi syarikat (nilai maksimum=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Nilai syarikat + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Kadar Bayaran Kargo -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Jumlah hari dalam perjalanan STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Bayaran untuk hantaran 10 unit (atau 10,000 liter) kargo sejauh 20 petak STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Guna Semua STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Nyahaktifkan Semua @@ -827,7 +830,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Tempoh tawaran subsidi tamat:{}{}{STRING} dari {STRING} ke {STRING} tidak akan diberi subsidi. STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidi ditarik:{}{}Servis {STRING} dari {STRING} ke {STRING} tidak akan diberi subsidi. +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Subsidi perkhidmatan ditawarkan:{}{}Perkhidmatan {STRING} pertama dari {STRING} ke {STRING} akan mendapat subsidi selama setahun daripada pihak berkuasa tempatan! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Subsidi perkhidmatan dianugerahkan kepada {STRING}!{}{}Perkhidmatan {STRING} dari {STRING} ke {STRING} akan ditambah bayaran 50% untuk tahun berikutnya! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Subsidi perkhidmatan dianugerahkan kepada {STRING}!{}{}Perkhidmatan {STRING} dari {STRING} ke {STRING} akan dibayar kadar dua kali ganda untuk tahun berikutnya! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Subsidi perkhidmatan dianugerahkan kepada {STRING}!{}{}Perkhidmatan {STRING} dari {STRING} ke {STRING} akan dibayar kadar tiga kali ganda untuk tahun berikutnya! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Subsidi perkhidmatan dianugerahkan kepada {STRING}!{}{}Perkhidmatan {STRING} dari {STRING} ke {STRING} akan dibayar kadar empat kali ganda untuk tahun berikutnya! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Kesesakan lalulintas di {TOWN}!{}{}Rancangan pembinaan semula jalanraya dibiayai oleh {STRING} akan menyeksa pemandu kenderaan selama 6 bulan! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Monopoly pengangkutan! @@ -925,6 +933,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Pilih se STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Maklumat lebih tentang set muzik asas + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Gagal untuk mendapat senarai resolusi yang disokong STR_ERROR_FULLSCREEN_FAILED :{WHITE}Mod skrin penuh gagal dilakukan @@ -1247,6 +1258,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Beri amaran jik STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Kenderaan tidak akan tamat tempohnya: {STRING} +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Gunakan pembaharuan automatik apabila kenderaan usang : {STRING} ###length 2 @@ -2883,10 +2896,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Tutup # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidi STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidi yang ditawarkan untuk perkhidmatan: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} dari {STRING} ke {STRING}{YELLOW} (sebelum {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Tiada - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Perkhidmatan yang telah disubsidikan: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} dari {STRING} ke {STRING}{YELLOW} ({COMPANY}{YELLOW}, sehingga {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik di atas servis untuk memusatkan pemandangan kepada industri/bandar. Ctrl+Klik untuk membuka tetingkap pemandangan di lokasi bandar # Story book window @@ -3435,9 +3446,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nama ken STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nama kapal STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Namakan pesawat -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Umur: {LTBLUE}{STRING}{BLACK} Kos Pengendalian: {LTBLUE}{CURRENCY_LONG}/thn STR_VEHICLE_INFO_AGE :{COMMA} tahun ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} tahun ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Umur: {LTBLUE}{STRING}{BLACK} Kos Pengendalian: {LTBLUE}{CURRENCY_LONG}/thn STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Kelajuan Maks.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Kelajuan maksima: {LTBLUE}{VELOCITY} {BLACK}Jenis pesawat: {LTBLUE}{STRING} @@ -3456,12 +3467,9 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Muatan: STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Pindahkan kredit: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Tempoh Penyenggelaraan: {LTBLUE}{COMMA}hari{BLACK} Penyenggelaraan terakhir: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Tempoh Penyenggelaraan: {LTBLUE}{COMMA}%{BLACK} Penyenggelaraan terakhir: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Tambah 10 tempoh penyenggelaraan. Ctrl+Klik untuk tambah 5 tempoh penyenggelaraan STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Kurangkan 10 tempoh penyenggelaraan. Ctrl+Klik untuk kurangkan 5 tempoh penyenggelaraan -STR_VEHICLE_DETAILS_DAYS :Hari STR_VEHICLE_DETAILS_PERCENT :Peratusan ###length VEHICLE_TYPES diff --git a/src/lang/maltese.txt b/src/lang/maltese.txt index b9da14b5d5..94149a22c3 100644 --- a/src/lang/maltese.txt +++ b/src/lang/maltese.txt @@ -171,6 +171,9 @@ STR_UNITS_FORCE_SI :{DECIMAL} kN STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ft STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_OSKTITLE :{BLACK}Daħħal sentenza għall-iffiltrar @@ -320,6 +323,7 @@ STR_GRAPH_Y_LABEL_NUMBER :{TINY_FONT}{COM + # Graph key window # Company league window @@ -422,6 +426,9 @@ STR_GAME_OPTIONS_RESOLUTION_OTHER :oħrajn + + + # Custom currency window @@ -546,6 +553,8 @@ STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Avza jekk jinti +###length 2 + ###length 2 diff --git a/src/lang/marathi.txt b/src/lang/marathi.txt index 92dedc401e..afe1e7de71 100644 --- a/src/lang/marathi.txt +++ b/src/lang/marathi.txt @@ -216,6 +216,9 @@ STR_UNITS_VOLUME_LONG_SI :{DECIMAL} m³ +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}शब्द गाळा: @@ -525,8 +528,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}वि STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}कंपनी कामगिरी रेटिंग (कमाल रेटिंग = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}कंपनी मूल्ये + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}मालवाहू भरणा दर -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}संक्रमणादरम्यान दिवस STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}मालवाहू 10 युनिट (किंवा 10,000 लिटर) 20 चौरस अंतरावर वितरण भरणा STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}सर्व सक्षम STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}सर्व अक्षम @@ -739,6 +742,9 @@ STR_GAME_OPTIONS_RESOLUTION_OTHER :अन्य + + + # Custom currency window @@ -854,6 +860,8 @@ STR_CONFIG_SETTING_WARN_LOST_VEHICLE : वाहन +###length 2 + ###length 2 diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index 6c902e29eb..7a8b39f430 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -199,7 +199,6 @@ STR_COLOUR_RANDOM :Tilfeldig STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mi/t STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/t STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}ruter/dag STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hk STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}hk @@ -231,6 +230,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filterstreng: @@ -585,8 +587,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Vareenhe STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Prestasjonsvurdering av firma (maks poeng=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Firmaverdier + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Varetakster -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dager i transport STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Betaling for levering av ti vareenheter (eller 10,000 liter) over en avstand på 20 ruter STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Vis alle STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Skjul alle @@ -1011,6 +1013,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Velg mus STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Ytterligere informasjon om det originale musikksettet + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Mislyktes med å hente en liste over støttede oppløsninger STR_ERROR_FULLSCREEN_FAILED :{WHITE}Fullskjermmodus mislyktes @@ -1375,6 +1380,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Når aktivert, STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Kjøretøy utgår aldri: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Når aktivert, vil alle kjøretøysmodeller være tilgjengelig for alltid etter de introduseres +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autoforny kjøretøy når det blir gammelt: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Når aktivert, blir et kjøretøy som nærmer seg slutten av sin levetid automatisk erstattet når betingelsene for fornyelse er oppfylt @@ -3482,10 +3489,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Lukk # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidier STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidietilbud: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} fra {STRING} til {STRING}{YELLOW} (innen {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ingen - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Tjenester som allerede subsidieres: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} fra {STRING} til {STRING}{YELLOW} ({COMPANY}{YELLOW}, inntil {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikk for å gå til industri/by. Ctrl+klikk åpner et nytt tilleggsvindu over industrien/byen # Story book window @@ -4142,9 +4147,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Navngi k STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Navngi skip STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Navngi luftfartøy -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftskostnader: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_AGE :{COMMA} år ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} år ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftskostnader: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Topphastighet: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Topphastighet: {LTBLUE}{VELOCITY} {BLACK}Flytype: {LTBLUE}{STRING} @@ -4163,14 +4168,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapasite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Overføringskreditt: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Vedlikeholdsintervall: {LTBLUE}{COMMA}{NBSP}dager{BLACK} Forrige vedlikehold: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Vedlikeholdsintervall: {LTBLUE}{COMMA}{NBSP}%{BLACK} Forrige vedlikehold: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Øk vedlikeholdsintervall med 10. Ctrl+klikk øker med 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Reduser vedlikeholdsintervall med 10. Ctrl+klikk reduserer med 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Enhet for vedlikeholdsintervall STR_VEHICLE_DETAILS_DEFAULT :Standard -STR_VEHICLE_DETAILS_DAYS :Dager STR_VEHICLE_DETAILS_PERCENT :Prosentandel ###length VEHICLE_TYPES diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt index d4e66ba17a..d6912f69a1 100644 --- a/src/lang/norwegian_nynorsk.txt +++ b/src/lang/norwegian_nynorsk.txt @@ -227,6 +227,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} fot STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Søkefilter: @@ -564,8 +567,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Vareeini STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Prestasjonsvurdering av firma (maks. poeng=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Firmaverdi + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Varetakster -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dager i transport STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Betaling for levering av ti einingar (eller 10 000 liter) over ein distanse på 20 ruter STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Syn alle STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Gøym alle @@ -853,7 +856,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ny {STRI STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Tilbod om subsidie har gått ut:{}{}{STRING} frå {STRING} til {STRING} får ikkje lenger subsidiar STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidie trekt attende:{}{}{STRING} teneste frå {STRING} til {STRING} får ikkje lenger subsidiar +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Subsidie-tilbod:{}{}Første transport av {STRING} frå {STRING} til {STRING} vil vere subsidiert i eit år av bystyret! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Subsidie gjeve til {STRING}!{}{}Transport av {STRING} frå {STRING} til {STRING} vil gje 50{NBSP}% ekstra forteneste det neste året! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Subsidie gjeve til {STRING}!{}{}Transport av {STRING} frå {STRING} til {STRING} vil gje dobbel inntekt i eit år! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Subsidie gjeve til {STRING}!{}{}Transport av {STRING} frå {STRING} til {STRING} vil gje trippel inntekt i eit år! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Subsidie gjeve til {STRING}!{}{}Transport av {STRING} frå {STRING} til {STRING} vil gje firedobbel inntekt i eit år! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Trafikkaos i {TOWN}!{}{}Ombyggjing av vegen, finansiert av {STRING}, medførar 6 månaders irritasjon for bilistane! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Transportmonopol! @@ -952,6 +960,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Vel musi STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Tilleggsinformasjon om musikksettet + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Kunne ikkje henta liste over støtta oppløysingar STR_ERROR_FULLSCREEN_FAILED :{WHITE}Fullskjermvising feila @@ -1279,6 +1290,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Åtvar dersom e STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Køyretøy utgår aldri: {STRING} +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autoforny køyretøy når det vert gamalt: {STRING} STR_CONFIG_SETTING_AUTORENEW_MONTHS :Automatisk fornying når køyretøy er {STRING} maks alder @@ -3063,10 +3076,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Lukk # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidiar STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Tilbydde subsidiar: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} frå {STRING} til {STRING}{YELLOW} (innan {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}Ingen STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Tenester som er subsidierte frå før: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} frå {STRING} til {STRING}{YELLOW} ({COMPANY}{YELLOW}, til {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikk på teneste for å midtstille hovedvisninga på industri/by. Ctrl+klikk syner industri/by i eit nytt tilleggsvindauge. # Story book window @@ -3653,9 +3664,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Namngje STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Namngje skip STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Namngje luftfartøy -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftskostnadar: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_AGE :{COMMA} år ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} år ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftskostnadar: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Maks. hastigheit: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Vekt: {LTBLUE}{WEIGHT_SHORT} {BLACK}Kraft: {LTBLUE}{POWER}{BLACK} Maks. hastigheit: {LTBLUE}{VELOCITY} @@ -3672,14 +3683,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapasite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Overfør kreditt: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Vedlikehaldsintervall: {LTBLUE}{COMMA}dagar{BLACK} Førre vedlikehald: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Vedlikehaldsintervall: {LTBLUE}{COMMA}{NBSP}%{BLACK} Førre vedlikehald: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Auk vedlikehaldsintervall med 10. CTRL+klikk aukar vedlikehaldsintervallet med 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Minsk vedlikehaldsintervall av tog med 10. CTRL+klikk minskar intervallet med 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Eining for vedlikehaldsintervall STR_VEHICLE_DETAILS_DEFAULT :Standard -STR_VEHICLE_DETAILS_DAYS :Dagar STR_VEHICLE_DETAILS_PERCENT :Prosent ###length VEHICLE_TYPES diff --git a/src/lang/persian.txt b/src/lang/persian.txt index 07ee6e47d2..1f617226d9 100644 --- a/src/lang/persian.txt +++ b/src/lang/persian.txt @@ -218,6 +218,9 @@ STR_UNITS_FORCE_SI :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP}پا STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}متر +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}متن فیلتر: @@ -554,8 +557,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}تعدا STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}رتبه بندی راندمان شرکت (رتبه بیشینه = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}ارزش نقدی شرکت + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}مبلغ پرداختی محموله ها -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}روز های گذشته در حمل STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}مبلغ پرداختی برای 10 واحد (یا 10000لیتر) به ازای 20 مربع STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}فعال سازی همه STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}غیر فعال سازی همه @@ -843,7 +846,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK} {STRING STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}پیشنهاد یارانه باطل شد:{}{}{STRING} از {STRING} به {STRING} دیگر یارانه ای به همراه نخواهد داشت STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}یارانه بازپس گرفته شد:{}{}{STRING} خدمات از {STRING} به {STRING} دیگر شامل یارانه نمی باشند +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}پیشنهاد پرداخت یارانه:{}{}نخستین {STRING} خدمات از {STRING} به {STRING} توسط فرماندار محلی به مدت یک سال شامل یارانه می گردد! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}{STRING} برنده یارانه خدمات گردید!{}{}{STRING} خدمات از {STRING} به {STRING} به مدت یک سال شامل ۵۰ درصد اضافه می گردد! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}{STRING} برنده یارانه خدمات گردید!{}{}{STRING} خدمات از {STRING} به {STRING} به مدت یک سال دوبرابر پرداخت میشود! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK} {STRING}برنده یارانه خدمات گردید!{}{}{STRING} دستمزد خدمات از {STRING} به {STRING} به مدت یک سال سه برابر پرداخت می شود! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}یارانه خدمات به {STRING}هدیه داده شد!{}{}{STRING} خدمات ترابری از {STRING} به {STRING} تا یک سال آینده چهار برابر پرداخت خواهد شد! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}ترافیک شدید در {TOWN}!{}{}هزینه روکش کردن آسفالت توسط {STRING} پرداخت گردیده و باعث 6 ماه بدبختی و دردسر برای رانندگان شده است! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}حمل و نقل انحصاری! @@ -942,6 +950,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}بسته STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}اطلاعات اضافه درباره بسته ی موسیقی پایه + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}ناتوان در گرفتن تنظیمات نمایش STR_ERROR_FULLSCREEN_FAILED :{WHITE}حالت تمام صفحه با شکست مواجه شد @@ -1215,6 +1226,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :هشدار هن STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :وسایل نقلیه هیچگاه از بین نروند: {STRING} +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :نوکردن خودکار وسایل نقلیه کهنه شده: {STRING} ###length 2 @@ -2852,10 +2865,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :بستن # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}یارانه ها STR_SUBSIDIES_OFFERED_TITLE :{BLACK}یارانه های پیشنهادی برای انجام سرویس های: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} از {STRING} به {STRING}{YELLOW} (توسط {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- هیچکدام- STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}سرویس هایی که قبلا یارانه ای بوده: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} از {STRING} به {STRING}{YELLOW} ({COMPANY}{YELLOW}, تا {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}روی سرویس کلیک کنید تا آن شهر/صنایع در مرکز صفحه نمایش نشان داده شود. کنترل+کلیک یک صفحه نمایش تازه برای محل شهر/صنایع باز خواهد کرد # Story book window @@ -3270,7 +3281,6 @@ STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} س STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}ظرفیت: {LTBLUE}{CARGO_LONG}, {CARGO_LONG}{STRING} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}فاصله ی زمانی بین تعمیرات دوره ای: {LTBLUE}{COMMA}روز {BLACK} آخیرین تعمیرات: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}افزایش مدت سرویس به مقدار 10. برای افزایش به مقدار 5 باید Ctrl+Click کنید STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}کاهش مدت سرویس به مقدار 10، برای کاهش به مقدار 5 باید Ctrl+Click کنید diff --git a/src/lang/polish.txt b/src/lang/polish.txt index bd55c0da6c..a335b17229 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -593,7 +593,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Taki jak podsta STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}p{P ole ola ól}/dzień STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}w. STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -634,10 +633,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}d{P zień ni ni} STR_UNITS_SECONDS :{COMMA}{NBSP}sekund{P a y ""} STR_UNITS_TICKS :{COMMA}{NBSP}tyknię{P cie cia ć} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtr: STR_LIST_FILTER_OSKTITLE :{BLACK}Wpisz jedno lub więcej słów kluczowych, aby przefiltrować listę @@ -994,8 +996,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Dostarcz STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Ocena wydajności firmy (maks. ocena=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Wykres wartości firmy + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Stawki płatności za ładunek -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dni w transporcie STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Dochód z przewozu 10 jednostek (lub 10,000 litrów) ładunku na odległość 20 pól STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Włącz wszystko STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Wyłącz wszystko @@ -1462,6 +1464,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Podstawo STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Wybierz podstawowy zestaw muzyki do użycia STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Dodatkowe informacje o muzyce podstawowej + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} brakując{P y e ych}/uszkodzon{P y e ych} plik{P "" i ów}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nie udało się pobrać listy obsługiwanych rozdzielczości @@ -1835,6 +1840,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Kiedy włączon STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Pojazdy nigdy nie są wycofywane: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Kiedy włączone, wszystkie modele pojazdów pozostają dostępne na zawsze od daty ich wprowadzenia +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autoodnawianie pojazdów gdy stają się stare: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Kiedy włączone, pojazd zbliżający się do końca swojej żywotności zostaje automatycznie zastąpiony, gdy warunki jego odnowienia są spełnione @@ -4033,10 +4040,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Zamknij # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Dotacje STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Oferta dotacji dla usługi przewozu: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} z {STRING} do {STRING}{YELLOW} (do {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Żadne - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Usługi już dotowane: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} z {STRING} do {STRING}{YELLOW} ({COMPANY}{YELLOW}, do {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Kliknij na usługę, aby wyśrodkować widok główny na przedsiębiorstwo/miasto. Ctrl+klik otwiera nowy podgląd na lokalizację przedsiębiorstwa/miasta # Story book window @@ -4720,9 +4725,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Zmień n STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Zmień nazwę statku STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Zmień nazwę samolotu -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Wiek: {LTBLUE}{STRING}{BLACK} Koszt utrzymania: {LTBLUE}{CURRENCY_LONG}/rok STR_VEHICLE_INFO_AGE :{COMMA} {P rok lata lat} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} {P rok lata lat} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Wiek: {LTBLUE}{STRING}{BLACK} Koszt utrzymania: {LTBLUE}{CURRENCY_LONG}/rok STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Prędkość maksymalna: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Max. prędkość: {LTBLUE}{VELOCITY} {BLACK}Typ samolotu: {LTBLUE}{STRING} @@ -4742,14 +4747,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Ładowno STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Wartość ładunku: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Okres między serwisami: {LTBLUE}{COMMA}{NBSP}dni{BLACK} Ostatni serwis: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Okres między serwisami: {LTBLUE}{COMMA}%{BLACK} Ostatni serwis: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Zwiększ okres między serwisowaniami o 10. Ctrl+klik zwiększa okres między serwisowaniami o 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Zmniejsz okres między serwisowaniami o 10. Ctrl+klik zmniejsza okres między serwisowaniami o 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Zmień typ interwału serwisowania STR_VEHICLE_DETAILS_DEFAULT :Domyślne -STR_VEHICLE_DETAILS_DAYS :Dni STR_VEHICLE_DETAILS_PERCENT :Procent ###length VEHICLE_TYPES diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index be7fe00f4d..40affefe6e 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Igual à Primá STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL} mph STR_UNITS_VELOCITY_METRIC :{DECIMAL} km/h STR_UNITS_VELOCITY_SI :{DECIMAL} m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP} blocos / dia STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}nós STR_UNITS_POWER_IMPERIAL :{DECIMAL}cv @@ -256,10 +255,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} pé(s STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}dia{P "" s} STR_UNITS_SECONDS :{COMMA}{NBSP}segundo{P "" s} STR_UNITS_TICKS :{COMMA}{NBSP}tique{P "" s} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtro: STR_LIST_FILTER_OSKTITLE :{BLACK}Insira uma ou mais palavras-chave para filtrar a lista @@ -616,8 +618,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unidades STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Classificações do desempenho da empresa (máximo=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Gráfico de Valor da Empresa + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tarifas por carga -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dias em trânsito STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pagamento por entregar 10 unidades (ou 10 000 litros) de carga numa distância de 20 quadrados STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Ativar tudo STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Desativar tudo @@ -1083,6 +1085,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Conjunto STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Seleccione o conjunto de música base a usar STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informação adicional sobre o conjunto de música base + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} ficheiro{P "" s} em falta/corrompido{P "" s}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Erro ao obter uma lista de resoluções suportadas @@ -1456,6 +1461,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Quando ativo, u STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Veículos nunca expiram: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Quando ativo, todos os modelos de veículos permanecerão disponíveis para sempre após a sua introdução +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Auto-renovação de veículos quando ficam velhos: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Quando ativo, um veículo a chegar ao fim de vida é automaticamente substituído quando as condições de renovação estão reunidas @@ -3654,10 +3661,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Fechar # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsídios STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Oferta de subsídios para os serviços: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} d{G 1 e o a os as} {STRING} para{G 2 "" " o" " a" " os" " as"} {STRING}{YELLOW} (por {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Nenhum - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Serviços já subsidiados: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} d{G 1 e o a os as} {STRING} para{G 2 "" " o" " a" " os" " as"} {STRING}{YELLOW} ({COMPANY}{YELLOW}, até {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Clique num serviço para centrar a visualização numa indústria/localidade. Ctrl+Clique abre um novo visualizador na localização da indústria/localidade # Story book window @@ -4335,9 +4340,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Renomear STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Renomear navio STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Renomear aeronave -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo de circulação: {LTBLUE}{CURRENCY_LONG}/ano STR_VEHICLE_INFO_AGE :{COMMA} ano{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ano{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo de circulação: {LTBLUE}{CURRENCY_LONG}/ano STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Velocidade máx.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Vel. máxima: {LTBLUE}{VELOCITY} {BLACK}Tipo de Aeronave: {LTBLUE}{STRING} @@ -4357,14 +4362,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacida STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Créditos de Transferência: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Intervalo de serviço: {LTBLUE}{COMMA}dias{BLACK} Último serviço: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervalo de serviço: {LTBLUE}{COMMA}%{BLACK} Último serviço: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Aumentar o intervalo de serviço por 10. Ctrl+Clique aumenta o intervalo de serviço por 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Diminuir intervalo de serviço por 10. Ctrl+Clique diminui o intervalo de serviço por 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Alterar tipo de intervalo de manutenção STR_VEHICLE_DETAILS_DEFAULT :Padrão -STR_VEHICLE_DETAILS_DAYS :Dias STR_VEHICLE_DETAILS_PERCENT :Percentagem ###length VEHICLE_TYPES diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index 7d8a1c0275..af860e8da1 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :La fel ca opți STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL} mph STR_UNITS_VELOCITY_METRIC :{DECIMAL} km/h STR_UNITS_VELOCITY_SI :{DECIMAL} m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}dale/zi STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}Noduri STR_UNITS_POWER_IMPERIAL :{DECIMAL}cp @@ -255,6 +254,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ft STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtru: @@ -612,8 +614,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unităț STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Evaluarea performanțelor companiilor (maxim=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Graficul valorii companiilor + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Prețurile transportului de mărfuri -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Zile în tranzit STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Plata pentru livrarea a 10 unități (sau 10.000 de litri) de marfă pe o distanță de 20 de pătrățele STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Activează tot STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Dezactivează tot @@ -1080,6 +1082,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selecta STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Informații adiționale despre setul de muzică de bază + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nu s-a putut obține lista de rezoluții suportate STR_ERROR_FULLSCREEN_FAILED :{WHITE}Comutarea pe întreg ecranul a eșuat @@ -1450,6 +1455,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :După activare, STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehiculele nu expiră niciodată: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :După activare, toate modelele de vehicule rămân disponibile permanent după introducerea lor +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Înnoire automată pentru vehiculele învechite: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :După activare, orice vehicul care este învechit va fi înnoit automat când condițiile de înlocuire automată sunt îndeplinite @@ -3648,10 +3655,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Închide # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvenții (F6) STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subvenții disponibile: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} de la {STRING} la {STRING}{YELLOW} (după {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE} - nici una - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Subvenții acordate la ora actuală: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}- {STRING} de la {STRING} la {STRING}{YELLOW} ({COMPANY}{YELLOW}, până în {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click pe serviciu pentru a centra imaginea pe industrie/oraș. Ctrl+Click deshide o fereastră cu locația industriei/orașului # Story book window @@ -4329,9 +4334,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Numele a STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Denumește această navă STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Denumește aeronava -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vechime: {LTBLUE}{STRING}{BLACK} Mentenanță: {LTBLUE}{CURRENCY_LONG}/an STR_VEHICLE_INFO_AGE :{COMMA} {P an ani "de ani"} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} {P an ani "de ani"} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vechime: {LTBLUE}{STRING}{BLACK} Mentenanță: {LTBLUE}{CURRENCY_LONG}/an STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Viteză max.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Viteză max.: {LTBLUE}{VELOCITY} {BLACK}Tip de aeronavă: {LTBLUE}{STRING} @@ -4351,14 +4356,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacita STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transferă Credit: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Intervalul pentru întreținere: {LTBLUE}{COMMA}zile{BLACK} Ultima întreținere: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervalul de service: {LTBLUE}{COMMA}%{BLACK} Ultimul service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Mărește intervalul de service cu 10. Ctrl+click mărește intervalul de service cu 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Micșorează intervalul de service cu 10. Ctrl+Click micșorează intervalul de service cu 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Schimbă tipul intervalului de întreținere STR_VEHICLE_DETAILS_DEFAULT :Standard -STR_VEHICLE_DETAILS_DAYS :Zile STR_VEHICLE_DETAILS_PERCENT :Procent ###length VEHICLE_TYPES diff --git a/src/lang/russian.txt b/src/lang/russian.txt index 8557b29e64..9948dde9a1 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -340,7 +340,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Тот же, ч STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}мил{P я и ь}/ч STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}км/ч STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}м/с -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}кл./день STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}уз{P ел ла лов} STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}лс @@ -381,10 +380,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}м STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}м +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}д{P ень ня ней} STR_UNITS_SECONDS :{COMMA}{NBSP}секунд{P а ы ""} STR_UNITS_TICKS :{COMMA}{NBSP}тик{P "" а ов} + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Фильтр: STR_LIST_FILTER_OSKTITLE :{BLACK}Введите ключевые слова для фильтрации списка @@ -408,7 +410,7 @@ STR_TOOLTIP_RESIZE :{BLACK}Нажм STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Большое/маленькое окно STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Прокрутка вверх/вниз STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Прокрутка влево/вправо -STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Полная очистка прямоугольного участка земли.{}При нажатом Ctrl - выбор диагональной области.{}При нажатом Shift - оценка стоимости очистки. +STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Полная очистка прямоугольного участка земли. При нажатом Ctrl - выбор диагональной области. При нажатом Shift - оценка стоимости очистки. # Show engines button ###length VEHICLE_TYPES @@ -496,7 +498,7 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Пауз STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Ускорить игру STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Настройки STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Сохранение/загрузка игры; главное меню; выход -STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Карта; окна просмотра; грузовые потоки; таблички +STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Карта; окна просмотра; грузовые потоки; список меток STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Список городов STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Субсидии STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Список станций @@ -504,7 +506,7 @@ STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Инфо STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Основная информация о компаниях STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}История компаний STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Список задач -STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Графики компаний и оплаты грузоперевозок +STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Графики различных показателей деятельности компаний и оплаты грузоперевозок STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Рейтинги компаний STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Список существующих предприятий; создание новых STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Списки поездов по компаниям. Ctrl+щелчок - показать/скрыть группы. @@ -513,15 +515,15 @@ STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Спис STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Списки воздушных судов по компаниям. Ctrl+щелчок - показать/скрыть группы. STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Приблизить STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Отдалить -STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Строительство железных дорог +STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Строительство железнодорожной инфраструктуры STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Строительство автомобильной инфраструктуры STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Строительство трамвайных путей -STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Строительство водных коммуникаций +STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Строительство речной/морской инфраструктуры STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Строительство аэропортов STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Открыть панель ландшафта для изменения рельефа, посадки деревьев и т.д. STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Настройка звука и музыки STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Показать последнее сообщение; настройки и удаление сообщений -STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Информация о территории, об игре и инструментах разработчика, снимки экрана +STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Показать информацию о территории, о разработчиках игры; инструменты разработчика, снимки экрана STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Переключить панели инструментов # Extra tooltips for the scenario editor toolbar @@ -531,7 +533,7 @@ STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Ред STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Начать игру на 1 год раньше STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Начать игру на 1 год позже STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Нажмите, чтобы изменить год начала игры -STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Показать карту; список городов +STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Показать карту, дополнительное окно просмотра, список меток, городов, предприятий STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Создание ландшафта STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Создание городов STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Создание предприятий @@ -753,8 +755,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Коли STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Рейтинг компании (макс=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}График изменения стоимости компании + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Оплата за перевозку грузов -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Дней в пути STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Оплата за перевозку 10{NBSP}единиц (10{NBSP}000 литров) груза на расстояние в 20 клеток STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Показать все STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Спрятать все @@ -1227,6 +1229,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Осно STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Выбор основного музыкального пакета STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Дополнительная информация о выбранном музыкальном пакете + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} отсутствующи{P й х х}/повреждённы{P й х х} файл{P "" а ов}) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Не удалось получить список поддерживаемых разрешений экрана @@ -1606,6 +1611,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Включае STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Транспорт не будет выходить из эксплуатации: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :При включении все транспортные средства остаются доступными для покупки в любое время после начала их производства +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Автозамена изношенного транспорта: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Включает автоматическую замену устаревших транспортных средств @@ -2982,7 +2989,7 @@ STR_BRIDGE_TUBULAR_SILICON :Трубчат # Road construction toolbar STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Автомобильные коммуникации STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Трамвайные коммуникации -STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Строительство автомобильных дорог. При нажатом Ctrl - удаление дороги. При нажатом Shift - оценка стоимости строительства. +STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Строительство автомобильных дорог. При нажатом Ctrl - удаление дороги. При нажатом Shift - оценка стоимости работ. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Строительство трамвайных путей. При нажатом Ctrl - их удаление. При нажатом Shift - оценка стоимости работ. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Строительство автомобильных дорог в автоматическом режиме. При нажатом Ctrl - удаление дороги. При нажатом Shift - оценка стоимости работ. STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Строительство трамвайных путей в автоматическом режиме. При нажатом Ctrl - удаление путей. При нажатом Shift - оценка стоимости строительства. @@ -2999,7 +3006,7 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Стро STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Строительство трамвайных туннелей. При нажатом Shift - оценка стоимости строительства. STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Строительство/удаление автомобильных дорог и станций STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Строительство/удаление трамвайных путей и станций -STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Реконструкция/изменение типа дорожного полотна. С нажатым Shift - оценка стоимости строительства. +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Реконструкция/изменение типа дорожного полотна. При нажатом Shift - оценка стоимости строительства. STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Реконструкция трамвайных путей. С нажатым Shift - оценка стоимости строительства. STR_ROAD_NAME_ROAD :Автомобильная дорога @@ -3027,7 +3034,7 @@ STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Водн STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Строительство каналов. При нажатом Shift - оценка стоимости строительства. STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Строительство шлюзов. При нажатом Shift - оценка стоимости строительства. STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Строительство доков (для приобретения и обслуживания судов). При нажатом Shift - оценка стоимости строительства. -STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Строительство пристаней. Нажатие Ctrl позволяет объединять станции. При нажатом Shift - оценка стоимости строительства. +STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Строительство пристаней. Ctrl+щелчок - объединение новой станции с существующей. При нажатом Shift - оценка стоимости строительства. STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Буи помогают в навигации на больших расстояниях; используйте их как маршрутные точки. При нажатом Shift - оценка стоимости строительства. STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Строительство акведуков. При нажатом Shift - оценка стоимости строительства. STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Создать канал.{}При зажатом Ctrl клетка на уровне моря наполняется водой. @@ -3105,7 +3112,7 @@ STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Созд # Land generation window (SE) STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Генератор карты STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Разместить скалы на карте -STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Задать площадь пустыни.{}Нажмите и держите CTRL для удаления +STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Указать область, занимаемую пустыней.{}Ctrl+щелчок убирает песок. STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Увеличить площадь изменения рельефа STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Уменьшить площадь изменения рельефа STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Создать случайную карту @@ -3119,7 +3126,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Вы у # Town generation window (SE) STR_FOUND_TOWN_CAPTION :{WHITE}Создание городов STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}Новый город -STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Построить новый город. Shift+щелчок - оценка стоимости основания. +STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Основать новый город. При нажатом Shift - оценка стоимости строительства. STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Случайный город STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Создать город в случайном месте STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Множество различных городов @@ -3436,7 +3443,7 @@ STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Пока STR_MAPGEN_AI_SETTINGS :{BLACK}Настройки ИИ STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Показать настройки ИИ STR_MAPGEN_GS_SETTINGS :{BLACK}Настройки игровых скриптов -STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Показать настройки игровых скриптов +STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Открыть настройки игровых скриптов ###length 21 STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH :Английские @@ -3828,10 +3835,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Закрыть # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Субсидии STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Предлагаемые субсидии: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} по маршруту из {STRING} в {STRING}{YELLOW} (по {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Нет - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Субсидируемые маршруты: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} по маршруту из {STRING} в {STRING}{YELLOW} ({COMPANY}{YELLOW}, до {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Щелчок по маршруту покажет нужные предприятия/города. Ctrl+щелчок откроет их в дополнительных окнах. # Story book window @@ -3849,7 +3854,7 @@ STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Невер # Station list window STR_STATION_LIST_TOOLTIP :{BLACK}Список станций - щелчок по названию показывает станцию в основном окне. Ctrl+щелчок показывает в дополнительном окне. -STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Нажмите и удерживайте Ctrl для выбора более одного варианта +STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Можно выбрать несколько вариантов, щёлкая по ним с нажатым Ctrl STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} станци{P я и й} STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATION_FEATURES} STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT} @@ -4212,16 +4217,16 @@ STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Купи STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Купить и переоборудовать ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Приобрести выбранный локомотив/вагон. Shift+щелчок покажет ориентировочную стоимость покупки. -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Приобрести выбранный автомобиль. Shift+щелчок покажет ориентировочную стоимость покупки. +STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Приобрести выбранный локомотив/вагон. При нажатом Shift - оценка стоимости покупки. +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Приобрести выбранный автомобиль. При нажатом Shift - оценка стоимости покупки. STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Приобрести выбранное судно. Shift+щелчок покажет ориентировочную стоимость покупки. -STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Приобрести выбранное воздушное судно. Shift+щелчок покажет ориентировочную стоимость покупки. +STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Приобрести выбранное воздушное судно. При нажатом Shift - оценка стоимости покупки. ###length VEHICLE_TYPES -STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранный локомотив/вагон. Shift+щелчок покажет ориентировочную стоимость покупки. -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранный автомобиль. Shift+щелчок покажет ориентировочную стоимость покупки. -STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранное судно. Shift+щелчок покажет ориентировочную стоимость покупки. -STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранное воздушное судно. Shift+щелчок покажет ориентировочную стоимость покупки. +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранный локомотив/вагон. При нажатом Shift - оценка стоимости покупки. +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранный автомобиль. При нажатом Shift - оценка стоимости покупки. +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранное судно. При нажатом Shift - оценка стоимости покупки. +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Приобрести и переоборудовать выбранное воздушное судно. При нажатом Shift - оценка стоимости покупки. ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Переименовать @@ -4313,7 +4318,7 @@ STR_DEPOT_CLONE_SHIP :{BLACK}Копи STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Копировать ###length VEHICLE_TYPES -STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Создать копию состава. Нажмите на кнопку, а затем на поезд внутри или снаружи депо. Ctrl+щелчок создаст поезд с общим маршрутом. Shift+щелчок - оценка стоимости покупки. +STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Создать копию состава. Нажмите на кнопку, а затем на поезд внутри или снаружи депо. Ctrl+щелчок создаст поезд с общим маршрутом. При нажатом Shift - оценка стоимости покупки. STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Создать копию автомобиля. Нажмите на кнопку, а затем на машину внутри или снаружи гаража. Ctrl+щелчок создаст автомобиль с общим маршрутом. Shift+щелчок - оценка стоимости покупки. STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Создать копию судна. Нажмите на кнопку, а затем на судно внутри или снаружи дока. Ctrl+щелчок создаст судно с общим маршрутом. Shift+щелчок - оценка стоимости покупки. STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Создать копию воздушного судна. Нажмите на кнопку, а потом на воздушное судно внутри или снаружи ангара. Ctrl+щелчок создаст копию с общим маршрутом. При нажатом Shift - оценка стоимости покупки. @@ -4521,9 +4526,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Пере STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Переименовать судно STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Переименовать воздушное судно -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Возраст: {LTBLUE}{STRING}{BLACK} Стоимость обслуживания: {LTBLUE}{CURRENCY_LONG}/год STR_VEHICLE_INFO_AGE :{COMMA} {P год года лет} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} {P год года лет} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Возраст: {LTBLUE}{STRING}{BLACK} Стоимость обслуживания: {LTBLUE}{CURRENCY_LONG}/год STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Макс. скорость: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Макс. скорость: {LTBLUE}{VELOCITY} {BLACK}Тип возд. судна: {LTBLUE}{STRING} @@ -4543,14 +4548,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Ёмко STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Выручка перевозки: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}ТО каждые {LTBLUE}{COMMA}{NBSP}дней{BLACK}. Последний раз: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}ТО при сниж. на {LTBLUE}{COMMA}%{BLACK}. Последний раз: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Увеличить интервал технического обслуживания на 10. Ctrl+щелчок увеличивает интервал на 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Уменьшить интервал технического обслуживания на 10. Ctrl+щелчок уменьшает интервал на 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Изменить тип интервала прохождения технического обслуживания STR_VEHICLE_DETAILS_DEFAULT :По умолчанию -STR_VEHICLE_DETAILS_DAYS :В днях STR_VEHICLE_DETAILS_PERCENT :В процентах ###length VEHICLE_TYPES @@ -4690,7 +4692,7 @@ STR_ORDERS_DELETE_BUTTON :{BLACK}Удал STR_ORDERS_DELETE_TOOLTIP :{BLACK}Удалить выделенное задание STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Удалить все задания STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Индивидуальный список -STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Сделать общий маршрут индивидуальным. Ctrl+щелчок очистит список заданий данного транспорта. +STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Сделать общий маршрут индивидуальным. Ctrl+щелчок очистит список заданий данного транспортного средства. STR_ORDERS_GO_TO_BUTTON :{BLACK}Следовать STR_ORDER_GO_TO_NEAREST_DEPOT :Идти к ближайшему депо diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt index bca61146e4..cb5c925835 100644 --- a/src/lang/serbian.txt +++ b/src/lang/serbian.txt @@ -389,7 +389,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Identično prim STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL} milja na sat STR_UNITS_VELOCITY_METRIC :{DECIMAL} km/h STR_UNITS_VELOCITY_SI :{DECIMAL} m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}pločica/dan STR_UNITS_POWER_IMPERIAL :{DECIMAL}ks STR_UNITS_POWER_METRIC :{DECIMAL}ks @@ -429,6 +428,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ft STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Pretraga: @@ -785,8 +787,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Isporuč STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Ocena učinka preduzeća (najveći je 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Vrednosti preduzeća + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Stope prihoda od tereta -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dana u tranzitu STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Isplata za dostavu 10 jedinica (ili 10 hiljada litara) tereta na razdaljinu od 20 kvadrata STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Prikaži sve STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Sakri sve @@ -1231,6 +1233,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Osnovni STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Odaberi željeni skup osnovne muzike STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Dodatni podaci o osnovnom skupu muzike + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} fajl{P '' a ovi} nedostaj{P e e u}/{P je su su} korumpiran{P '' a i} STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Neuspešno dobijanje spiska podržanih rezolucija @@ -1598,6 +1603,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Ako je omoguće STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vozila nikad ne zastarevaju: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ako je omogućeno, svi modeli vozila ostaju zauvek dostupni (posle njihovog predstavljanja) +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automatska zamena kada vozilo ostari: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Kada je omogućeno, vozilo blizu kraja života će se automatski zameniti kada su ispunjeni uslovi obnavljanja @@ -3742,10 +3749,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Zatvori # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvencije STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subvencije u toku (u vezi preuzimanja navedenog tereta): -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING.big} od {STRING} do {STRING}{YELLOW} (pre {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Prazno - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Odobrene subvencije: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} između stanica {STRING} i {STRING}{YELLOW} ({COMPANY}{YELLOW}, do {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikom na uslugu prebacuje glavni pogled na lokaciju fabrike/naselja. Ctrl+klik otvara novi pogled na to mesto # Story book window @@ -4433,9 +4438,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Naziv dr STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Naziv broda STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Naziv letelice -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Starost: {LTBLUE}{STRING}{BLACK} Trošak održavanja: {LTBLUE}{CURRENCY_LONG}/god. STR_VEHICLE_INFO_AGE :{COMMA} godin{P a e a} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} godin{P a e a} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Starost: {LTBLUE}{STRING}{BLACK} Trošak održavanja: {LTBLUE}{CURRENCY_LONG}/god. STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Najveća brzina: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maks. brzina: {LTBLUE}{VELOCITY} {BLACK}Vrsta letelice: {LTBLUE}{STRING} @@ -4455,14 +4460,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Nosivost STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Zarada od transfera: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Period servisiranja: {LTBLUE}{COMMA}dana{BLACK} Poslednji servis: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Period servisiranja: {LTBLUE}{COMMA}%{BLACK} Poslednji servis: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Povećava period servisiranja za 10. Ctrl+klik povećava period servisiranja za 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Smanjuje period servisiranja za 10. Ctrl+klik smanjuje period servisiranja za 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Promeni tip intervala za servis STR_VEHICLE_DETAILS_DEFAULT :Podrazumevano -STR_VEHICLE_DETAILS_DAYS :dani STR_VEHICLE_DETAILS_PERCENT :Procenat ###length VEHICLE_TYPES diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index 5fe4ccdfba..c32cb7fa62 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :主色调 STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}英里/小时 STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}千米/小时 STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}米/秒 -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}格/日 STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}节 STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}匹 @@ -255,10 +254,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}米 STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}米 +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP} 日 STR_UNITS_SECONDS :{COMMA}{NBSP} 秒 STR_UNITS_TICKS :{COMMA}{NBSP} 刻 + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}搜索: STR_LIST_FILTER_OSKTITLE :{BLACK}输入关键字筛选 @@ -615,8 +617,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}运输 STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}公司评价表现指数 (最大指数为1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}公司市值图表 + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}货物运输价格 -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}运输时间(天) STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}将 10 单位 (或 10,000 升) 货物运输 20 个方格 STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}全部启用 STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}全部禁用 @@ -1082,6 +1084,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}基础 STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}选择要使用的基础音乐组 STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}有关基础音乐组的附加信息 + + + STR_BASESET_STATUS :{STRING} {RED}(共有{NUM}份缺失或损坏的文件) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}检索支持的分辨率列表失败 @@ -1455,6 +1460,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :“打开”, STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :载具永不过期:{STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :启用时,所有载具一经面世,就可以永远选择购买使用。 +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :当车辆报废时自动更新:{STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :“打开”时,车辆在临近它的报废期限时自动更新 @@ -3653,10 +3660,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :关闭 # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}财政补贴项目 STR_SUBSIDIES_OFFERED_TITLE :{BLACK}尚未中标的项目: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}将 {STRING} 从 {STRING} 运送到 {STRING}{YELLOW} (截止日期为 {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}没有 STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}已经中标的项目: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}将 {STRING} 从 {STRING} 运送到 {STRING}{YELLOW} ({COMPANY}{YELLOW},截止日期为 {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}点击项目可将屏幕中心移动到{}城镇/工业 所在的位置. 单击的同时按住Ctrl会在新视点中显示城镇/工业位置 # Story book window @@ -4334,9 +4339,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}命名 STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}命名船只 STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}命名飞机 -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}年龄:{LTBLUE}{STRING}{BLACK} 运行成本:{LTBLUE}{CURRENCY_LONG} /年 STR_VEHICLE_INFO_AGE :{COMMA} 年 ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} 年 ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}年龄:{LTBLUE}{STRING}{BLACK} 运行成本:{LTBLUE}{CURRENCY_LONG} /年 STR_VEHICLE_INFO_MAX_SPEED :{BLACK}最大速度:{LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}最高速度: {LTBLUE}{VELOCITY} {BLACK}飞机种类: {LTBLUE}{STRING} @@ -4356,14 +4361,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}运载 STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}转运成本: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}保养周期:{LTBLUE}{COMMA}天{BLACK} 上次保养日期:{LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}保养周期:{LTBLUE}{COMMA}%{BLACK} 上次保养:{LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}增大检修时间间隔,以10为单位进行调整. 按住Ctrl同时点击则以5为单位进行调整 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}减少检修时间间隔,以10为单位进行调整. 按住Ctrl同时点击则以5为单位进行调整 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}更改服务时间间隔类型 STR_VEHICLE_DETAILS_DEFAULT :默认 -STR_VEHICLE_DETAILS_DAYS :天 STR_VEHICLE_DETAILS_PERCENT :百分比 ###length VEHICLE_TYPES diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt index e3cb79b90e..88ba41d0e4 100644 --- a/src/lang/slovak.txt +++ b/src/lang/slovak.txt @@ -277,7 +277,6 @@ STR_COLOUR_SECONDARY_WHITE :Biela STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL} mph STR_UNITS_VELOCITY_METRIC :{DECIMAL} km/h STR_UNITS_VELOCITY_SI :{DECIMAL} m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}políč{P ko ka ok}/deň STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}uzlov STR_UNITS_POWER_IMPERIAL :{DECIMAL}hp @@ -318,6 +317,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} st{P STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filter: @@ -673,8 +675,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Graf pre STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Graf hodnotenia výkonu (najvyššie hodnotenie je 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Graf hodnoty spoločnosti + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Ceny prepravy -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Počet dní na ceste STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Platba za prepravu 10 jednotiek (alebo 10 000 litrov) nákladu cez 20 políčok STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Povoliť všetky STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Zakázať všetky @@ -1130,6 +1132,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Výber s STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Dodatočné informácie o základnej sade hudby + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nepodarilo sa načítať zoznam podporovaných rozlíšení STR_ERROR_FULLSCREEN_FAILED :{WHITE}Zobrazovanie na celú obrazovku zlyhalo @@ -1497,6 +1502,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Ak je zapnuté, STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Nikdy neprestať s výrobou starých vozidiel: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ak je zapnuté, všetky vozidlá zostanú k dispozícii navždy. +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automatická obnova dopravných prostriedkov, keď sú staré: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Ak je zapnuté, vozidlá blížiace sa ku koncu svojej životnosti budú automaticky vymenené ak sú splnené podmienky na výmenu. @@ -3635,10 +3642,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Zavrieť # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Dotácie STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Ponúknuté dotácie: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} z {STRING} do {STRING}{YELLOW} ({DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}Žiadne STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}V súčasnosti poskytované dotácie: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} z {STRING} do {STRING}{YELLOW} ({COMPANY}{YELLOW}, do {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Kliknúť na trasu pre centrovanie pohľadu na továreň/mesto # Story book window @@ -4313,9 +4318,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Premenov STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Pomenovať loď STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Pomenovať lietadlo -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vek: {LTBLUE}{STRING}{BLACK} Prevádzkové náklady: {LTBLUE}{CURRENCY_LONG}/rok STR_VEHICLE_INFO_AGE :{COMMA} rok{P "" y ov} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} rok{P "" y ov} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Vek: {LTBLUE}{STRING}{BLACK} Prevádzkové náklady: {LTBLUE}{CURRENCY_LONG}/rok STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. rýchlosť: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Rýchlosť: {LTBLUE}{VELOCITY} {BLACK}Typ lietadla: {LTBLUE}{STRING} @@ -4335,14 +4340,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapacita STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer kredity: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servisný interval: {LTBLUE}{COMMA}{NBSP}dní{BLACK} Posledný servis: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servisný interval: {LTBLUE}{COMMA}%{BLACK} Posledný servis: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Predĺžiť servisný interval o 10. Ctrl+klik predĺži servisný interval o 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Skrátiť servisný interval o 10. Ctrl+klik pre skrátenie servisného intervalu o 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Zmeniť typ servisného intervalu STR_VEHICLE_DETAILS_DEFAULT :Štandardné -STR_VEHICLE_DETAILS_DAYS :Dni STR_VEHICLE_DETAILS_PERCENT :Percentáž ###length VEHICLE_TYPES diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt index 9f43d02c8c..7ac3e683c6 100644 --- a/src/lang/slovenian.txt +++ b/src/lang/slovenian.txt @@ -378,6 +378,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ft STR_UNITS_HEIGHT_METRIC :{DECIMAL} m STR_UNITS_HEIGHT_SI :{DECIMAL} m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtriraj niz: @@ -716,8 +719,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Enot dos STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Ocene uspeha podjetja (max=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Vrednosti podjetij + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cene tovora -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dni v tranzitu STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Plačilo za dostavo 10 enot (ali 10.000 litrov) tovora za razdaljo 20 kvadratkov STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Omogoči vse STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Onemogoči vse @@ -1007,7 +1010,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Novo! {S STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Ponudba subvencije potekla:{}{}Prevoz {STRING.r} od {STRING} do {STRING} ni več subvencioniran STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subvencija zaključena:{}{}Prevoz {STRING.r} od {STRING} do {STRING} ni več subvencioniran +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Nova ponujena subvencija:{}{}Prvi prevoz {STRING.r} od {STRING.r} do {STRING.r} bo{}subvencioniran s strani mestnega sveta! ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Subvencija podeljena podjetju {STRING}!{}{}Prevoz {STRING.r} od {STRING} do {STRING} bo prinesel 50% večji prihodek{}za naslednje leto! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Podjetje {STRING} je prejelo subvencijo!{}{}Prevoz {STRING.r} od {STRING} do {STRING} bo prinesel dvakratni prihodek{}za naslednje leto! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Subvencija odobrena podjetju {STRING}!{}{}Prevoz {STRING.r} od {STRING} do {STRING} bo prinesel trikratni prihodek{}za naslednje leto! +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Subvencija podeljena podjetju{STRING}!{}{}Prevoz {STRING.r} od {STRING} do {STRING} bo prinesel štirikratni prihodek{}za naslednje leto! STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Prometni kaos v mestu {TOWN}!{}{}Obnovitvena dela, ki jih financira podjetje {STRING},{}bodo prinesla 6 mesecev nevšečnosti{}voznikom motornih vozil! STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Transportni monopol! @@ -1107,6 +1115,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Izberi o STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Dodatne informacije o osnovnem kompletu glasbe + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Nalaganje seznama podprtih resolucij ni uspelo STR_ERROR_FULLSCREEN_FAILED :{WHITE}Celozaslonski način spodletel @@ -1452,6 +1463,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Če je omogoče STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vozila nikoli ne dotrajajo: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Če je omogočeno, vsi modeli vozil ostanejo omogočeni po uvedbi. +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Samoobnovi vozila, ko se postarajo: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Če je omogočeno, se vozila ob koncu življenjske dobe avtomatsko zamenjajo pod pogoji samoobnove. @@ -3309,10 +3322,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Zapri # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvencije STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Ponudba subvencije za storitev: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}Prevoz {STRING.r} iz {STRING} v {STRING}{YELLOW} (do {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Brez - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Že subvencionirane storitve: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}Prevoz {STRING.r} od {STRING} do {STRING}{YELLOW} ({COMPANY}{YELLOW}, do {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikni na storitev za pogled na industrijo/mesto. Ctrl+Klik odpre nov pogled na lokaciji industrije/mesta # Story book window @@ -3901,9 +3912,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Poimenuj STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Poimenuj ladjo STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Poimenuj letalo -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Starost: {LTBLUE}{STRING}{BLACK} Cena delovanja: {LTBLUE}{CURRENCY_LONG}/leto STR_VEHICLE_INFO_AGE :{COMMA} let{P o i a ""} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} let{P o i a ""} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Starost: {LTBLUE}{STRING}{BLACK} Cena delovanja: {LTBLUE}{CURRENCY_LONG}/leto STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. hitrost: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Teža: {LTBLUE}{WEIGHT_SHORT} {BLACK}Moč: {LTBLUE}{POWER}{BLACK} Max. hitrost: {LTBLUE}{VELOCITY} @@ -3920,14 +3931,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Zmogljiv STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Prenesi kredite: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}IObdobje servisiranja: {LTBLUE}{COMMA}dni{BLACK} Zadnji servis: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Obdobje servisiranja: {LTBLUE}{COMMA}%{BLACK} Zadnji servis: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Podaljšaj čas med servisi za 10. Ctrl+Klik podaljša za 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Skrajšaj čas med servisi za 10. Ctrl+Klik skrajša za 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Spremeni presledek tipa servisiranja STR_VEHICLE_DETAILS_DEFAULT :Privzeto -STR_VEHICLE_DETAILS_DAYS :Dni STR_VEHICLE_DETAILS_PERCENT :Odstotek ###length VEHICLE_TYPES diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index 1b62c038cb..3c93a7a291 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -198,7 +198,6 @@ STR_COLOUR_RANDOM :Aleatorio STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}casillas/día STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}cv @@ -238,6 +237,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtro: @@ -593,8 +595,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unidades STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Nivel de desempeño de empresas (máximo=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Valor de la empresa + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tarifas de pago de cargas -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Días en tránsito STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pago por entregar 10 unidades (o 10 000 litros) de carga a una distancia de 20 casillas STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Activar todos STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Desactivar todos @@ -1027,6 +1029,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Seleccio STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Información adicional sobre el conjunto de música base + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}No se ha podido obtener una lista de resoluciones soportadas STR_ERROR_FULLSCREEN_FAILED :{WHITE}El modo de pantalla completa ha fallado @@ -1392,6 +1397,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Si se activa, s STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Los vehículos nunca caducan: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Cuando se activa, todos los modelos de vehículos permanecen disponibles para siempre una vez han sido introducidos +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Renovación automática de vehículos cuando se vuelven viejos: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Cuando se activa, los vehículos próximos al final de su vida útil serán reemplazados automáticamente, siempre y cuando se cumplan las condiciones de renovación @@ -3521,10 +3528,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Cerrar # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subvenciones STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Se ofrecen subvenciones por transportar: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} desde {STRING} a {STRING}{YELLOW} (antes de {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ninguno - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Líneas ya subvencionadas: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} desde {STRING} a {STRING}{YELLOW} ({COMPANY}{YELLOW}, hasta {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Clic sobre el servicio para centrar la vista principal en esta industria/municipio. Ctrl+clic abre un punto de vista en dicha posición # Story book window @@ -4196,9 +4201,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Nombrar STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Nombrar barco STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Nombrar aeronave -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Edad: {LTBLUE}{STRING}{BLACK} Coste Mantenimiento: {LTBLUE}{CURRENCY_LONG}/año STR_VEHICLE_INFO_AGE :{COMMA} año{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} año{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Edad: {LTBLUE}{STRING}{BLACK} Coste Mantenimiento: {LTBLUE}{CURRENCY_LONG}/año STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Velocidad Máx.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Velocidad Máx.: {LTBLUE}{VELOCITY} {BLACK}Tipo de aeronave: {LTBLUE}{STRING} @@ -4218,14 +4223,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacida STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Créditos de Transferencia: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Intervalo de mantenimiento: {LTBLUE}{COMMA}{NBSP}días{BLACK} Último mantenimiento: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Intervalo de mantenimiento: {LTBLUE}{COMMA}%{BLACK} Último mantenimiento: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Incrementar intervalo de mantenimiento en 10. Ctrl+clic incrementa el intervalo de mantenimiento en 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Reducir intervalo de mantenimiento en 10. Ctrl+clic reduce el intervalo de mantenimiento en 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Cambia el tipo de intervalo de mantenimiento STR_VEHICLE_DETAILS_DEFAULT :Por defecto -STR_VEHICLE_DETAILS_DAYS :Días STR_VEHICLE_DETAILS_PERCENT :Porcentaje ###length VEHICLE_TYPES diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index 969b93aaf5..72f98bd197 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -198,7 +198,6 @@ STR_COLOUR_RANDOM :Aleatorio STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}casillas/día STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}cv @@ -238,6 +237,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtrar: @@ -593,8 +595,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Unidades STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Nivel de desempeño (nivel máximo: 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Valor de la empresa + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tasas de pago por carga -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Días en tránsito STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Pago por entregar 10 unidades (o 10,000 litros) de carga por distancia de 20 casillas STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Activar todos STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Desactivar todos @@ -1027,6 +1029,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Elegir m STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Información adicional sobre música base + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}No se pudo obtener una lista de resoluciones compatibles STR_ERROR_FULLSCREEN_FAILED :{WHITE}El modo de pantalla completa falló @@ -1392,6 +1397,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Mostrar un mens STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehículos siempre disponibles: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Todos los modelos de vehículos estarán disponibles para siempre tras haber sido introducidos +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Renovar automáticamente vehículos viejos: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Los vehículos próximos al final de su vida útil serán renovados automáticamente, siempre y cuando se cumplan las condiciones de renovación @@ -3522,10 +3529,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Cerrar # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subsidios STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Se ofrecen subsidios al servicio que lleve: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} desde {STRING} a {STRING}{YELLOW} (antes de {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Ninguno - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Servicios con subsidio: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} desde {STRING} a {STRING}{YELLOW} ({COMPANY}{YELLOW}, hasta {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Clic en un servicio para centrar la vista en la industria o localidad. Ctrl+Clic abre una vista aparte # Story book window @@ -4197,9 +4202,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Cambiar STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Cambiar nombre STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Cambiar nombre -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Edad: {LTBLUE}{STRING}{BLACK} Costo de mantenimiento: {LTBLUE}{CURRENCY_LONG}/año STR_VEHICLE_INFO_AGE :{COMMA} año{P "" s} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} año{P "" s} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Edad: {LTBLUE}{STRING}{BLACK} Costo de mantenimiento: {LTBLUE}{CURRENCY_LONG}/año STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Velocidad máx.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Vel. máx.: {LTBLUE}{VELOCITY} {BLACK}Tipo de aeronave: {LTBLUE}{STRING} @@ -4219,14 +4224,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacida STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Créditos por transferencia: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Mantenimiento cada: {LTBLUE}{COMMA}{NBSP}días{BLACK} Último mantenimiento: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Mantenimiento cada: {LTBLUE}{COMMA}%{BLACK} Último mantenimiento: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Incrementar el intervalo de mantenimiento 10 días. Ctrl+Clic para incrementar el intervalo de mantenimiento en 5 días STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Reducir intervalo de mantenimiento 10 días. Ctrl+Clic para reducir el intervalo de mantenimiento 5 días STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Cambiar tipo de intervalo de mantenimiento STR_VEHICLE_DETAILS_DEFAULT :Por defecto -STR_VEHICLE_DETAILS_DAYS :Días STR_VEHICLE_DETAILS_PERCENT :Porcentaje ###length VEHICLE_TYPES diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index 959586d4e2..7fa4456df6 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Samma som huvud STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}rutor/dag STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}knop STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hk @@ -255,6 +254,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Sökfilter: @@ -610,8 +612,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Enheter STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Företagets prestationsvärderingar (maxvärdering=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Företagsvärdesgraf + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Fraktförtjänster -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Dagar under transport STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Betalning för leverans av 10 enheter (eller 10,000 liter) gods på ett avstånd av 20 rutor STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Aktivera alla STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Inaktivera alla @@ -1070,6 +1072,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Välj vi STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Yttligare information om musikpaketet + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Det gick inte att hämta en lista över upplösningar som stöds STR_ERROR_FULLSCREEN_FAILED :{WHITE}Fullskärmsläge misslyckades @@ -1441,6 +1446,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Om det är akti STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Fordon blir aldrig gamla: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Om det är aktiverat förblir alla fordonstyper tillgängliga i obegränsad tid efter att de introducerats +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Förnya fordon automatiskt när de blir gamla: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Om det är aktiverat kommer ett fordon som närmar sig slutet av sin livslängd automatiskt att bytas ut när villkoren för förnyelse är uppfyllda @@ -3594,10 +3601,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Stäng # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Subventioner STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Aktuella subventioner: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} från {STRING} till {STRING}{YELLOW} (tills {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Inga - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Redan subventionerade rutter: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} från {STRING} till {STRING}{YELLOW} ({COMPANY}{YELLOW}, tills {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klicka för att centrera huvudvyn ovanför industrin/staden. Ctrl+klick öppnar en ny vy över industrin/stadens läge # Story book window @@ -4275,9 +4280,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Byt namn STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Byt namn på skepp STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Byt namn på flygplan -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ålder: {LTBLUE}{STRING}{BLACK} Driftkostnad: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_AGE :{COMMA} år ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} år ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Ålder: {LTBLUE}{STRING}{BLACK} Driftkostnad: {LTBLUE}{CURRENCY_LONG}/år STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Maxhastiget: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Maxhastighet: {LTBLUE}{VELOCITY} {BLACK}Flygplanstyp: {LTBLUE}{STRING} @@ -4297,14 +4302,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapacite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK} Överför kredit: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Serviceintervall: {LTBLUE}{COMMA}{NBSP}dagar{BLACK} Senaste service: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Serviceintervall: {LTBLUE}{COMMA}%{BLACK} Senaste service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Öka serviceintervall med 10. Ctrl+klick ökar serviceintervall med 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Minska serviceintervall med 10. Ctrl+klick minskar servinceintervall med 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Ändra typ av service-intervall STR_VEHICLE_DETAILS_DEFAULT :Standard -STR_VEHICLE_DETAILS_DAYS :Dagar STR_VEHICLE_DETAILS_PERCENT :Procent ###length VEHICLE_TYPES diff --git a/src/lang/tamil.txt b/src/lang/tamil.txt index b609493937..0726ef3b60 100644 --- a/src/lang/tamil.txt +++ b/src/lang/tamil.txt @@ -197,7 +197,6 @@ STR_COLOUR_RANDOM :ஏதோவொ STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}வட்டங்கள்/நாளிற்கு STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp STR_UNITS_POWER_METRIC :{DECIMAL}{NBSP}hp @@ -229,6 +228,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}மீ STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}மீ +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}வடிகட்டி தொடர்: @@ -574,8 +576,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}பர STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}கம்பெனி செயல்வரம்பு (அதிகபட்ச செயல்வரம்பு=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}கம்பெனி மதிப்பீடுகள் + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}சரக்கு விற்பனை விலை -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}எடுத்துச் செல்லுதல் நாட்கள் STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}10 யூனிட்டு (அல்லது 10000 லிட்டர்) சரக்குகளை 20 கட்டங்களுக்கு நகர்த்தியதற்கான வருவாய் STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}அனைத்தையும் செயலாக்கு STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}அனைத்தையும் செயலிளக்கவை @@ -973,6 +975,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}பய STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}அடிப்படை இசைத் தொகுப்பு பற்றிய கூடுதல் தகவல்கள் + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}ஆதரிக்கப்பட்ட திரைத் தெளிவுத்திரங்களின் வரிசை பெற முடியவில்லை STR_ERROR_FULLSCREEN_FAILED :{WHITE}முழுத்திரை நிலை தோல்வியடைந்தது @@ -1294,6 +1299,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :வாகனம STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :வாகனங்கள் என்றும் காலாவதியாகாது: {STRING} +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :வாகனங்கள் காலாவதியானால் தானாக மாற்றியமை: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :செயலாக்க செய்யப்பட்டால், வாகனங்கள் காலாவதியாவதற்கு முன்னால் தானாக மாற்றியமைக்கப்படும் @@ -3126,10 +3133,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :மூடு # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}மானியங்கள் STR_SUBSIDIES_OFFERED_TITLE :{BLACK}மானியம் வழங்கப்படப்போகும் பணிகள்: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} {STRING} இருந்து {STRING}வரை {YELLOW} ({DATE_SHORT} முன்னர்) STR_SUBSIDIES_NONE :{ORANGE}- ஒன்றுமில்லை - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}மானியம் ஏற்கனவே வழங்கப்பட்ட பணிகள்: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} {STRING} இருந்து {STRING} வரை {YELLOW} ({COMPANY}{YELLOW}, {DATE_SHORT} வரை) # Story book window STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} கதைப் புத்தகம் @@ -3743,9 +3748,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}சா STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}கப்பலுக்கு பெயரிடு STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}விமானத்திற்கு பெயரிடு -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}வயது: {LTBLUE}{STRING}{BLACK} ஓட்டுதல் செலவு: {LTBLUE}{CURRENCY_LONG}/வரு STR_VEHICLE_INFO_AGE :{COMMA} வருடம்{P "" கள்} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} வருடம்{P "" கள்} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}வயது: {LTBLUE}{STRING}{BLACK} ஓட்டுதல் செலவு: {LTBLUE}{CURRENCY_LONG}/வரு STR_VEHICLE_INFO_MAX_SPEED :{BLACK}அதி. வேகம்: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}அதி. வேகம்: {LTBLUE}{VELOCITY} {BLACK}விமான வகை: {LTBLUE}{STRING} @@ -3764,12 +3769,9 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}கொ STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}இடமாற்றம் வரவுகள்: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}பராமரிப்புகளுக்கிடையேயான காலம்: {LTBLUE}{COMMA}{NBSP}நாட்கள்{BLACK} கடைசி பராமரிப்பு: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}பராமரிப்புகளுக்கிடையேயான காலம்: {LTBLUE}{COMMA}%{BLACK} கடைசி பராமரிப்பு: {LTBLUE}{DATE_LONG} STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}பழுதுபார்த்தல் இடைவேளி வகையினை மாற்றவும் STR_VEHICLE_DETAILS_DEFAULT :Default -STR_VEHICLE_DETAILS_DAYS :நாட்கள் STR_VEHICLE_DETAILS_PERCENT :சதவிகிதம் ###length VEHICLE_TYPES diff --git a/src/lang/thai.txt b/src/lang/thai.txt index 0403d9db30..5538e6648e 100644 --- a/src/lang/thai.txt +++ b/src/lang/thai.txt @@ -226,6 +226,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL} ฟ STR_UNITS_HEIGHT_METRIC :{DECIMAL} เมตร STR_UNITS_HEIGHT_SI :{DECIMAL} ม. +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}คำกรอง: @@ -568,8 +571,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}หน STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}คะแนนประสิทธิภาพของบริษัท (คะแนนสูงสุด=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}มูลค่าทรัพย์สินบริษัท + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}อัตราค่าตอบแทนการขนส่ง -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}จำนวนวันในการเดินทาง STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}ค่าขนส่งจากการขนส่งสินค้า 10 หน่วย (หรือ 10,000 ลิตร) ต่อระยะทาง 20 ช่องตาราง STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}เปิดทั้งหมด STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}ปิดทั้งหมด all @@ -969,6 +972,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}เล STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}ข้อมูลเพิ่มเติมเกี่ยวกับชุดเพลงประกอบพื้นฐาน + + + STR_ERROR_FULLSCREEN_FAILED :{WHITE}Fullscreen โหมดล้มเหลว # Custom currency window @@ -1312,6 +1318,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :เมื่อ STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :ยานพาหนะไม่หมดอายุ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :เมื่อเปิดใช้งาน พาหนะทั้งหมดจะยังสามารถซื้อได้ตลอดไปหลังจากหมดช่วงระยะเวลา +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :เปลี่ยนยานพาหนะใหม่โดยอัตโนมัติเมื่อเก่าเกินไป: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :เมื่อเปิดใช้งาน พาหนะที่ใกล้หมดอายุการใช้งาน จะทำการแทนที่ใหม่เอง @@ -3245,10 +3253,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :ปิด # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}เงินอุดหนุน STR_SUBSIDIES_OFFERED_TITLE :{BLACK}โครงการที่จะได้รับเงินทุนสนับสนุน: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} จาก {STRING} ถึง {STRING}{YELLOW} (ก่อน {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- ไม่มี - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}โครงการที่ได้เงินสนับสนุนเรียบร้อยแล้ว: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} จาก {STRING} ถึง {STRING}{YELLOW} ({COMPANY}{YELLOW}, จนกว่าจะถึง {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}กดที่บริการเพื่อไปยังจุดกึ่งกลางของจุดเริ่มต้น # Story book window @@ -3862,9 +3868,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}ชื STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}ชื่อ STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}ชื่อ -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}ใช้งานมาแล้ว: {LTBLUE}{STRING}{BLACK} ค่าปฏิบัติการ: {LTBLUE}{CURRENCY_LONG}/ปี STR_VEHICLE_INFO_AGE :{COMMA} ปี ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} ปี ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}ใช้งานมาแล้ว: {LTBLUE}{STRING}{BLACK} ค่าปฏิบัติการ: {LTBLUE}{CURRENCY_LONG}/ปี STR_VEHICLE_INFO_MAX_SPEED :{BLACK}ความเร็วสูงสุด: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}ความเร็วสูงสุด: {LTBLUE}{VELOCITY} {BLACK}อากาศยานชนิด: {LTBLUE}{STRING} @@ -3882,14 +3888,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}บร STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}รายได้จากการส่งต่อ: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}เข้าซ่อมบำรุงทุก: {LTBLUE}{COMMA}วัน{BLACK} ครั้งสุดท้ายเมื่อ: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}เข้าซ่อมบำรุงเมื่อประสิทธิภาพ: {LTBLUE}{COMMA}%{BLACK} เข้าซ่อมบำรุงครั้งสุดท้ายเมื่อ: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}เพิ่มระยะการซ่อมบำรุงครั้งละ 10 . Ctrl+Click เพิ่มทีละ5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}ลดระยะการซ่อมบำรุงครั้งละ 10 . Ctrl+Click ลดทีละ5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}ปรับเปลี่ยนประเภทการวัดค่าที่ควรซ่อมบำรุง STR_VEHICLE_DETAILS_DEFAULT :ค่าเริ่มต้น -STR_VEHICLE_DETAILS_DAYS :วัน STR_VEHICLE_DETAILS_PERCENT :เปอร์เซนต์ ###length VEHICLE_TYPES diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt index 2fcf926003..b0c696e83c 100644 --- a/src/lang/traditional_chinese.txt +++ b/src/lang/traditional_chinese.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :與主色調相 STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}英里/小時 STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}公里/小時 STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}米/秒 -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}格/日 STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}節 STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}匹 @@ -255,6 +254,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}米 STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}公尺 +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}篩選: @@ -611,8 +613,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}運送 STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}公司效率指標 (最高 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}公司價值 + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}貨物運費表 -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}運輸日數 STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}將 10 單位 (或 10,000 公升) 貨物運送 20 格的費用 STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}全部啟用 STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}全部停用 @@ -1066,6 +1068,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}選擇 STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}關於基本音樂集的額外資訊 + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}無法擷取可用的螢幕解析度清單 STR_ERROR_FULLSCREEN_FAILED :{WHITE}無法切換全螢幕模式 @@ -1435,6 +1440,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :如啟用此選 STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :車輛永不過期:{STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :如啟用此選項,所有車輛一經面世,就永遠可以選擇建造。 +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :車輛達到使用年限時自動更新:{STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :如啟用此選項,所有在符合替換條件時進入維修設施的車輛會被替換。 @@ -3591,10 +3598,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :關閉 # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}補助資訊 STR_SUBSIDIES_OFFERED_TITLE :{BLACK}提供補助的運輸服務: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}將 {STRING} 從 {STRING} 運到 {STRING}{YELLOW} (在 {DATE_SHORT} 之前) STR_SUBSIDIES_NONE :{ORANGE}- 無 - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}已獲補助的服務: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}將 {STRING} 從 {STRING} 運到 {STRING}{YELLOW} ({COMPANY}{YELLOW},補助到 {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}點選運送服務可將工業/市鎮置於畫面中央。 按住 Ctrl 點選可於工業/市鎮位置開啟新視窗視野 # Story book window @@ -4268,9 +4273,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}命名 STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}命名船舶 STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}命名飛機 -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}年齡:{LTBLUE}{STRING}{BLACK} 營運成本:每年{LTBLUE}{CURRENCY_LONG} STR_VEHICLE_INFO_AGE :{COMMA} 年 ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} 年 ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}年齡:{LTBLUE}{STRING}{BLACK} 營運成本:每年{LTBLUE}{CURRENCY_LONG} STR_VEHICLE_INFO_MAX_SPEED :{BLACK}最高速度:{LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}最大速度:{LTBLUE}{VELOCITY} {BLACK}飛機型號:{LTBLUE}{STRING} @@ -4290,14 +4295,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}容量 STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}轉運潛在收入:{LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}每隔 {LTBLUE}{COMMA}{NBSP}天進行維護{BLACK} 上次維護日期:{LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}維護間隔:{LTBLUE}{COMMA}%{BLACK} 上次維護:{LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}以 10 為單位延長維護間隔。 按住 Ctrl 點選可以 5 為單位 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}以 10 為單位縮短維護間隔。 按住 Ctrl 點選可以 5 為單位 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}更改檢修週期所用單位 STR_VEHICLE_DETAILS_DEFAULT :預設 -STR_VEHICLE_DETAILS_DAYS :日數 STR_VEHICLE_DETAILS_PERCENT :百分比 ###length VEHICLE_TYPES diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt index 2fb28e199c..9a55c03fe1 100644 --- a/src/lang/turkish.txt +++ b/src/lang/turkish.txt @@ -215,7 +215,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Birincil Ile Ay STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mil/s STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/s STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}karo/gün STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}hava hızı STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}bg @@ -256,10 +255,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}gün{P "ler" } STR_UNITS_SECONDS :{COMMA}{NBSP}saniye{P "ler" } STR_UNITS_TICKS :{COMMA}{NBSP}tik{P "ler" } + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtre: STR_LIST_FILTER_OSKTITLE :{BLACK}Listeyi filtrelemek için anahtar sözcük girin @@ -616,8 +618,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Taşına STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Şirket performans değerlendirmeleri (azami=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Şirket Değerleri Grafiği + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Kargo Ödeme Seviyeleri -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Taşınma süresi STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}20 karelik yolda 10 birim (ya da 10,000 litre) için ödeme STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Tümünü aç STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Tümünü kapat @@ -1078,6 +1080,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Temel m STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Kullanılacak temel müzik kümesini seçin STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Temel müzik hakkında daha fazla bilgi + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} eksik/bozuk dosya{P "lar" }) STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Desteklenen çözünürlük listesi alınamadı @@ -1451,6 +1456,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Etkinleştirild STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Eski araçlar sürekli üretilsin: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Etkinleştirildiğinde, tüm araç modelleri piyasaya çıkışlarından itibaren sonsuza dek satın alınabilir. +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Araç eskiyince otomatik olarak yenile: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Etkinleştirildiğinde, yenileme koşulları sağlandığı takdirde ömrünün sonuna yaklaşan bir araç otomatik olarak yenilenir. @@ -3625,10 +3632,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Kapat # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Teşvikler STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Teklif edilmiş teşvikler: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} {STRING} -> {STRING}{YELLOW} ({DATE_SHORT} tarihinden itibaren) STR_SUBSIDIES_NONE :{ORANGE}- Yok - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Teşvik almakta olan hizmetler: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} {STRING} -> {STRING}{YELLOW} ({COMPANY}{YELLOW}, {DATE_SHORT} tarihine kadar) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Görüntüyü ortalamak için endüstriye/şehre tıklayın. Ctrl ile tıklama endüstrinin/şehrin konumunu gösteren yeni bir pencere açar # Story book window @@ -4306,9 +4311,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Karayolu STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Gemiyi adlandır STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Uçağı adlandır -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Yaş: {LTBLUE}{STRING}{BLACK} İşletme Gideri: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_AGE :{COMMA} sene ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} sene ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Yaş: {LTBLUE}{STRING}{BLACK} İşletme Gideri: {LTBLUE}{CURRENCY_LONG}/yr STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Azami Hız: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Azami hız: {LTBLUE}{VELOCITY} {BLACK}Uçak türü: {LTBLUE}{STRING} @@ -4328,14 +4333,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Kapasite STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Aktarma Maliyeti: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Bakım aralığı: {LTBLUE}{COMMA}{NBSP}günde bir{BLACK} Son bakım: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Bakım zamanı: {LTBLUE}%{COMMA}{BLACK} Son bakım: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Bakım periyodunu 10 arttır. Ctrl-tıklama bakım periyodunu 5 arttırır. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Bakım periyodunu 10 azalt. Ctrl+Tıklama bakım periyodunu 5 azaltır STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Bakım aralığı türünü değiştir STR_VEHICLE_DETAILS_DEFAULT :Varsayılan -STR_VEHICLE_DETAILS_DAYS :Gün STR_VEHICLE_DETAILS_PERCENT :Yüzde ###length VEHICLE_TYPES diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index 1c601dbf3c..7194840821 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -322,7 +322,6 @@ STR_COLOUR_RANDOM :Випадко STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}миль/год STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}км/год STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}м/с -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}клітинок/день STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}вуз{P ол ла лів} STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}к.с. @@ -363,6 +362,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}м STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}м +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Фільтр: @@ -721,8 +723,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Кіль STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Рейтинг продуктивності компанії (найбільший рейтинг=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Вартість компанії + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Тарифи на доставку вантажів -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Днів у дорозі STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Плата за доставку 10 одиниць (або 10,000 літрів) вантажу на відстань 20 квадратів STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Включити всі STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Відключити усі @@ -1174,6 +1176,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Обер STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Допоміжна інформація про базовий музичний набір + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Не вдалося отримати список підтримуваних дозволів STR_ERROR_FULLSCREEN_FAILED :{WHITE}Повноекранний режим не працює @@ -1539,6 +1544,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Вмикає/в STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Транспортні засоби не застарівають: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :При включенні будь-яка модель транспортного засобу буде доступна для придбання безстроково після її впровадження. +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Автозаміна зношених транспортних засобів: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :При включенні транспортні засоби з вичерпаним строком служби автоматично замінюються на нові (при виконанні умов автозаміни). @@ -3680,10 +3687,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Закрити # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Субсидії STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Пропонуються субсидії: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}Перевезення {STRING.r} з {STRING} до {STRING}{YELLOW} ({DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- немає - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Призначені субсидії: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}Перевезення {STRING.r} з {STRING} до {STRING}{YELLOW} ({COMPANY}{YELLOW}, по {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Натисніть на субсидії, щоб показати підприємство/місто у центрі екрану. Ctrl+клац мишою відкриває нове вікно з видом на підприємство/місто # Story book window @@ -4357,9 +4362,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Назв STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Назвати корабель STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Назвати літак -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Вік: {LTBLUE}{STRING}{BLACK} Вартість експлуатації: {LTBLUE}{CURRENCY_LONG}/рік STR_VEHICLE_INFO_AGE :{COMMA} р{P ік оки оків} ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} р{P ік оки оків} ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Вік: {LTBLUE}{STRING}{BLACK} Вартість експлуатації: {LTBLUE}{CURRENCY_LONG}/рік STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Макс. швидкість: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Макс. швидкість: {LTBLUE}{VELOCITY} {BLACK}Тип: {LTBLUE}{STRING} @@ -4379,14 +4384,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Міст STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Плата за трансфер: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Інтервал техогляду: {LTBLUE}{COMMA}{NBSP}днів{BLACK} Останній техогляд: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Інтервал техогляду: {LTBLUE}{COMMA}%{BLACK} Останній техогляд: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Збільшити інтервал техогляду на 10. Ctrl+клац мишою збільшує інтервал техогляду на 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Зменшити період техогляду на 10. Ctrl+клац мишою зменшує інтервал техогляду на 5 STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Відлік інтервалу між техоглядами STR_VEHICLE_DETAILS_DEFAULT :Стандартно -STR_VEHICLE_DETAILS_DAYS :Дні STR_VEHICLE_DETAILS_PERCENT :Проценти ###length VEHICLE_TYPES diff --git a/src/lang/urdu.txt b/src/lang/urdu.txt index 16a8e9b9c2..090c7cf9c1 100644 --- a/src/lang/urdu.txt +++ b/src/lang/urdu.txt @@ -219,6 +219,9 @@ STR_UNITS_FORCE_SI :{NBSP}{DECIMAL} STR_UNITS_HEIGHT_IMPERIAL :{NBSP}{DECIMAL} فٹ STR_UNITS_HEIGHT_SI :{NBSP}{DECIMAL} میٹر +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_OSKTITLE :{BLACK} چھان کے الفاظ درج کیجیئے @@ -544,8 +547,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE} شما STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE} کمپنی کی کارکردگی کی درج بندی (حدِ درجھ = 1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}کمپنی کی مالیت + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE} سامان کی ادایگی کا تناسب -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK} حرکت میں ایام STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK} سامان کی دس اکائیات (یآ 10،000 لیٹر)، 20 چکور تک لے جانے کی ادائیگی STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT} {BLACK} سب کو قابل کیجیئے STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT} {BLACK} سب کو نا کارہ کیجیئے @@ -822,7 +825,12 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}نئی { STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}امداد کی پیشکش کی معیاد ختم:{}{}{STRING} {STRING} سے {STRING} تک اب کوئی امداد نہیں ملے گی STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}امداد ختم:{}{}{STRING} {STRING} سے {STRING} تک کئی گئی خدمت کی اب کوئی امداد نہیں ملے گی +STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}خدمات پر امداد کی پیشکش:{}{}پہلی خدمت {STRING} جو {STRING} سے {STRING} تک ہو، پر ایک سال تک امدام ملے گی ###length 4 +STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}خدمات پر{STRING} کو امداد دے دی گئی!{}{}{STRING} {STRING} سے {STRING} تک دی جانے والی خدمات پر اگلے سال 50٪ زیادہ ملیں گے +STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}خدمات پر{STRING} کو امداد دے دی گئی!{}{}{STRING} {STRING} سے {STRING} تک دی جانے والی خدمات پر اگلے سال دُگنے پیسے ملیں گے +STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}خدمات پر{STRING} کو امداد دے دی گئی!{}{}{STRING} {STRING} سے {STRING} تک دی جانے والی خدمات پر اگلے سال تین گُنا پیسے ملیں گے +STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}خدمات پر{STRING} کو امداد دے دی گئی!{}{}{STRING} {STRING} سے {STRING} تک دی جانے والی خدمات پر اگلے سال چار گُنا پیسے ملیں گے STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}{TOWN} میں ٹریفک کا بُرا حال!{}{}سڑکیں دوبارہ بنوانے کے پیسے {STRING} نے دئیے۔ اس کی وجہ سے اگلے 6 ماہ مشکل رہے گی @@ -917,6 +925,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}بُنی STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}بُنیادی موسیقی سیٹ کے بارے میں اضافی معلومات + + + STR_ERROR_FULLSCREEN_FAILED :{WHITE}مُکمل اسکرین موڈ ناکام ہوگیا # Custom currency window @@ -1159,6 +1170,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :گاڑی کو STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :گاڑیوں کی معیاد کبھی ختم نہ ہو: {STRING} +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :گاڑی پرانی ہونے کی صورت میں خودکار طریقے سے بدل دیں: {STRING} ###length 2 diff --git a/src/lang/vietnamese.txt b/src/lang/vietnamese.txt index b7f4eb0dbd..9d3d621be8 100644 --- a/src/lang/vietnamese.txt +++ b/src/lang/vietnamese.txt @@ -214,7 +214,6 @@ STR_COLOUR_SECONDARY_SAME_AS_PRIMARY :Như màu chủ STR_UNITS_VELOCITY_IMPERIAL :{DECIMAL}{NBSP}mph STR_UNITS_VELOCITY_METRIC :{DECIMAL}{NBSP}km/h STR_UNITS_VELOCITY_SI :{DECIMAL}{NBSP}m/s -STR_UNITS_VELOCITY_GAMEUNITS :{DECIMAL}{NBSP}ô/ngày STR_UNITS_VELOCITY_KNOTS :{DECIMAL}{NBSP}hải lý STR_UNITS_POWER_IMPERIAL :{DECIMAL}{NBSP}hp @@ -255,10 +254,13 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters STR_UNITS_DAYS :{COMMA}{NBSP}ngày STR_UNITS_SECONDS :{COMMA}{NBSP}giây STR_UNITS_TICKS :{COMMA}{NBSP}tick + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Lọc: STR_LIST_FILTER_OSKTITLE :{BLACK}Nhập một hoặc nhiều từ khóa để lọc danh sách @@ -615,8 +617,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Số lư STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Đánh giá năng suất công ty (cao nhất=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Biểu đồ giá trị công ty + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Bảng Giá Cước Vận Chuyển Hàng Hóa -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Số ngày vận chuyển STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Tiền trả khi vận chuyển 10 đơn vị (hay 10,000 lít) hàng hóa trên mỗi 20 ô STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Cho phép toàn bộ STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Bỏ toàn bộ @@ -1077,6 +1079,9 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Gói nh STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Chọn gói nhạc để sử dụng STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Thông tin thêm về gói nhạc chuẩn + + + STR_BASESET_STATUS :{STRING} {RED}({NUM} file bị hỏng/thiếu STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Không thể lấy danh sách độ phân giải được hỗ trợ @@ -1450,6 +1455,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Nếu bật, s STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Phương tiện không bao giờ hết hạn sử dụng: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Nếu bật, tất cả các model phương tiện sẽ không bị lỗi thời +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Tự thay mới phương tiện nếu hết hạn sử dụng: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Nếu bật, phương tiện gần hết hạn sẽ được tự động thay mới và điều kiện thay mới được thỏa mãn @@ -3633,10 +3640,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Đóng # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Trợ Cấp STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Trợ cấp sẽ có cho dịch vụ sau: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} từ {STRING} đến {STRING}{YELLOW} (đến {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Không - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Chính quyền đã dành trợ cấp cho dịch vụ của: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} từ {STRING} đến {STRING}{YELLOW} ({COMPANY}{YELLOW}, hết hạn {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Nháy vào tên dịch vụ để xem nhà máy/đô thị liên quan. Ctrl+Click mở cửa sổ mới để xem # Story book window @@ -4314,9 +4319,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Đổi t STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Đổi tên tàu thuỷ STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Đổi tên máy bay -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Tuổi: {LTBLUE}{STRING}{BLACK} Chi phí hoạt động: {LTBLUE}{CURRENCY_LONG}/năm STR_VEHICLE_INFO_AGE :{COMMA} năm ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} năm ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Tuổi: {LTBLUE}{STRING}{BLACK} Chi phí hoạt động: {LTBLUE}{CURRENCY_LONG}/năm STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Tốc độ tối đa: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Tốc độ tối đa: {LTBLUE}{VELOCITY} {BLACK}Kiểu máy bay: {LTBLUE}{STRING} @@ -4336,14 +4341,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Sức ch STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Cước trung chuyển: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Tần suất bảo trì: {LTBLUE}{COMMA}{NBSP}ngày{BLACK} Lần bảo trì cuối: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Tần suất bảo trì: {LTBLUE}{COMMA}%{BLACK} Lần bảo trì cuối: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Tăng tần suất bảo trì lên 10. Ctrl+Click để tăng 5 thôi STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Giảm tần suất bảo trì lên 10. Ctrl+Click để giảm 5 thôi STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Thay đổi kiểu tần suất phục vụ STR_VEHICLE_DETAILS_DEFAULT :Mặc định -STR_VEHICLE_DETAILS_DAYS :Ngày STR_VEHICLE_DETAILS_PERCENT :Phần trăm ###length VEHICLE_TYPES diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt index 0178e12cca..fa96efd7af 100644 --- a/src/lang/welsh.txt +++ b/src/lang/welsh.txt @@ -231,6 +231,9 @@ STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP} STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m +# Time units used in string control characters + + # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Hidlydd: @@ -570,8 +573,8 @@ STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Llwythi STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Graddfeydd Perfformiad Cwmni (gradd uchaf=1000) STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Gwerth Cwmnïau + STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Graddfeydd Tâl Llwythi -STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Diwrnodau ar daith STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Tâl am gludo llwyth o 10 uned (neu 10,000 litr) pellter o 20 sgwâr STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Galluogi popeth STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Analluogi popeth @@ -986,6 +989,9 @@ STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Dewisiwc STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Gwybodaeth bellach am y set gerddoriaeth sylfaenol + + + STR_ERROR_RESOLUTION_LIST_FAILED :{WHITE}Methu nôl rhestr o cydraniadau cydnaws STR_ERROR_FULLSCREEN_FAILED :{WHITE}Methodd y modd sgrin llawn @@ -1339,6 +1345,8 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Pan fo wedi'i a STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Nid yw cerbydau'n darfod: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Pan fo wedi'i alluogi, bydd bob math o gerbyd yn aros ar gael am byth wedi eu cyflwyniad gyntaf +###length 2 + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Awtoadnewyddu cerbyd pan aiff yn hen: {STRING} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Pan fo wedi'i alluogi, bydd cerbyd sy'n agos at ddiwedd ei oes yn cael ei ddisodli'n ddiofyn pan y caiff yr amodau adnewyddu eu cyflawni @@ -3260,10 +3268,8 @@ STR_GOAL_QUESTION_BUTTON_CLOSE :Cau # Subsidies window STR_SUBSIDIES_CAPTION :{WHITE}Cymorthdaliadau STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Cymorthdaliadau sy'n cael eu cynnig ar gyfer cludo: -STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} o {STRING} i {STRING}{YELLOW} (erbyn {DATE_SHORT}) STR_SUBSIDIES_NONE :{ORANGE}- Dim - STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Gwasanaethau sydd eisoes yn derbyn cymhorthdal: -STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} o {STRING} i {STRING}{YELLOW} ({COMPANY}{YELLOW}, tan {DATE_SHORT}) STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Cliciwch ar y gwasanaeth i ganoli'r olygfa ar y diwydiant/tref. Mae Ctrl+Clic yn agor ffenest golwg newydd ar leoliad y diwydiant/tref # Story book window @@ -3886,9 +3892,9 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Enwi cer STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Enwi llong STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Enwi awyren -STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Oed: {LTBLUE}{STRING}{BLACK} Cost Rhedeg: {LTBLUE}{CURRENCY_LONG}/bl STR_VEHICLE_INFO_AGE :{COMMA} blwyddyn ({COMMA}) STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} blwyddyn ({COMMA}) +STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Oed: {LTBLUE}{STRING}{BLACK} Cost Rhedeg: {LTBLUE}{CURRENCY_LONG}/bl STR_VEHICLE_INFO_MAX_SPEED :{BLACK}cyflymder uchaf: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_MAX_SPEED_TYPE :{BLACK}Cyflym. uchaf: {LTBLUE}{VELOCITY} {BLACK}Math awyren: {LTBLUE}{STRING} @@ -3908,14 +3914,11 @@ STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Cynhwyse STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Credydau Trosglwyddo: {LTBLUE}{CURRENCY_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Bwlch rhwng gwasanaeth: {LTBLUE}{COMMA}{NBSP}diwrnod{BLACK} Gwasanaeth diwethaf: {LTBLUE}{DATE_LONG} -STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Bwlch rhwng gwasanaethu: {LTBLUE}{COMMA}%{BLACK} Gwasanaeth diwethaf: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Cynyddu'r bwlch rhwng gwasanaethau fesul 10. Mae Ctrl+Clic yn gostwng y bwlch rhwng gwasanaethau fesul 5. STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Gostwng y bwlch rhwng gwasanaethau fesul 10. Mae Ctrl+Clic yn gostwng y bwlch rhwng gwasanaethau fesul 5. STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Newid dull ystod gwasanaethu STR_VEHICLE_DETAILS_DEFAULT :Rhagosodedig -STR_VEHICLE_DETAILS_DAYS :Diwrnod STR_VEHICLE_DETAILS_PERCENT :Canran ###length VEHICLE_TYPES From 21581b6ab3aee872cca10ff85676e172c3283f5e Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Tue, 23 Jan 2024 18:33:54 -0500 Subject: [PATCH 13/52] Feature: Setting for minutes per calendar year (#11428) --- src/lang/english.txt | 7 +++++ src/openttd.cpp | 5 ++-- src/saveload/misc_sl.cpp | 1 + src/saveload/saveload.h | 1 + src/settings_gui.cpp | 1 + src/settings_table.cpp | 40 +++++++++++++++++++++++++ src/settings_type.h | 1 + src/table/settings/economy_settings.ini | 16 ++++++++++ src/timer/timer_game_calendar.cpp | 33 +++++++++++++++----- src/timer/timer_game_calendar.h | 8 ++++- src/timer/timer_game_economy.cpp | 8 +++-- src/timer/timer_game_realtime.cpp | 4 ++- src/timer/timer_game_tick.cpp | 4 ++- src/timer/timer_manager.h | 3 +- src/timer/timer_window.cpp | 4 ++- 15 files changed, 118 insertions(+), 18 deletions(-) diff --git a/src/lang/english.txt b/src/lang/english.txt index 812a0c94af..b4abe4a19c 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1487,6 +1487,13 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_HELPTEXT :Select the time STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendar STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Wallclock +STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutes per year: {STRING2} +STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. This setting does not affect the economic simulation of the game, and is only available when using wallclock timekeeping. + +STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM} +###setting-zero-is-special +STR_CONFIG_SETTING_MINUTES_PER_YEAR_FROZEN :0 (calendar time frozen) + STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenew vehicle when it gets old: {STRING2} STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :When enabled, a vehicle nearing its end of life gets automatically replaced when the renew conditions are fulfilled diff --git a/src/openttd.cpp b/src/openttd.cpp index 9a6db6259d..200b9d3d87 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1472,11 +1472,12 @@ void StateGameLoop() BasePersistentStorageArray::SwitchMode(PSM_ENTER_GAMELOOP); AnimateAnimatedTiles(); - TimerManager::Elapsed(1); + if (TimerManager::Elapsed(1)) { + RunVehicleCalendarDayProc(); + } TimerManager::Elapsed(1); TimerManager::Elapsed(1); RunTileLoop(); - RunVehicleCalendarDayProc(); CallVehicleTicks(); CallLandscapeTick(); BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP); diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index a28021f520..7ec076310a 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -88,6 +88,7 @@ static const SaveLoad _date_desc[] = { SLEG_CONDVAR("tick_counter", TimerGameTick::counter, SLE_UINT64, SLV_U64_TICK_COUNTER, SL_MAX_VERSION), SLEG_CONDVAR("economy_date", TimerGameEconomy::date, SLE_INT32, SLV_ECONOMY_DATE, SL_MAX_VERSION), SLEG_CONDVAR("economy_date_fract", TimerGameEconomy::date_fract, SLE_UINT16, SLV_ECONOMY_DATE, SL_MAX_VERSION), + SLEG_CONDVAR("calendar_sub_date_fract", TimerGameCalendar::sub_date_fract, SLE_UINT16, SLV_CALENDAR_SUB_DATE_FRACT, SL_MAX_VERSION), SLEG_CONDVAR("age_cargo_skip_counter", _age_cargo_skip_counter, SLE_UINT8, SL_MIN_VERSION, SLV_162), SLEG_CONDVAR("cur_tileloop_tile", _cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, SL_MIN_VERSION, SLV_6), SLEG_CONDVAR("cur_tileloop_tile", _cur_tileloop_tile, SLE_UINT32, SLV_6, SL_MAX_VERSION), diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 912aac6c97..4564b9d4f3 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -370,6 +370,7 @@ enum SaveLoadVersion : uint16_t { SLV_WATER_REGION_EVAL_SIMPLIFIED, ///< 325 PR#11750 Simplified Water Region evaluation. SLV_ECONOMY_DATE, ///< 326 PR#10700 Split calendar and economy timers and dates. SLV_ECONOMY_MODE_TIMEKEEPING_UNITS, ///< 327 PR#11341 Mode to display economy measurements in wallclock units. + SLV_CALENDAR_SUB_DATE_FRACT, ///< 328 PR#11428 Add sub_date_fract to measure calendar days. SL_MAX_VERSION, ///< Highest possible saveload version }; diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 43b03c1266..b70d2b6b6e 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -2213,6 +2213,7 @@ static SettingsContainer &GetSettingsTree() SettingsPage *time = environment->Add(new SettingsPage(STR_CONFIG_SETTING_ENVIRONMENT_TIME)); { time->Add(new SettingEntry("economy.timekeeping_units")); + time->Add(new SettingEntry("economy.minutes_per_calendar_year")); time->Add(new SettingEntry("game_creation.ending_year")); time->Add(new SettingEntry("gui.pause_on_newgame")); time->Add(new SettingEntry("gui.fast_forward_speed_limit")); diff --git a/src/settings_table.cpp b/src/settings_table.cpp index 38573339db..8075477433 100644 --- a/src/settings_table.cpp +++ b/src/settings_table.cpp @@ -22,6 +22,7 @@ #include "news_func.h" #include "window_func.h" #include "company_func.h" +#include "timer/timer_game_calendar.h" #if defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA) #define HAS_TRUETYPE_FONT #include "fontcache.h" @@ -500,9 +501,48 @@ static void ChangeTimekeepingUnits(int32_t) UpdateAllServiceInterval(0); } + /* If we are using calendar timekeeping, "minutes per year" must be default. */ + if (!TimerGameEconomy::UsingWallclockUnits(true)) { + _settings_newgame.economy.minutes_per_calendar_year = CalendarTime::DEF_MINUTES_PER_YEAR; + } + InvalidateWindowClassesData(WC_GAME_OPTIONS, 0); } +/** + * Callback after the player changes the minutes per year. + * @param new_value The intended new value of the setting, used for clamping. + */ +static void ChangeMinutesPerYear(int32_t new_value) +{ + /* We don't allow setting Minutes Per Year below default, unless it's to 0 for frozen calendar time. */ + if (new_value < CalendarTime::DEF_MINUTES_PER_YEAR) { + int clamped; + + /* If the new value is 1, we're probably at 0 and trying to increase the value, so we should jump up to default. */ + if (new_value == 1) { + clamped = CalendarTime::DEF_MINUTES_PER_YEAR; + } else { + clamped = CalendarTime::FROZEN_MINUTES_PER_YEAR; + } + + /* Override the setting with the clamped value. */ + if (_game_mode == GM_MENU) { + _settings_newgame.economy.minutes_per_calendar_year = clamped; + } else { + _settings_game.economy.minutes_per_calendar_year = clamped; + } + } + + /* If the setting value is not the default, force the game to use wallclock timekeeping units. + * This can only happen in the menu, since the pre_cb ensures this setting can only be changed there, or if we're already using wallclock units. + */ + if (_game_mode == GM_MENU && (_settings_newgame.economy.minutes_per_calendar_year != CalendarTime::DEF_MINUTES_PER_YEAR)) { + _settings_newgame.economy.timekeeping_units = TKU_WALLCLOCK; + InvalidateWindowClassesData(WC_GAME_OPTIONS, 0); + } +} + /** * Pre-callback check when trying to change the timetable mode. This is locked to Seconds when using wallclock units. * @param Unused. diff --git a/src/settings_type.h b/src/settings_type.h index 82efe5fd39..06ced9330f 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -558,6 +558,7 @@ struct EconomySettings { bool allow_town_level_crossings; ///< towns are allowed to build level crossings bool infrastructure_maintenance; ///< enable monthly maintenance fee for owner infrastructure TimekeepingUnits timekeeping_units; ///< time units to use for the game economy, either calendar or wallclock + uint16_t minutes_per_calendar_year; ///< minutes per calendar year. Special value 0 means that calendar time is frozen. }; struct LinkGraphSettings { diff --git a/src/table/settings/economy_settings.ini b/src/table/settings/economy_settings.ini index f824c50fe0..30545d539e 100644 --- a/src/table/settings/economy_settings.ini +++ b/src/table/settings/economy_settings.ini @@ -10,6 +10,7 @@ [pre-amble] static void TownFoundingChanged(int32_t new_value); static void ChangeTimekeepingUnits(int32_t new_value); +static void ChangeMinutesPerYear(int32_t new_value); static const SettingVariant _economy_settings_table[] = { [post-amble] @@ -294,3 +295,18 @@ strval = STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR strhelp = STR_CONFIG_SETTING_TIMEKEEPING_UNITS_HELPTEXT post_cb = ChangeTimekeepingUnits cat = SC_BASIC + +[SDT_VAR] +var = economy.minutes_per_calendar_year +type = SLE_UINT16 +flags = SF_GUI_0_IS_SPECIAL | SF_NO_NETWORK +def = CalendarTime::DEF_MINUTES_PER_YEAR +min = CalendarTime::FROZEN_MINUTES_PER_YEAR +max = CalendarTime::MAX_MINUTES_PER_YEAR +interval = 1 +str = STR_CONFIG_SETTING_MINUTES_PER_YEAR +strhelp = STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT +strval = STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE +pre_cb = [](auto) { return _game_mode == GM_MENU || _settings_game.economy.timekeeping_units == 1; } +post_cb = ChangeMinutesPerYear +cat = SC_BASIC diff --git a/src/timer/timer_game_calendar.cpp b/src/timer/timer_game_calendar.cpp index 1dcc1c79ee..3b7bc870a8 100644 --- a/src/timer/timer_game_calendar.cpp +++ b/src/timer/timer_game_calendar.cpp @@ -32,6 +32,7 @@ TimerGameCalendar::Year TimerGameCalendar::year = {}; TimerGameCalendar::Month TimerGameCalendar::month = {}; TimerGameCalendar::Date TimerGameCalendar::date = {}; TimerGameCalendar::DateFract TimerGameCalendar::date_fract = {}; +uint16_t TimerGameCalendar::sub_date_fract = {}; /** * Converts a Date to a Year, Month & Day. @@ -93,28 +94,42 @@ void TimeoutTimer::Elapsed(TimerGameCalendar::TElapsed trigge } template<> -void TimerManager::Elapsed([[maybe_unused]] TimerGameCalendar::TElapsed delta) +bool TimerManager::Elapsed([[maybe_unused]] TimerGameCalendar::TElapsed delta) { assert(delta == 1); - if (_game_mode == GM_MENU) return; + if (_game_mode == GM_MENU) return false; + + /* If calendar day progress is frozen, don't try to advance time. */ + if (_settings_game.economy.minutes_per_calendar_year == CalendarTime::FROZEN_MINUTES_PER_YEAR) return false; + + /* If we are using a non-default calendar progression speed, we need to check the sub_date_fract before updating date_fract. */ + if (_settings_game.economy.minutes_per_calendar_year != CalendarTime::DEF_MINUTES_PER_YEAR) { + TimerGameCalendar::sub_date_fract++; + + /* Check if we are ready to increment date_fract */ + if (TimerGameCalendar::sub_date_fract < (Ticks::DAY_TICKS * _settings_game.economy.minutes_per_calendar_year) / CalendarTime::DEF_MINUTES_PER_YEAR) return false; + } TimerGameCalendar::date_fract++; - if (TimerGameCalendar::date_fract < Ticks::DAY_TICKS) return; + + /* Check if we entered a new day. */ + if (TimerGameCalendar::date_fract < Ticks::DAY_TICKS) return true; TimerGameCalendar::date_fract = 0; + TimerGameCalendar::sub_date_fract = 0; - /* increase day counter */ + /* Increase day counter. */ TimerGameCalendar::date++; TimerGameCalendar::YearMonthDay ymd = TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date); - /* check if we entered a new month? */ + /* Check if we entered a new month. */ bool new_month = ymd.month != TimerGameCalendar::month; - /* check if we entered a new year? */ + /* Check if we entered a new year. */ bool new_year = ymd.year != TimerGameCalendar::year; - /* update internal variables before calling the daily/monthly/yearly loops */ + /* Update internal variables before calling the daily/monthly/yearly loops. */ TimerGameCalendar::month = ymd.month; TimerGameCalendar::year = ymd.year; @@ -137,7 +152,7 @@ void TimerManager::Elapsed([[maybe_unused]] TimerGameCalendar } } - /* check if we reached the maximum year, decrement dates by a year */ + /* If we reached the maximum year, decrement dates by a year. */ if (TimerGameCalendar::year == CalendarTime::MAX_YEAR + 1) { int days_this_year; @@ -145,6 +160,8 @@ void TimerManager::Elapsed([[maybe_unused]] TimerGameCalendar days_this_year = TimerGameCalendar::IsLeapYear(TimerGameCalendar::year) ? CalendarTime::DAYS_IN_LEAP_YEAR : CalendarTime::DAYS_IN_YEAR; TimerGameCalendar::date -= days_this_year; } + + return true; } #ifdef WITH_ASSERT diff --git a/src/timer/timer_game_calendar.h b/src/timer/timer_game_calendar.h index 7994b57fa7..602d96e429 100644 --- a/src/timer/timer_game_calendar.h +++ b/src/timer/timer_game_calendar.h @@ -33,6 +33,7 @@ public: static Month month; ///< Current month (0..11). static Date date; ///< Current date in days (day counter). static DateFract date_fract; ///< Fractional part of the day. + static uint16_t sub_date_fract; ///< Subpart of date_fract that we use when calendar days are slower than economy days. static YearMonthDay ConvertDateToYMD(Date date); static Date ConvertYMDToDate(Year year, Month month, Day day); @@ -42,6 +43,11 @@ public: /** * Storage class for Calendar time constants. */ -class CalendarTime : public TimerGameConst {}; +class CalendarTime : public TimerGameConst { +public: + static constexpr int DEF_MINUTES_PER_YEAR = 12; + static constexpr int FROZEN_MINUTES_PER_YEAR = 0; + static constexpr int MAX_MINUTES_PER_YEAR = 10080; // One week of real time. The actual max that doesn't overflow TimerGameCalendar::sub_date_fract is 10627, but this is neater. +}; #endif /* TIMER_GAME_CALENDAR_H */ diff --git a/src/timer/timer_game_economy.cpp b/src/timer/timer_game_economy.cpp index 474fcfd461..62f6806213 100644 --- a/src/timer/timer_game_economy.cpp +++ b/src/timer/timer_game_economy.cpp @@ -121,14 +121,14 @@ void TimeoutTimer::Elapsed(TimerGameEconomy::TElapsed trigger) } template<> -void TimerManager::Elapsed([[maybe_unused]] TimerGameEconomy::TElapsed delta) +bool TimerManager::Elapsed([[maybe_unused]] TimerGameEconomy::TElapsed delta) { assert(delta == 1); - if (_game_mode == GM_MENU) return; + if (_game_mode == GM_MENU) return false; TimerGameEconomy::date_fract++; - if (TimerGameEconomy::date_fract < Ticks::DAY_TICKS) return; + if (TimerGameEconomy::date_fract < Ticks::DAY_TICKS) return true; TimerGameEconomy::date_fract = 0; /* increase day counter */ @@ -187,6 +187,8 @@ void TimerManager::Elapsed([[maybe_unused]] TimerGameEconomy:: for (Vehicle *v : Vehicle::Iterate()) v->ShiftDates(-days_this_year); for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(-days_this_year); } + + return true; } #ifdef WITH_ASSERT diff --git a/src/timer/timer_game_realtime.cpp b/src/timer/timer_game_realtime.cpp index 62b10f9b05..600e24f317 100644 --- a/src/timer/timer_game_realtime.cpp +++ b/src/timer/timer_game_realtime.cpp @@ -54,11 +54,13 @@ void TimeoutTimer::Elapsed(TimerGameRealtime::TElapsed delta) } template<> -void TimerManager::Elapsed(TimerGameRealtime::TElapsed delta) +bool TimerManager::Elapsed(TimerGameRealtime::TElapsed delta) { for (auto timer : TimerManager::GetTimers()) { timer->Elapsed(delta); } + + return true; } #ifdef WITH_ASSERT diff --git a/src/timer/timer_game_tick.cpp b/src/timer/timer_game_tick.cpp index 225204b668..92399a4e63 100644 --- a/src/timer/timer_game_tick.cpp +++ b/src/timer/timer_game_tick.cpp @@ -51,13 +51,15 @@ void TimeoutTimer::Elapsed(TimerGameTick::TElapsed delta) } template<> -void TimerManager::Elapsed(TimerGameTick::TElapsed delta) +bool TimerManager::Elapsed(TimerGameTick::TElapsed delta) { TimerGameTick::counter++; for (auto timer : TimerManager::GetTimers()) { timer->Elapsed(delta); } + + return true; } #ifdef WITH_ASSERT diff --git a/src/timer/timer_manager.h b/src/timer/timer_manager.h index ca87ec4edc..c3b45a73bd 100644 --- a/src/timer/timer_manager.h +++ b/src/timer/timer_manager.h @@ -78,8 +78,9 @@ public: * Call the Elapsed() method of all active timers. * * @param value The amount of time that has elapsed. + * @return True iff time has progressed. */ - static void Elapsed(TElapsed value); + static bool Elapsed(TElapsed value); private: /** diff --git a/src/timer/timer_window.cpp b/src/timer/timer_window.cpp index bc6a10530d..906d5e0a9f 100644 --- a/src/timer/timer_window.cpp +++ b/src/timer/timer_window.cpp @@ -49,7 +49,7 @@ void TimeoutTimer::Elapsed(TimerWindow::TElapsed delta) } template<> -void TimerManager::Elapsed(TimerWindow::TElapsed delta) +bool TimerManager::Elapsed(TimerWindow::TElapsed delta) { /* Make a temporary copy of the timers, as a timer's callback might add/remove other timers. */ auto timers = TimerManager::GetTimers(); @@ -57,6 +57,8 @@ void TimerManager::Elapsed(TimerWindow::TElapsed delta) for (auto timer : timers) { timer->Elapsed(delta); } + + return true; } #ifdef WITH_ASSERT From cbb24b5d71412a7d80f6d08233c812b28cf5dc54 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 24 Jan 2024 21:24:34 +0000 Subject: [PATCH 14/52] Codechange: Split bit numbers from values in RailTypeFlags, RoadTypeFlags enums (#11877) --- src/rail.h | 7 +++++-- src/road.h | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/rail.h b/src/rail.h index 6fe9c28d69..563278b28e 100644 --- a/src/rail.h +++ b/src/rail.h @@ -21,15 +21,18 @@ #include "signal_type.h" #include "settings_type.h" -/** Railtype flags. */ -enum RailTypeFlags { +/** Railtype flag bit numbers. */ +enum RailTypeFlag { RTF_CATENARY = 0, ///< Bit number for drawing a catenary. RTF_NO_LEVEL_CROSSING = 1, ///< Bit number for disallowing level crossings. RTF_HIDDEN = 2, ///< Bit number for hiding from selection. RTF_NO_SPRITE_COMBINE = 3, ///< Bit number for using non-combined junctions. RTF_ALLOW_90DEG = 4, ///< Bit number for always allowed 90 degree turns, regardless of setting. RTF_DISALLOW_90DEG = 5, ///< Bit number for never allowed 90 degree turns, regardless of setting. +}; +/** Railtype flags. */ +enum RailTypeFlags : uint8_t { RTFB_NONE = 0, ///< All flags cleared. RTFB_CATENARY = 1 << RTF_CATENARY, ///< Value for drawing a catenary. RTFB_NO_LEVEL_CROSSING = 1 << RTF_NO_LEVEL_CROSSING, ///< Value for disallowing level crossings. diff --git a/src/road.h b/src/road.h index c6a88e8552..f192c2bd6d 100644 --- a/src/road.h +++ b/src/road.h @@ -33,14 +33,17 @@ DECLARE_ENUM_AS_BIT_SET(RoadTramTypes) static const RoadTramType _roadtramtypes[] = { RTT_ROAD, RTT_TRAM }; -/** Roadtype flags. Starts with RO instead of R because R is used for rails */ -enum RoadTypeFlags { +/** Roadtype flag bit numbers. Starts with RO instead of R because R is used for rails */ +enum RoadTypeFlag { ROTF_CATENARY = 0, ///< Bit number for adding catenary ROTF_NO_LEVEL_CROSSING, ///< Bit number for disabling level crossing ROTF_NO_HOUSES, ///< Bit number for setting this roadtype as not house friendly ROTF_HIDDEN, ///< Bit number for hidden from construction. ROTF_TOWN_BUILD, ///< Bit number for allowing towns to build this roadtype. +}; +/** Roadtype flags. Starts with RO instead of R because R is used for rails */ +enum RoadTypeFlags : uint8_t { ROTFB_NONE = 0, ///< All flags cleared. ROTFB_CATENARY = 1 << ROTF_CATENARY, ///< Value for drawing a catenary. ROTFB_NO_LEVEL_CROSSING = 1 << ROTF_NO_LEVEL_CROSSING, ///< Value for disabling a level crossing. From ea8c1d8597d6b0f3a763021b4d7e5f9dbfc1acbf Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Mon, 22 Jan 2024 16:45:00 +0100 Subject: [PATCH 15/52] Change: make for smooth-scrolling based on actual time This means if rendering takes a bit longer, scrolling goes a bit quicker, making travel time always about the same time for the same distance. --- src/core/math_func.hpp | 17 ----------- src/intro_gui.cpp | 4 +-- src/viewport.cpp | 65 ++++++++++++++++++++++++++++++++++++------ src/viewport_func.h | 2 +- src/window.cpp | 2 +- 5 files changed, 61 insertions(+), 29 deletions(-) diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index b50e84d299..1417c0f793 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -350,23 +350,6 @@ constexpr int RoundDivSU(int a, uint b) } } -/** - * Computes (a / b) rounded away from zero. - * @param a Numerator - * @param b Denominator - * @return Quotient, rounded away from zero - */ -constexpr int DivAwayFromZero(int a, uint b) -{ - const int _b = static_cast(b); - if (a > 0) { - return (a + _b - 1) / _b; - } else { - /* Note: Behaviour of negative numerator division is truncation toward zero. */ - return (a - _b + 1) / _b; - } -} - uint32_t IntSqrt(uint32_t num); #endif /* MATH_FUNC_HPP */ diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index ed06c0968c..2ffe2d4097 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -190,7 +190,7 @@ struct SelectGameWindow : public Window { this->mouse_idle_pos = _cursor.pos; } - void OnRealtimeTick([[maybe_unused]] uint delta_ms) override + void OnRealtimeTick(uint delta_ms) override { /* Move the main game viewport according to intro viewport commands. */ @@ -252,7 +252,7 @@ struct SelectGameWindow : public Window { /* Update the viewport position. */ mw->viewport->dest_scrollpos_x = mw->viewport->scrollpos_x = pos.x; mw->viewport->dest_scrollpos_y = mw->viewport->scrollpos_y = pos.y; - UpdateViewportPosition(mw); + UpdateViewportPosition(mw, delta_ms); mw->SetDirty(); // Required during panning, otherwise logo graphics disappears /* If there is only one command, we just executed it and don't need to do any more */ diff --git a/src/viewport.cpp b/src/viewport.cpp index f07fd514a5..f76ddbd5fb 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1868,11 +1868,65 @@ static inline void ClampViewportToMap(const Viewport *vp, int *scroll_x, int *sc } } +/** + * Clamp the smooth scroll to a maxmimum speed and distance based on time elapsed. + * + * Every 30ms, we move 1/4th of the distance, to give a smooth movement experience. + * But we never go over the max_scroll speed. + * + * @param delta_ms Time elapsed since last update. + * @param delta_hi The distance to move in highest dimension (can't be zero). + * @param delta_lo The distance to move in lowest dimension. + * @param[out] delta_hi_clamped The clamped distance to move in highest dimension. + * @param[out] delta_lo_clamped The clamped distance to move in lowest dimension. + */ +static void ClampSmoothScroll(uint32_t delta_ms, int64_t delta_hi, int64_t delta_lo, int &delta_hi_clamped, int &delta_lo_clamped) +{ + /** A tile is 64 pixels in width at 1x zoom; viewport coordinates are in 4x zoom. */ + constexpr int PIXELS_PER_TILE = TILE_PIXELS * 2 * ZOOM_LVL_BASE; + constexpr int MS_PER_STEP = 30; ///< Time between each step in the smooth scroll. + + static uint32_t remainder_time = 0; + + assert(delta_hi != 0); + + int64_t delta_left = delta_hi; + int max_scroll = 0; + + for (uint count = 0; count < (delta_ms + remainder_time) / MS_PER_STEP; count++) { + /* We move 1/4th of the distance per 30ms, to give a smooth movement experience. */ + delta_left = delta_left * 3 / 4; + /* But we don't allow more than 16 tiles movement per 30ms; longer distances take longer. + * This means that the full width of a map would take ~1 second, ignoring the slowdown: + * 256 / 16 * 30ms = 480ms. */ + max_scroll += Map::ScaleBySize1D(16 * PIXELS_PER_TILE); + } + remainder_time = (delta_ms + remainder_time) % MS_PER_STEP; + + /* We never go over the max_scroll speed. */ + delta_hi_clamped = Clamp(delta_hi - delta_left, -max_scroll, max_scroll); + /* The lower delta is in ratio of the higher delta, so we keep going straight at the destination. */ + delta_lo_clamped = delta_lo * delta_hi_clamped / delta_hi; + + /* Ensure we always move (delta_hi can't be zero). */ + if (delta_hi_clamped == 0) { + delta_hi_clamped = delta_hi > 0 ? 1 : -1; + } + + /* Also ensure we always move on the lower delta. This is mostly to avoid a + * situation at borders, where you can't move from (x, y) to (x + 1, y), + * but you can move to (x + 1, y + 1). This due to how viewport clamping + * works and rounding issue. */ + if (delta_lo_clamped == 0 && delta_lo != 0) { + delta_lo_clamped = delta_lo > 0 ? 1 : -1; + } +} + /** * Update the viewport position being displayed. * @param w %Window owning the viewport. */ -void UpdateViewportPosition(Window *w) +void UpdateViewportPosition(Window *w, uint32_t delta_ms) { const Viewport *vp = w->viewport; @@ -1893,19 +1947,14 @@ void UpdateViewportPosition(Window *w) bool update_overlay = false; if (delta_x != 0 || delta_y != 0) { if (_settings_client.gui.smooth_scroll) { - int max_scroll = Map::ScaleBySize1D(512 * ZOOM_LVL_BASE); - int delta_x_clamped; int delta_y_clamped; if (abs(delta_x) > abs(delta_y)) { - delta_x_clamped = Clamp(DivAwayFromZero(delta_x, 4), -max_scroll, max_scroll); - delta_y_clamped = delta_y * delta_x_clamped / delta_x; + ClampSmoothScroll(delta_ms, delta_x, delta_y, delta_x_clamped, delta_y_clamped); } else { - delta_y_clamped = Clamp(DivAwayFromZero(delta_y, 4), -max_scroll, max_scroll); - delta_x_clamped = delta_x * delta_y_clamped / delta_y; + ClampSmoothScroll(delta_ms, delta_y, delta_x, delta_y_clamped, delta_x_clamped); } - w->viewport->scrollpos_x += delta_x_clamped; w->viewport->scrollpos_y += delta_y_clamped; } else { diff --git a/src/viewport_func.h b/src/viewport_func.h index d5a69deb91..5b1537478c 100644 --- a/src/viewport_func.h +++ b/src/viewport_func.h @@ -26,7 +26,7 @@ void InitializeWindowViewport(Window *w, int x, int y, int width, int height, st Viewport *IsPtInWindowViewport(const Window *w, int x, int y); Point TranslateXYToTileCoord(const Viewport *vp, int x, int y, bool clamp_to_map = true); Point GetTileBelowCursor(); -void UpdateViewportPosition(Window *w); +void UpdateViewportPosition(Window *w, uint32_t delta_ms); bool MarkAllViewportsDirty(int left, int top, int right, int bottom); diff --git a/src/window.cpp b/src/window.cpp index 0c22944151..3287159da1 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3066,7 +3066,7 @@ void UpdateWindows() for (Window *w : Window::Iterate()) { /* Update viewport only if window is not shaded. */ - if (w->viewport != nullptr && !w->IsShaded()) UpdateViewportPosition(w); + if (w->viewport != nullptr && !w->IsShaded()) UpdateViewportPosition(w, delta_ms.count()); } NetworkDrawChatMessage(); /* Redraw mouse cursor in case it was hidden */ From 36579dd18ba822b89e8cdd98522d4c795959a81c Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 25 Jan 2024 11:07:36 +0100 Subject: [PATCH 16/52] Change: set smooth-scrolling on by default (#11860) --- src/table/settings/gui_settings.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/table/settings/gui_settings.ini b/src/table/settings/gui_settings.ini index a4b41da886..6c6d9d4ccc 100644 --- a/src/table/settings/gui_settings.ini +++ b/src/table/settings/gui_settings.ini @@ -123,7 +123,7 @@ cat = SC_BASIC [SDTC_BOOL] var = gui.smooth_scroll flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC -def = false +def = true str = STR_CONFIG_SETTING_SMOOTH_SCROLLING strhelp = STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT From cd75adfb715d4c7b7f1a9635327b57204513c20c Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 25 Jan 2024 21:10:38 +0100 Subject: [PATCH 17/52] Add: [Dependabot] introduce Dependabot to keep our workflows up-to-date (#11880) --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..d97e315781 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + groups: + actions: + patterns: + - "*" From 62d7d92a0e82f7f4e8e4c59af5633e4ae0614a99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:22:33 +0000 Subject: [PATCH 18/52] Upgrade: [CI] bump the actions group with 9 updates (#11881) Bumps the actions group with 9 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `3` | `4` | | [actions/cache](https://github.com/actions/cache) | `3` | `4` | | [actions/github-script](https://github.com/actions/github-script) | `6` | `7` | | [OpenTTD/actions](https://github.com/openttd/actions) | `2` | `5` | | [github/codeql-action](https://github.com/github/codeql-action) | `2` | `3` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `3` | `4` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `3` | `4` | | [tibdex/github-app-token](https://github.com/tibdex/github-app-token) | `1` | `2` | | [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) | `2` | `3` | Updates `actions/checkout` from 3 to 4 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) Updates `actions/github-script` from 6 to 7 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) Updates `OpenTTD/actions` from 2 to 5 - [Release notes](https://github.com/openttd/actions/releases) - [Commits](https://github.com/openttd/actions/compare/v2...v5) Updates `github/codeql-action` from 2 to 3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) Updates `actions/download-artifact` from 3 to 4 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) Updates `actions/upload-artifact` from 3 to 4 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) Updates `tibdex/github-app-token` from 1 to 2 - [Release notes](https://github.com/tibdex/github-app-token/releases) - [Commits](https://github.com/tibdex/github-app-token/compare/v1...v2) Updates `peter-evans/repository-dispatch` from 2 to 3 - [Release notes](https://github.com/peter-evans/repository-dispatch/releases) - [Commits](https://github.com/peter-evans/repository-dispatch/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: OpenTTD/actions dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: tibdex/github-app-token dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: peter-evans/repository-dispatch dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-build.yml | 20 +++++++++---------- .github/workflows/codeql.yml | 10 +++++----- .github/workflows/commit-checker.yml | 4 ++-- .github/workflows/preview-build.yml | 4 ++-- .github/workflows/release-docs.yml | 4 ++-- .github/workflows/release-linux-legacy.yml | 8 ++++---- .github/workflows/release-linux.yml | 8 ++++---- .github/workflows/release-macos.yml | 8 ++++---- .github/workflows/release-source.yml | 10 +++++----- .github/workflows/release-windows-store.yml | 10 +++++----- .github/workflows/release-windows.yml | 8 ++++---- .../script-missing-mode-enforcement.yml | 2 +- .github/workflows/unused-strings.yml | 2 +- .github/workflows/upload-cdn.yml | 17 ++++++++-------- .github/workflows/upload-gog.yml | 10 +++++----- .github/workflows/upload-steam.yml | 10 +++++----- 16 files changed, 68 insertions(+), 67 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index df771b6012..2183044d93 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /emsdk/upstream/emscripten/cache key: 3.1.42-${{ runner.os }} @@ -106,10 +106,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup vcpkg caching - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); @@ -209,10 +209,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup vcpkg caching - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); @@ -273,10 +273,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup vcpkg caching - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); @@ -350,7 +350,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup MSYS2 uses: msys2/setup-msys2@v2 @@ -426,4 +426,4 @@ jobs: steps: - name: Check annotations - uses: OpenTTD/actions/annotation-check@v3 + uses: OpenTTD/actions/annotation-check@v5 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b9b083568c..c5a432d80b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | @@ -53,16 +53,16 @@ jobs: echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: cpp config-file: ./.github/codeql/codeql-config.yml - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: /language:cpp upload: False @@ -80,6 +80,6 @@ jobs: output: sarif-results/cpp.sarif - name: Upload results - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: sarif-results/cpp.sarif diff --git a/.github/workflows/commit-checker.yml b/.github/workflows/commit-checker.yml index 1407757fc5..319ab8a5b9 100644 --- a/.github/workflows/commit-checker.yml +++ b/.github/workflows/commit-checker.yml @@ -14,12 +14,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 4 - name: Get pull-request commits - uses: OpenTTD/actions/checkout-pull-request@v2 + uses: OpenTTD/actions/checkout-pull-request@v5 - name: Check commits uses: OpenTTD/OpenTTD-git-hooks@main diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index 4f7a1dde8d..0bb79ed4b9 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} @@ -35,7 +35,7 @@ jobs: git checkout -b pr${{ github.event.pull_request.number }} - name: Setup cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /emsdk/upstream/emscripten/cache key: 3.1.42-${{ runner.os }} diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index 759f33035c..83868e5266 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source @@ -78,7 +78,7 @@ jobs: echo "::endgroup::" - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openttd-docs path: build/bundles/*.tar.xz diff --git a/.github/workflows/release-linux-legacy.yml b/.github/workflows/release-linux-legacy.yml index a9c1a23b32..6d75236817 100644 --- a/.github/workflows/release-linux-legacy.yml +++ b/.github/workflows/release-linux-legacy.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source @@ -56,7 +56,7 @@ jobs: key: legacy - name: Setup vcpkg caching - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); @@ -208,14 +208,14 @@ jobs: echo "::endgroup::" - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openttd-linux-legacy path: build/bundles retention-days: 5 - name: Store symbols - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: symbols-linux-legacy path: build/symbols diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.yml index 09c4e3da66..d3e0ea776c 100644 --- a/.github/workflows/release-linux.yml +++ b/.github/workflows/release-linux.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source @@ -36,7 +36,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Setup vcpkg caching - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); @@ -168,14 +168,14 @@ jobs: echo "::endgroup::" - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openttd-linux-generic path: build/bundles retention-days: 5 - name: Store symbols - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: symbols-linux-generic path: build/symbols diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index ca4d1ac412..6e673f2d8b 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source @@ -33,7 +33,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Setup vcpkg caching - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); @@ -202,14 +202,14 @@ jobs: mv _CPack_Packages/*/Bundle/openttd-*.zip bundles/ - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openttd-macos-universal path: build-x64/bundles retention-days: 5 - name: Store symbols - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: symbols-macos-universal path: build-x64/symbols diff --git a/.github/workflows/release-source.yml b/.github/workflows/release-source.yml index 9308e0063d..331ba6821d 100644 --- a/.github/workflows/release-source.yml +++ b/.github/workflows/release-source.yml @@ -30,14 +30,14 @@ jobs: steps: - name: Checkout (Release) if: github.event_name == 'release' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # We generate a changelog; for this we need the full git log. fetch-depth: 0 - name: Checkout (Manual) if: github.event_name == 'workflow_dispatch' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.ref }} # We generate a changelog; for this we need the full git log. @@ -45,7 +45,7 @@ jobs: - name: Checkout (Trigger) if: github.event_name == 'repository_dispatch' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.client_payload.ref }} # We generate a changelog; for this we need the full git log. @@ -193,14 +193,14 @@ jobs: echo "::endgroup::" - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openttd-source path: build/bundles/* retention-days: 5 - name: Store source (for other jobs) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: internal-source path: source.tar.gz diff --git a/.github/workflows/release-windows-store.yml b/.github/workflows/release-windows-store.yml index 97b4398b36..93aaafd799 100644 --- a/.github/workflows/release-windows-store.yml +++ b/.github/workflows/release-windows-store.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source @@ -25,17 +25,17 @@ jobs: tar -xf source.tar.gz --strip-components=1 - name: Download x86 build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-windows-x86 - name: Download x64 build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-windows-x64 - name: Download arm64 build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-windows-arm64 @@ -185,7 +185,7 @@ jobs: move output\OpenTTD.appxbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.appxbundle - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openttd-windows-store path: builds/bundles diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 602c6050a0..5b5f6cd1d4 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source @@ -46,7 +46,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Setup vcpkg caching - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); @@ -202,14 +202,14 @@ jobs: WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }} - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openttd-windows-${{ matrix.arch }} path: build/bundles retention-days: 5 - name: Store symbols - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: symbols-windows-${{ matrix.arch }} path: build/symbols diff --git a/.github/workflows/script-missing-mode-enforcement.yml b/.github/workflows/script-missing-mode-enforcement.yml index 9b9e8e7efa..5b98576686 100644 --- a/.github/workflows/script-missing-mode-enforcement.yml +++ b/.github/workflows/script-missing-mode-enforcement.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check for finding script functions that require company/deity mode enforcement/checks run: | diff --git a/.github/workflows/unused-strings.yml b/.github/workflows/unused-strings.yml index 08a0cb26e7..dc488b8456 100644 --- a/.github/workflows/unused-strings.yml +++ b/.github/workflows/unused-strings.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check for unused strings run: | diff --git a/.github/workflows/upload-cdn.yml b/.github/workflows/upload-cdn.yml index 79cce0adde..adbdd04f45 100644 --- a/.github/workflows/upload-cdn.yml +++ b/.github/workflows/upload-cdn.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Download all bundles - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Calculate checksums run: | @@ -70,14 +70,14 @@ jobs: done - name: Store bundles - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: cdn-bundles path: bundles/* retention-days: 5 - name: Store breakpad symbols - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: cdn-symbols path: symbols/* @@ -88,7 +88,7 @@ jobs: - prepare name: Publish bundles - uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v4 + uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v5 secrets: CDN_SIGNING_KEY: ${{ secrets.CDN_SIGNING_KEY }} DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }} @@ -103,7 +103,7 @@ jobs: - prepare name: Publish symbols - uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v4 + uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v5 secrets: SYMBOLS_SIGNING_KEY: ${{ secrets.SYMBOLS_SIGNING_KEY }} with: @@ -122,14 +122,15 @@ jobs: steps: - name: Generate access token id: generate_token - uses: tibdex/github-app-token@v1 + uses: tibdex/github-app-token@v2 with: app_id: ${{ secrets.DEPLOYMENT_APP_ID }} private_key: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }} - repository: OpenTTD/workflows + repositories: >- + ["OpenTTD/workflows"] - name: Trigger 'Publish Docs' - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: token: ${{ steps.generate_token.outputs.token }} repository: OpenTTD/workflows diff --git a/.github/workflows/upload-gog.yml b/.github/workflows/upload-gog.yml index c1d0678859..1370988f3e 100644 --- a/.github/workflows/upload-gog.yml +++ b/.github/workflows/upload-gog.yml @@ -15,31 +15,31 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source path: internal-source - name: Download bundle (Windows x86) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-windows-x86 path: openttd-windows-x86 - name: Download bundle (Windows x64) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-windows-x64 path: openttd-windows-x64 - name: Download bundle (MacOS) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-macos-universal path: openttd-macos-universal - name: Download bundle (Linux) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-linux-generic path: openttd-linux-generic diff --git a/.github/workflows/upload-steam.yml b/.github/workflows/upload-steam.yml index 808983f828..47fa48d01b 100644 --- a/.github/workflows/upload-steam.yml +++ b/.github/workflows/upload-steam.yml @@ -18,31 +18,31 @@ jobs: steps: - name: Download source - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: internal-source path: internal-source - name: Download bundle (Windows x86) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-windows-x86 path: openttd-windows-x86 - name: Download bundle (Windows x64) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-windows-x64 path: openttd-windows-x64 - name: Download bundle (MacOS) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-macos-universal path: openttd-macos-universal - name: Download bundle (Linux) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: openttd-linux-generic path: openttd-linux-generic From 09b66751cf4d9b1dbf5cd357062d5c464603963b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Thu, 25 Jan 2024 23:18:26 +0100 Subject: [PATCH 19/52] Fix b38d3c2208: missing water regions invalidation when building locks (#11879) --- src/water_cmd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 8325c4da19..50d105dbc9 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -360,6 +360,8 @@ static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag MarkTileDirtyByTile(tile + delta); MarkCanalsAndRiversAroundDirty(tile - delta); MarkCanalsAndRiversAroundDirty(tile + delta); + InvalidateWaterRegion(tile - delta); + InvalidateWaterRegion(tile + delta); } cost.AddCost(_price[PR_BUILD_LOCK]); From 37fd69b6047ff7d48fe03d4c829f8a36ee42348d Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 25 Jan 2024 23:24:43 +0100 Subject: [PATCH 20/52] Remove: [CI] Linux Legacy support (#11882) Although created not long ago, you battled to be relevant. Sadly, GitHub Runners didn't agree with you. You can't run node20. And that makes you a broken legacy. So many potential. But here we are. Bye Linux Legacy. Thank you for being. --- .github/workflows/release-linux-legacy.yml | 222 --------------------- .github/workflows/release.yml | 13 +- 2 files changed, 1 insertion(+), 234 deletions(-) delete mode 100644 .github/workflows/release-linux-legacy.yml diff --git a/.github/workflows/release-linux-legacy.yml b/.github/workflows/release-linux-legacy.yml deleted file mode 100644 index 6d75236817..0000000000 --- a/.github/workflows/release-linux-legacy.yml +++ /dev/null @@ -1,222 +0,0 @@ -name: Release (Linux, Legacy) - -on: - workflow_call: - inputs: - survey_key: - required: false - type: string - default: "" - -jobs: - linux: - name: Linux (Legacy) - - runs-on: ubuntu-latest - container: - # manylinux2014 is based on CentOS 7, and already has a lot of things - # installed and preconfigured. It makes it easier to build OpenTTD. - # This distro is based on glibc 2.17, released in 2012. - image: quay.io/pypa/manylinux2014_x86_64 - - steps: - - name: Download source - uses: actions/download-artifact@v4 - with: - name: internal-source - - - name: Unpack source - run: | - tar -xf source.tar.gz --strip-components=1 - - # curl is too old for most of the tools to work properly. For example, - # rust-toolchain doesn't work properly, neither vcpkg caching. - # The easier solution here is to upgrade curl. - - name: Update curl - run: | - yum install -y \ - openssl-devel \ - # EOF - - mkdir /curl - cd /curl - curl -o curl-7.81.0.zip https://curl.se/download/curl-7.81.0.zip - unzip curl-7.81.0.zip - cd curl-7.81.0 - ./configure --with-ssl --with-zlib --prefix=/usr --libdir=/usr/lib64 - make -j $(nproc) - make install - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - - name: Enable Rust cache - uses: Swatinem/rust-cache@v2.7.0 - with: - key: legacy - - - name: Setup vcpkg caching - uses: actions/github-script@v7 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite') - - - name: Install dependencies - run: | - echo "::group::Install system dependencies" - # perl-IPC-Cmd, wget, and zip are needed to run vcpkg. - # autoconf-archive is needed to build ICU. - yum install -y \ - autoconf-archive \ - perl-IPC-Cmd \ - wget \ - zip \ - # EOF - - # aclocal looks first in /usr/local/share/aclocal, and if that doesn't - # exist only looks in /usr/share/aclocal. We have files in both that - # are important. So copy the latter to the first, and we are good to - # go. - cp /usr/share/aclocal/* /usr/local/share/aclocal/ - echo "::endgroup::" - - # The yum variant of fluidsynth depends on all possible audio drivers, - # like jack, ALSA, pulseaudio, etc. This is not really useful for us, - # as we route the output of fluidsynth back via our sound driver, and - # as such do not use these audio driver outputs at all. - # The vcpkg variant of fluidsynth depends on ALSA. Similar issue here. - # So instead, we compile fluidsynth ourselves, with as few - # dependencies as possible. We do it before anything else is installed, - # to make sure it doesn't pick up on any of the drivers. - echo "::group::Install fluidsynth" - wget https://github.com/FluidSynth/fluidsynth/archive/v2.3.3.tar.gz - tar xf v2.3.3.tar.gz - ( - cd fluidsynth-2.3.3 - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr - cmake --build . -j $(nproc) - cmake --install . - ) - - # The container we use is old enough, that it doesn't know SHF_COMPRESSED. - # But, breakpad needs this symbol to exist. So we patch it in our system - # libraries. - ( - cd / - patch -p1 < ${GITHUB_WORKSPACE}/os/linux/shf-compressed.patch - ) - echo "::endgroup::" - - echo "::group::Install audio drivers" - # These audio libs are to make sure the SDL version of vcpkg adds - # sound-support; these libraries are not added to the resulting - # binary, but the headers are used to enable them in SDL. - yum install -y \ - alsa-lib-devel \ - jack-audio-connection-kit-devel \ - pulseaudio-libs-devel \ - # EOF - echo "::endgroup::" - - echo "::group::Install video drivers" - # These video libs are to make sure the SDL version of vcpkg adds - # video-support; these libraries are not added to the resulting - # binary, but the headers are used to enable them in SDL. - yum install -y \ - libX11-devel \ - libXcursor-devel \ - libXext-devel \ - libXfixes-devel \ - libXi-devel \ - libxkbcommon-devel \ - libXrandr-devel \ - libXScrnSaver-devel \ - # EOF - echo "::endgroup::" - - # We use vcpkg for our dependencies, to get more up-to-date version. - echo "::group::Install vcpkg and dependencies" - - git clone https://github.com/microsoft/vcpkg /vcpkg - - ( - cd /vcpkg - ./bootstrap-vcpkg.sh -disableMetrics - ) - - # Make Python3 available for other packages. This needs to be done - # first, as otherwise dependencies fail to build because Python3 is - # not available. - ( - cd / - - /vcpkg/vcpkg install python3 - ln -sf /vcpkg/installed/x64-linux/tools/python3/python3.[0-9][0-9] /usr/bin/python3 - ) - echo "::endgroup::" - - echo "::group::Install breakpad dependencies" - cargo install dump_syms - echo "::endgroup::" - - - name: Patch bundle name - run: | - sed -i 's/generic/legacy/g' cmake/InstallAndPackage.cmake - - - name: Install GCC problem matcher - uses: ammaraskar/gcc-problem-matcher@master - - - name: Build - run: | - mkdir -p build - cd build - - echo "::group::CMake" - cmake ${GITHUB_WORKSPACE} \ - -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \ - -DOPTION_PACKAGE_DEPENDENCIES=ON \ - # EOF - echo "::endgroup::" - - echo "::group::Build" - echo "Running on $(nproc) cores" - cmake --build . -j $(nproc) --target openttd - echo "::endgroup::" - - - name: Create breakpad symbols - run: | - cd build - dump_syms ./openttd --inlines --store symbols - - - name: Create bundles - run: | - cd ${GITHUB_WORKSPACE}/build - echo "::group::Run CPack" - cpack - echo "::endgroup::" - - echo "::group::Cleanup" - # Remove the sha256 files CPack generates; we will do this ourself at - # the end of this workflow. - rm -f bundles/*.sha256 - echo "::endgroup::" - - - name: Store bundles - uses: actions/upload-artifact@v4 - with: - name: openttd-linux-legacy - path: build/bundles - retention-days: 5 - - - name: Store symbols - uses: actions/upload-artifact@v4 - with: - name: symbols-linux-legacy - path: build/symbols - retention-days: 5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c4fd78932..ffbad50df7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,16 +31,6 @@ jobs: with: version: ${{ needs.source.outputs.version }} - linux-legacy: - name: Linux (Legacy) - needs: source - - uses: ./.github/workflows/release-linux-legacy.yml - secrets: inherit - - with: - survey_key: ${{ needs.source.outputs.survey_key }} - linux: name: Linux (Generic) needs: source @@ -91,7 +81,6 @@ jobs: needs: - source - docs - - linux-legacy - linux - macos - windows @@ -99,7 +88,7 @@ jobs: # As windows-store is condition, we need to check ourselves if we need to run. # The always() makes sure the rest is always evaluated. - if: always() && needs.source.result == 'success' && needs.docs.result == 'success' && needs.linux-legacy.result == 'success' && needs.linux.result == 'success' && needs.macos.result == 'success' && needs.windows.result == 'success' && (needs.windows-store.result == 'success' || needs.windows-store.result == 'skipped') + if: always() && needs.source.result == 'success' && needs.docs.result == 'success' && needs.linux.result == 'success' && needs.macos.result == 'success' && needs.windows.result == 'success' && (needs.windows-store.result == 'success' || needs.windows-store.result == 'skipped') runs-on: ubuntu-latest From 28716548d2ec1bcd9ff7565257e503fa592d96b2 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Fri, 26 Jan 2024 10:25:25 -0500 Subject: [PATCH 21/52] Feature: Setting to automatically restart server based on hours played (#11142) --- src/network/network_server.cpp | 80 +++++++++++++++++-------- src/network/network_server.h | 1 + src/openttd.cpp | 7 ++- src/settings_type.h | 1 + src/table/settings/network_settings.ini | 11 ++++ 5 files changed, 75 insertions(+), 25 deletions(-) diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 121223a4cf..d970456644 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -33,6 +33,7 @@ #include "../timer/timer.h" #include "../timer/timer_game_calendar.h" #include "../timer/timer_game_economy.h" +#include "../timer/timer_game_realtime.h" #include #include @@ -1491,29 +1492,6 @@ void NetworkUpdateClientInfo(ClientID client_id) NetworkAdminClientUpdate(ci); } -/** Check if we want to restart the map */ -static void NetworkCheckRestartMap() -{ - if (_settings_client.network.restart_game_year != 0 && TimerGameCalendar::year >= _settings_client.network.restart_game_year) { - Debug(net, 3, "Auto-restarting map: year {} reached", TimerGameCalendar::year); - - _settings_newgame.game_creation.generation_seed = GENERATE_NEW_SEED; - switch(_file_to_saveload.abstract_ftype) { - case FT_SAVEGAME: - case FT_SCENARIO: - _switch_mode = SM_LOAD_GAME; - break; - - case FT_HEIGHTMAP: - _switch_mode = SM_START_HEIGHTMAP; - break; - - default: - _switch_mode = SM_NEWGAME; - } - } -} - /** Check if the server has autoclean_companies activated * Two things happen: * 1) If a company is not protected, it is closed after 1 year (for example) @@ -1811,11 +1789,65 @@ void NetworkServer_Tick(bool send_frame) } } +/** Helper function to restart the map. */ +static void NetworkRestartMap() +{ + _settings_newgame.game_creation.generation_seed = GENERATE_NEW_SEED; + switch (_file_to_saveload.abstract_ftype) { + case FT_SAVEGAME: + case FT_SCENARIO: + _switch_mode = SM_LOAD_GAME; + break; + + case FT_HEIGHTMAP: + _switch_mode = SM_START_HEIGHTMAP; + break; + + default: + _switch_mode = SM_NEWGAME; + } +} + +/** Timer to restart a network server automatically based on real-time hours played. Initialized at zero to disable until settings are loaded. */ +static IntervalTimer _network_restart_map_timer({std::chrono::hours::zero(), TimerGameRealtime::UNPAUSED}, [](auto) +{ + if (!_network_server) return; + + /* If setting is 0, this feature is disabled. */ + if (_settings_client.network.restart_hours == 0) return; + + Debug(net, 3, "Auto-restarting map: {} hours played", _settings_client.network.restart_hours); + NetworkRestartMap(); +}); + +/** + * Reset the automatic network restart time interval. + * @param reset Whether to reset the timer to zero. + */ +void ChangeNetworkRestartTime(bool reset) +{ + if (!_network_server) return; + + _network_restart_map_timer.SetInterval({ std::chrono::hours(_settings_client.network.restart_hours), TimerGameRealtime::UNPAUSED }, reset); +} + +/** Check if we want to restart the map based on the year. */ +static void NetworkCheckRestartMapYear() +{ + /* If setting is 0, this feature is disabled. */ + if (_settings_client.network.restart_game_year == 0) return; + + if (TimerGameCalendar::year >= _settings_client.network.restart_game_year) { + Debug(net, 3, "Auto-restarting map: year {} reached", TimerGameCalendar::year); + NetworkRestartMap(); + } +} + /** Calendar yearly "callback". Called whenever the calendar year changes. */ static IntervalTimer _calendar_network_yearly({ TimerGameCalendar::YEAR, TimerGameCalendar::Priority::NONE }, [](auto) { if (!_network_server) return; - NetworkCheckRestartMap(); + NetworkCheckRestartMapYear(); }); /** Economy yearly "callback". Called whenever the economy year changes. */ diff --git a/src/network/network_server.h b/src/network/network_server.h index fa3608e974..171a89233d 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -120,6 +120,7 @@ public: }; void NetworkServer_Tick(bool send_frame); +void ChangeNetworkRestartTime(bool reset); void NetworkServerSetCompanyPassword(CompanyID company_id, const std::string &password, bool already_hashed = true); void NetworkServerUpdateCompanyPassworded(CompanyID company_id, bool passworded); diff --git a/src/openttd.cpp b/src/openttd.cpp index 200b9d3d87..04388b181d 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -34,6 +34,7 @@ #include "console_func.h" #include "screenshot.h" #include "network/network.h" +#include "network/network_server.h" #include "network/network_func.h" #include "ai/ai.hpp" #include "ai/ai_config.hpp" @@ -917,7 +918,11 @@ static void MakeNewGameDone() CheckIndustries(); MarkWholeScreenDirty(); - if (_network_server && !_network_dedicated) ShowClientList(); + if (_network_server) { + ChangeNetworkRestartTime(true); + + if (!_network_dedicated) ShowClientList(); + } } static void MakeNewGame(bool from_heightmap, bool reset_settings) diff --git a/src/settings_type.h b/src/settings_type.h index 06ced9330f..e9c6a60038 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -325,6 +325,7 @@ struct NetworkSettings { uint8_t max_companies; ///< maximum amount of companies uint8_t max_clients; ///< maximum amount of clients TimerGameCalendar::Year restart_game_year; ///< year the server restarts + uint16_t restart_hours; ///< number of hours to run the server before automatic restart uint8_t min_active_clients; ///< minimum amount of active clients to unpause the game bool reload_cfg; ///< reload the config file before restarting std::string last_joined; ///< Last joined server diff --git a/src/table/settings/network_settings.ini b/src/table/settings/network_settings.ini index ae31973433..92f570ca37 100644 --- a/src/table/settings/network_settings.ini +++ b/src/table/settings/network_settings.ini @@ -8,6 +8,7 @@ [pre-amble] static void UpdateClientConfigValues(); +void ChangeNetworkRestartTime(bool reset); static constexpr std::initializer_list _server_game_type{"local", "public", "invite-only"}; @@ -241,6 +242,16 @@ min = CalendarTime::MIN_YEAR max = CalendarTime::MAX_YEAR interval = 1 +[SDTC_VAR] +var = network.restart_hours +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY +def = 0 +min = 0 +max = UINT16_MAX +interval = 1 +post_cb = [](auto) { ChangeNetworkRestartTime(false); } + [SDTC_VAR] var = network.min_active_clients type = SLE_UINT8 From 80ebcc72fb415fc73f80cb8afbf0d927ade639e4 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Fri, 26 Jan 2024 19:56:01 +0100 Subject: [PATCH 22/52] Change: rebrand Cheats as Sandbox Options (#11874) --- src/cheat_gui.cpp | 34 ++++++++++++---------------------- src/lang/english.txt | 7 +++---- src/toolbar_gui.cpp | 5 +++++ 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index e63e70b386..45afc32c70 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -217,10 +217,7 @@ static constexpr NWidgetPart _nested_cheat_widgets[] = { NWidget(WWT_SHADEBOX, COLOUR_GREY), NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), - NWidget(WWT_PANEL, COLOUR_GREY, WID_C_PANEL), SetDataTip(0x0, STR_CHEATS_TOOLTIP), EndContainer(), - NWidget(WWT_PANEL, COLOUR_GREY), - NWidget(WWT_LABEL, COLOUR_GREY, WID_C_NOTE), SetFill(1, 1), SetDataTip(STR_CHEATS_NOTE, STR_NULL), SetPadding(WidgetDimensions::unscaled.frametext), - EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY, WID_C_PANEL), EndContainer(), }; /** GUI for the cheats. */ @@ -228,7 +225,6 @@ struct CheatWindow : Window { int clicked; int clicked_widget; uint line_height; - Dimension box; ///< Dimension of box sprite Dimension icon; ///< Dimension of company icon sprite CheatWindow(WindowDesc *desc) : Window(desc) @@ -238,7 +234,6 @@ struct CheatWindow : Window { void OnInit() override { - this->box = maxdim(GetSpriteSize(SPR_BOX_EMPTY), GetSpriteSize(SPR_BOX_CHECKED)); this->icon = GetSpriteSize(SPR_COMPANY_ICON); } @@ -250,21 +245,17 @@ struct CheatWindow : Window { int y = ir.top; bool rtl = _current_text_dir == TD_RTL; - uint box_left = rtl ? ir.right - this->box.width - WidgetDimensions::scaled.hsep_wide : ir.left + WidgetDimensions::scaled.hsep_wide; - uint button_left = rtl ? ir.right - this->box.width - WidgetDimensions::scaled.hsep_wide * 2 - SETTING_BUTTON_WIDTH : ir.left + this->box.width + WidgetDimensions::scaled.hsep_wide * 2; - uint text_left = ir.left + (rtl ? 0 : WidgetDimensions::scaled.hsep_wide * 4 + this->box.width + SETTING_BUTTON_WIDTH); - uint text_right = ir.right - (rtl ? WidgetDimensions::scaled.hsep_wide * 4 + this->box.width + SETTING_BUTTON_WIDTH : 0); + uint button_left = rtl ? ir.right - SETTING_BUTTON_WIDTH : ir.left; + uint text_left = ir.left + (rtl ? 0 : WidgetDimensions::scaled.hsep_wide + SETTING_BUTTON_WIDTH); + uint text_right = ir.right - (rtl ? WidgetDimensions::scaled.hsep_wide + SETTING_BUTTON_WIDTH : 0); int text_y_offset = (this->line_height - GetCharacterHeight(FS_NORMAL)) / 2; - int box_y_offset = (this->line_height - this->box.height) / 2; int button_y_offset = (this->line_height - SETTING_BUTTON_HEIGHT) / 2; int icon_y_offset = (this->line_height - this->icon.height) / 2; for (int i = 0; i != lengthof(_cheats_ui); i++) { const CheatEntry *ce = &_cheats_ui[i]; - DrawSprite((*ce->been_used) ? SPR_BOX_CHECKED : SPR_BOX_EMPTY, PAL_NONE, box_left, y + box_y_offset); - switch (ce->type) { case SLE_BOOL: { bool on = (*(bool*)ce->variable); @@ -330,7 +321,7 @@ struct CheatWindow : Window { /* Draw coloured flag for change company cheat */ case STR_CHEAT_CHANGE_COMPANY: SetDParamMaxValue(0, MAX_COMPANIES); - width = std::max(width, GetStringBoundingBox(ce->str).width + WidgetDimensions::scaled.hsep_wide * 4); + width = std::max(width, GetStringBoundingBox(ce->str).width + WidgetDimensions::scaled.hsep_wide); break; default: @@ -342,11 +333,10 @@ struct CheatWindow : Window { } } - this->line_height = std::max(this->box.height, this->icon.height); this->line_height = std::max(this->line_height, SETTING_BUTTON_HEIGHT); this->line_height = std::max(this->line_height, GetCharacterHeight(FS_NORMAL)) + WidgetDimensions::scaled.framerect.Vertical(); - size->width = width + WidgetDimensions::scaled.hsep_wide * 4 + this->box.width + SETTING_BUTTON_WIDTH /* stuff on the left */ + WidgetDimensions::scaled.hsep_wide * 2 /* extra spacing on right */; + size->width = width + WidgetDimensions::scaled.hsep_wide * 2 + SETTING_BUTTON_WIDTH; size->height = WidgetDimensions::scaled.framerect.Vertical() + this->line_height * lengthof(_cheats_ui); } @@ -356,7 +346,7 @@ struct CheatWindow : Window { Rect r = this->GetWidget(WID_C_PANEL)->GetCurrentRect().Shrink(WidgetDimensions::scaled.framerect); uint btn = (pt.y - r.top) / this->line_height; - uint x = pt.x - r.left; + int x = pt.x - r.left; bool rtl = _current_text_dir == TD_RTL; if (rtl) x = r.Width() - 1 - x; @@ -366,13 +356,13 @@ struct CheatWindow : Window { int value = (int32_t)ReadValue(ce->variable, ce->type); int oldvalue = value; - if (btn == CHT_CHANGE_DATE && x >= WidgetDimensions::scaled.hsep_wide * 2 + this->box.width + SETTING_BUTTON_WIDTH) { + if (btn == CHT_CHANGE_DATE && x >= SETTING_BUTTON_WIDTH) { /* Click at the date text directly. */ clicked_widget = CHT_CHANGE_DATE; SetDParam(0, value); ShowQueryString(STR_JUST_INT, STR_CHEAT_CHANGE_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED); return; - } else if (btn == CHT_EDIT_MAX_HL && x >= WidgetDimensions::scaled.hsep_wide * 2 + this->box.width + SETTING_BUTTON_WIDTH) { + } else if (btn == CHT_EDIT_MAX_HL && x >= SETTING_BUTTON_WIDTH) { clicked_widget = CHT_EDIT_MAX_HL; SetDParam(0, value); ShowQueryString(STR_JUST_INT, STR_CHEAT_EDIT_MAX_HL_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED); @@ -380,7 +370,7 @@ struct CheatWindow : Window { } /* Not clicking a button? */ - if (!IsInsideMM(x, WidgetDimensions::scaled.hsep_wide * 2 + this->box.width, WidgetDimensions::scaled.hsep_wide * 2 + this->box.width + SETTING_BUTTON_WIDTH)) return; + if (!IsInsideMM(x, 0, SETTING_BUTTON_WIDTH)) return; *ce->been_used = true; @@ -392,10 +382,10 @@ struct CheatWindow : Window { default: /* Take whatever the function returns */ - value = ce->proc(value + ((x >= WidgetDimensions::scaled.hsep_wide * 2 + this->box.width + SETTING_BUTTON_WIDTH / 2) ? 1 : -1), (x >= WidgetDimensions::scaled.hsep_wide * 2 + this->box.width + SETTING_BUTTON_WIDTH / 2) ? 1 : -1); + value = ce->proc(value + ((x >= SETTING_BUTTON_WIDTH / 2) ? 1 : -1), (x >= SETTING_BUTTON_WIDTH / 2) ? 1 : -1); /* The first cheat (money), doesn't return a different value. */ - if (value != oldvalue || btn == CHT_MONEY) this->clicked = btn * 2 + 1 + ((x >= WidgetDimensions::scaled.hsep_wide * 2 + this->box.width + SETTING_BUTTON_WIDTH / 2) != rtl ? 1 : 0); + if (value != oldvalue || btn == CHT_MONEY) this->clicked = btn * 2 + 1 + ((x >= SETTING_BUTTON_WIDTH / 2) != rtl ? 1 : 0); break; } diff --git a/src/lang/english.txt b/src/lang/english.txt index b4abe4a19c..0772679215 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -434,12 +434,13 @@ STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Exit # Settings menu -###length 15 +###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Game options STR_SETTINGS_MENU_CONFIG_SETTINGS_TREE :Settings STR_SETTINGS_MENU_AI_SETTINGS :AI settings STR_SETTINGS_MENU_GAMESCRIPT_SETTINGS :Game script settings STR_SETTINGS_MENU_NEWGRF_SETTINGS :NewGRF settings +STR_SETTINGS_MENU_SANDBOX_OPTIONS :Sandbox options STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS :Transparency options STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED :Town names displayed STR_SETTINGS_MENU_STATION_NAMES_DISPLAYED :Station names displayed @@ -2224,9 +2225,7 @@ STR_HELP_WINDOW_BUGTRACKER :{BLACK}Report a STR_HELP_WINDOW_COMMUNITY :{BLACK}Community # Cheat window -STR_CHEATS :{WHITE}Cheats -STR_CHEATS_TOOLTIP :{BLACK}Checkboxes indicate if you have used this cheat before -STR_CHEATS_NOTE :{BLACK}Note: any usage of these settings will be recorded by the savegame +STR_CHEATS :{WHITE}Sandbox Options STR_CHEAT_MONEY :{LTBLUE}Increase money by {CURRENCY_LONG} STR_CHEAT_CHANGE_COMPANY :{LTBLUE}Playing as company: {ORANGE}{COMMA} STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Magic bulldozer (remove industries, unmovable objects): {ORANGE}{STRING1} diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 9fa9788258..f1be2f9c7a 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -228,6 +228,7 @@ enum OptionMenuEntries { OME_AI_SETTINGS, OME_GAMESCRIPT_SETTINGS, OME_NEWGRFSETTINGS, + ONE_SANDBOX, OME_TRANSPARENCIES, OME_SHOW_TOWNNAMES, OME_SHOW_STATIONNAMES, @@ -259,6 +260,9 @@ static CallBackFunction ToolbarOptionsClick(Window *w) list.push_back(std::make_unique(STR_SETTINGS_MENU_GAMESCRIPT_SETTINGS, OME_GAMESCRIPT_SETTINGS, false)); } list.push_back(std::make_unique(STR_SETTINGS_MENU_NEWGRF_SETTINGS, OME_NEWGRFSETTINGS, false)); + if (_game_mode != GM_EDITOR) { + list.push_back(std::make_unique(STR_SETTINGS_MENU_SANDBOX_OPTIONS, ONE_SANDBOX, false)); + } list.push_back(std::make_unique(STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS, OME_TRANSPARENCIES, false)); list.push_back(std::make_unique(-1, false)); list.push_back(std::make_unique(HasBit(_display_opt, DO_SHOW_TOWN_NAMES), STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED, OME_SHOW_TOWNNAMES, false)); @@ -290,6 +294,7 @@ static CallBackFunction MenuClickSettings(int index) case OME_AI_SETTINGS: ShowAIConfigWindow(); return CBF_NONE; case OME_GAMESCRIPT_SETTINGS: ShowGSConfigWindow(); return CBF_NONE; case OME_NEWGRFSETTINGS: ShowNewGRFSettings(!_networking && _settings_client.gui.UserIsAllowedToChangeNewGRFs(), true, true, &_grfconfig); return CBF_NONE; + case ONE_SANDBOX: ShowCheatWindow(); break; case OME_TRANSPARENCIES: ShowTransparencyToolbar(); break; case OME_SHOW_TOWNNAMES: ToggleBit(_display_opt, DO_SHOW_TOWN_NAMES); break; From 79b684b8ac5ea9cd60665b51439d393ad9ee12b5 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Fri, 26 Jan 2024 18:13:55 +0100 Subject: [PATCH 23/52] Update: fmt to 10.2.0 --- src/3rdparty/fmt/chrono.h | 479 +++++++-------- src/3rdparty/fmt/core.h | 637 ++++++++++---------- src/3rdparty/fmt/format-inl.h | 184 +++--- src/3rdparty/fmt/format.h | 1051 +++++++++++++-------------------- src/3rdparty/fmt/ostream.h | 102 ++-- src/3rdparty/fmt/ranges.h | 40 +- src/3rdparty/fmt/std.h | 312 ++++++++-- 7 files changed, 1409 insertions(+), 1396 deletions(-) diff --git a/src/3rdparty/fmt/chrono.h b/src/3rdparty/fmt/chrono.h index 55e8a50670..9d54574e16 100644 --- a/src/3rdparty/fmt/chrono.h +++ b/src/3rdparty/fmt/chrono.h @@ -18,7 +18,7 @@ #include #include -#include "format.h" +#include "ostream.h" // formatbuf FMT_BEGIN_NAMESPACE @@ -72,7 +72,8 @@ template ::value && std::numeric_limits::is_signed == std::numeric_limits::is_signed)> -FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { +FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec) + -> To { ec = 0; using F = std::numeric_limits; using T = std::numeric_limits; @@ -101,7 +102,8 @@ template ::value && std::numeric_limits::is_signed != std::numeric_limits::is_signed)> -FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { +FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec) + -> To { ec = 0; using F = std::numeric_limits; using T = std::numeric_limits; @@ -133,7 +135,8 @@ FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { template ::value)> -FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { +FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec) + -> To { ec = 0; return from; } // function @@ -154,7 +157,7 @@ FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { // clang-format on template ::value)> -FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) { +FMT_CONSTEXPR auto safe_float_conversion(const From from, int& ec) -> To { ec = 0; using T = std::numeric_limits; static_assert(std::is_floating_point::value, "From must be floating"); @@ -176,7 +179,7 @@ FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) { template ::value)> -FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) { +FMT_CONSTEXPR auto safe_float_conversion(const From from, int& ec) -> To { ec = 0; static_assert(std::is_floating_point::value, "From must be floating"); return from; @@ -188,8 +191,8 @@ FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) { template ::value), FMT_ENABLE_IF(std::is_integral::value)> -To safe_duration_cast(std::chrono::duration from, - int& ec) { +auto safe_duration_cast(std::chrono::duration from, + int& ec) -> To { using From = std::chrono::duration; ec = 0; // the basic idea is that we need to convert from count() in the from type @@ -240,8 +243,8 @@ To safe_duration_cast(std::chrono::duration from, template ::value), FMT_ENABLE_IF(std::is_floating_point::value)> -To safe_duration_cast(std::chrono::duration from, - int& ec) { +auto safe_duration_cast(std::chrono::duration from, + int& ec) -> To { using From = std::chrono::duration; ec = 0; if (std::isnan(from.count())) { @@ -321,12 +324,12 @@ To safe_duration_cast(std::chrono::duration from, namespace detail { template struct null {}; -inline null<> localtime_r FMT_NOMACRO(...) { return null<>(); } -inline null<> localtime_s(...) { return null<>(); } -inline null<> gmtime_r(...) { return null<>(); } -inline null<> gmtime_s(...) { return null<>(); } +inline auto localtime_r FMT_NOMACRO(...) -> null<> { return null<>(); } +inline auto localtime_s(...) -> null<> { return null<>(); } +inline auto gmtime_r(...) -> null<> { return null<>(); } +inline auto gmtime_s(...) -> null<> { return null<>(); } -inline const std::locale& get_classic_locale() { +inline auto get_classic_locale() -> const std::locale& { static const auto& locale = std::locale::classic(); return locale; } @@ -336,8 +339,6 @@ template struct codecvt_result { CodeUnit buf[max_size]; CodeUnit* end; }; -template -constexpr const size_t codecvt_result::max_size; template void write_codecvt(codecvt_result& out, string_view in_buf, @@ -377,8 +378,8 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc) unit_t unit; write_codecvt(unit, in, loc); // In UTF-8 is used one to four one-byte code units. - unicode_to_utf8> - u; + auto u = + to_utf8>(); if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)})) FMT_THROW(format_error("failed to format time")); return copy_str(u.c_str(), u.c_str() + u.size(), out); @@ -408,8 +409,7 @@ inline void do_write(buffer& buf, const std::tm& time, auto&& format_buf = formatbuf>(buf); auto&& os = std::basic_ostream(&format_buf); os.imbue(loc); - using iterator = std::ostreambuf_iterator; - const auto& facet = std::use_facet>(loc); + const auto& facet = std::use_facet>(loc); auto end = facet.put(os, os, Char(' '), &time, format, modifier); if (end.failed()) FMT_THROW(format_error("failed to format time")); } @@ -432,6 +432,51 @@ auto write(OutputIt out, const std::tm& time, const std::locale& loc, return write_encoded_tm_str(out, string_view(buf.data(), buf.size()), loc); } +template +struct is_same_arithmetic_type + : public std::integral_constant::value && + std::is_integral::value) || + (std::is_floating_point::value && + std::is_floating_point::value)> { +}; + +template < + typename To, typename FromRep, typename FromPeriod, + FMT_ENABLE_IF(is_same_arithmetic_type::value)> +auto fmt_duration_cast(std::chrono::duration from) -> To { +#if FMT_SAFE_DURATION_CAST + // Throwing version of safe_duration_cast is only available for + // integer to integer or float to float casts. + int ec; + To to = safe_duration_cast::safe_duration_cast(from, ec); + if (ec) FMT_THROW(format_error("cannot format duration")); + return to; +#else + // Standard duration cast, may overflow. + return std::chrono::duration_cast(from); +#endif +} + +template < + typename To, typename FromRep, typename FromPeriod, + FMT_ENABLE_IF(!is_same_arithmetic_type::value)> +auto fmt_duration_cast(std::chrono::duration from) -> To { + // Mixed integer <-> float cast is not supported by safe_duration_cast. + return std::chrono::duration_cast(from); +} + +template +auto to_time_t( + std::chrono::time_point time_point) + -> std::time_t { + // Cannot use std::chrono::system_clock::to_time_t since this would first + // require a cast to std::chrono::system_clock::time_point, which could + // overflow. + return fmt_duration_cast>( + time_point.time_since_epoch()) + .count(); +} } // namespace detail FMT_BEGIN_EXPORT @@ -441,29 +486,29 @@ FMT_BEGIN_EXPORT expressed in local time. Unlike ``std::localtime``, this function is thread-safe on most platforms. */ -inline std::tm localtime(std::time_t time) { +inline auto localtime(std::time_t time) -> std::tm { struct dispatcher { std::time_t time_; std::tm tm_; dispatcher(std::time_t t) : time_(t) {} - bool run() { + auto run() -> bool { using namespace fmt::detail; return handle(localtime_r(&time_, &tm_)); } - bool handle(std::tm* tm) { return tm != nullptr; } + auto handle(std::tm* tm) -> bool { return tm != nullptr; } - bool handle(detail::null<>) { + auto handle(detail::null<>) -> bool { using namespace fmt::detail; return fallback(localtime_s(&tm_, &time_)); } - bool fallback(int res) { return res == 0; } + auto fallback(int res) -> bool { return res == 0; } #if !FMT_MSC_VERSION - bool fallback(detail::null<>) { + auto fallback(detail::null<>) -> bool { using namespace fmt::detail; std::tm* tm = std::localtime(&time_); if (tm) tm_ = *tm; @@ -480,8 +525,8 @@ inline std::tm localtime(std::time_t time) { #if FMT_USE_LOCAL_TIME template inline auto localtime(std::chrono::local_time time) -> std::tm { - return localtime(std::chrono::system_clock::to_time_t( - std::chrono::current_zone()->to_sys(time))); + return localtime( + detail::to_time_t(std::chrono::current_zone()->to_sys(time))); } #endif @@ -490,90 +535,49 @@ inline auto localtime(std::chrono::local_time time) -> std::tm { expressed in Coordinated Universal Time (UTC). Unlike ``std::gmtime``, this function is thread-safe on most platforms. */ -inline std::tm gmtime(std::time_t time) { +inline auto gmtime(std::time_t time) -> std::tm { struct dispatcher { std::time_t time_; std::tm tm_; dispatcher(std::time_t t) : time_(t) {} - bool run() { + auto run() -> bool { using namespace fmt::detail; return handle(gmtime_r(&time_, &tm_)); } - bool handle(std::tm* tm) { return tm != nullptr; } + auto handle(std::tm* tm) -> bool { return tm != nullptr; } - bool handle(detail::null<>) { + auto handle(detail::null<>) -> bool { using namespace fmt::detail; return fallback(gmtime_s(&tm_, &time_)); } - bool fallback(int res) { return res == 0; } + auto fallback(int res) -> bool { return res == 0; } #if !FMT_MSC_VERSION - bool fallback(detail::null<>) { + auto fallback(detail::null<>) -> bool { std::tm* tm = std::gmtime(&time_); if (tm) tm_ = *tm; return tm != nullptr; } #endif }; - dispatcher gt(time); + auto gt = dispatcher(time); // Too big time values may be unsupported. if (!gt.run()) FMT_THROW(format_error("time_t value out of range")); return gt.tm_; } -inline std::tm gmtime( - std::chrono::time_point time_point) { - return gmtime(std::chrono::system_clock::to_time_t(time_point)); +template +inline auto gmtime( + std::chrono::time_point time_point) + -> std::tm { + return gmtime(detail::to_time_t(time_point)); } -FMT_BEGIN_DETAIL_NAMESPACE - -// DEPRECATED! -template -FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end, - format_specs& specs) -> const Char* { - FMT_ASSERT(begin != end, ""); - auto align = align::none; - auto p = begin + code_point_length(begin); - if (end - p <= 0) p = begin; - for (;;) { - switch (to_ascii(*p)) { - case '<': - align = align::left; - break; - case '>': - align = align::right; - break; - case '^': - align = align::center; - break; - } - if (align != align::none) { - if (p != begin) { - auto c = *begin; - if (c == '}') return begin; - if (c == '{') { - throw_format_error("invalid fill character '{'"); - return begin; - } - specs.fill = {begin, to_unsigned(p - begin)}; - begin = p + 1; - } else { - ++begin; - } - break; - } else if (p == begin) { - break; - } - p = begin; - } - specs.align = align; - return begin; -} +namespace detail { // Writes two-digit numbers a, b and c separated by sep to buf. // The method by Pavel Novikov based on @@ -609,7 +613,8 @@ inline void write_digit2_separated(char* buf, unsigned a, unsigned b, } } -template FMT_CONSTEXPR inline const char* get_units() { +template +FMT_CONSTEXPR inline auto get_units() -> const char* { if (std::is_same::value) return "as"; if (std::is_same::value) return "fs"; if (std::is_same::value) return "ps"; @@ -627,8 +632,9 @@ template FMT_CONSTEXPR inline const char* get_units() { if (std::is_same::value) return "Ts"; if (std::is_same::value) return "Ps"; if (std::is_same::value) return "Es"; - if (std::is_same>::value) return "m"; + if (std::is_same>::value) return "min"; if (std::is_same>::value) return "h"; + if (std::is_same>::value) return "d"; return nullptr; } @@ -664,9 +670,8 @@ auto write_padding(OutputIt out, pad_type pad) -> OutputIt { // Parses a put_time-like format string and invokes handler actions. template -FMT_CONSTEXPR const Char* parse_chrono_format(const Char* begin, - const Char* end, - Handler&& handler) { +FMT_CONSTEXPR auto parse_chrono_format(const Char* begin, const Char* end, + Handler&& handler) -> const Char* { if (begin == end || *begin == '}') return begin; if (*begin != '%') FMT_THROW(format_error("invalid format")); auto ptr = begin; @@ -997,25 +1002,25 @@ struct tm_format_checker : null_chrono_spec_handler { FMT_CONSTEXPR void on_tz_name() {} }; -inline const char* tm_wday_full_name(int wday) { +inline auto tm_wday_full_name(int wday) -> const char* { static constexpr const char* full_name_list[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; return wday >= 0 && wday <= 6 ? full_name_list[wday] : "?"; } -inline const char* tm_wday_short_name(int wday) { +inline auto tm_wday_short_name(int wday) -> const char* { static constexpr const char* short_name_list[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; return wday >= 0 && wday <= 6 ? short_name_list[wday] : "???"; } -inline const char* tm_mon_full_name(int mon) { +inline auto tm_mon_full_name(int mon) -> const char* { static constexpr const char* full_name_list[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; return mon >= 0 && mon <= 11 ? full_name_list[mon] : "?"; } -inline const char* tm_mon_short_name(int mon) { +inline auto tm_mon_short_name(int mon) -> const char* { static constexpr const char* short_name_list[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", @@ -1047,21 +1052,21 @@ inline void tzset_once() { // Converts value to Int and checks that it's in the range [0, upper). template ::value)> -inline Int to_nonnegative_int(T value, Int upper) { - FMT_ASSERT(std::is_unsigned::value || - (value >= 0 && to_unsigned(value) <= to_unsigned(upper)), - "invalid value"); - (void)upper; +inline auto to_nonnegative_int(T value, Int upper) -> Int { + if (!std::is_unsigned::value && + (value < 0 || to_unsigned(value) > to_unsigned(upper))) { + FMT_THROW(fmt::format_error("chrono value is out of range")); + } return static_cast(value); } template ::value)> -inline Int to_nonnegative_int(T value, Int upper) { +inline auto to_nonnegative_int(T value, Int upper) -> Int { if (value < 0 || value > static_cast(upper)) FMT_THROW(format_error("invalid value")); return static_cast(value); } -constexpr long long pow10(std::uint32_t n) { +constexpr auto pow10(std::uint32_t n) -> long long { return n == 0 ? 1 : 10 * pow10(n - 1); } @@ -1095,13 +1100,12 @@ void write_fractional_seconds(OutputIt& out, Duration d, int precision = -1) { std::chrono::seconds::rep>::type, std::ratio<1, detail::pow10(num_fractional_digits)>>; - const auto fractional = - d - std::chrono::duration_cast(d); + const auto fractional = d - fmt_duration_cast(d); const auto subseconds = std::chrono::treat_as_floating_point< typename subsecond_precision::rep>::value ? fractional.count() - : std::chrono::duration_cast(fractional).count(); + : fmt_duration_cast(fractional).count(); auto n = static_cast>(subseconds); const int num_digits = detail::count_digits(n); @@ -1152,11 +1156,11 @@ void write_floating_seconds(memory_buffer& buf, Duration duration, num_fractional_digits = 6; } - format_to(std::back_inserter(buf), FMT_STRING("{:.{}f}"), - std::fmod(val * static_cast(Duration::period::num) / - static_cast(Duration::period::den), - static_cast(60)), - num_fractional_digits); + fmt::format_to(std::back_inserter(buf), FMT_STRING("{:.{}f}"), + std::fmod(val * static_cast(Duration::period::num) / + static_cast(Duration::period::den), + static_cast(60)), + num_fractional_digits); } template (l); } - // Algorithm: - // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_the_week_number_from_a_month_and_day_of_the_month_or_ordinal_date + // Algorithm: https://en.wikipedia.org/wiki/ISO_week_date. auto iso_year_weeks(long long curr_year) const noexcept -> int { const auto prev_year = curr_year - 1; const auto curr_p = @@ -1358,7 +1361,7 @@ class tm_writer { subsecs_(subsecs), tm_(tm) {} - OutputIt out() const { return out_; } + auto out() const -> OutputIt { return out_; } FMT_CONSTEXPR void on_text(const Char* begin, const Char* end) { out_ = copy_str(begin, end, out_); @@ -1622,6 +1625,7 @@ struct chrono_format_checker : null_chrono_spec_handler { template FMT_CONSTEXPR void on_text(const Char*, const Char*) {} + FMT_CONSTEXPR void on_day_of_year() {} FMT_CONSTEXPR void on_24_hour(numeric_system, pad_type) {} FMT_CONSTEXPR void on_12_hour(numeric_system, pad_type) {} FMT_CONSTEXPR void on_minute(numeric_system, pad_type) {} @@ -1640,16 +1644,16 @@ struct chrono_format_checker : null_chrono_spec_handler { template ::value&& has_isfinite::value)> -inline bool isfinite(T) { +inline auto isfinite(T) -> bool { return true; } template ::value)> -inline T mod(T x, int y) { +inline auto mod(T x, int y) -> T { return x % static_cast(y); } template ::value)> -inline T mod(T x, int y) { +inline auto mod(T x, int y) -> T { return std::fmod(x, static_cast(y)); } @@ -1664,49 +1668,38 @@ template struct make_unsigned_or_unchanged { using type = typename std::make_unsigned::type; }; -#if FMT_SAFE_DURATION_CAST -// throwing version of safe_duration_cast -template -To fmt_safe_duration_cast(std::chrono::duration from) { - int ec; - To to = safe_duration_cast::safe_duration_cast(from, ec); - if (ec) FMT_THROW(format_error("cannot format duration")); - return to; -} -#endif - template ::value)> -inline std::chrono::duration get_milliseconds( - std::chrono::duration d) { +inline auto get_milliseconds(std::chrono::duration d) + -> std::chrono::duration { // this may overflow and/or the result may not fit in the // target type. #if FMT_SAFE_DURATION_CAST using CommonSecondsType = typename std::common_type::type; - const auto d_as_common = fmt_safe_duration_cast(d); + const auto d_as_common = fmt_duration_cast(d); const auto d_as_whole_seconds = - fmt_safe_duration_cast(d_as_common); + fmt_duration_cast(d_as_common); // this conversion should be nonproblematic const auto diff = d_as_common - d_as_whole_seconds; const auto ms = - fmt_safe_duration_cast>(diff); + fmt_duration_cast>(diff); return ms; #else - auto s = std::chrono::duration_cast(d); - return std::chrono::duration_cast(d - s); + auto s = fmt_duration_cast(d); + return fmt_duration_cast(d - s); #endif } template ::value)> -OutputIt format_duration_value(OutputIt out, Rep val, int) { +auto format_duration_value(OutputIt out, Rep val, int) -> OutputIt { return write(out, val); } template ::value)> -OutputIt format_duration_value(OutputIt out, Rep val, int precision) { +auto format_duration_value(OutputIt out, Rep val, int precision) -> OutputIt { auto specs = format_specs(); specs.precision = precision; specs.type = precision >= 0 ? presentation_type::fixed_lower @@ -1715,12 +1708,12 @@ OutputIt format_duration_value(OutputIt out, Rep val, int precision) { } template -OutputIt copy_unit(string_view unit, OutputIt out, Char) { +auto copy_unit(string_view unit, OutputIt out, Char) -> OutputIt { return std::copy(unit.begin(), unit.end(), out); } template -OutputIt copy_unit(string_view unit, OutputIt out, wchar_t) { +auto copy_unit(string_view unit, OutputIt out, wchar_t) -> OutputIt { // This works when wchar_t is UTF-32 because units only contain characters // that have the same representation in UTF-16 and UTF-32. utf8_to_utf16 u(unit); @@ -1728,7 +1721,7 @@ OutputIt copy_unit(string_view unit, OutputIt out, wchar_t) { } template -OutputIt format_duration_unit(OutputIt out) { +auto format_duration_unit(OutputIt out) -> OutputIt { if (const char* unit = get_units()) return copy_unit(string_view(unit), out, Char()); *out++ = '['; @@ -1795,18 +1788,12 @@ struct chrono_formatter { // this may overflow and/or the result may not fit in the // target type. -#if FMT_SAFE_DURATION_CAST // might need checked conversion (rep!=Rep) - auto tmpval = std::chrono::duration(val); - s = fmt_safe_duration_cast(tmpval); -#else - s = std::chrono::duration_cast( - std::chrono::duration(val)); -#endif + s = fmt_duration_cast(std::chrono::duration(val)); } // returns true if nan or inf, writes to out. - bool handle_nan_inf() { + auto handle_nan_inf() -> bool { if (isfinite(val)) { return false; } @@ -1823,17 +1810,22 @@ struct chrono_formatter { return true; } - Rep hour() const { return static_cast(mod((s.count() / 3600), 24)); } + auto days() const -> Rep { return static_cast(s.count() / 86400); } + auto hour() const -> Rep { + return static_cast(mod((s.count() / 3600), 24)); + } - Rep hour12() const { + auto hour12() const -> Rep { Rep hour = static_cast(mod((s.count() / 3600), 12)); return hour <= 0 ? 12 : hour; } - Rep minute() const { return static_cast(mod((s.count() / 60), 60)); } - Rep second() const { return static_cast(mod(s.count(), 60)); } + auto minute() const -> Rep { + return static_cast(mod((s.count() / 60), 60)); + } + auto second() const -> Rep { return static_cast(mod(s.count(), 60)); } - std::tm time() const { + auto time() const -> std::tm { auto time = std::tm(); time.tm_hour = to_nonnegative_int(hour(), 24); time.tm_min = to_nonnegative_int(minute(), 60); @@ -1901,10 +1893,14 @@ struct chrono_formatter { void on_dec0_week_of_year(numeric_system) {} void on_dec1_week_of_year(numeric_system) {} void on_iso_week_of_year(numeric_system) {} - void on_day_of_year() {} void on_day_of_month(numeric_system) {} void on_day_of_month_space(numeric_system) {} + void on_day_of_year() { + if (handle_nan_inf()) return; + write(days(), 0); + } + void on_24_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; @@ -1997,7 +1993,7 @@ struct chrono_formatter { } }; -FMT_END_DETAIL_NAMESPACE +} // namespace detail #if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907 using weekday = std::chrono::weekday; @@ -2011,7 +2007,7 @@ class weekday { weekday() = default; explicit constexpr weekday(unsigned wd) noexcept : value(static_cast(wd != 7 ? wd : 0)) {} - constexpr unsigned c_encoding() const noexcept { return value; } + constexpr auto c_encoding() const noexcept -> unsigned { return value; } }; class year_month_day {}; @@ -2047,80 +2043,67 @@ template struct formatter { template struct formatter, Char> { private: - format_specs specs; - int precision = -1; - using arg_ref_type = detail::arg_ref; - arg_ref_type width_ref; - arg_ref_type precision_ref; - bool localized = false; - basic_string_view format_str; - using duration = std::chrono::duration; - - using iterator = typename basic_format_parse_context::iterator; - struct parse_range { - iterator begin; - iterator end; - }; + format_specs specs_; + detail::arg_ref width_ref_; + detail::arg_ref precision_ref_; + bool localized_ = false; + basic_string_view format_str_; - FMT_CONSTEXPR parse_range do_parse(basic_format_parse_context& ctx) { - auto begin = ctx.begin(), end = ctx.end(); - if (begin == end || *begin == '}') return {begin, begin}; + public: + FMT_CONSTEXPR auto parse(basic_format_parse_context& ctx) + -> decltype(ctx.begin()) { + auto it = ctx.begin(), end = ctx.end(); + if (it == end || *it == '}') return it; - begin = detail::parse_align(begin, end, specs); - if (begin == end) return {begin, begin}; + it = detail::parse_align(it, end, specs_); + if (it == end) return it; - begin = detail::parse_dynamic_spec(begin, end, specs.width, width_ref, ctx); - if (begin == end) return {begin, begin}; + it = detail::parse_dynamic_spec(it, end, specs_.width, width_ref_, ctx); + if (it == end) return it; auto checker = detail::chrono_format_checker(); - if (*begin == '.') { + if (*it == '.') { checker.has_precision_integral = !std::is_floating_point::value; - begin = - detail::parse_precision(begin, end, precision, precision_ref, ctx); + it = detail::parse_precision(it, end, specs_.precision, precision_ref_, + ctx); } - if (begin != end && *begin == 'L') { - ++begin; - localized = true; + if (it != end && *it == 'L') { + localized_ = true; + ++it; } - end = detail::parse_chrono_format(begin, end, checker); - return {begin, end}; - } - - public: - FMT_CONSTEXPR auto parse(basic_format_parse_context& ctx) - -> decltype(ctx.begin()) { - auto range = do_parse(ctx); - format_str = basic_string_view( - &*range.begin, detail::to_unsigned(range.end - range.begin)); - return range.end; + end = detail::parse_chrono_format(it, end, checker); + format_str_ = {it, detail::to_unsigned(end - it)}; + return end; } template - auto format(const duration& d, FormatContext& ctx) const + auto format(std::chrono::duration d, FormatContext& ctx) const -> decltype(ctx.out()) { - auto specs_copy = specs; - auto precision_copy = precision; - auto begin = format_str.begin(), end = format_str.end(); + auto specs = specs_; + auto precision = specs.precision; + specs.precision = -1; + auto begin = format_str_.begin(), end = format_str_.end(); // As a possible future optimization, we could avoid extra copying if width // is not specified. - basic_memory_buffer buf; + auto buf = basic_memory_buffer(); auto out = std::back_inserter(buf); - detail::handle_dynamic_spec(specs_copy.width, - width_ref, ctx); - detail::handle_dynamic_spec(precision_copy, - precision_ref, ctx); + detail::handle_dynamic_spec(specs.width, width_ref_, + ctx); + detail::handle_dynamic_spec(precision, + precision_ref_, ctx); if (begin == end || *begin == '}') { - out = detail::format_duration_value(out, d.count(), precision_copy); + out = detail::format_duration_value(out, d.count(), precision); detail::format_duration_unit(out); } else { - detail::chrono_formatter f( - ctx, out, d); - f.precision = precision_copy; - f.localized = localized; + using chrono_formatter = + detail::chrono_formatter; + auto f = chrono_formatter(ctx, out, d); + f.precision = precision; + f.localized = localized_; detail::parse_chrono_format(begin, end, f); } return detail::write( - ctx.out(), basic_string_view(buf.data(), buf.size()), specs_copy); + ctx.out(), basic_string_view(buf.data(), buf.size()), specs); } }; @@ -2128,34 +2111,33 @@ template struct formatter, Char> : formatter { FMT_CONSTEXPR formatter() { - this->format_str = detail::string_literal{}; + this->format_str_ = detail::string_literal{}; } template auto format(std::chrono::time_point val, FormatContext& ctx) const -> decltype(ctx.out()) { using period = typename Duration::period; - if (period::num != 1 || period::den != 1 || - std::is_floating_point::value) { + if (detail::const_check( + period::num != 1 || period::den != 1 || + std::is_floating_point::value)) { const auto epoch = val.time_since_epoch(); - auto subsecs = std::chrono::duration_cast( - epoch - std::chrono::duration_cast(epoch)); + auto subsecs = detail::fmt_duration_cast( + epoch - detail::fmt_duration_cast(epoch)); if (subsecs.count() < 0) { - auto second = std::chrono::seconds(1); + auto second = + detail::fmt_duration_cast(std::chrono::seconds(1)); if (epoch.count() < ((Duration::min)() + second).count()) FMT_THROW(format_error("duration is too small")); subsecs += second; val -= second; } - return formatter::do_format( - gmtime(std::chrono::time_point_cast(val)), ctx, - &subsecs); + return formatter::do_format(gmtime(val), ctx, &subsecs); } - return formatter::format( - gmtime(std::chrono::time_point_cast(val)), ctx); + return formatter::format(gmtime(val), ctx); } }; @@ -2164,7 +2146,7 @@ template struct formatter, Char> : formatter { FMT_CONSTEXPR formatter() { - this->format_str = detail::string_literal{}; + this->format_str_ = detail::string_literal{}; } template @@ -2174,17 +2156,13 @@ struct formatter, Char> if (period::num != 1 || period::den != 1 || std::is_floating_point::value) { const auto epoch = val.time_since_epoch(); - const auto subsecs = std::chrono::duration_cast( - epoch - std::chrono::duration_cast(epoch)); + const auto subsecs = detail::fmt_duration_cast( + epoch - detail::fmt_duration_cast(epoch)); - return formatter::do_format( - localtime(std::chrono::time_point_cast(val)), - ctx, &subsecs); + return formatter::do_format(localtime(val), ctx, &subsecs); } - return formatter::format( - localtime(std::chrono::time_point_cast(val)), - ctx); + return formatter::format(localtime(val), ctx); } }; #endif @@ -2207,51 +2185,46 @@ struct formatter, template struct formatter { private: - format_specs specs; - detail::arg_ref width_ref; + format_specs specs_; + detail::arg_ref width_ref_; protected: - basic_string_view format_str; - - FMT_CONSTEXPR auto do_parse(basic_format_parse_context& ctx) - -> decltype(ctx.begin()) { - auto begin = ctx.begin(), end = ctx.end(); - if (begin == end || *begin == '}') return begin; - - begin = detail::parse_align(begin, end, specs); - if (begin == end) return end; - - begin = detail::parse_dynamic_spec(begin, end, specs.width, width_ref, ctx); - if (begin == end) return end; - - end = detail::parse_chrono_format(begin, end, detail::tm_format_checker()); - // Replace default format_str only if the new spec is not empty. - if (end != begin) format_str = {begin, detail::to_unsigned(end - begin)}; - return end; - } + basic_string_view format_str_; template auto do_format(const std::tm& tm, FormatContext& ctx, const Duration* subsecs) const -> decltype(ctx.out()) { - auto specs_copy = specs; - basic_memory_buffer buf; + auto specs = specs_; + auto buf = basic_memory_buffer(); auto out = std::back_inserter(buf); - detail::handle_dynamic_spec(specs_copy.width, - width_ref, ctx); + detail::handle_dynamic_spec(specs.width, width_ref_, + ctx); - const auto loc_ref = ctx.locale(); + auto loc_ref = ctx.locale(); detail::get_locale loc(static_cast(loc_ref), loc_ref); auto w = detail::tm_writer(loc, out, tm, subsecs); - detail::parse_chrono_format(format_str.begin(), format_str.end(), w); + detail::parse_chrono_format(format_str_.begin(), format_str_.end(), w); return detail::write( - ctx.out(), basic_string_view(buf.data(), buf.size()), specs_copy); + ctx.out(), basic_string_view(buf.data(), buf.size()), specs); } public: FMT_CONSTEXPR auto parse(basic_format_parse_context& ctx) -> decltype(ctx.begin()) { - return this->do_parse(ctx); + auto it = ctx.begin(), end = ctx.end(); + if (it == end || *it == '}') return it; + + it = detail::parse_align(it, end, specs_); + if (it == end) return it; + + it = detail::parse_dynamic_spec(it, end, specs_.width, width_ref_, ctx); + if (it == end) return it; + + end = detail::parse_chrono_format(it, end, detail::tm_format_checker()); + // Replace the default format_str only if the new spec is not empty. + if (end != it) format_str_ = {it, detail::to_unsigned(end - it)}; + return end; } template diff --git a/src/3rdparty/fmt/core.h b/src/3rdparty/fmt/core.h index 26517a4958..7fe8550413 100644 --- a/src/3rdparty/fmt/core.h +++ b/src/3rdparty/fmt/core.h @@ -13,11 +13,12 @@ #include // std::strlen #include #include +#include // std::addressof #include #include // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 100000 +#define FMT_VERSION 100200 #if defined(__clang__) && !defined(__ibmxl__) # define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) @@ -92,7 +93,7 @@ #ifndef FMT_USE_CONSTEXPR # if (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VERSION >= 1912 || \ (FMT_GCC_VERSION >= 600 && FMT_CPLUSPLUS >= 201402L)) && \ - !FMT_ICC_VERSION && !defined(__NVCC__) + !FMT_ICC_VERSION && (!defined(__NVCC__) || FMT_CPLUSPLUS >= 202002L) # define FMT_USE_CONSTEXPR 1 # else # define FMT_USE_CONSTEXPR 0 @@ -104,9 +105,12 @@ # define FMT_CONSTEXPR #endif -#if ((FMT_CPLUSPLUS >= 202002L) && \ - (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE > 9)) || \ - (FMT_CPLUSPLUS >= 201709L && FMT_GCC_VERSION >= 1002) +#if (FMT_CPLUSPLUS >= 202002L || \ + (FMT_CPLUSPLUS >= 201709L && FMT_GCC_VERSION >= 1002)) && \ + ((!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 10) && \ + (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 10000) && \ + (!FMT_MSC_VERSION || FMT_MSC_VERSION >= 1928)) && \ + defined(__cpp_lib_is_constant_evaluated) # define FMT_CONSTEXPR20 constexpr #else # define FMT_CONSTEXPR20 @@ -162,9 +166,6 @@ # endif #endif -// An inline std::forward replacement. -#define FMT_FORWARD(...) static_cast(__VA_ARGS__) - #ifdef _MSC_VER # define FMT_UNCHECKED_ITERATOR(It) \ using _Unchecked_type = It // Mark iterator as checked. @@ -181,24 +182,26 @@ } #endif -#ifndef FMT_MODULE_EXPORT -# define FMT_MODULE_EXPORT +#ifndef FMT_EXPORT +# define FMT_EXPORT # define FMT_BEGIN_EXPORT # define FMT_END_EXPORT #endif +#if FMT_GCC_VERSION || FMT_CLANG_VERSION +# define FMT_VISIBILITY(value) __attribute__((visibility(value))) +#else +# define FMT_VISIBILITY(value) +#endif + #if !defined(FMT_HEADER_ONLY) && defined(_WIN32) -# ifdef FMT_LIB_EXPORT +# if defined(FMT_LIB_EXPORT) # define FMT_API __declspec(dllexport) # elif defined(FMT_SHARED) # define FMT_API __declspec(dllimport) # endif -#else -# if defined(FMT_LIB_EXPORT) || defined(FMT_SHARED) -# if defined(__GNUC__) || defined(__clang__) -# define FMT_API __attribute__((visibility("default"))) -# endif -# endif +#elif defined(FMT_LIB_EXPORT) || defined(FMT_SHARED) +# define FMT_API FMT_VISIBILITY("default") #endif #ifndef FMT_API # define FMT_API @@ -224,8 +227,9 @@ __apple_build_version__ >= 14000029L) && \ FMT_CPLUSPLUS >= 202002L) || \ (defined(__cpp_consteval) && \ - (!FMT_MSC_VERSION || _MSC_FULL_VER >= 193030704)) -// consteval is broken in MSVC before VS2022 and Apple clang before 14. + (!FMT_MSC_VERSION || FMT_MSC_VERSION >= 1929)) +// consteval is broken in MSVC before VS2019 version 16.10 and Apple clang +// before 14. # define FMT_CONSTEVAL consteval # define FMT_HAS_CONSTEVAL # else @@ -244,10 +248,13 @@ # endif #endif -#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L -# define FMT_INLINE_VARIABLE inline -#else -# define FMT_INLINE_VARIABLE +// GCC < 5 requires this-> in decltype +#ifndef FMT_DECLTYPE_THIS +# if FMT_GCC_VERSION && FMT_GCC_VERSION < 500 +# define FMT_DECLTYPE_THIS this-> +# else +# define FMT_DECLTYPE_THIS +# endif #endif FMT_GCC_PRAGMA("GCC push_options") @@ -266,11 +273,18 @@ template using remove_const_t = typename std::remove_const::type; template using remove_cvref_t = typename std::remove_cv>::type; -template struct type_identity { using type = T; }; +template struct type_identity { + using type = T; +}; template using type_identity_t = typename type_identity::type; template using underlying_t = typename std::underlying_type::type; +// Checks whether T is a container with contiguous storage. +template struct is_contiguous : std::false_type {}; +template +struct is_contiguous> : std::true_type {}; + struct monostate { constexpr monostate() {} }; @@ -284,8 +298,11 @@ struct monostate { # define FMT_ENABLE_IF(...) fmt::enable_if_t<(__VA_ARGS__), int> = 0 #endif +// This is defined in core.h instead of format.h to avoid injecting in std. +// It is a template to avoid undesirable implicit conversions to std::byte. #ifdef __cpp_lib_byte -inline auto format_as(std::byte b) -> unsigned char { +template ::value)> +inline auto format_as(T b) -> unsigned char { return static_cast(b); } #endif @@ -389,7 +406,7 @@ FMT_CONSTEXPR inline auto is_utf8() -> bool { compiled with a different ``-std`` option than the client code (which is not recommended). */ -FMT_MODULE_EXPORT +FMT_EXPORT template class basic_string_view { private: const Char* data_; @@ -449,15 +466,15 @@ template class basic_string_view { size_ -= n; } - FMT_CONSTEXPR_CHAR_TRAITS bool starts_with( - basic_string_view sv) const noexcept { + FMT_CONSTEXPR_CHAR_TRAITS auto starts_with( + basic_string_view sv) const noexcept -> bool { return size_ >= sv.size_ && std::char_traits::compare(data_, sv.data_, sv.size_) == 0; } - FMT_CONSTEXPR_CHAR_TRAITS bool starts_with(Char c) const noexcept { + FMT_CONSTEXPR_CHAR_TRAITS auto starts_with(Char c) const noexcept -> bool { return size_ >= 1 && std::char_traits::eq(*data_, c); } - FMT_CONSTEXPR_CHAR_TRAITS bool starts_with(const Char* s) const { + FMT_CONSTEXPR_CHAR_TRAITS auto starts_with(const Char* s) const -> bool { return starts_with(basic_string_view(s)); } @@ -492,11 +509,11 @@ template class basic_string_view { } }; -FMT_MODULE_EXPORT +FMT_EXPORT using string_view = basic_string_view; /** Specifies if ``T`` is a character type. Can be specialized by users. */ -FMT_MODULE_EXPORT +FMT_EXPORT template struct is_char : std::false_type {}; template <> struct is_char : std::true_type {}; @@ -595,10 +612,10 @@ FMT_TYPE_CONSTANT(const Char*, cstring_type); FMT_TYPE_CONSTANT(basic_string_view, string_type); FMT_TYPE_CONSTANT(const void*, pointer_type); -constexpr bool is_integral_type(type t) { +constexpr auto is_integral_type(type t) -> bool { return t > type::none_type && t <= type::last_integer_type; } -constexpr bool is_arithmetic_type(type t) { +constexpr auto is_arithmetic_type(type t) -> bool { return t > type::none_type && t <= type::last_numeric_type; } @@ -622,6 +639,7 @@ enum { pointer_set = set(type::pointer_type) }; +// DEPRECATED! FMT_NORETURN FMT_API void throw_format_error(const char* message); struct error_handler { @@ -634,6 +652,9 @@ struct error_handler { }; } // namespace detail +/** Throws ``format_error`` with a given message. */ +using detail::throw_format_error; + /** String's character type. */ template using char_t = typename detail::char_t_impl::type; @@ -644,7 +665,7 @@ template using char_t = typename detail::char_t_impl::type; You can use the ``format_parse_context`` type alias for ``char`` instead. \endrst */ -FMT_MODULE_EXPORT +FMT_EXPORT template class basic_format_parse_context { private: basic_string_view format_str_; @@ -710,7 +731,7 @@ template class basic_format_parse_context { FMT_CONSTEXPR void check_dynamic_spec(int arg_id); }; -FMT_MODULE_EXPORT +FMT_EXPORT using format_parse_context = basic_format_parse_context; namespace detail { @@ -751,72 +772,6 @@ class compile_parse_context : public basic_format_parse_context { #endif } }; -} // namespace detail - -template -FMT_CONSTEXPR void basic_format_parse_context::do_check_arg_id(int id) { - // Argument id is only checked at compile-time during parsing because - // formatting has its own validation. - if (detail::is_constant_evaluated() && - (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) { - using context = detail::compile_parse_context; - if (id >= static_cast(this)->num_args()) - detail::throw_format_error("argument not found"); - } -} - -template -FMT_CONSTEXPR void basic_format_parse_context::check_dynamic_spec( - int arg_id) { - if (detail::is_constant_evaluated() && - (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) { - using context = detail::compile_parse_context; - static_cast(this)->check_dynamic_spec(arg_id); - } -} - -FMT_MODULE_EXPORT template class basic_format_arg; -FMT_MODULE_EXPORT template class basic_format_args; -FMT_MODULE_EXPORT template class dynamic_format_arg_store; - -// A formatter for objects of type T. -FMT_MODULE_EXPORT -template -struct formatter { - // A deleted default constructor indicates a disabled formatter. - formatter() = delete; -}; - -// Specifies if T has an enabled formatter specialization. A type can be -// formattable even if it doesn't have a formatter e.g. via a conversion. -template -using has_formatter = - std::is_constructible>; - -// Checks whether T is a container with contiguous storage. -template struct is_contiguous : std::false_type {}; -template -struct is_contiguous> : std::true_type {}; - -class appender; - -namespace detail { - -template -constexpr auto has_const_formatter_impl(T*) - -> decltype(typename Context::template formatter_type().format( - std::declval(), std::declval()), - true) { - return true; -} -template -constexpr auto has_const_formatter_impl(...) -> bool { - return false; -} -template -constexpr auto has_const_formatter() -> bool { - return has_const_formatter_impl(static_cast(nullptr)); -} // Extracts a reference to the container from back_insert_iterator. template @@ -862,7 +817,7 @@ template class buffer { protected: // Don't initialize ptr_ since it is not accessed to save a few cycles. FMT_MSC_WARNING(suppress : 26495) - buffer(size_t sz) noexcept : size_(sz), capacity_(sz) {} + FMT_CONSTEXPR buffer(size_t sz) noexcept : size_(sz), capacity_(sz) {} FMT_CONSTEXPR20 buffer(T* p = nullptr, size_t sz = 0, size_t cap = 0) noexcept : ptr_(p), size_(sz), capacity_(cap) {} @@ -877,6 +832,7 @@ template class buffer { } /** Increases the buffer capacity to hold at least *capacity* elements. */ + // DEPRECATED! virtual FMT_CONSTEXPR20 void grow(size_t capacity) = 0; public: @@ -898,10 +854,8 @@ template class buffer { /** Returns the capacity of this buffer. */ constexpr auto capacity() const noexcept -> size_t { return capacity_; } - /** Returns a pointer to the buffer data. */ + /** Returns a pointer to the buffer data (not null-terminated). */ FMT_CONSTEXPR auto data() noexcept -> T* { return ptr_; } - - /** Returns a pointer to the buffer data. */ FMT_CONSTEXPR auto data() const noexcept -> const T* { return ptr_; } /** Clears this buffer. */ @@ -1094,6 +1048,79 @@ template class counting_buffer final : public buffer { auto count() -> size_t { return count_ + this->size(); } }; +} // namespace detail + +template +FMT_CONSTEXPR void basic_format_parse_context::do_check_arg_id(int id) { + // Argument id is only checked at compile-time during parsing because + // formatting has its own validation. + if (detail::is_constant_evaluated() && + (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) { + using context = detail::compile_parse_context; + if (id >= static_cast(this)->num_args()) + detail::throw_format_error("argument not found"); + } +} + +template +FMT_CONSTEXPR void basic_format_parse_context::check_dynamic_spec( + int arg_id) { + if (detail::is_constant_evaluated() && + (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) { + using context = detail::compile_parse_context; + static_cast(this)->check_dynamic_spec(arg_id); + } +} + +FMT_EXPORT template class basic_format_arg; +FMT_EXPORT template class basic_format_args; +FMT_EXPORT template class dynamic_format_arg_store; + +// A formatter for objects of type T. +FMT_EXPORT +template +struct formatter { + // A deleted default constructor indicates a disabled formatter. + formatter() = delete; +}; + +// Specifies if T has an enabled formatter specialization. A type can be +// formattable even if it doesn't have a formatter e.g. via a conversion. +template +using has_formatter = + std::is_constructible>; + +// An output iterator that appends to a buffer. +// It is used to reduce symbol sizes for the common case. +class appender : public std::back_insert_iterator> { + using base = std::back_insert_iterator>; + + public: + using std::back_insert_iterator>::back_insert_iterator; + appender(base it) noexcept : base(it) {} + FMT_UNCHECKED_ITERATOR(appender); + + auto operator++() noexcept -> appender& { return *this; } + auto operator++(int) noexcept -> appender { return *this; } +}; + +namespace detail { + +template +constexpr auto has_const_formatter_impl(T*) + -> decltype(typename Context::template formatter_type().format( + std::declval(), std::declval()), + true) { + return true; +} +template +constexpr auto has_const_formatter_impl(...) -> bool { + return false; +} +template +constexpr auto has_const_formatter() -> bool { + return has_const_formatter_impl(static_cast(nullptr)); +} template using buffer_appender = conditional_t::value, appender, @@ -1269,9 +1296,9 @@ template class value { FMT_INLINE value(const named_arg_info* args, size_t size) : named_args{args, size} {} - template FMT_CONSTEXPR FMT_INLINE value(T& val) { - using value_type = remove_cvref_t; - custom.value = const_cast(&val); + template FMT_CONSTEXPR20 FMT_INLINE value(T& val) { + using value_type = remove_const_t; + custom.value = const_cast(std::addressof(val)); // Get the formatter type through the context to allow different contexts // have different extension points, e.g. `formatter` for `format` and // `printf_formatter` for `printf`. @@ -1292,13 +1319,11 @@ template class value { parse_ctx.advance_to(f.parse(parse_ctx)); using qualified_type = conditional_t(), const T, T>; + // Calling format through a mutable reference is deprecated. ctx.advance_to(f.format(*static_cast(arg), ctx)); } }; -template -FMT_CONSTEXPR auto make_arg(T&& value) -> basic_format_arg; - // To minimize the number of types we need to deal with, long is translated // either to int or to long long depending on its size. enum { long_short = sizeof(long) == sizeof(int) }; @@ -1308,7 +1333,7 @@ using ulong_type = conditional_t; template struct format_as_result { template ::value || std::is_class::value)> - static auto map(U*) -> decltype(format_as(std::declval())); + static auto map(U*) -> remove_cvref_t()))>; static auto map(...) -> void; using type = decltype(map(static_cast(nullptr))); @@ -1410,9 +1435,8 @@ template struct arg_mapper { FMT_ENABLE_IF( std::is_pointer::value || std::is_member_pointer::value || std::is_function::type>::value || - (std::is_convertible::value && - !std::is_convertible::value && - !has_formatter::value))> + (std::is_array::value && + !std::is_convertible::value))> FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer { return {}; } @@ -1426,39 +1450,39 @@ template struct arg_mapper { // Only map owning types because mapping views can be unsafe. template , FMT_ENABLE_IF(std::is_arithmetic::value)> - FMT_CONSTEXPR FMT_INLINE auto map(const T& val) -> decltype(this->map(U())) { + FMT_CONSTEXPR FMT_INLINE auto map(const T& val) + -> decltype(FMT_DECLTYPE_THIS map(U())) { return map(format_as(val)); } - template > - struct formattable - : bool_constant() || - (has_formatter::value && - !std::is_const>::value)> {}; + template > + struct formattable : bool_constant() || + (has_formatter::value && + !std::is_const::value)> {}; template ::value)> - FMT_CONSTEXPR FMT_INLINE auto do_map(T&& val) -> T& { + FMT_CONSTEXPR FMT_INLINE auto do_map(T& val) -> T& { return val; } template ::value)> - FMT_CONSTEXPR FMT_INLINE auto do_map(T&&) -> unformattable { + FMT_CONSTEXPR FMT_INLINE auto do_map(T&) -> unformattable { return {}; } - template , + template , FMT_ENABLE_IF((std::is_class::value || std::is_enum::value || std::is_union::value) && !is_string::value && !is_char::value && !is_named_arg::value && !std::is_arithmetic>::value)> - FMT_CONSTEXPR FMT_INLINE auto map(T&& val) - -> decltype(this->do_map(std::forward(val))) { - return do_map(std::forward(val)); + FMT_CONSTEXPR FMT_INLINE auto map(T& val) + -> decltype(FMT_DECLTYPE_THIS do_map(val)) { + return do_map(val); } template ::value)> FMT_CONSTEXPR FMT_INLINE auto map(const T& named_arg) - -> decltype(this->map(named_arg.value)) { + -> decltype(FMT_DECLTYPE_THIS map(named_arg.value)) { return map(named_arg.value); } @@ -1476,31 +1500,132 @@ enum { packed_arg_bits = 4 }; enum { max_packed_args = 62 / packed_arg_bits }; enum : unsigned long long { is_unpacked_bit = 1ULL << 63 }; enum : unsigned long long { has_named_args_bit = 1ULL << 62 }; -} // namespace detail -// An output iterator that appends to a buffer. -// It is used to reduce symbol sizes for the common case. -class appender : public std::back_insert_iterator> { - using base = std::back_insert_iterator>; +template +auto copy_str(InputIt begin, InputIt end, appender out) -> appender { + get_container(out).append(begin, end); + return out; +} +template +auto copy_str(InputIt begin, InputIt end, + std::back_insert_iterator out) + -> std::back_insert_iterator { + get_container(out).append(begin, end); + return out; +} + +template +FMT_CONSTEXPR auto copy_str(R&& rng, OutputIt out) -> OutputIt { + return detail::copy_str(rng.begin(), rng.end(), out); +} + +#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500 +// A workaround for gcc 4.8 to make void_t work in a SFINAE context. +template struct void_t_impl { + using type = void; +}; +template using void_t = typename void_t_impl::type; +#else +template using void_t = void; +#endif + +template +struct is_output_iterator : std::false_type {}; + +template +struct is_output_iterator< + It, T, + void_t::iterator_category, + decltype(*std::declval() = std::declval())>> + : std::true_type {}; + +template struct is_back_insert_iterator : std::false_type {}; +template +struct is_back_insert_iterator> + : std::true_type {}; + +// A type-erased reference to an std::locale to avoid a heavy include. +class locale_ref { + private: + const void* locale_; // A type-erased pointer to std::locale. public: - using std::back_insert_iterator>::back_insert_iterator; - appender(base it) noexcept : base(it) {} - FMT_UNCHECKED_ITERATOR(appender); + constexpr FMT_INLINE locale_ref() : locale_(nullptr) {} + template explicit locale_ref(const Locale& loc); - auto operator++() noexcept -> appender& { return *this; } - auto operator++(int) noexcept -> appender { return *this; } + explicit operator bool() const noexcept { return locale_ != nullptr; } + + template auto get() const -> Locale; }; -// A formatting argument. It is a trivially copyable/constructible type to -// allow storage in basic_memory_buffer. +template constexpr auto encode_types() -> unsigned long long { + return 0; +} + +template +constexpr auto encode_types() -> unsigned long long { + return static_cast(mapped_type_constant::value) | + (encode_types() << packed_arg_bits); +} + +#if defined(__cpp_if_constexpr) +// This type is intentionally undefined, only used for errors +template struct type_is_unformattable_for; +#endif + +template +FMT_CONSTEXPR FMT_INLINE auto make_arg(T& val) -> value { + using arg_type = remove_cvref_t().map(val))>; + + constexpr bool formattable_char = + !std::is_same::value; + static_assert(formattable_char, "Mixing character types is disallowed."); + + // Formatting of arbitrary pointers is disallowed. If you want to format a + // pointer cast it to `void*` or `const void*`. In particular, this forbids + // formatting of `[const] volatile char*` printed as bool by iostreams. + constexpr bool formattable_pointer = + !std::is_same::value; + static_assert(formattable_pointer, + "Formatting of non-void pointers is disallowed."); + + constexpr bool formattable = !std::is_same::value; +#if defined(__cpp_if_constexpr) + if constexpr (!formattable) { + type_is_unformattable_for _; + } +#endif + static_assert( + formattable, + "Cannot format an argument. To make type T formattable provide a " + "formatter specialization: https://fmt.dev/latest/api.html#udt"); + return {arg_mapper().map(val)}; +} + +template +FMT_CONSTEXPR auto make_arg(T& val) -> basic_format_arg { + auto arg = basic_format_arg(); + arg.type_ = mapped_type_constant::value; + arg.value_ = make_arg(val); + return arg; +} + +template +FMT_CONSTEXPR inline auto make_arg(T& val) -> basic_format_arg { + return make_arg(val); +} +} // namespace detail +FMT_BEGIN_EXPORT + +// A formatting argument. Context is a template parameter for the compiled API +// where output can be unbuffered. template class basic_format_arg { private: detail::value value_; detail::type type_; template - friend FMT_CONSTEXPR auto detail::make_arg(T&& value) + friend FMT_CONSTEXPR auto detail::make_arg(T& value) -> basic_format_arg; template @@ -1545,6 +1670,15 @@ template class basic_format_arg { auto is_arithmetic() const -> bool { return detail::is_arithmetic_type(type_); } + + FMT_INLINE auto format_custom(const char_type* parse_begin, + typename Context::parse_context_type& parse_ctx, + Context& ctx) -> bool { + if (type_ != detail::type::custom_type) return false; + parse_ctx.advance_to(parse_begin); + value_.custom.format(value_.custom.value, parse_ctx, ctx); + return true; + } }; /** @@ -1554,7 +1688,7 @@ template class basic_format_arg { ``vis(value)`` will be called with the value of type ``double``. \endrst */ -FMT_MODULE_EXPORT +// DEPRECATED! template FMT_CONSTEXPR FMT_INLINE auto visit_format_arg( Visitor&& vis, const basic_format_arg& arg) -> decltype(vis(0)) { @@ -1596,123 +1730,6 @@ FMT_CONSTEXPR FMT_INLINE auto visit_format_arg( return vis(monostate()); } -namespace detail { - -template -auto copy_str(InputIt begin, InputIt end, appender out) -> appender { - get_container(out).append(begin, end); - return out; -} - -template -FMT_CONSTEXPR auto copy_str(R&& rng, OutputIt out) -> OutputIt { - return detail::copy_str(rng.begin(), rng.end(), out); -} - -#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500 -// A workaround for gcc 4.8 to make void_t work in a SFINAE context. -template struct void_t_impl { using type = void; }; -template using void_t = typename void_t_impl::type; -#else -template using void_t = void; -#endif - -template -struct is_output_iterator : std::false_type {}; - -template -struct is_output_iterator< - It, T, - void_t::iterator_category, - decltype(*std::declval() = std::declval())>> - : std::true_type {}; - -template struct is_back_insert_iterator : std::false_type {}; -template -struct is_back_insert_iterator> - : std::true_type {}; - -template -struct is_contiguous_back_insert_iterator : std::false_type {}; -template -struct is_contiguous_back_insert_iterator> - : is_contiguous {}; -template <> -struct is_contiguous_back_insert_iterator : std::true_type {}; - -// A type-erased reference to an std::locale to avoid a heavy include. -class locale_ref { - private: - const void* locale_; // A type-erased pointer to std::locale. - - public: - constexpr FMT_INLINE locale_ref() : locale_(nullptr) {} - template explicit locale_ref(const Locale& loc); - - explicit operator bool() const noexcept { return locale_ != nullptr; } - - template auto get() const -> Locale; -}; - -template constexpr auto encode_types() -> unsigned long long { - return 0; -} - -template -constexpr auto encode_types() -> unsigned long long { - return static_cast(mapped_type_constant::value) | - (encode_types() << packed_arg_bits); -} - -template -FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value { - using arg_type = remove_cvref_t().map(val))>; - - constexpr bool formattable_char = - !std::is_same::value; - static_assert(formattable_char, "Mixing character types is disallowed."); - - // Formatting of arbitrary pointers is disallowed. If you want to format a - // pointer cast it to `void*` or `const void*`. In particular, this forbids - // formatting of `[const] volatile char*` printed as bool by iostreams. - constexpr bool formattable_pointer = - !std::is_same::value; - static_assert(formattable_pointer, - "Formatting of non-void pointers is disallowed."); - - constexpr bool formattable = !std::is_same::value; - static_assert( - formattable, - "Cannot format an argument. To make type T formattable provide a " - "formatter specialization: https://fmt.dev/latest/api.html#udt"); - return {arg_mapper().map(val)}; -} - -template -FMT_CONSTEXPR auto make_arg(T&& value) -> basic_format_arg { - auto arg = basic_format_arg(); - arg.type_ = mapped_type_constant::value; - arg.value_ = make_value(value); - return arg; -} - -// The DEPRECATED type template parameter is there to avoid an ODR violation -// when using a fallback formatter in one translation unit and an implicit -// conversion in another (not recommended). -template -FMT_CONSTEXPR FMT_INLINE auto make_arg(T&& val) -> value { - return make_value(val); -} - -template -FMT_CONSTEXPR inline auto make_arg(T&& value) -> basic_format_arg { - return make_arg(value); -} -} // namespace detail -FMT_BEGIN_EXPORT - // Formatting context. template class basic_format_context { private: @@ -1750,6 +1767,7 @@ template class basic_format_context { } auto args() const -> const format_args& { return args_; } + // DEPRECATED! FMT_CONSTEXPR auto error_handler() -> detail::error_handler { return {}; } void on_error(const char* message) { error_handler().on_error(message); } @@ -1772,7 +1790,7 @@ using format_context = buffer_context; template using is_formattable = bool_constant>() - .map(std::declval()))>::value>; + .map(std::declval()))>::value>; /** \rst @@ -1790,7 +1808,7 @@ class format_arg_store { private: static const size_t num_args = sizeof...(Args); - static const size_t num_named_args = detail::count_named_args(); + static constexpr size_t num_named_args = detail::count_named_args(); static const bool is_packed = num_args <= detail::max_packed_args; using value_type = conditional_t, @@ -1811,16 +1829,14 @@ class format_arg_store public: template - FMT_CONSTEXPR FMT_INLINE format_arg_store(T&&... args) + FMT_CONSTEXPR FMT_INLINE format_arg_store(T&... args) : #if FMT_GCC_VERSION && FMT_GCC_VERSION < 409 basic_format_args(*this), #endif - data_{detail::make_arg< - is_packed, Context, - detail::mapped_type_constant, Context>::value>( - FMT_FORWARD(args))...} { - detail::init_named_args(data_.named_args(), 0, 0, args...); + data_{detail::make_arg(args)...} { + if (detail::const_check(num_named_args != 0)) + detail::init_named_args(data_.named_args(), 0, 0, args...); } }; @@ -1828,14 +1844,15 @@ class format_arg_store \rst Constructs a `~fmt::format_arg_store` object that contains references to arguments and can be implicitly converted to `~fmt::format_args`. `Context` - can be omitted in which case it defaults to `~fmt::context`. + can be omitted in which case it defaults to `~fmt::format_context`. See `~fmt::arg` for lifetime considerations. \endrst */ +// Arguments are taken by lvalue references to avoid some lifetime issues. template -constexpr auto make_format_args(T&&... args) +constexpr auto make_format_args(T&... args) -> format_arg_store...> { - return {FMT_FORWARD(args)...}; + return {args...}; } /** @@ -1863,7 +1880,7 @@ FMT_END_EXPORT ``vformat``:: void vlog(string_view format_str, format_args args); // OK - format_args args = make_format_args(42); // Error: dangling reference + format_args args = make_format_args(); // Error: dangling reference \endrst */ template class basic_format_args { @@ -1980,7 +1997,7 @@ template class basic_format_args { /** An alias to ``basic_format_args``. */ // A separate type would result in shorter symbols but break ABI compatibility // between clang and gcc on ARM (#1919). -FMT_MODULE_EXPORT using format_args = basic_format_args; +FMT_EXPORT using format_args = basic_format_args; // We cannot use enum classes as bit fields because of a gcc bug, so we put them // in namespaces instead (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414). @@ -2312,9 +2329,12 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs( dynamic_format_specs& specs; type arg_type; - FMT_CONSTEXPR auto operator()(pres type, int set) -> const Char* { - if (!in(arg_type, set)) throw_format_error("invalid format specifier"); - specs.type = type; + FMT_CONSTEXPR auto operator()(pres pres_type, int set) -> const Char* { + if (!in(arg_type, set)) { + if (arg_type == type::none_type) return begin; + throw_format_error("invalid format specifier"); + } + specs.type = pres_type; return begin + 1; } } parse_presentation_type{begin, specs, arg_type}; @@ -2331,6 +2351,7 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs( case '+': case '-': case ' ': + if (arg_type == type::none_type) return begin; enter_state(state::sign, in(arg_type, sint_set | float_set)); switch (c) { case '+': @@ -2346,14 +2367,17 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs( ++begin; break; case '#': + if (arg_type == type::none_type) return begin; enter_state(state::hash, is_arithmetic_type(arg_type)); specs.alt = true; ++begin; break; case '0': enter_state(state::zero); - if (!is_arithmetic_type(arg_type)) + if (!is_arithmetic_type(arg_type)) { + if (arg_type == type::none_type) return begin; throw_format_error("format specifier requires numeric argument"); + } if (specs.align == align::none) { // Ignore 0 if align is specified for compatibility with std::format. specs.align = align::numeric; @@ -2375,12 +2399,14 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs( begin = parse_dynamic_spec(begin, end, specs.width, specs.width_ref, ctx); break; case '.': + if (arg_type == type::none_type) return begin; enter_state(state::precision, in(arg_type, float_set | string_set | cstring_set)); begin = parse_precision(begin, end, specs.precision, specs.precision_ref, ctx); break; case 'L': + if (arg_type == type::none_type) return begin; enter_state(state::locale, is_arithmetic_type(arg_type)); specs.localized = true; ++begin; @@ -2414,6 +2440,8 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs( case 'G': return parse_presentation_type(pres::general_upper, float_set); case 'c': + if (arg_type == type::bool_type) + throw_format_error("invalid format specifier"); return parse_presentation_type(pres::chr, integral_set); case 's': return parse_presentation_type(pres::string, @@ -2552,7 +2580,17 @@ FMT_CONSTEXPR auto parse_format_specs(ParseContext& ctx) mapped_type_constant::value != type::custom_type, decltype(arg_mapper().map(std::declval())), typename strip_named_arg::type>; +#if defined(__cpp_if_constexpr) + if constexpr (std::is_default_constructible< + formatter>::value) { + return formatter().parse(ctx); + } else { + type_is_unformattable_for _; + return ctx.begin(); + } +#else return formatter().parse(ctx); +#endif } // Checks char specs and returns true iff the presentation type is char-like. @@ -2568,8 +2606,6 @@ FMT_CONSTEXPR auto check_char_specs(const format_specs& specs) -> bool { return true; } -constexpr FMT_INLINE_VARIABLE int invalid_arg_index = -1; - #if FMT_USE_NONTYPE_TEMPLATE_ARGS template constexpr auto get_arg_index_by_name(basic_string_view name) -> int { @@ -2579,7 +2615,7 @@ constexpr auto get_arg_index_by_name(basic_string_view name) -> int { if constexpr (sizeof...(Args) > 0) return get_arg_index_by_name(name); (void)name; // Workaround an MSVC bug about "unused" parameter. - return invalid_arg_index; + return -1; } #endif @@ -2590,7 +2626,7 @@ FMT_CONSTEXPR auto get_arg_index_by_name(basic_string_view name) -> int { return get_arg_index_by_name<0, Args...>(name); #endif (void)name; - return invalid_arg_index; + return -1; } template class format_string_checker { @@ -2604,15 +2640,15 @@ template class format_string_checker { // needed for compile-time checks: https://godbolt.org/z/GvWzcTjh1. using parse_func = const Char* (*)(parse_context_type&); + type types_[num_args > 0 ? static_cast(num_args) : 1]; parse_context_type context_; parse_func parse_funcs_[num_args > 0 ? static_cast(num_args) : 1]; - type types_[num_args > 0 ? static_cast(num_args) : 1]; public: explicit FMT_CONSTEXPR format_string_checker(basic_string_view fmt) - : context_(fmt, num_args, types_), - parse_funcs_{&parse_format_specs...}, - types_{mapped_type_constant>::value...} {} + : types_{mapped_type_constant>::value...}, + context_(fmt, num_args, types_), + parse_funcs_{&parse_format_specs...} {} FMT_CONSTEXPR void on_text(const Char*, const Char*) {} @@ -2623,7 +2659,7 @@ template class format_string_checker { FMT_CONSTEXPR auto on_arg_id(basic_string_view id) -> int { #if FMT_USE_NONTYPE_TEMPLATE_ARGS auto index = get_arg_index_by_name(id); - if (index == invalid_arg_index) on_error("named argument is not found"); + if (index < 0) on_error("named argument is not found"); return index; #else (void)id; @@ -2632,7 +2668,9 @@ template class format_string_checker { #endif } - FMT_CONSTEXPR void on_replacement_field(int, const Char*) {} + FMT_CONSTEXPR void on_replacement_field(int id, const Char* begin) { + on_format_specs(id, begin, begin); // Call parse() on empty specs. + } FMT_CONSTEXPR auto on_format_specs(int id, const Char* begin, const Char*) -> const Char* { @@ -2669,7 +2707,9 @@ template struct vformat_args { using type = basic_format_args< basic_format_context>, Char>>; }; -template <> struct vformat_args { using type = format_args; }; +template <> struct vformat_args { + using type = format_args; +}; // Use vformat_args and avoid type_identity to keep symbols short. template @@ -2715,27 +2755,6 @@ struct formatter decltype(ctx.out()); }; -#define FMT_FORMAT_AS(Type, Base) \ - template \ - struct formatter : formatter { \ - template \ - auto format(const Type& val, FormatContext& ctx) const \ - -> decltype(ctx.out()) { \ - return formatter::format(static_cast(val), ctx); \ - } \ - } - -FMT_FORMAT_AS(signed char, int); -FMT_FORMAT_AS(unsigned char, unsigned); -FMT_FORMAT_AS(short, int); -FMT_FORMAT_AS(unsigned short, unsigned); -FMT_FORMAT_AS(long, long long); -FMT_FORMAT_AS(unsigned long, unsigned long long); -FMT_FORMAT_AS(Char*, const Char*); -FMT_FORMAT_AS(std::basic_string, basic_string_view); -FMT_FORMAT_AS(std::nullptr_t, const void*); -FMT_FORMAT_AS(detail::std_string_view, basic_string_view); - template struct runtime_format_string { basic_string_view str; }; diff --git a/src/3rdparty/fmt/format-inl.h b/src/3rdparty/fmt/format-inl.h index 5bae3c7b2c..e9a4ca453a 100644 --- a/src/3rdparty/fmt/format-inl.h +++ b/src/3rdparty/fmt/format-inl.h @@ -18,7 +18,7 @@ # include #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(FMT_WINDOWS_NO_WCHAR) # include // _isatty #endif @@ -58,8 +58,8 @@ FMT_FUNC void format_error_code(detail::buffer& out, int error_code, error_code_size += detail::to_unsigned(detail::count_digits(abs_value)); auto it = buffer_appender(out); if (message.size() <= inline_buffer_size - error_code_size) - format_to(it, FMT_STRING("{}{}"), message, SEP); - format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code); + fmt::format_to(it, FMT_STRING("{}{}"), message, SEP); + fmt::format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code); FMT_ASSERT(out.size() <= inline_buffer_size, ""); } @@ -73,9 +73,8 @@ FMT_FUNC void report_error(format_func func, int error_code, } // A wrapper around fwrite that throws on error. -inline void fwrite_fully(const void* ptr, size_t size, size_t count, - FILE* stream) { - size_t written = std::fwrite(ptr, size, count, stream); +inline void fwrite_fully(const void* ptr, size_t count, FILE* stream) { + size_t written = std::fwrite(ptr, 1, count, stream); if (written < count) FMT_THROW(system_error(errno, FMT_STRING("cannot write to file"))); } @@ -86,7 +85,7 @@ locale_ref::locale_ref(const Locale& loc) : locale_(&loc) { static_assert(std::is_same::value, ""); } -template Locale locale_ref::get() const { +template auto locale_ref::get() const -> Locale { static_assert(std::is_same::value, ""); return locale_ ? *static_cast(locale_) : std::locale(); } @@ -98,7 +97,8 @@ FMT_FUNC auto thousands_sep_impl(locale_ref loc) -> thousands_sep_result { auto thousands_sep = grouping.empty() ? Char() : facet.thousands_sep(); return {std::move(grouping), thousands_sep}; } -template FMT_FUNC Char decimal_point_impl(locale_ref loc) { +template +FMT_FUNC auto decimal_point_impl(locale_ref loc) -> Char { return std::use_facet>(loc.get()) .decimal_point(); } @@ -144,24 +144,25 @@ FMT_API FMT_FUNC auto format_facet::do_put( } #endif -FMT_FUNC std::system_error vsystem_error(int error_code, string_view fmt, - format_args args) { +FMT_FUNC auto vsystem_error(int error_code, string_view fmt, format_args args) + -> std::system_error { auto ec = std::error_code(error_code, std::generic_category()); return std::system_error(ec, vformat(fmt, args)); } namespace detail { -template inline bool operator==(basic_fp x, basic_fp y) { +template +inline auto operator==(basic_fp x, basic_fp y) -> bool { return x.f == y.f && x.e == y.e; } // Compilers should be able to optimize this into the ror instruction. -FMT_CONSTEXPR inline uint32_t rotr(uint32_t n, uint32_t r) noexcept { +FMT_CONSTEXPR inline auto rotr(uint32_t n, uint32_t r) noexcept -> uint32_t { r &= 31; return (n >> r) | (n << (32 - r)); } -FMT_CONSTEXPR inline uint64_t rotr(uint64_t n, uint32_t r) noexcept { +FMT_CONSTEXPR inline auto rotr(uint64_t n, uint32_t r) noexcept -> uint64_t { r &= 63; return (n >> r) | (n << (64 - r)); } @@ -170,14 +171,14 @@ FMT_CONSTEXPR inline uint64_t rotr(uint64_t n, uint32_t r) noexcept { namespace dragonbox { // Computes upper 64 bits of multiplication of a 32-bit unsigned integer and a // 64-bit unsigned integer. -inline uint64_t umul96_upper64(uint32_t x, uint64_t y) noexcept { +inline auto umul96_upper64(uint32_t x, uint64_t y) noexcept -> uint64_t { return umul128_upper64(static_cast(x) << 32, y); } // Computes lower 128 bits of multiplication of a 64-bit unsigned integer and a // 128-bit unsigned integer. -inline uint128_fallback umul192_lower128(uint64_t x, - uint128_fallback y) noexcept { +inline auto umul192_lower128(uint64_t x, uint128_fallback y) noexcept + -> uint128_fallback { uint64_t high = x * y.high(); uint128_fallback high_low = umul128(x, y.low()); return {high + high_low.high(), high_low.low()}; @@ -185,12 +186,12 @@ inline uint128_fallback umul192_lower128(uint64_t x, // Computes lower 64 bits of multiplication of a 32-bit unsigned integer and a // 64-bit unsigned integer. -inline uint64_t umul96_lower64(uint32_t x, uint64_t y) noexcept { +inline auto umul96_lower64(uint32_t x, uint64_t y) noexcept -> uint64_t { return x * y; } // Various fast log computations. -inline int floor_log10_pow2_minus_log10_4_over_3(int e) noexcept { +inline auto floor_log10_pow2_minus_log10_4_over_3(int e) noexcept -> int { FMT_ASSERT(e <= 2936 && e >= -2985, "too large exponent"); return (e * 631305 - 261663) >> 21; } @@ -204,7 +205,7 @@ FMT_INLINE_VARIABLE constexpr struct { // divisible by pow(10, N). // Precondition: n <= pow(10, N + 1). template -bool check_divisibility_and_divide_by_pow10(uint32_t& n) noexcept { +auto check_divisibility_and_divide_by_pow10(uint32_t& n) noexcept -> bool { // The numbers below are chosen such that: // 1. floor(n/d) = floor(nm / 2^k) where d=10 or d=100, // 2. nm mod 2^k < m if and only if n is divisible by d, @@ -229,7 +230,7 @@ bool check_divisibility_and_divide_by_pow10(uint32_t& n) noexcept { // Computes floor(n / pow(10, N)) for small n and N. // Precondition: n <= pow(10, N + 1). -template uint32_t small_division_by_pow10(uint32_t n) noexcept { +template auto small_division_by_pow10(uint32_t n) noexcept -> uint32_t { constexpr auto info = div_small_pow10_infos[N - 1]; FMT_ASSERT(n <= info.divisor * 10, "n is too large"); constexpr uint32_t magic_number = @@ -238,12 +239,12 @@ template uint32_t small_division_by_pow10(uint32_t n) noexcept { } // Computes floor(n / 10^(kappa + 1)) (float) -inline uint32_t divide_by_10_to_kappa_plus_1(uint32_t n) noexcept { +inline auto divide_by_10_to_kappa_plus_1(uint32_t n) noexcept -> uint32_t { // 1374389535 = ceil(2^37/100) return static_cast((static_cast(n) * 1374389535) >> 37); } // Computes floor(n / 10^(kappa + 1)) (double) -inline uint64_t divide_by_10_to_kappa_plus_1(uint64_t n) noexcept { +inline auto divide_by_10_to_kappa_plus_1(uint64_t n) noexcept -> uint64_t { // 2361183241434822607 = ceil(2^(64+7)/1000) return umul128_upper64(n, 2361183241434822607ull) >> 7; } @@ -255,7 +256,7 @@ template <> struct cache_accessor { using carrier_uint = float_info::carrier_uint; using cache_entry_type = uint64_t; - static uint64_t get_cached_power(int k) noexcept { + static auto get_cached_power(int k) noexcept -> uint64_t { FMT_ASSERT(k >= float_info::min_k && k <= float_info::max_k, "k is out of range"); static constexpr const uint64_t pow10_significands[] = { @@ -297,20 +298,23 @@ template <> struct cache_accessor { bool is_integer; }; - static compute_mul_result compute_mul( - carrier_uint u, const cache_entry_type& cache) noexcept { + static auto compute_mul(carrier_uint u, + const cache_entry_type& cache) noexcept + -> compute_mul_result { auto r = umul96_upper64(u, cache); return {static_cast(r >> 32), static_cast(r) == 0}; } - static uint32_t compute_delta(const cache_entry_type& cache, - int beta) noexcept { + static auto compute_delta(const cache_entry_type& cache, int beta) noexcept + -> uint32_t { return static_cast(cache >> (64 - 1 - beta)); } - static compute_mul_parity_result compute_mul_parity( - carrier_uint two_f, const cache_entry_type& cache, int beta) noexcept { + static auto compute_mul_parity(carrier_uint two_f, + const cache_entry_type& cache, + int beta) noexcept + -> compute_mul_parity_result { FMT_ASSERT(beta >= 1, ""); FMT_ASSERT(beta < 64, ""); @@ -319,22 +323,22 @@ template <> struct cache_accessor { static_cast(r >> (32 - beta)) == 0}; } - static carrier_uint compute_left_endpoint_for_shorter_interval_case( - const cache_entry_type& cache, int beta) noexcept { + static auto compute_left_endpoint_for_shorter_interval_case( + const cache_entry_type& cache, int beta) noexcept -> carrier_uint { return static_cast( (cache - (cache >> (num_significand_bits() + 2))) >> (64 - num_significand_bits() - 1 - beta)); } - static carrier_uint compute_right_endpoint_for_shorter_interval_case( - const cache_entry_type& cache, int beta) noexcept { + static auto compute_right_endpoint_for_shorter_interval_case( + const cache_entry_type& cache, int beta) noexcept -> carrier_uint { return static_cast( (cache + (cache >> (num_significand_bits() + 1))) >> (64 - num_significand_bits() - 1 - beta)); } - static carrier_uint compute_round_up_for_shorter_interval_case( - const cache_entry_type& cache, int beta) noexcept { + static auto compute_round_up_for_shorter_interval_case( + const cache_entry_type& cache, int beta) noexcept -> carrier_uint { return (static_cast( cache >> (64 - num_significand_bits() - 2 - beta)) + 1) / @@ -346,7 +350,7 @@ template <> struct cache_accessor { using carrier_uint = float_info::carrier_uint; using cache_entry_type = uint128_fallback; - static uint128_fallback get_cached_power(int k) noexcept { + static auto get_cached_power(int k) noexcept -> uint128_fallback { FMT_ASSERT(k >= float_info::min_k && k <= float_info::max_k, "k is out of range"); @@ -985,8 +989,7 @@ template <> struct cache_accessor { {0xe0accfa875af45a7, 0x93eb1b80a33b8606}, {0x8c6c01c9498d8b88, 0xbc72f130660533c4}, {0xaf87023b9bf0ee6a, 0xeb8fad7c7f8680b5}, - { 0xdb68c2ca82ed2a05, - 0xa67398db9f6820e2 } + {0xdb68c2ca82ed2a05, 0xa67398db9f6820e2}, #else {0xff77b1fcbebcdc4f, 0x25e8e89c13bb0f7b}, {0xce5d73ff402d98e3, 0xfb0a3d212dc81290}, @@ -1071,19 +1074,22 @@ template <> struct cache_accessor { bool is_integer; }; - static compute_mul_result compute_mul( - carrier_uint u, const cache_entry_type& cache) noexcept { + static auto compute_mul(carrier_uint u, + const cache_entry_type& cache) noexcept + -> compute_mul_result { auto r = umul192_upper128(u, cache); return {r.high(), r.low() == 0}; } - static uint32_t compute_delta(cache_entry_type const& cache, - int beta) noexcept { + static auto compute_delta(cache_entry_type const& cache, int beta) noexcept + -> uint32_t { return static_cast(cache.high() >> (64 - 1 - beta)); } - static compute_mul_parity_result compute_mul_parity( - carrier_uint two_f, const cache_entry_type& cache, int beta) noexcept { + static auto compute_mul_parity(carrier_uint two_f, + const cache_entry_type& cache, + int beta) noexcept + -> compute_mul_parity_result { FMT_ASSERT(beta >= 1, ""); FMT_ASSERT(beta < 64, ""); @@ -1092,35 +1098,35 @@ template <> struct cache_accessor { ((r.high() << beta) | (r.low() >> (64 - beta))) == 0}; } - static carrier_uint compute_left_endpoint_for_shorter_interval_case( - const cache_entry_type& cache, int beta) noexcept { + static auto compute_left_endpoint_for_shorter_interval_case( + const cache_entry_type& cache, int beta) noexcept -> carrier_uint { return (cache.high() - (cache.high() >> (num_significand_bits() + 2))) >> (64 - num_significand_bits() - 1 - beta); } - static carrier_uint compute_right_endpoint_for_shorter_interval_case( - const cache_entry_type& cache, int beta) noexcept { + static auto compute_right_endpoint_for_shorter_interval_case( + const cache_entry_type& cache, int beta) noexcept -> carrier_uint { return (cache.high() + (cache.high() >> (num_significand_bits() + 1))) >> (64 - num_significand_bits() - 1 - beta); } - static carrier_uint compute_round_up_for_shorter_interval_case( - const cache_entry_type& cache, int beta) noexcept { + static auto compute_round_up_for_shorter_interval_case( + const cache_entry_type& cache, int beta) noexcept -> carrier_uint { return ((cache.high() >> (64 - num_significand_bits() - 2 - beta)) + 1) / 2; } }; -FMT_FUNC uint128_fallback get_cached_power(int k) noexcept { +FMT_FUNC auto get_cached_power(int k) noexcept -> uint128_fallback { return cache_accessor::get_cached_power(k); } // Various integer checks template -bool is_left_endpoint_integer_shorter_interval(int exponent) noexcept { +auto is_left_endpoint_integer_shorter_interval(int exponent) noexcept -> bool { const int case_shorter_interval_left_endpoint_lower_threshold = 2; const int case_shorter_interval_left_endpoint_upper_threshold = 3; return exponent >= case_shorter_interval_left_endpoint_lower_threshold && @@ -1128,16 +1134,12 @@ bool is_left_endpoint_integer_shorter_interval(int exponent) noexcept { } // Remove trailing zeros from n and return the number of zeros removed (float) -FMT_INLINE int remove_trailing_zeros(uint32_t& n) noexcept { +FMT_INLINE int remove_trailing_zeros(uint32_t& n, int s = 0) noexcept { FMT_ASSERT(n != 0, ""); // Modular inverse of 5 (mod 2^32): (mod_inv_5 * 5) mod 2^32 = 1. - // See https://github.com/fmtlib/fmt/issues/3163 for more details. - const uint32_t mod_inv_5 = 0xcccccccd; - // Casts are needed to workaround a bug in MSVC 19.22 and older. - const uint32_t mod_inv_25 = - static_cast(uint64_t(mod_inv_5) * mod_inv_5); + constexpr uint32_t mod_inv_5 = 0xcccccccd; + constexpr uint32_t mod_inv_25 = 0xc28f5c29; // = mod_inv_5 * mod_inv_5 - int s = 0; while (true) { auto q = rotr(n * mod_inv_25, 2); if (q > max_value() / 100) break; @@ -1162,32 +1164,17 @@ FMT_INLINE int remove_trailing_zeros(uint64_t& n) noexcept { // Is n is divisible by 10^8? if ((nm.high() & ((1ull << (90 - 64)) - 1)) == 0 && nm.low() < magic_number) { - // If yes, work with the quotient. + // If yes, work with the quotient... auto n32 = static_cast(nm.high() >> (90 - 64)); - - const uint32_t mod_inv_5 = 0xcccccccd; - const uint32_t mod_inv_25 = mod_inv_5 * mod_inv_5; - - int s = 8; - while (true) { - auto q = rotr(n32 * mod_inv_25, 2); - if (q > max_value() / 100) break; - n32 = q; - s += 2; - } - auto q = rotr(n32 * mod_inv_5, 1); - if (q <= max_value() / 10) { - n32 = q; - s |= 1; - } - + // ... and use the 32 bit variant of the function + int s = remove_trailing_zeros(n32, 8); n = n32; return s; } // If n is not divisible by 10^8, work with n itself. - const uint64_t mod_inv_5 = 0xcccccccccccccccd; - const uint64_t mod_inv_25 = mod_inv_5 * mod_inv_5; + constexpr uint64_t mod_inv_5 = 0xcccccccccccccccd; + constexpr uint64_t mod_inv_25 = 0x8f5c28f5c28f5c29; // mod_inv_5 * mod_inv_5 int s = 0; while (true) { @@ -1253,7 +1240,7 @@ FMT_INLINE decimal_fp shorter_interval_case(int exponent) noexcept { return ret_value; } -template decimal_fp to_decimal(T x) noexcept { +template auto to_decimal(T x) noexcept -> decimal_fp { // Step 1: integer promotion & Schubfach multiplier calculation. using carrier_uint = typename float_info::carrier_uint; @@ -1392,15 +1379,15 @@ template <> struct formatter { for (auto i = n.bigits_.size(); i > 0; --i) { auto value = n.bigits_[i - 1u]; if (first) { - out = format_to(out, FMT_STRING("{:x}"), value); + out = fmt::format_to(out, FMT_STRING("{:x}"), value); first = false; continue; } - out = format_to(out, FMT_STRING("{:08x}"), value); + out = fmt::format_to(out, FMT_STRING("{:08x}"), value); } if (n.exp_ > 0) - out = format_to(out, FMT_STRING("p{}"), - n.exp_ * detail::bigint::bigit_bits); + out = fmt::format_to(out, FMT_STRING("p{}"), + n.exp_ * detail::bigint::bigit_bits); return out; } }; @@ -1436,7 +1423,7 @@ FMT_FUNC void report_system_error(int error_code, report_error(format_system_error, error_code, message); } -FMT_FUNC std::string vformat(string_view fmt, format_args args) { +FMT_FUNC auto vformat(string_view fmt, format_args args) -> std::string { // Don't optimize the "{}" case to keep the binary size small and because it // can be better optimized in fmt::format anyway. auto buffer = memory_buffer(); @@ -1445,33 +1432,38 @@ FMT_FUNC std::string vformat(string_view fmt, format_args args) { } namespace detail { -#ifndef _WIN32 -FMT_FUNC bool write_console(std::FILE*, string_view) { return false; } +#if !defined(_WIN32) || defined(FMT_WINDOWS_NO_WCHAR) +FMT_FUNC auto write_console(int, string_view) -> bool { return false; } #else using dword = conditional_t; extern "C" __declspec(dllimport) int __stdcall WriteConsoleW( // void*, const void*, dword, dword*, void*); -FMT_FUNC bool write_console(std::FILE* f, string_view text) { - auto fd = _fileno(f); - if (!_isatty(fd)) return false; +FMT_FUNC bool write_console(int fd, string_view text) { auto u16 = utf8_to_utf16(text); - auto written = dword(); return WriteConsoleW(reinterpret_cast(_get_osfhandle(fd)), u16.c_str(), - static_cast(u16.size()), &written, nullptr); + static_cast(u16.size()), nullptr, nullptr) != 0; } +#endif +#ifdef _WIN32 // Print assuming legacy (non-Unicode) encoding. FMT_FUNC void vprint_mojibake(std::FILE* f, string_view fmt, format_args args) { auto buffer = memory_buffer(); - detail::vformat_to(buffer, fmt, - basic_format_args>(args)); - fwrite_fully(buffer.data(), 1, buffer.size(), f); + detail::vformat_to(buffer, fmt, args); + fwrite_fully(buffer.data(), buffer.size(), f); } #endif FMT_FUNC void print(std::FILE* f, string_view text) { - if (!write_console(f, text)) fwrite_fully(text.data(), 1, text.size(), f); +#ifdef _WIN32 + int fd = _fileno(f); + if (_isatty(fd)) { + std::fflush(f); + if (write_console(fd, text)) return; + } +#endif + fwrite_fully(text.data(), text.size(), f); } } // namespace detail diff --git a/src/3rdparty/fmt/format.h b/src/3rdparty/fmt/format.h index ed8b29eba9..97f0e1fb12 100644 --- a/src/3rdparty/fmt/format.h +++ b/src/3rdparty/fmt/format.h @@ -43,14 +43,15 @@ #include // std::system_error #ifdef __cpp_lib_bit_cast -# include // std::bitcast +# include // std::bit_cast #endif #include "core.h" -#ifndef FMT_BEGIN_DETAIL_NAMESPACE -# define FMT_BEGIN_DETAIL_NAMESPACE namespace detail { -# define FMT_END_DETAIL_NAMESPACE } +#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L +# define FMT_INLINE_VARIABLE inline +#else +# define FMT_INLINE_VARIABLE #endif #if FMT_HAS_CPP17_ATTRIBUTE(fallthrough) @@ -78,16 +79,25 @@ # endif #endif -#if FMT_GCC_VERSION -# define FMT_GCC_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#else -# define FMT_GCC_VISIBILITY_HIDDEN +#ifndef FMT_NO_UNIQUE_ADDRESS +# if FMT_CPLUSPLUS >= 202002L +# if FMT_HAS_CPP_ATTRIBUTE(no_unique_address) +# define FMT_NO_UNIQUE_ADDRESS [[no_unique_address]] +// VS2019 v16.10 and later except clang-cl (https://reviews.llvm.org/D110485) +# elif (FMT_MSC_VERSION >= 1929) && !FMT_CLANG_VERSION +# define FMT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] +# endif +# endif +#endif +#ifndef FMT_NO_UNIQUE_ADDRESS +# define FMT_NO_UNIQUE_ADDRESS #endif -#ifdef __NVCC__ -# define FMT_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__) +// Visibility when compiled as a shared library/object. +#if defined(FMT_LIB_EXPORT) || defined(FMT_SHARED) +# define FMT_SO_VISIBILITY(value) FMT_VISIBILITY(value) #else -# define FMT_CUDA_VERSION 0 +# define FMT_SO_VISIBILITY(value) #endif #ifdef __has_builtin @@ -120,10 +130,8 @@ FMT_END_NAMESPACE # define FMT_THROW(x) throw x # endif # else -# define FMT_THROW(x) \ - do { \ - FMT_ASSERT(false, (x).what()); \ - } while (false) +# define FMT_THROW(x) \ + ::fmt::detail::assert_fail(__FILE__, __LINE__, (x).what()) # endif #endif @@ -145,7 +153,10 @@ FMT_END_NAMESPACE #ifndef FMT_USE_USER_DEFINED_LITERALS // EDG based compilers (Intel, NVIDIA, Elbrus, etc), GCC and MSVC support UDLs. -# if (FMT_HAS_FEATURE(cxx_user_literals) || FMT_GCC_VERSION >= 407 || \ +// +// GCC before 4.9 requires a space in `operator"" _a` which is invalid in later +// compiler versions. +# if (FMT_HAS_FEATURE(cxx_user_literals) || FMT_GCC_VERSION >= 409 || \ FMT_MSC_VERSION >= 1900) && \ (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= /* UDL feature */ 480) # define FMT_USE_USER_DEFINED_LITERALS 1 @@ -266,19 +277,6 @@ FMT_END_NAMESPACE #endif FMT_BEGIN_NAMESPACE - -template struct disjunction : std::false_type {}; -template struct disjunction

: P {}; -template -struct disjunction - : conditional_t> {}; - -template struct conjunction : std::true_type {}; -template struct conjunction

: P {}; -template -struct conjunction - : conditional_t, P1> {}; - namespace detail { FMT_CONSTEXPR inline void abort_fuzzing_if(bool condition) { @@ -300,37 +298,6 @@ template constexpr CharT string_literal::value[sizeof...(C)]; #endif -template class formatbuf : public Streambuf { - private: - using char_type = typename Streambuf::char_type; - using streamsize = decltype(std::declval().sputn(nullptr, 0)); - using int_type = typename Streambuf::int_type; - using traits_type = typename Streambuf::traits_type; - - buffer& buffer_; - - public: - explicit formatbuf(buffer& buf) : buffer_(buf) {} - - protected: - // The put area is always empty. This makes the implementation simpler and has - // the advantage that the streambuf and the buffer are always in sync and - // sputc never writes into uninitialized memory. A disadvantage is that each - // call to sputc always results in a (virtual) call to overflow. There is no - // disadvantage here for sputn since this always results in a call to xsputn. - - auto overflow(int_type ch) -> int_type override { - if (!traits_type::eq_int_type(ch, traits_type::eof())) - buffer_.push_back(static_cast(ch)); - return ch; - } - - auto xsputn(const char_type* s, streamsize count) -> streamsize override { - buffer_.append(s, s + count); - return count; - } -}; - // Implementation of std::bit_cast for pre-C++20. template FMT_CONSTEXPR20 auto bit_cast(const From& from) -> To { @@ -362,14 +329,12 @@ class uint128_fallback { private: uint64_t lo_, hi_; - friend uint128_fallback umul128(uint64_t x, uint64_t y) noexcept; - public: constexpr uint128_fallback(uint64_t hi, uint64_t lo) : lo_(lo), hi_(hi) {} constexpr uint128_fallback(uint64_t value = 0) : lo_(value), hi_(0) {} - constexpr uint64_t high() const noexcept { return hi_; } - constexpr uint64_t low() const noexcept { return lo_; } + constexpr auto high() const noexcept -> uint64_t { return hi_; } + constexpr auto low() const noexcept -> uint64_t { return lo_; } template ::value)> constexpr explicit operator T() const { @@ -445,7 +410,7 @@ class uint128_fallback { hi_ &= n.hi_; } - FMT_CONSTEXPR20 uint128_fallback& operator+=(uint64_t n) noexcept { + FMT_CONSTEXPR20 auto operator+=(uint64_t n) noexcept -> uint128_fallback& { if (is_constant_evaluated()) { lo_ += n; hi_ += (lo_ < n ? 1 : 0); @@ -536,6 +501,8 @@ FMT_INLINE void assume(bool condition) { (void)condition; #if FMT_HAS_BUILTIN(__builtin_assume) && !FMT_ICC_VERSION __builtin_assume(condition); +#elif FMT_GCC_VERSION + if (!condition) __builtin_unreachable(); #endif } @@ -554,20 +521,6 @@ inline auto get_data(Container& c) -> typename Container::value_type* { return c.data(); } -#if defined(_SECURE_SCL) && _SECURE_SCL -// Make a checked iterator to avoid MSVC warnings. -template using checked_ptr = stdext::checked_array_iterator; -template -constexpr auto make_checked(T* p, size_t size) -> checked_ptr { - return {p, size}; -} -#else -template using checked_ptr = T*; -template constexpr auto make_checked(T* p, size_t) -> T* { - return p; -} -#endif - // Attempts to reserve space for n extra characters in the output range. // Returns a pointer to the reserved range or a reference to it. template ::value)> @@ -575,12 +528,12 @@ template ::value)> __attribute__((no_sanitize("undefined"))) #endif inline auto -reserve(std::back_insert_iterator it, size_t n) - -> checked_ptr { +reserve(std::back_insert_iterator it, size_t n) -> + typename Container::value_type* { Container& c = get_container(it); size_t size = c.size(); c.resize(size + n); - return make_checked(get_data(c) + size, n); + return get_data(c) + size; } template @@ -612,8 +565,8 @@ template auto to_pointer(buffer_appender it, size_t n) -> T* { } template ::value)> -inline auto base_iterator(std::back_insert_iterator& it, - checked_ptr) +inline auto base_iterator(std::back_insert_iterator it, + typename Container::value_type*) -> std::back_insert_iterator { return it; } @@ -747,7 +700,7 @@ inline auto compute_width(basic_string_view s) -> size_t { } // Computes approximate display width of a UTF-8 string. -FMT_CONSTEXPR inline size_t compute_width(string_view s) { +FMT_CONSTEXPR inline auto compute_width(string_view s) -> size_t { size_t num_code_points = 0; // It is not a lambda for compatibility with C++14. struct count_code_points { @@ -794,12 +747,17 @@ inline auto code_point_index(basic_string_view s, size_t n) -> size_t { // Calculates the index of the nth code point in a UTF-8 string. inline auto code_point_index(string_view s, size_t n) -> size_t { - const char* data = s.data(); - size_t num_code_points = 0; - for (size_t i = 0, size = s.size(); i != size; ++i) { - if ((data[i] & 0xc0) != 0x80 && ++num_code_points > n) return i; - } - return s.size(); + size_t result = s.size(); + const char* begin = s.begin(); + for_each_codepoint(s, [begin, &n, &result](uint32_t, string_view sv) { + if (n != 0) { + --n; + return true; + } + result = to_unsigned(sv.begin() - begin); + return false; + }); + return result; } inline auto code_point_index(basic_string_view s, size_t n) @@ -881,7 +839,7 @@ void buffer::append(const U* begin, const U* end) { try_reserve(size_ + count); auto free_cap = capacity_ - size_; if (free_cap < count) count = free_cap; - std::uninitialized_copy_n(begin, count, make_checked(ptr_ + size_, count)); + std::uninitialized_copy_n(begin, count, ptr_ + size_); size_ += count; begin += count; } @@ -909,7 +867,7 @@ enum { inline_buffer_size = 500 }; **Example**:: auto out = fmt::memory_buffer(); - format_to(std::back_inserter(out), "The answer is {}.", 42); + fmt::format_to(std::back_inserter(out), "The answer is {}.", 42); This will append the following output to the ``out`` object: @@ -926,8 +884,8 @@ class basic_memory_buffer final : public detail::buffer { private: T store_[SIZE]; - // Don't inherit from Allocator avoid generating type_info for it. - Allocator alloc_; + // Don't inherit from Allocator to avoid generating type_info for it. + FMT_NO_UNIQUE_ADDRESS Allocator alloc_; // Deallocate memory allocated by the buffer. FMT_CONSTEXPR20 void deallocate() { @@ -948,9 +906,10 @@ class basic_memory_buffer final : public detail::buffer { T* old_data = this->data(); T* new_data = std::allocator_traits::allocate(alloc_, new_capacity); + // Suppress a bogus -Wstringop-overflow in gcc 13.1 (#3481). + detail::assume(this->size() <= new_capacity); // The following code doesn't throw, so the raw pointer above doesn't leak. - std::uninitialized_copy(old_data, old_data + this->size(), - detail::make_checked(new_data, new_capacity)); + std::uninitialized_copy_n(old_data, this->size(), new_data); this->set(new_data, new_capacity); // deallocate must not throw according to the standard, but even if it does, // the buffer already uses the new storage and will deallocate it in @@ -978,8 +937,7 @@ class basic_memory_buffer final : public detail::buffer { size_t size = other.size(), capacity = other.capacity(); if (data == other.store_) { this->set(store_, capacity); - detail::copy_str(other.store_, other.store_ + size, - detail::make_checked(store_, capacity)); + detail::copy_str(other.store_, other.store_ + size, store_); } else { this->set(data, capacity); // Set pointer to the inline array so that delete is not called @@ -1025,7 +983,6 @@ class basic_memory_buffer final : public detail::buffer { /** Increases the buffer capacity to *new_capacity*. */ void reserve(size_t new_capacity) { this->try_reserve(new_capacity); } - // Directly append data into the buffer using detail::buffer::append; template void append(const ContiguousRange& range) { @@ -1041,9 +998,10 @@ struct is_contiguous> : std::true_type { FMT_END_EXPORT namespace detail { -FMT_API bool write_console(std::FILE* f, string_view text); +FMT_API auto write_console(int fd, string_view text) -> bool; FMT_API void print(std::FILE*, string_view); } // namespace detail + FMT_BEGIN_EXPORT // Suppress a misleading warning in older versions of clang. @@ -1052,7 +1010,7 @@ FMT_BEGIN_EXPORT #endif /** An error reported from a formatting function. */ -class FMT_API format_error : public std::runtime_error { +class FMT_SO_VISIBILITY("default") format_error : public std::runtime_error { public: using std::runtime_error::runtime_error; }; @@ -1128,7 +1086,7 @@ template class format_facet : public Locale::facet { } }; -FMT_BEGIN_DETAIL_NAMESPACE +namespace detail { // Returns true if value is negative, false otherwise. // Same as `value < 0` but doesn't produce warnings if T is an unsigned type. @@ -1159,13 +1117,13 @@ using uint32_or_64_or_128_t = template using uint64_or_128_t = conditional_t() <= 64, uint64_t, uint128_t>; -#define FMT_POWERS_OF_10(factor) \ - factor * 10, (factor)*100, (factor)*1000, (factor)*10000, (factor)*100000, \ - (factor)*1000000, (factor)*10000000, (factor)*100000000, \ - (factor)*1000000000 +#define FMT_POWERS_OF_10(factor) \ + factor * 10, (factor) * 100, (factor) * 1000, (factor) * 10000, \ + (factor) * 100000, (factor) * 1000000, (factor) * 10000000, \ + (factor) * 100000000, (factor) * 1000000000 // Converts value in the range [0, 100) to a string. -constexpr const char* digits2(size_t value) { +constexpr auto digits2(size_t value) -> const char* { // GCC generates slightly better code when value is pointer-size. return &"0001020304050607080910111213141516171819" "2021222324252627282930313233343536373839" @@ -1175,7 +1133,7 @@ constexpr const char* digits2(size_t value) { } // Sign is a template parameter to workaround a bug in gcc 4.8. -template constexpr Char sign(Sign s) { +template constexpr auto sign(Sign s) -> Char { #if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 604 static_assert(std::is_same::value, ""); #endif @@ -1257,7 +1215,7 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int { FMT_INLINE auto do_count_digits(uint32_t n) -> int { // An optimization by Kendall Willets from https://bit.ly/3uOIQrB. // This increments the upper 32 bits (log10(T) - 1) when >= T is added. -# define FMT_INC(T) (((sizeof(# T) - 1ull) << 32) - T) +# define FMT_INC(T) (((sizeof(#T) - 1ull) << 32) - T) static constexpr uint64_t table[] = { FMT_INC(0), FMT_INC(0), FMT_INC(0), // 8 FMT_INC(10), FMT_INC(10), FMT_INC(10), // 64 @@ -1393,14 +1351,14 @@ FMT_CONSTEXPR auto format_uint(Char* buffer, UInt value, int num_digits, } template -inline auto format_uint(It out, UInt value, int num_digits, bool upper = false) - -> It { +FMT_CONSTEXPR inline auto format_uint(It out, UInt value, int num_digits, + bool upper = false) -> It { if (auto ptr = to_pointer(out, to_unsigned(num_digits))) { format_uint(ptr, value, num_digits, upper); return out; } // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). - char buffer[num_bits() / BASE_BITS + 1]; + char buffer[num_bits() / BASE_BITS + 1] = {}; format_uint(buffer, value, num_digits, upper); return detail::copy_str_noinline(buffer, buffer + num_digits, out); } @@ -1418,47 +1376,54 @@ class utf8_to_utf16 { auto str() const -> std::wstring { return {&buffer_[0], size()}; } }; +enum class to_utf8_error_policy { abort, replace }; + // A converter from UTF-16/UTF-32 (host endian) to UTF-8. -template -class unicode_to_utf8 { +template class to_utf8 { private: Buffer buffer_; public: - unicode_to_utf8() {} - explicit unicode_to_utf8(basic_string_view s) { + to_utf8() {} + explicit to_utf8(basic_string_view s, + to_utf8_error_policy policy = to_utf8_error_policy::abort) { static_assert(sizeof(WChar) == 2 || sizeof(WChar) == 4, "Expect utf16 or utf32"); - - if (!convert(s)) + if (!convert(s, policy)) FMT_THROW(std::runtime_error(sizeof(WChar) == 2 ? "invalid utf16" : "invalid utf32")); } operator string_view() const { return string_view(&buffer_[0], size()); } - size_t size() const { return buffer_.size() - 1; } - const char* c_str() const { return &buffer_[0]; } - std::string str() const { return std::string(&buffer_[0], size()); } + auto size() const -> size_t { return buffer_.size() - 1; } + auto c_str() const -> const char* { return &buffer_[0]; } + auto str() const -> std::string { return std::string(&buffer_[0], size()); } // Performs conversion returning a bool instead of throwing exception on // conversion error. This method may still throw in case of memory allocation // error. - bool convert(basic_string_view s) { - if (!convert(buffer_, s)) return false; + auto convert(basic_string_view s, + to_utf8_error_policy policy = to_utf8_error_policy::abort) + -> bool { + if (!convert(buffer_, s, policy)) return false; buffer_.push_back(0); return true; } - static bool convert(Buffer& buf, basic_string_view s) { + static auto convert(Buffer& buf, basic_string_view s, + to_utf8_error_policy policy = to_utf8_error_policy::abort) + -> bool { for (auto p = s.begin(); p != s.end(); ++p) { uint32_t c = static_cast(*p); if (sizeof(WChar) == 2 && c >= 0xd800 && c <= 0xdfff) { - // surrogate pair + // Handle a surrogate pair. ++p; if (p == s.end() || (c & 0xfc00) != 0xd800 || (*p & 0xfc00) != 0xdc00) { - return false; + if (policy == to_utf8_error_policy::abort) return false; + buf.append(string_view("\xEF\xBF\xBD")); + --p; + } else { + c = (c << 10) + static_cast(*p) - 0x35fdc00; } - c = (c << 10) + static_cast(*p) - 0x35fdc00; - } - if (c < 0x80) { + } else if (c < 0x80) { buf.push_back(static_cast(c)); } else if (c < 0x800) { buf.push_back(static_cast(0xc0 | (c >> 6))); @@ -1481,14 +1446,14 @@ class unicode_to_utf8 { }; // Computes 128-bit result of multiplication of two 64-bit unsigned integers. -inline uint128_fallback umul128(uint64_t x, uint64_t y) noexcept { +inline auto umul128(uint64_t x, uint64_t y) noexcept -> uint128_fallback { #if FMT_USE_INT128 auto p = static_cast(x) * static_cast(y); return {static_cast(p >> 64), static_cast(p)}; #elif defined(_MSC_VER) && defined(_M_X64) - auto result = uint128_fallback(); - result.lo_ = _umul128(x, y, &result.hi_); - return result; + auto hi = uint64_t(); + auto lo = _umul128(x, y, &hi); + return {hi, lo}; #else const uint64_t mask = static_cast(max_value()); @@ -1512,19 +1477,19 @@ inline uint128_fallback umul128(uint64_t x, uint64_t y) noexcept { namespace dragonbox { // Computes floor(log10(pow(2, e))) for e in [-2620, 2620] using the method from // https://fmt.dev/papers/Dragonbox.pdf#page=28, section 6.1. -inline int floor_log10_pow2(int e) noexcept { +inline auto floor_log10_pow2(int e) noexcept -> int { FMT_ASSERT(e <= 2620 && e >= -2620, "too large exponent"); static_assert((-1 >> 1) == -1, "right shift is not arithmetic"); return (e * 315653) >> 20; } -inline int floor_log2_pow10(int e) noexcept { +inline auto floor_log2_pow10(int e) noexcept -> int { FMT_ASSERT(e <= 1233 && e >= -1233, "too large exponent"); return (e * 1741647) >> 19; } // Computes upper 64 bits of multiplication of two 64-bit unsigned integers. -inline uint64_t umul128_upper64(uint64_t x, uint64_t y) noexcept { +inline auto umul128_upper64(uint64_t x, uint64_t y) noexcept -> uint64_t { #if FMT_USE_INT128 auto p = static_cast(x) * static_cast(y); return static_cast(p >> 64); @@ -1537,14 +1502,14 @@ inline uint64_t umul128_upper64(uint64_t x, uint64_t y) noexcept { // Computes upper 128 bits of multiplication of a 64-bit unsigned integer and a // 128-bit unsigned integer. -inline uint128_fallback umul192_upper128(uint64_t x, - uint128_fallback y) noexcept { +inline auto umul192_upper128(uint64_t x, uint128_fallback y) noexcept + -> uint128_fallback { uint128_fallback r = umul128(x, y.high()); r += umul128_upper64(x, y.low()); return r; } -FMT_API uint128_fallback get_cached_power(int k) noexcept; +FMT_API auto get_cached_power(int k) noexcept -> uint128_fallback; // Type-specific information that Dragonbox uses. template struct float_info; @@ -1598,14 +1563,14 @@ template FMT_API auto to_decimal(T x) noexcept -> decimal_fp; } // namespace dragonbox // Returns true iff Float has the implicit bit which is not stored. -template constexpr bool has_implicit_bit() { +template constexpr auto has_implicit_bit() -> bool { // An 80-bit FP number has a 64-bit significand an no implicit bit. return std::numeric_limits::digits != 64; } // Returns the number of significand bits stored in Float. The implicit bit is // not counted since it is not stored. -template constexpr int num_significand_bits() { +template constexpr auto num_significand_bits() -> int { // std::numeric_limits may not support __float128. return is_float128() ? 112 : (std::numeric_limits::digits - @@ -1698,7 +1663,7 @@ using fp = basic_fp; // Normalizes the value converted from double and multiplied by (1 << SHIFT). template -FMT_CONSTEXPR basic_fp normalize(basic_fp value) { +FMT_CONSTEXPR auto normalize(basic_fp value) -> basic_fp { // Handle subnormals. const auto implicit_bit = F(1) << num_significand_bits(); const auto shifted_implicit_bit = implicit_bit << SHIFT; @@ -1715,7 +1680,7 @@ FMT_CONSTEXPR basic_fp normalize(basic_fp value) { } // Computes lhs * rhs / pow(2, 64) rounded to nearest with half-up tie breaking. -FMT_CONSTEXPR inline uint64_t multiply(uint64_t lhs, uint64_t rhs) { +FMT_CONSTEXPR inline auto multiply(uint64_t lhs, uint64_t rhs) -> uint64_t { #if FMT_USE_INT128 auto product = static_cast<__uint128_t>(lhs) * rhs; auto f = static_cast(product >> 64); @@ -1732,124 +1697,13 @@ FMT_CONSTEXPR inline uint64_t multiply(uint64_t lhs, uint64_t rhs) { #endif } -FMT_CONSTEXPR inline fp operator*(fp x, fp y) { +FMT_CONSTEXPR inline auto operator*(fp x, fp y) -> fp { return {multiply(x.f, y.f), x.e + y.e + 64}; } -template struct basic_data { - // Normalized 64-bit significands of pow(10, k), for k = -348, -340, ..., 340. - // These are generated by support/compute-powers.py. - static constexpr uint64_t pow10_significands[87] = { - 0xfa8fd5a0081c0288, 0xbaaee17fa23ebf76, 0x8b16fb203055ac76, - 0xcf42894a5dce35ea, 0x9a6bb0aa55653b2d, 0xe61acf033d1a45df, - 0xab70fe17c79ac6ca, 0xff77b1fcbebcdc4f, 0xbe5691ef416bd60c, - 0x8dd01fad907ffc3c, 0xd3515c2831559a83, 0x9d71ac8fada6c9b5, - 0xea9c227723ee8bcb, 0xaecc49914078536d, 0x823c12795db6ce57, - 0xc21094364dfb5637, 0x9096ea6f3848984f, 0xd77485cb25823ac7, - 0xa086cfcd97bf97f4, 0xef340a98172aace5, 0xb23867fb2a35b28e, - 0x84c8d4dfd2c63f3b, 0xc5dd44271ad3cdba, 0x936b9fcebb25c996, - 0xdbac6c247d62a584, 0xa3ab66580d5fdaf6, 0xf3e2f893dec3f126, - 0xb5b5ada8aaff80b8, 0x87625f056c7c4a8b, 0xc9bcff6034c13053, - 0x964e858c91ba2655, 0xdff9772470297ebd, 0xa6dfbd9fb8e5b88f, - 0xf8a95fcf88747d94, 0xb94470938fa89bcf, 0x8a08f0f8bf0f156b, - 0xcdb02555653131b6, 0x993fe2c6d07b7fac, 0xe45c10c42a2b3b06, - 0xaa242499697392d3, 0xfd87b5f28300ca0e, 0xbce5086492111aeb, - 0x8cbccc096f5088cc, 0xd1b71758e219652c, 0x9c40000000000000, - 0xe8d4a51000000000, 0xad78ebc5ac620000, 0x813f3978f8940984, - 0xc097ce7bc90715b3, 0x8f7e32ce7bea5c70, 0xd5d238a4abe98068, - 0x9f4f2726179a2245, 0xed63a231d4c4fb27, 0xb0de65388cc8ada8, - 0x83c7088e1aab65db, 0xc45d1df942711d9a, 0x924d692ca61be758, - 0xda01ee641a708dea, 0xa26da3999aef774a, 0xf209787bb47d6b85, - 0xb454e4a179dd1877, 0x865b86925b9bc5c2, 0xc83553c5c8965d3d, - 0x952ab45cfa97a0b3, 0xde469fbd99a05fe3, 0xa59bc234db398c25, - 0xf6c69a72a3989f5c, 0xb7dcbf5354e9bece, 0x88fcf317f22241e2, - 0xcc20ce9bd35c78a5, 0x98165af37b2153df, 0xe2a0b5dc971f303a, - 0xa8d9d1535ce3b396, 0xfb9b7cd9a4a7443c, 0xbb764c4ca7a44410, - 0x8bab8eefb6409c1a, 0xd01fef10a657842c, 0x9b10a4e5e9913129, - 0xe7109bfba19c0c9d, 0xac2820d9623bf429, 0x80444b5e7aa7cf85, - 0xbf21e44003acdd2d, 0x8e679c2f5e44ff8f, 0xd433179d9c8cb841, - 0x9e19db92b4e31ba9, 0xeb96bf6ebadf77d9, 0xaf87023b9bf0ee6b, - }; - -#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409 -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wnarrowing" -#endif - // Binary exponents of pow(10, k), for k = -348, -340, ..., 340, corresponding - // to significands above. - static constexpr int16_t pow10_exponents[87] = { - -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954, - -927, -901, -874, -847, -821, -794, -768, -741, -715, -688, -661, - -635, -608, -582, -555, -529, -502, -475, -449, -422, -396, -369, - -343, -316, -289, -263, -236, -210, -183, -157, -130, -103, -77, - -50, -24, 3, 30, 56, 83, 109, 136, 162, 189, 216, - 242, 269, 295, 322, 348, 375, 402, 428, 455, 481, 508, - 534, 561, 588, 614, 641, 667, 694, 720, 747, 774, 800, - 827, 853, 880, 907, 933, 960, 986, 1013, 1039, 1066}; -#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409 -# pragma GCC diagnostic pop -#endif - - static constexpr uint64_t power_of_10_64[20] = { - 1, FMT_POWERS_OF_10(1ULL), FMT_POWERS_OF_10(1000000000ULL), - 10000000000000000000ULL}; - - // For checking rounding thresholds. - // The kth entry is chosen to be the smallest integer such that the - // upper 32-bits of 10^(k+1) times it is strictly bigger than 5 * 10^k. - static constexpr uint32_t fractional_part_rounding_thresholds[8] = { - 2576980378, // ceil(2^31 + 2^32/10^1) - 2190433321, // ceil(2^31 + 2^32/10^2) - 2151778616, // ceil(2^31 + 2^32/10^3) - 2147913145, // ceil(2^31 + 2^32/10^4) - 2147526598, // ceil(2^31 + 2^32/10^5) - 2147487943, // ceil(2^31 + 2^32/10^6) - 2147484078, // ceil(2^31 + 2^32/10^7) - 2147483691 // ceil(2^31 + 2^32/10^8) - }; -}; - -#if FMT_CPLUSPLUS < 201703L -template constexpr uint64_t basic_data::pow10_significands[]; -template constexpr int16_t basic_data::pow10_exponents[]; -template constexpr uint64_t basic_data::power_of_10_64[]; -template -constexpr uint32_t basic_data::fractional_part_rounding_thresholds[]; -#endif - -// This is a struct rather than an alias to avoid shadowing warnings in gcc. -struct data : basic_data<> {}; - -// Returns a cached power of 10 `c_k = c_k.f * pow(2, c_k.e)` such that its -// (binary) exponent satisfies `min_exponent <= c_k.e <= min_exponent + 28`. -FMT_CONSTEXPR inline fp get_cached_power(int min_exponent, - int& pow10_exponent) { - const int shift = 32; - // log10(2) = 0x0.4d104d427de7fbcc... - const int64_t significand = 0x4d104d427de7fbcc; - int index = static_cast( - ((min_exponent + fp::num_significand_bits - 1) * (significand >> shift) + - ((int64_t(1) << shift) - 1)) // ceil - >> 32 // arithmetic shift - ); - // Decimal exponent of the first (smallest) cached power of 10. - const int first_dec_exp = -348; - // Difference between 2 consecutive decimal exponents in cached powers of 10. - const int dec_exp_step = 8; - index = (index - first_dec_exp - 1) / dec_exp_step + 1; - pow10_exponent = first_dec_exp + index * dec_exp_step; - // Using *(x + index) instead of x[index] avoids an issue with some compilers - // using the EDG frontend (e.g. nvhpc/22.3 in C++17 mode). - return {*(data::pow10_significands + index), - *(data::pow10_exponents + index)}; -} - -template +template () == num_bits()> using convert_float_result = - conditional_t::value || - std::numeric_limits::digits == - std::numeric_limits::digits, - double, T>; + conditional_t::value || doublish, double, T>; template constexpr auto convert_float(T value) -> convert_float_result { @@ -1970,7 +1824,7 @@ inline auto find_escape(const char* begin, const char* end) [] { \ /* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \ /* Use a macro-like name to avoid shadowing warnings. */ \ - struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base { \ + struct FMT_VISIBILITY("hidden") FMT_COMPILE_STRING : base { \ using char_type FMT_MAYBE_UNUSED = fmt::remove_cvref_t; \ FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \ operator fmt::basic_string_view() const { \ @@ -2065,11 +1919,13 @@ auto write_escaped_string(OutputIt out, basic_string_view str) template auto write_escaped_char(OutputIt out, Char v) -> OutputIt { + Char v_array[1] = {v}; *out++ = static_cast('\''); if ((needs_escape(static_cast(v)) && v != static_cast('"')) || v == static_cast('\'')) { - out = write_escaped_cp( - out, find_escape_result{&v, &v + 1, static_cast(v)}); + out = write_escaped_cp(out, + find_escape_result{v_array, v_array + 1, + static_cast(v)}); } else { *out++ = v; } @@ -2158,10 +2014,10 @@ template class digit_grouping { std::string::const_iterator group; int pos; }; - next_state initial_state() const { return {grouping_.begin(), 0}; } + auto initial_state() const -> next_state { return {grouping_.begin(), 0}; } // Returns the next digit group separator position. - int next(next_state& state) const { + auto next(next_state& state) const -> int { if (thousands_sep_.empty()) return max_value(); if (state.group == grouping_.end()) return state.pos += grouping_.back(); if (*state.group <= 0 || *state.group == max_value()) @@ -2180,9 +2036,9 @@ template class digit_grouping { digit_grouping(std::string grouping, std::basic_string sep) : grouping_(std::move(grouping)), thousands_sep_(std::move(sep)) {} - bool has_separator() const { return !thousands_sep_.empty(); } + auto has_separator() const -> bool { return !thousands_sep_.empty(); } - int count_separators(int num_digits) const { + auto count_separators(int num_digits) const -> int { int count = 0; auto state = initial_state(); while (num_digits > next(state)) ++count; @@ -2191,7 +2047,7 @@ template class digit_grouping { // Applies grouping to digits and write the output to out. template - Out apply(Out out, basic_string_view digits) const { + auto apply(Out out, basic_string_view digits) const -> Out { auto num_digits = static_cast(digits.size()); auto separators = basic_memory_buffer(); separators.push_back(0); @@ -2214,24 +2070,66 @@ template class digit_grouping { } }; +FMT_CONSTEXPR inline void prefix_append(unsigned& prefix, unsigned value) { + prefix |= prefix != 0 ? value << 8 : value; + prefix += (1u + (value > 0xff ? 1 : 0)) << 24; +} + // Writes a decimal integer with digit grouping. template auto write_int(OutputIt out, UInt value, unsigned prefix, const format_specs& specs, const digit_grouping& grouping) -> OutputIt { static_assert(std::is_same, UInt>::value, ""); - int num_digits = count_digits(value); - char digits[40]; - format_decimal(digits, value, num_digits); - unsigned size = to_unsigned((prefix != 0 ? 1 : 0) + num_digits + - grouping.count_separators(num_digits)); + int num_digits = 0; + auto buffer = memory_buffer(); + switch (specs.type) { + case presentation_type::none: + case presentation_type::dec: { + num_digits = count_digits(value); + format_decimal(appender(buffer), value, num_digits); + break; + } + case presentation_type::hex_lower: + case presentation_type::hex_upper: { + bool upper = specs.type == presentation_type::hex_upper; + if (specs.alt) + prefix_append(prefix, unsigned(upper ? 'X' : 'x') << 8 | '0'); + num_digits = count_digits<4>(value); + format_uint<4, char>(appender(buffer), value, num_digits, upper); + break; + } + case presentation_type::bin_lower: + case presentation_type::bin_upper: { + bool upper = specs.type == presentation_type::bin_upper; + if (specs.alt) + prefix_append(prefix, unsigned(upper ? 'B' : 'b') << 8 | '0'); + num_digits = count_digits<1>(value); + format_uint<1, char>(appender(buffer), value, num_digits); + break; + } + case presentation_type::oct: { + num_digits = count_digits<3>(value); + // Octal prefix '0' is counted as a digit, so only add it if precision + // is not greater than the number of digits. + if (specs.alt && specs.precision <= num_digits && value != 0) + prefix_append(prefix, '0'); + format_uint<3, char>(appender(buffer), value, num_digits); + break; + } + case presentation_type::chr: + return write_char(out, static_cast(value), specs); + default: + throw_format_error("invalid format specifier"); + } + + unsigned size = (prefix != 0 ? prefix >> 24 : 0) + to_unsigned(num_digits) + + to_unsigned(grouping.count_separators(num_digits)); return write_padded( out, specs, size, size, [&](reserve_iterator it) { - if (prefix != 0) { - char sign = static_cast(prefix); - *it++ = static_cast(sign); - } - return grouping.apply(it, string_view(digits, to_unsigned(num_digits))); + for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8) + *it++ = static_cast(p & 0xff); + return grouping.apply(it, string_view(buffer.data(), buffer.size())); }); } @@ -2244,11 +2142,6 @@ inline auto write_loc(OutputIt, loc_value, const format_specs&, return false; } -FMT_CONSTEXPR inline void prefix_append(unsigned& prefix, unsigned value) { - prefix |= prefix != 0 ? value << 8 : value; - prefix += (1u + (value > 0xff ? 1 : 0)) << 24; -} - template struct write_int_arg { UInt abs_value; unsigned prefix; @@ -2395,25 +2288,25 @@ class counting_iterator { FMT_CONSTEXPR counting_iterator() : count_(0) {} - FMT_CONSTEXPR size_t count() const { return count_; } + FMT_CONSTEXPR auto count() const -> size_t { return count_; } - FMT_CONSTEXPR counting_iterator& operator++() { + FMT_CONSTEXPR auto operator++() -> counting_iterator& { ++count_; return *this; } - FMT_CONSTEXPR counting_iterator operator++(int) { + FMT_CONSTEXPR auto operator++(int) -> counting_iterator { auto it = *this; ++*this; return it; } - FMT_CONSTEXPR friend counting_iterator operator+(counting_iterator it, - difference_type n) { + FMT_CONSTEXPR friend auto operator+(counting_iterator it, difference_type n) + -> counting_iterator { it.count_ += static_cast(n); return it; } - FMT_CONSTEXPR value_type operator*() const { return {}; } + FMT_CONSTEXPR auto operator*() const -> value_type { return {}; } }; template @@ -2448,9 +2341,10 @@ template FMT_CONSTEXPR auto write(OutputIt out, const Char* s, const format_specs& specs, locale_ref) -> OutputIt { - return specs.type != presentation_type::pointer - ? write(out, basic_string_view(s), specs, {}) - : write_ptr(out, bit_cast(s), &specs); + if (specs.type == presentation_type::pointer) + return write_ptr(out, bit_cast(s), &specs); + if (!s) throw_format_error("string pointer is null"); + return write(out, basic_string_view(s), specs, {}); } template OutputIt { return base_iterator(out, it); } +// DEPRECATED! +template +FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end, + format_specs& specs) -> const Char* { + FMT_ASSERT(begin != end, ""); + auto align = align::none; + auto p = begin + code_point_length(begin); + if (end - p <= 0) p = begin; + for (;;) { + switch (to_ascii(*p)) { + case '<': + align = align::left; + break; + case '>': + align = align::right; + break; + case '^': + align = align::center; + break; + } + if (align != align::none) { + if (p != begin) { + auto c = *begin; + if (c == '}') return begin; + if (c == '{') { + throw_format_error("invalid fill character '{'"); + return begin; + } + specs.fill = {begin, to_unsigned(p - begin)}; + begin = p + 1; + } else { + ++begin; + } + break; + } else if (p == begin) { + break; + } + p = begin; + } + specs.align = align; + return begin; +} + // A floating-point presentation format. enum class float_format : unsigned char { general, // General: exponent notation or fixed point based on magnitude. @@ -2493,9 +2430,8 @@ struct float_specs { bool showpoint : 1; }; -template -FMT_CONSTEXPR auto parse_float_type_spec(const format_specs& specs, - ErrorHandler&& eh = {}) +template +FMT_CONSTEXPR auto parse_float_type_spec(const format_specs& specs) -> float_specs { auto result = float_specs(); result.showpoint = specs.alt; @@ -2531,7 +2467,7 @@ FMT_CONSTEXPR auto parse_float_type_spec(const format_specs& specs, result.format = float_format::hex; break; default: - eh.on_error("invalid format specifier"); + throw_format_error("invalid format specifier"); break; } return result; @@ -2770,12 +2706,12 @@ template class fallback_digit_grouping { public: constexpr fallback_digit_grouping(locale_ref, bool) {} - constexpr bool has_separator() const { return false; } + constexpr auto has_separator() const -> bool { return false; } - constexpr int count_separators(int) const { return 0; } + constexpr auto count_separators(int) const -> int { return 0; } template - constexpr Out apply(Out out, basic_string_view) const { + constexpr auto apply(Out out, basic_string_view) const -> Out { return out; } }; @@ -2794,7 +2730,7 @@ FMT_CONSTEXPR20 auto write_float(OutputIt out, const DecimalFP& f, } } -template constexpr bool isnan(T value) { +template constexpr auto isnan(T value) -> bool { return !(value >= value); // std::isnan doesn't support __float128. } @@ -2807,14 +2743,14 @@ struct has_isfinite> template ::value&& has_isfinite::value)> -FMT_CONSTEXPR20 bool isfinite(T value) { +FMT_CONSTEXPR20 auto isfinite(T value) -> bool { constexpr T inf = T(std::numeric_limits::infinity()); if (is_constant_evaluated()) return !detail::isnan(value) && value < inf && value > -inf; return std::isfinite(value); } template ::value)> -FMT_CONSTEXPR bool isfinite(T value) { +FMT_CONSTEXPR auto isfinite(T value) -> bool { T inf = T(std::numeric_limits::infinity()); // std::isfinite doesn't support __float128. return !detail::isnan(value) && value < inf && value > -inf; @@ -2833,78 +2769,6 @@ FMT_INLINE FMT_CONSTEXPR bool signbit(T value) { return std::signbit(static_cast(value)); } -enum class round_direction { unknown, up, down }; - -// Given the divisor (normally a power of 10), the remainder = v % divisor for -// some number v and the error, returns whether v should be rounded up, down, or -// whether the rounding direction can't be determined due to error. -// error should be less than divisor / 2. -FMT_CONSTEXPR inline round_direction get_round_direction(uint64_t divisor, - uint64_t remainder, - uint64_t error) { - FMT_ASSERT(remainder < divisor, ""); // divisor - remainder won't overflow. - FMT_ASSERT(error < divisor, ""); // divisor - error won't overflow. - FMT_ASSERT(error < divisor - error, ""); // error * 2 won't overflow. - // Round down if (remainder + error) * 2 <= divisor. - if (remainder <= divisor - remainder && error * 2 <= divisor - remainder * 2) - return round_direction::down; - // Round up if (remainder - error) * 2 >= divisor. - if (remainder >= error && - remainder - error >= divisor - (remainder - error)) { - return round_direction::up; - } - return round_direction::unknown; -} - -namespace digits { -enum result { - more, // Generate more digits. - done, // Done generating digits. - error // Digit generation cancelled due to an error. -}; -} - -struct gen_digits_handler { - char* buf; - int size; - int precision; - int exp10; - bool fixed; - - FMT_CONSTEXPR digits::result on_digit(char digit, uint64_t divisor, - uint64_t remainder, uint64_t error, - bool integral) { - FMT_ASSERT(remainder < divisor, ""); - buf[size++] = digit; - if (!integral && error >= remainder) return digits::error; - if (size < precision) return digits::more; - if (!integral) { - // Check if error * 2 < divisor with overflow prevention. - // The check is not needed for the integral part because error = 1 - // and divisor > (1 << 32) there. - if (error >= divisor || error >= divisor - error) return digits::error; - } else { - FMT_ASSERT(error == 1 && divisor > 2, ""); - } - auto dir = get_round_direction(divisor, remainder, error); - if (dir != round_direction::up) - return dir == round_direction::down ? digits::done : digits::error; - ++buf[size - 1]; - for (int i = size - 1; i > 0 && buf[i] > '9'; --i) { - buf[i] = '0'; - ++buf[i - 1]; - } - if (buf[0] > '9') { - buf[0] = '1'; - if (fixed) - buf[size++] = '0'; - else - ++exp10; - } - return digits::done; - } -}; - inline FMT_CONSTEXPR20 void adjust_precision(int& precision, int exp10) { // Adjust fixed precision by exponent because it is relative to decimal // point. @@ -2913,101 +2777,6 @@ inline FMT_CONSTEXPR20 void adjust_precision(int& precision, int exp10) { precision += exp10; } -// Generates output using the Grisu digit-gen algorithm. -// error: the size of the region (lower, upper) outside of which numbers -// definitely do not round to value (Delta in Grisu3). -FMT_INLINE FMT_CONSTEXPR20 auto grisu_gen_digits(fp value, uint64_t error, - int& exp, - gen_digits_handler& handler) - -> digits::result { - const fp one(1ULL << -value.e, value.e); - // The integral part of scaled value (p1 in Grisu) = value / one. It cannot be - // zero because it contains a product of two 64-bit numbers with MSB set (due - // to normalization) - 1, shifted right by at most 60 bits. - auto integral = static_cast(value.f >> -one.e); - FMT_ASSERT(integral != 0, ""); - FMT_ASSERT(integral == value.f >> -one.e, ""); - // The fractional part of scaled value (p2 in Grisu) c = value % one. - uint64_t fractional = value.f & (one.f - 1); - exp = count_digits(integral); // kappa in Grisu. - // Non-fixed formats require at least one digit and no precision adjustment. - if (handler.fixed) { - adjust_precision(handler.precision, exp + handler.exp10); - // Check if precision is satisfied just by leading zeros, e.g. - // format("{:.2f}", 0.001) gives "0.00" without generating any digits. - if (handler.precision <= 0) { - if (handler.precision < 0) return digits::done; - // Divide by 10 to prevent overflow. - uint64_t divisor = data::power_of_10_64[exp - 1] << -one.e; - auto dir = get_round_direction(divisor, value.f / 10, error * 10); - if (dir == round_direction::unknown) return digits::error; - handler.buf[handler.size++] = dir == round_direction::up ? '1' : '0'; - return digits::done; - } - } - // Generate digits for the integral part. This can produce up to 10 digits. - do { - uint32_t digit = 0; - auto divmod_integral = [&](uint32_t divisor) { - digit = integral / divisor; - integral %= divisor; - }; - // This optimization by Milo Yip reduces the number of integer divisions by - // one per iteration. - switch (exp) { - case 10: - divmod_integral(1000000000); - break; - case 9: - divmod_integral(100000000); - break; - case 8: - divmod_integral(10000000); - break; - case 7: - divmod_integral(1000000); - break; - case 6: - divmod_integral(100000); - break; - case 5: - divmod_integral(10000); - break; - case 4: - divmod_integral(1000); - break; - case 3: - divmod_integral(100); - break; - case 2: - divmod_integral(10); - break; - case 1: - digit = integral; - integral = 0; - break; - default: - FMT_ASSERT(false, "invalid number of digits"); - } - --exp; - auto remainder = (static_cast(integral) << -one.e) + fractional; - auto result = handler.on_digit(static_cast('0' + digit), - data::power_of_10_64[exp] << -one.e, - remainder, error, true); - if (result != digits::more) return result; - } while (exp > 0); - // Generate digits for the fractional part. - for (;;) { - fractional *= 10; - error *= 10; - char digit = static_cast('0' + (fractional >> -one.e)); - fractional &= one.f - 1; - --exp; - auto result = handler.on_digit(digit, one.f, fractional, error, false); - if (result != digits::more) return result; - } -} - class bigint { private: // A bigint is stored as an array of bigits (big digits), with bigit at index @@ -3018,10 +2787,10 @@ class bigint { basic_memory_buffer bigits_; int exp_; - FMT_CONSTEXPR20 bigit operator[](int index) const { + FMT_CONSTEXPR20 auto operator[](int index) const -> bigit { return bigits_[to_unsigned(index)]; } - FMT_CONSTEXPR20 bigit& operator[](int index) { + FMT_CONSTEXPR20 auto operator[](int index) -> bigit& { return bigits_[to_unsigned(index)]; } @@ -3108,7 +2877,7 @@ class bigint { auto size = other.bigits_.size(); bigits_.resize(size); auto data = other.bigits_.data(); - std::copy(data, data + size, make_checked(bigits_.data(), size)); + copy_str(data, data + size, bigits_.data()); exp_ = other.exp_; } @@ -3117,11 +2886,11 @@ class bigint { assign(uint64_or_128_t(n)); } - FMT_CONSTEXPR20 int num_bigits() const { + FMT_CONSTEXPR20 auto num_bigits() const -> int { return static_cast(bigits_.size()) + exp_; } - FMT_NOINLINE FMT_CONSTEXPR20 bigint& operator<<=(int shift) { + FMT_NOINLINE FMT_CONSTEXPR20 auto operator<<=(int shift) -> bigint& { FMT_ASSERT(shift >= 0, ""); exp_ += shift / bigit_bits; shift %= bigit_bits; @@ -3136,13 +2905,15 @@ class bigint { return *this; } - template FMT_CONSTEXPR20 bigint& operator*=(Int value) { + template + FMT_CONSTEXPR20 auto operator*=(Int value) -> bigint& { FMT_ASSERT(value > 0, ""); multiply(uint32_or_64_or_128_t(value)); return *this; } - friend FMT_CONSTEXPR20 int compare(const bigint& lhs, const bigint& rhs) { + friend FMT_CONSTEXPR20 auto compare(const bigint& lhs, const bigint& rhs) + -> int { int num_lhs_bigits = lhs.num_bigits(), num_rhs_bigits = rhs.num_bigits(); if (num_lhs_bigits != num_rhs_bigits) return num_lhs_bigits > num_rhs_bigits ? 1 : -1; @@ -3159,8 +2930,9 @@ class bigint { } // Returns compare(lhs1 + lhs2, rhs). - friend FMT_CONSTEXPR20 int add_compare(const bigint& lhs1, const bigint& lhs2, - const bigint& rhs) { + friend FMT_CONSTEXPR20 auto add_compare(const bigint& lhs1, + const bigint& lhs2, const bigint& rhs) + -> int { auto minimum = [](int a, int b) { return a < b ? a : b; }; auto maximum = [](int a, int b) { return a > b ? a : b; }; int max_lhs_bigits = maximum(lhs1.num_bigits(), lhs2.num_bigits()); @@ -3241,13 +3013,13 @@ class bigint { bigits_.resize(to_unsigned(num_bigits + exp_difference)); for (int i = num_bigits - 1, j = i + exp_difference; i >= 0; --i, --j) bigits_[j] = bigits_[i]; - std::uninitialized_fill_n(bigits_.data(), exp_difference, 0); + std::uninitialized_fill_n(bigits_.data(), exp_difference, 0u); exp_ -= exp_difference; } // Divides this bignum by divisor, assigning the remainder to this and // returning the quotient. - FMT_CONSTEXPR20 int divmod_assign(const bigint& divisor) { + FMT_CONSTEXPR20 auto divmod_assign(const bigint& divisor) -> int { FMT_ASSERT(this != &divisor, ""); if (compare(*this, divisor) < 0) return 0; FMT_ASSERT(divisor.bigits_[divisor.bigits_.size() - 1u] != 0, ""); @@ -3322,6 +3094,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp value, } int even = static_cast((value.f & 1) == 0); if (!upper) upper = &lower; + bool shortest = num_digits < 0; if ((flags & dragon::fixup) != 0) { if (add_compare(numerator, *upper, denominator) + even <= 0) { --exp10; @@ -3334,7 +3107,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp value, if ((flags & dragon::fixed) != 0) adjust_precision(num_digits, exp10 + 1); } // Invariant: value == (numerator / denominator) * pow(10, exp10). - if (num_digits < 0) { + if (shortest) { // Generate the shortest representation. num_digits = 0; char* data = buf.data(); @@ -3364,7 +3137,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp value, } // Generate the given number of digits. exp10 -= num_digits - 1; - if (num_digits == 0) { + if (num_digits <= 0) { denominator *= 10; auto digit = add_compare(numerator, numerator, denominator) > 0 ? '1' : '0'; buf.push_back(digit); @@ -3389,7 +3162,10 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp value, } if (buf[0] == overflow) { buf[0] = '1'; - ++exp10; + if ((flags & dragon::fixed) != 0) + buf.push_back('0'); + else + ++exp10; } return; } @@ -3486,6 +3262,17 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, int precision, format_hexfloat(static_cast(value), precision, specs, buf); } +constexpr auto fractional_part_rounding_thresholds(int index) -> uint32_t { + // For checking rounding thresholds. + // The kth entry is chosen to be the smallest integer such that the + // upper 32-bits of 10^(k+1) times it is strictly bigger than 5 * 10^k. + // It is equal to ceil(2^31 + 2^32/10^(k + 1)). + // These are stored in a string literal because we cannot have static arrays + // in constexpr functions and non-static ones are poorly optimized. + return U"\x9999999a\x828f5c29\x80418938\x80068db9\x8000a7c6\x800010c7" + U"\x800001ae\x8000002b"[index]; +} + template FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, buffer& buf) -> int { @@ -3508,7 +3295,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, int exp = 0; bool use_dragon = true; unsigned dragon_flags = 0; - if (!is_fast_float()) { + if (!is_fast_float() || is_constant_evaluated()) { const auto inv_log2_10 = 0.3010299956639812; // 1 / log2(10) using info = dragonbox::float_info; const auto f = basic_fp(converted_value); @@ -3516,10 +3303,11 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, // 10^(exp - 1) <= value < 10^exp or 10^exp <= value < 10^(exp + 1). // This is based on log10(value) == log2(value) / log2(10) and approximation // of log2(value) by e + num_fraction_bits idea from double-conversion. - exp = static_cast( - std::ceil((f.e + count_digits<1>(f.f) - 1) * inv_log2_10 - 1e-10)); + auto e = (f.e + count_digits<1>(f.f) - 1) * inv_log2_10 - 1e-10; + exp = static_cast(e); + if (e > exp) ++exp; // Compute ceil. dragon_flags = dragon::fixup; - } else if (!is_constant_evaluated() && precision < 0) { + } else if (precision < 0) { // Use Dragonbox for the shortest format. if (specs.binary32) { auto dec = dragonbox::to_decimal(static_cast(value)); @@ -3529,25 +3317,6 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, auto dec = dragonbox::to_decimal(static_cast(value)); write(buffer_appender(buf), dec.significand); return dec.exponent; - } else if (is_constant_evaluated()) { - // Use Grisu + Dragon4 for the given precision: - // https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf. - const int min_exp = -60; // alpha in Grisu. - int cached_exp10 = 0; // K in Grisu. - fp normalized = normalize(fp(converted_value)); - const auto cached_pow = get_cached_power( - min_exp - (normalized.e + fp::num_significand_bits), cached_exp10); - normalized = normalized * cached_pow; - gen_digits_handler handler{buf.data(), 0, precision, -cached_exp10, fixed}; - if (grisu_gen_digits(normalized, 1, exp, handler) != digits::error && - !is_constant_evaluated()) { - exp += handler.exp10; - buf.try_resize(to_unsigned(handler.size)); - use_dragon = false; - } else { - exp += handler.size - cached_exp10 - 1; - precision = handler.precision; - } } else { // Extract significand bits and exponent bits. using info = dragonbox::float_info; @@ -3566,7 +3335,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, significand <<= 1; } else { // Normalize subnormal inputs. - FMT_ASSERT(significand != 0, "zeros should not appear hear"); + FMT_ASSERT(significand != 0, "zeros should not appear here"); int shift = countl_zero(significand); FMT_ASSERT(shift >= num_bits() - num_significand_bits(), ""); @@ -3603,9 +3372,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, } // Compute the actual number of decimal digits to print. - if (fixed) { - adjust_precision(precision, exp + digits_in_the_first_segment); - } + if (fixed) adjust_precision(precision, exp + digits_in_the_first_segment); // Use Dragon4 only when there might be not enough digits in the first // segment. @@ -3710,12 +3477,12 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, // fractional part is strictly larger than 1/2. if (precision < 9) { uint32_t fractional_part = static_cast(prod); - should_round_up = fractional_part >= - data::fractional_part_rounding_thresholds - [8 - number_of_digits_to_print] || - ((fractional_part >> 31) & - ((digits & 1) | (second_third_subsegments != 0) | - has_more_segments)) != 0; + should_round_up = + fractional_part >= fractional_part_rounding_thresholds( + 8 - number_of_digits_to_print) || + ((fractional_part >> 31) & + ((digits & 1) | (second_third_subsegments != 0) | + has_more_segments)) != 0; } // Rounding at the subsegment boundary. // In this case, the fractional part is at least 1/2 if and only if @@ -3750,12 +3517,12 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, // of 19 digits, so in this case the third segment should be // consisting of a genuine digit from the input. uint32_t fractional_part = static_cast(prod); - should_round_up = fractional_part >= - data::fractional_part_rounding_thresholds - [8 - number_of_digits_to_print] || - ((fractional_part >> 31) & - ((digits & 1) | (third_subsegment != 0) | - has_more_segments)) != 0; + should_round_up = + fractional_part >= fractional_part_rounding_thresholds( + 8 - number_of_digits_to_print) || + ((fractional_part >> 31) & + ((digits & 1) | (third_subsegment != 0) | + has_more_segments)) != 0; } // Rounding at the subsegment boundary. else { @@ -3987,8 +3754,11 @@ template enable_if_t::value == type::custom_type, OutputIt> { + auto formatter = typename Context::template formatter_type(); + auto parse_ctx = typename Context::parse_context_type({}); + formatter.parse(parse_ctx); auto ctx = Context(out, {}, {}); - return typename Context::template formatter_type().format(value, ctx); + return formatter.format(value, ctx); } // An argument visitor that formats the argument and writes it via the output @@ -4031,74 +3801,50 @@ template struct arg_formatter { } }; -template struct custom_formatter { - basic_format_parse_context& parse_ctx; - buffer_context& ctx; - - void operator()( - typename basic_format_arg>::handle h) const { - h.format(parse_ctx, ctx); - } - template void operator()(T) const {} -}; - -template class width_checker { - public: - explicit FMT_CONSTEXPR width_checker(ErrorHandler& eh) : handler_(eh) {} - +struct width_checker { template ::value)> FMT_CONSTEXPR auto operator()(T value) -> unsigned long long { - if (is_negative(value)) handler_.on_error("negative width"); + if (is_negative(value)) throw_format_error("negative width"); return static_cast(value); } template ::value)> FMT_CONSTEXPR auto operator()(T) -> unsigned long long { - handler_.on_error("width is not integer"); + throw_format_error("width is not integer"); return 0; } - - private: - ErrorHandler& handler_; }; -template class precision_checker { - public: - explicit FMT_CONSTEXPR precision_checker(ErrorHandler& eh) : handler_(eh) {} - +struct precision_checker { template ::value)> FMT_CONSTEXPR auto operator()(T value) -> unsigned long long { - if (is_negative(value)) handler_.on_error("negative precision"); + if (is_negative(value)) throw_format_error("negative precision"); return static_cast(value); } template ::value)> FMT_CONSTEXPR auto operator()(T) -> unsigned long long { - handler_.on_error("precision is not integer"); + throw_format_error("precision is not integer"); return 0; } - - private: - ErrorHandler& handler_; }; -template