diff --git a/src/base_station_base.h b/src/base_station_base.h index 0d9c360883..c94f040310 100644 --- a/src/base_station_base.h +++ b/src/base_station_base.h @@ -119,7 +119,7 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> { * @param available will return false if ever the variable asked for does not exist * @return the value stored in the corresponding variable */ - virtual uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint16_t variable, uint8_t parameter, bool *available) const = 0; + virtual uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint16_t variable, uint8_t parameter, bool &available) const = 0; /** * Update the coordinated of the sign (as shown in the viewport). @@ -237,7 +237,7 @@ struct SpecializedStation : public BaseStation { * Set station type correctly * @param tile The base tile of the station. */ - inline SpecializedStation(TileIndex tile) : + inline SpecializedStation(TileIndex tile) : BaseStation(tile) { this->facilities = EXPECTED_FACIL; diff --git a/src/command.cpp b/src/command.cpp index f2221a15d6..c9a2a80e7f 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -170,6 +170,7 @@ CommandProc CmdTownCargoGoal; CommandProc CmdTownSetText; CommandProc CmdExpandTown; CommandProc CmdDeleteTown; +CommandProc CmdPlaceHouse; CommandProc CmdChangeSetting; CommandProc CmdChangeCompanySetting; @@ -441,6 +442,7 @@ static const Command _command_proc_table[] = { DEF_CMD(CmdTownSetText, CMD_LOG_AUX | CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_TOWN_SET_TEXT DEF_CMD(CmdExpandTown, CMD_DEITY, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_EXPAND_TOWN DEF_CMD(CmdDeleteTown, CMD_OFFLINE, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_DELETE_TOWN + DEF_CMD(CmdPlaceHouse, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_PLACE_HOUSE DEF_CMD(CmdOrderRefit, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_ORDER_REFIT DEF_CMD(CmdCloneOrder, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_CLONE_ORDER diff --git a/src/command_type.h b/src/command_type.h index e98c8eb2b6..e6d6f79f4a 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -386,6 +386,7 @@ enum Commands { CMD_TOWN_SET_TEXT, ///< set the custom text of a town CMD_EXPAND_TOWN, ///< expand a town CMD_DELETE_TOWN, ///< delete a town + CMD_PLACE_HOUSE, ///< place a house CMD_ORDER_REFIT, ///< change the refit information of an order (for "goto depot" ) CMD_CLONE_ORDER, ///< clone (and share) an order diff --git a/src/fontcache.h b/src/fontcache.h index cff42d8e14..52c766f586 100644 --- a/src/fontcache.h +++ b/src/fontcache.h @@ -112,14 +112,6 @@ public: */ virtual GlyphID MapCharToGlyph(char32_t key, bool fallback = true) = 0; - /** - * Read a font table from the font. - * @param tag The of the table to load. - * @param length The length of the read data. - * @return The loaded table data. - */ - virtual const void *GetFontTable(uint32_t tag, size_t &length) = 0; - /** * Get the native OS font handle, if there is one. * @return Opaque OS font handle. diff --git a/src/fontcache/freetypefontcache.cpp b/src/fontcache/freetypefontcache.cpp index 9101c393d7..7b3db3ae3b 100644 --- a/src/fontcache/freetypefontcache.cpp +++ b/src/fontcache/freetypefontcache.cpp @@ -35,7 +35,6 @@ private: FT_Face face; ///< The font face associated with this font. void SetFontSize(int pixels); - const void *InternalGetFontTable(uint32_t tag, size_t &length) override; const Sprite *InternalGetGlyph(GlyphID key, bool aa) override; public: @@ -327,22 +326,6 @@ GlyphID FreeTypeFontCache::MapCharToGlyph(char32_t key, bool allow_fallback) return glyph; } -const void *FreeTypeFontCache::InternalGetFontTable(uint32_t tag, size_t &length) -{ - FT_ULong len = 0; - FT_Byte *result = nullptr; - - FT_Load_Sfnt_Table(this->face, tag, 0, nullptr, &len); - - if (len > 0) { - result = MallocT(len); - FT_Load_Sfnt_Table(this->face, tag, 0, result, &len); - } - - length = len; - return result; -} - /** * Free everything allocated w.r.t. freetype. */ diff --git a/src/fontcache/spritefontcache.h b/src/fontcache/spritefontcache.h index e35cb1a5d6..e176aeb9b1 100644 --- a/src/fontcache/spritefontcache.h +++ b/src/fontcache/spritefontcache.h @@ -30,7 +30,6 @@ public: uint GetGlyphWidth(GlyphID key) override; bool GetDrawGlyphShadow() override; GlyphID MapCharToGlyph(char32_t key, [[maybe_unused]] bool allow_fallback = true) override { assert(IsPrintable(key)); return SPRITE_GLYPH | key; } - const void *GetFontTable(uint32_t, size_t &length) override { length = 0; return nullptr; } std::string GetFontName() override { return "sprite"; } bool IsBuiltInFont() override { return true; } }; diff --git a/src/fontcache/truetypefontcache.cpp b/src/fontcache/truetypefontcache.cpp index 5bbe5d304e..9ad8ce93b6 100644 --- a/src/fontcache/truetypefontcache.cpp +++ b/src/fontcache/truetypefontcache.cpp @@ -33,10 +33,6 @@ TrueTypeFontCache::~TrueTypeFontCache() { /* Virtual functions get called statically in destructors, so make it explicit to remove any confusion. */ this->TrueTypeFontCache::ClearFontCache(); - - for (auto &iter : this->font_tables) { - free(iter.second.second); - } } /** @@ -164,17 +160,3 @@ const Sprite *TrueTypeFontCache::GetGlyph(GlyphID key) return this->InternalGetGlyph(key, GetFontAAState()); } - -const void *TrueTypeFontCache::GetFontTable(uint32_t tag, size_t &length) -{ - const auto iter = this->font_tables.find(tag); - if (iter != this->font_tables.end()) { - length = iter->second.first; - return iter->second.second; - } - - const void *result = this->InternalGetFontTable(tag, length); - - this->font_tables[tag] = std::pair(length, result); - return result; -} diff --git a/src/fontcache/truetypefontcache.h b/src/fontcache/truetypefontcache.h index 4d311a4a2a..d5ca1ada2f 100644 --- a/src/fontcache/truetypefontcache.h +++ b/src/fontcache/truetypefontcache.h @@ -11,7 +11,6 @@ #define TRUETYPEFONTCACHE_H #include "../fontcache.h" -#include "../3rdparty/cpp-btree/btree_map.h" static const int MAX_FONT_SIZE = 72; ///< Maximum font size. @@ -28,9 +27,6 @@ protected: int req_size; ///< Requested font size. int used_size; ///< Used font size. - using FontTable = btree::btree_map>; ///< Table with font table cache - FontTable font_tables; ///< Cached font tables. - /** Container for information about a glyph. */ struct GlyphEntry { Sprite *sprite; ///< The loaded sprite. @@ -56,7 +52,6 @@ protected: GlyphEntry *GetGlyphPtr(GlyphID key); void SetGlyphPtr(GlyphID key, const GlyphEntry *glyph, bool duplicate = false); - virtual const void *InternalGetFontTable(uint32_t tag, size_t &length) = 0; virtual const Sprite *InternalGetGlyph(GlyphID key, bool aa) = 0; public: @@ -73,7 +68,6 @@ public: const Sprite *GetGlyph(GlyphID key) override; - const void *GetFontTable(uint32_t tag, size_t &length) override; void ClearFontCache() override; uint GetGlyphWidth(GlyphID key) override; bool GetDrawGlyphShadow() override; diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 839e6f0fb9..14b7729807 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -1584,7 +1584,7 @@ struct GenerateProgressWindow : public Window { /* Draw the % complete with a bar and a text */ DrawFrameRect(r, COLOUR_GREY, FR_BORDERONLY | FR_LOWERED); Rect br = r.Shrink(WidgetDimensions::scaled.bevel); - DrawFrameRect(br.WithWidth(br.Width() * _gws.percent / 100, false), COLOUR_MAUVE, FR_NONE); + DrawFrameRect(br.WithWidth(br.Width() * _gws.percent / 100, _current_text_dir == TD_RTL), COLOUR_MAUVE, FR_NONE); SetDParam(0, _gws.percent); DrawString(br.left, br.right, CenterBounds(br.top, br.bottom, GetCharacterHeight(FS_NORMAL)), STR_GENERATION_PROGRESS, TC_FROMSTRING, SA_HOR_CENTER); break; diff --git a/src/gfx_layout_icu.cpp b/src/gfx_layout_icu.cpp index f32c998ea4..19051d2678 100644 --- a/src/gfx_layout_icu.cpp +++ b/src/gfx_layout_icu.cpp @@ -284,7 +284,7 @@ std::vector ItemizeBidi(UChar *buff, size_t length) UBiDiLevel level; ubidi_getLogicalRun(ubidi, start_pos, &logical_pos, &level); - runs.emplace_back(ICURun(start_pos, logical_pos - start_pos, level)); + runs.emplace_back(start_pos, logical_pos - start_pos, level); } assert(static_cast(count) == runs.size()); @@ -315,7 +315,7 @@ std::vector ItemizeScript(UChar *buff, size_t length, std::vectorstart + cur_run->length); assert(stop_pos - cur_pos > 0); - runs.push_back(ICURun(cur_pos, stop_pos - cur_pos, cur_run->level, script_itemizer.getScriptCode())); + runs.emplace_back(cur_pos, stop_pos - cur_pos, cur_run->level, script_itemizer.getScriptCode()); if (stop_pos == cur_run->start + cur_run->length) cur_run++; cur_pos = stop_pos; @@ -347,7 +347,7 @@ std::vector ItemizeStyle(std::vector &runs_current, FontMap &fon int stop_pos = std::min(font_map.first, cur_run->start + cur_run->length); assert(stop_pos - cur_pos > 0); - runs.push_back(ICURun(cur_pos, stop_pos - cur_pos, cur_run->level, cur_run->script, font_map.second)); + runs.emplace_back(cur_pos, stop_pos - cur_pos, cur_run->level, cur_run->script, font_map.second); if (stop_pos == cur_run->start + cur_run->length) cur_run++; cur_pos = stop_pos; diff --git a/src/house.h b/src/house.h index 3b55bf6e3e..f9ac88bc28 100644 --- a/src/house.h +++ b/src/house.h @@ -32,7 +32,7 @@ static const HouseID INVALID_HOUSE_ID = 0xFFFF; static const uint HOUSE_NUM_ACCEPTS = 16; ///< Max number of cargoes accepted by a tile static const uint HOUSE_ORIGINAL_NUM_ACCEPTS = 3; ///< Original number of accepted cargo types. -enum BuildingFlags { +enum BuildingFlags : uint8_t { TILE_NO_FLAG = 0, TILE_SIZE_1x1 = 1U << 0, TILE_NOT_SLOPED = 1U << 1, @@ -50,7 +50,7 @@ enum BuildingFlags { }; DECLARE_ENUM_AS_BIT_SET(BuildingFlags) -enum HouseZonesBits { +enum HouseZonesBits : uint8_t { HZB_BEGIN = 0, HZB_TOWN_EDGE = 0, HZB_TOWN_OUTSKIRT, @@ -80,7 +80,7 @@ enum HouseZones : uint16_t { ///< Bit Value Meaning }; DECLARE_ENUM_AS_BIT_SET(HouseZones) -enum HouseExtraFlags { +enum HouseExtraFlags : uint8_t { NO_EXTRA_FLAG = 0, BUILDING_IS_HISTORICAL = 1U << 0, ///< this house will only appear during town generation in random games, thus the historical BUILDING_IS_PROTECTED = 1U << 1, ///< towns and AI will not remove this house, while human players will be able to @@ -144,6 +144,8 @@ inline HouseID GetTranslatedHouseID(HouseID hid) return hs->grf_prop.override == INVALID_HOUSE_ID ? hid : hs->grf_prop.override; } +void ShowBuildHousePicker(struct Window *); + StringID GetHouseName(HouseID house, TileIndex tile = INVALID_TILE); void DrawHouseImage(HouseID house_id, int left, int top, int right, int bottom); void AddProducedHouseCargo(HouseID house_id, TileIndex tile, CargoArray &produced); diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt index abfda221b7..9dbe309d74 100644 --- a/src/lang/afrikaans.txt +++ b/src/lang/afrikaans.txt @@ -387,6 +387,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Verlaat redigee STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Verlaat + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spel opsies @@ -2396,6 +2397,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Bou 'n s + + STR_STATION_CLASS_DFLT :Verstek stasie STR_STATION_CLASS_WAYP :Roetebakens diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index 0fd30dbe14..8296611f5f 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -408,6 +408,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :خروج من STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :انهاء + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :إعدادات اللعبه @@ -2263,6 +2264,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}بناء + + STR_STATION_CLASS_DFLT :المحطة القياسية STR_STATION_CLASS_WAYP :نقطة عبور diff --git a/src/lang/basque.txt b/src/lang/basque.txt index d36172f297..6e5a45a4dd 100644 --- a/src/lang/basque.txt +++ b/src/lang/basque.txt @@ -377,6 +377,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Eszenario edito STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Irten + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Jokoaren aukerak @@ -2276,6 +2277,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Geltokia + + STR_STATION_CLASS_DFLT :Geltoki lehenetsia STR_STATION_CLASS_WAYP :Bidepuntuak diff --git a/src/lang/belarusian.txt b/src/lang/belarusian.txt index 86544b096b..0607876ede 100644 --- a/src/lang/belarusian.txt +++ b/src/lang/belarusian.txt @@ -750,6 +750,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Выйсьці STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Выхад + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Наладкі гульні @@ -3118,6 +3119,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Пабу + + STR_STATION_CLASS_DFLT :Стандартная станцыя STR_STATION_CLASS_DFLT_STATION :Стандартная чыг. станцыя STR_STATION_CLASS_DFLT_ROADSTOP :Стандартны прыпынак diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index fd238dbf49..9d98197b03 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -438,6 +438,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Sair do editor STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Sair +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Gerar localidades +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Colocar casas + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opções do jogo @@ -2815,6 +2818,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Selecionar uma STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Escolher um tipo de estação de caminhões para construir. Ctrl+Clique para adicionar ou remover nos itens salvos STR_PICKER_OBJECT_CLASS_TOOLTIP :Selecionar uma classe de objeto para mostrar STR_PICKER_OBJECT_TYPE_TOOLTIP :Escolher um tipo de objeto para construir. Ctrl+Clique para adicionar ou remover nos itens salvos. Ctrl+Clique+Arraste para selecionar a área diagonalmente. Pressione também Shift para só mostrar o custo estimado +STR_PICKER_HOUSE_CLASS_TOOLTIP :Selecionar uma zona urbana para mostrar +STR_PICKER_HOUSE_TYPE_TOOLTIP :Selecionar um tipo de casa para construir. Ctrl+Clique para adicionar ou remover nos itens salvos + +STR_HOUSE_PICKER_CAPTION :Seleção de Casas + +STR_HOUSE_PICKER_CLASS_ZONE1 :Borda +STR_HOUSE_PICKER_CLASS_ZONE2 :Subúrbio +STR_HOUSE_PICKER_CLASS_ZONE3 :Periferia Distante +STR_HOUSE_PICKER_CLASS_ZONE4 :Periferia Próxima +STR_HOUSE_PICKER_CLASS_ZONE5 :Centro da cidade STR_STATION_CLASS_DFLT :Padrão STR_STATION_CLASS_DFLT_STATION :Estação padrão @@ -5002,6 +5015,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... não STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Trabalhos sendo realizados na estrada STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Não é possível remover esta localidade...{}Uma estação ou depósito refere-se à localidade ou não é possível remover um quadrado que pertence à mesma STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... não há local adequado para uma estátua no centro desta localidade +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Não é possível construir casa... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... há indústrias demais diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt index 1c93081ad2..2ddeb07639 100644 --- a/src/lang/bulgarian.txt +++ b/src/lang/bulgarian.txt @@ -399,6 +399,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Изход от STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Изход + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Игрови опции @@ -2465,6 +2466,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Стро + + STR_STATION_CLASS_DFLT :Станция по подразбиране STR_STATION_CLASS_WAYP :Пътни точки diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt index f6a1237327..cd06c08a1e 100644 --- a/src/lang/catalan.txt +++ b/src/lang/catalan.txt @@ -438,6 +438,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Surt de l'edito STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Surt +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Genera poblacions +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Posa cases + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opcions de la partida @@ -2798,7 +2801,33 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Seleccio STR_STATION_BUILD_DRAG_DROP :{BLACK}Arrossega i solta STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Construeix una estació amb el mètode arrossega i solta. +STR_PICKER_MODE_ALL :Tots +STR_PICKER_MODE_ALL_TOOLTIP :Commuta entre mostrar o no els elements de totes les classes. +STR_PICKER_MODE_USED :Fets servir +STR_PICKER_MODE_USED_TOOLTIP :Commuta entre mostrar o no només els elements que ja s'hagin construït. +STR_PICKER_MODE_SAVED :Desats +STR_PICKER_MODE_SAVED_TOOLTIP :Commuta entre mostrar o no només els elements desats. +STR_PICKER_STATION_CLASS_TOOLTIP :Trieu quina classe d'estació voleu veure. +STR_PICKER_STATION_TYPE_TOOLTIP :Trieu quin tipus d'estació voleu construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats. +STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Trieu quina classe de punts de control voleu veure. +STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Trieu quin tipus de punt de control voleu construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats. +STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Trieu quina classe d'estacions d'autobús voleu veure. +STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Trieu quin tipus d'estació d'autobús voleu construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats. +STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Trieu quina classe d'estació de camions voleu veure. +STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Trieu un tipus d'estació de camió a construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats. +STR_PICKER_OBJECT_CLASS_TOOLTIP :Trieu quina classe d'objectes voleu veure. +STR_PICKER_OBJECT_TYPE_TOOLTIP :Trieu quin tipus d'objecte voleu construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats. Amb Ctrl+clic+arrossega es selecciona l'àrea en diagonal. Amb Maj, només es mostrarà el cost estimat de l'acció. +STR_PICKER_HOUSE_CLASS_TOOLTIP :Trieu quina zona de població voleu veure. +STR_PICKER_HOUSE_TYPE_TOOLTIP :Trieu quin tipus de casa construir. Amb Ctrl+clic, s'afegeix o es trau l'element de la llista de desats. + +STR_HOUSE_PICKER_CAPTION :Selecció de cases + +STR_HOUSE_PICKER_CLASS_ZONE1 :Vora +STR_HOUSE_PICKER_CLASS_ZONE2 :Afores +STR_HOUSE_PICKER_CLASS_ZONE3 :Suburbi exterior +STR_HOUSE_PICKER_CLASS_ZONE4 :Suburbi interior +STR_HOUSE_PICKER_CLASS_ZONE5 :Centre de la població STR_STATION_CLASS_DFLT :Per defecte STR_STATION_CLASS_DFLT_STATION :Estació per defecte @@ -4986,6 +5015,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}...no qu STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Obres en progrés STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}No es pot eliminar aquesta població...{}Hi ha una estació, un dipòsit o una cel·la pertanyent a la població que no pot ser eliminada STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... no hi ha un lloc adequat per situar l'estàtua al centre d'aquesta població +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}La casa no es pot construir... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... massa indústries diff --git a/src/lang/chuvash.txt b/src/lang/chuvash.txt index a6e67827d0..835a6e4102 100644 --- a/src/lang/chuvash.txt +++ b/src/lang/chuvash.txt @@ -231,6 +231,7 @@ STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Объе STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Вӗҫле + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Вӑййи майлаштару @@ -1057,6 +1058,8 @@ STR_CONTENT_DETAIL_VERSION :{SILVER}Вер + + # Signal window # Bridge selection window diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index 7b316863de..ac8576519b 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -485,6 +485,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Odustani od ure STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Izlaz + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Postavke igre @@ -2539,6 +2540,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Napravi + + STR_STATION_CLASS_DFLT :Zadana postaja STR_STATION_CLASS_WAYP :Čvorišta diff --git a/src/lang/czech.txt b/src/lang/czech.txt index a85a351922..bb0c3eb535 100644 --- a/src/lang/czech.txt +++ b/src/lang/czech.txt @@ -512,6 +512,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Ukončit editor STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Ukončit + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Možnosti hry @@ -2873,6 +2874,10 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Stavět + +STR_HOUSE_PICKER_CLASS_ZONE1 :Okraj +STR_HOUSE_PICKER_CLASS_ZONE2 :Periferie + STR_STATION_CLASS_DFLT :Původní STR_STATION_CLASS_DFLT_STATION :Původní stanice STR_STATION_CLASS_DFLT_ROADSTOP :Původní silniční stanoviště @@ -4437,7 +4442,7 @@ STR_VEHICLE_VIEW_AIRCRAFT_STATUS_START_STOP_TOOLTIP :{BLACK}Stávaj # Messages in the start stop button in the vehicle view STR_VEHICLE_STATUS_LOADING_UNLOADING :{LTBLUE}Nakládá nebo vykládá STR_VEHICLE_STATUS_LEAVING :{LTBLUE}Odjíždí -STR_VEHICLE_STATUS_WAITING_UNBUNCHING :{LTBLUE}Čeká na vyložení +STR_VEHICLE_STATUS_WAITING_UNBUNCHING :{LTBLUE}Čeká na dostatečný rozestup STR_VEHICLE_STATUS_CRASHED :{RED}Nehoda! STR_VEHICLE_STATUS_BROKEN_DOWN :{RED}Porucha STR_VEHICLE_STATUS_STOPPED :{RED}Zastaveno @@ -4451,7 +4456,7 @@ STR_VEHICLE_STATUS_NO_ORDERS_VEL :{LTBLUE}Bez př STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT_VEL :{LTBLUE}Míří do {WAYPOINT}, {VELOCITY} STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_VEL :{ORANGE}Míří do {DEPOT}, {VELOCITY} STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE_VEL :{LTBLUE}Údržba v {DEPOT}, {VELOCITY} -STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_UNBUNCH_VEL :{LTBLUE}Rozbalit a poslat do servisu do {DEPOT}, {VELOCITY} +STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_UNBUNCH_VEL :{LTBLUE}Poslat do servisu a vytvořit rozestup v {DEPOT}, {VELOCITY} STR_VEHICLE_STATUS_CANNOT_REACH_STATION_VEL :{LTBLUE}Nelze dosáhnout {STATION}, {VELOCITY} STR_VEHICLE_STATUS_CANNOT_REACH_WAYPOINT_VEL :{LTBLUE}Nelze dosáhnout {WAYPOINT}, {VELOCITY} @@ -4619,7 +4624,7 @@ STR_ORDER_DROP_REFIT_AUTO_ANY :Dostupný nákl STR_ORDER_DROP_GO_ALWAYS_DEPOT :Jeď vždy STR_ORDER_DROP_SERVICE_DEPOT :Údržba v případě potřeby STR_ORDER_DROP_HALT_DEPOT :Zastavit -STR_ORDER_DROP_UNBUNCH :Vyložit +STR_ORDER_DROP_UNBUNCH :Vytvořit rozestup # Depot action tooltips, one per vehicle type ###length VEHICLE_TYPES @@ -4696,7 +4701,7 @@ STR_ORDER_REFIT_ORDER :(Přestavět na STR_ORDER_REFIT_STOP_ORDER :(Přestavět na {STRING} a zastavit) STR_ORDER_STOP_ORDER :(Zastavit) -STR_ORDER_WAIT_TO_UNBUNCH :(čeká na vykládku) +STR_ORDER_WAIT_TO_UNBUNCH :(Vytvořit rozestup) STR_ORDER_GO_TO_STATION :{STRING} {STATION} {STRING} STR_ORDER_GO_TO_STATION_CAN_T_USE_STATION :{PUSH_COLOUR}{RED}(Nemůže použít stanici){POP_COLOUR} {STRING} {STATION} {STRING} @@ -5164,11 +5169,11 @@ STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT :{WHITE}Nelze na STR_ERROR_DEPOT_WRONG_DEPOT_TYPE :Nevhodný druh depa # Depot unbunching related errors -STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED :{WHITE}... může mít pouze jeden příkaz nalož -STR_ERROR_UNBUNCHING_NO_FULL_LOAD :{WHITE}... příkaz plně naložit nelze použít dokud má vozidlo sdílený příkaz -STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD :{WHITE}... nelze vyložit vozidlo s příkazem plně naložit -STR_ERROR_UNBUNCHING_NO_CONDITIONAL :{WHITE}... nelze použít podmíněné příkazy dokud má vozidlo sdílený příkaz -STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL :{WHITE}... nelze rozplánovat vozidla s podmíněným příkazem. +STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED :{WHITE}... může mít pouze jeden příkaz pro vytvoření rozestupu +STR_ERROR_UNBUNCHING_NO_FULL_LOAD :{WHITE}... příkaz plně naložit nelze použít dokud má vozidlo příkaz na vytvoření rozestupu +STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD :{WHITE}... nelze vytvořit rozestup pro vozidlo s příkazem plně naložit +STR_ERROR_UNBUNCHING_NO_CONDITIONAL :{WHITE}... nelze použít podmíněné příkazy dokud má vozidlo příkaz pro vytvoření rozestupu +STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL :{WHITE}... nelze vytvořit rozestup pro vozidla s podmíněným příkazem. # Autoreplace related errors STR_ERROR_TRAIN_TOO_LONG_AFTER_REPLACEMENT :{WHITE}{VEHICLE} je po výměně moc dlouhý diff --git a/src/lang/danish.txt b/src/lang/danish.txt index b1bbde7b58..4ade7af644 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -437,6 +437,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Forlad scenarie STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Afslut + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opsætning @@ -2798,6 +2799,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Byg en s + + STR_STATION_CLASS_DFLT :Standard station STR_STATION_CLASS_DFLT_STATION :Standard station STR_STATION_CLASS_DFLT_ROADSTOP :Standard vejstop diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt index 9ccd45adad..3162267db6 100644 --- a/src/lang/dutch.txt +++ b/src/lang/dutch.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Scenariobewerke STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Afsluiten +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Steden genereren +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Huizen plaatsen + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spelopties @@ -2797,7 +2800,33 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Selectee STR_STATION_BUILD_DRAG_DROP :{BLACK}Slepen STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Je kunt een station bouwen door te slepen +STR_PICKER_MODE_ALL :Alle +STR_PICKER_MODE_ALL_TOOLTIP :Weergave van alle klassen onderdelen omschakelen +STR_PICKER_MODE_USED :Gebruikt +STR_PICKER_MODE_USED_TOOLTIP :Weergave van alleen bestaande onderdelen omschakelen +STR_PICKER_MODE_SAVED :Opgeslagen +STR_PICKER_MODE_SAVED_TOOLTIP :Weergave van alleen opgeslagen onderdelen omschakelen +STR_PICKER_STATION_CLASS_TOOLTIP :Selecteer een klasse stations voor weergave +STR_PICKER_STATION_TYPE_TOOLTIP :Selecteer een type station om te bouwen. Ctrl+klik om toe te voegen aan of te verwijderen uit opgeslagen onderdelen +STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Selecteer een klasse routepunten voor weergave +STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Selecteer een routepunt om te bouwen. Ctrl+klik om toe te voegen aan of te verwijderen uit opgeslagen onderdelen +STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Selecteer een klasse busstations voor weergave +STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Selecteer een type busstation om te bouwen. Ctrl+klik om toe te voegen aan of te verwijderen uit opgeslagen onderdelen +STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Selecteer een klasse vrachtwagenstations voor weergave +STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Selecteer een type vrachtwagenstation om te bouwen. Ctrl+klik om toe te voegen aan of te verwijderen uit opgeslagen onderdelen +STR_PICKER_OBJECT_CLASS_TOOLTIP :Selecteer een onderdeelklasse voor weergave +STR_PICKER_OBJECT_TYPE_TOOLTIP :Selecteer een type objet voor bouwen. Ctrr+klik om toe te voegen aan of te verwijderen uit opgeslagen onderdelen. Ctrl+klik+slepen om diagonaal te selecteren. Voeg Shift toe voor alleen inschatting van de kosten +STR_PICKER_HOUSE_CLASS_TOOLTIP :Selecteer een stadsgebied voor weergave +STR_PICKER_HOUSE_TYPE_TOOLTIP :Selecteer een type huizen om te bouwen. Ctrl+klik om toe te voegen aan of te verwijderen uit opgeslagen onderdelen + +STR_HOUSE_PICKER_CAPTION :Huizen selecteren + +STR_HOUSE_PICKER_CLASS_ZONE1 :Rand +STR_HOUSE_PICKER_CLASS_ZONE2 :Buitenwijken +STR_HOUSE_PICKER_CLASS_ZONE3 :Buitenste voorsteden +STR_HOUSE_PICKER_CLASS_ZONE4 :Binnenste voorsteden +STR_HOUSE_PICKER_CLASS_ZONE5 :Stadscentrum STR_STATION_CLASS_DFLT :Standaard STR_STATION_CLASS_DFLT_STATION :Standaard station @@ -4985,6 +5014,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... er i STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Wegwerkzaamheden in uitvoering STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Kan deze stad niet verwijderen...{}Een station of depot verwijst naar deze plaats of een door de stad beheerde tegel kan niet worden verwijderd STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... er is geen geschikte plaats voor een standbeeld in het centrum van dit dorp +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Kan huis niet bouwen... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... te veel industrieën diff --git a/src/lang/english.txt b/src/lang/english.txt index 9005414034..a7e6713b29 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Abandon scenari STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Exit +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Generate towns +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Place houses + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Game options @@ -2814,6 +2817,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a lorry STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Select a lorry station type to build. Ctrl+Click to add or remove in saved items STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display STR_PICKER_OBJECT_TYPE_TOOLTIP :Select an object type to build. Ctrl+Click to add or remove in saved items. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display +STR_PICKER_HOUSE_TYPE_TOOLTIP :Select a house type to build. Ctrl+Click to add or remove in saved items + +STR_HOUSE_PICKER_CAPTION :House Selection + +STR_HOUSE_PICKER_CLASS_ZONE1 :Edge +STR_HOUSE_PICKER_CLASS_ZONE2 :Outskirts +STR_HOUSE_PICKER_CLASS_ZONE3 :Outer Suburbs +STR_HOUSE_PICKER_CLASS_ZONE4 :Inner Suburbs +STR_HOUSE_PICKER_CLASS_ZONE5 :Town centre STR_STATION_CLASS_DFLT :Default STR_STATION_CLASS_DFLT_STATION :Default station @@ -5001,6 +5014,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... ther STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Road works in progress STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Can't delete this town...{}A station or depot is referring to the town or a town owned tile can't be removed STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... there is no suitable place for a statue in the centre of this town +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Can't build house... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... too many industries diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index 602e1d32af..bbb6f3d2b8 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Abandon scenari STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Exit +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Generate towns +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Place houses + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Game options @@ -2814,6 +2817,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a lorry STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Select a lorry station type to build. Ctrl+Click to add or remove in saved items STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display STR_PICKER_OBJECT_TYPE_TOOLTIP :Select an object type to build. Ctrl+Click to add or remove in saved items. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display +STR_PICKER_HOUSE_TYPE_TOOLTIP :Select a house type to build. Ctrl+Click to add or remove in saved items + +STR_HOUSE_PICKER_CAPTION :House Selection + +STR_HOUSE_PICKER_CLASS_ZONE1 :Edge +STR_HOUSE_PICKER_CLASS_ZONE2 :Outskirts +STR_HOUSE_PICKER_CLASS_ZONE3 :Outer Suburbs +STR_HOUSE_PICKER_CLASS_ZONE4 :Inner Suburbs +STR_HOUSE_PICKER_CLASS_ZONE5 :Town centre STR_STATION_CLASS_DFLT :Default STR_STATION_CLASS_DFLT_STATION :Default station @@ -5001,6 +5014,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... ther STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Road works in progress STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Can't delete this town...{}A station or depot is referring to the town or a town owned tile can't be removed STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... there is no suitable place for a statue in the centre of this town +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Can't build house... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... too many industries diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index e6f331e3ae..ade2067f22 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Abandon scenari STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Quit +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Generate towns +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Place houses + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Game options @@ -2814,6 +2817,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a truck STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Select a truck station type to build. Ctrl+Click to add or remove in saved items STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display STR_PICKER_OBJECT_TYPE_TOOLTIP :Select an object type to build. Ctrl+Click to add or remove in saved items. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only +STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display +STR_PICKER_HOUSE_TYPE_TOOLTIP :Select a house type to build. Ctrl+Click to add or remove in saved items + +STR_HOUSE_PICKER_CAPTION :House Selection + +STR_HOUSE_PICKER_CLASS_ZONE1 :Edge +STR_HOUSE_PICKER_CLASS_ZONE2 :Outskirts +STR_HOUSE_PICKER_CLASS_ZONE3 :Outer Suburbs +STR_HOUSE_PICKER_CLASS_ZONE4 :Inner Suburbs +STR_HOUSE_PICKER_CLASS_ZONE5 :Town center STR_STATION_CLASS_DFLT :Default STR_STATION_CLASS_DFLT_STATION :Default station @@ -5001,6 +5014,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... ther STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Road work in progress STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Can't delete this town...{}A station or depot is referring to the town or a town owned tile can't be removed STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... there is no suitable place for a statue in the center of this town +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Can't build house... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... too many industries diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt index 3e03a52c07..66f418249d 100644 --- a/src/lang/esperanto.txt +++ b/src/lang/esperanto.txt @@ -518,6 +518,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Forlasi scenaro STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Forlasi + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Ludaj agordoj @@ -2753,6 +2754,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Tiru por + + STR_STATION_CLASS_DFLT :Defaŭlta STR_STATION_CLASS_DFLT_STATION :Defaŭlta stacio STR_STATION_CLASS_DFLT_ROADSTOP :Defaŭlta vojhaltejo diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt index e5662adc31..2b6cc2abfa 100644 --- a/src/lang/estonian.txt +++ b/src/lang/estonian.txt @@ -494,6 +494,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Lahku redaktori STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Välju + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Mängu seadistus @@ -2853,8 +2854,17 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Vali rau STR_STATION_BUILD_DRAG_DROP :{BLACK}Lohistamine STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Ehita jaam kasutades hiirega lohistamist +STR_PICKER_MODE_ALL :Kõik +STR_HOUSE_PICKER_CAPTION :Maja valik + +STR_HOUSE_PICKER_CLASS_ZONE1 :Äär +STR_HOUSE_PICKER_CLASS_ZONE2 :Äärealad +STR_HOUSE_PICKER_CLASS_ZONE3 :Äärelinnad +STR_HOUSE_PICKER_CLASS_ZONE4 :Eeslinnad +STR_HOUSE_PICKER_CLASS_ZONE5 :Kesklinn + STR_STATION_CLASS_DFLT :Vaikimisi STR_STATION_CLASS_DFLT_STATION :Vaikimisi jaam STR_STATION_CLASS_DFLT_ROADSTOP :Vaikimisi peatus @@ -5038,6 +5048,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... pole STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Teede ehitamine STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Seda asulat ei saa kõrvaldada...{}Jaam või depoo viitab asulale, või asulale kuuluvat ruutu ei saa kõrvaldada STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... asula keskuses ei leidu kujule sobivat kohta +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Maja ei saa ehitada... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... liiga palju tööstuseid diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt index d36de93d2e..a3fa5e3579 100644 --- a/src/lang/faroese.txt +++ b/src/lang/faroese.txt @@ -360,6 +360,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Far frá tilbur STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Gevst + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spæl møguleikar @@ -2172,6 +2173,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Bygg ein + + STR_STATION_CLASS_DFLT :Vanlig støð STR_STATION_CLASS_WAYP :Waypoint diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index 7372a98e50..45661c26e3 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Sulje skenaario STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Lopeta +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Luo kuntia +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Sijoita taloja + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Pelin valinnat @@ -2814,6 +2817,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Valitse näytet STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Valitse rakennettavan lastauslaiturin tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista STR_PICKER_OBJECT_CLASS_TOOLTIP :Valitse näytettävä objektien luokka STR_PICKER_OBJECT_TYPE_TOOLTIP :Valitse rakennettavan objektin tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista. Ctrl+napsautus+veto valitsee alueen vinottain. Paina lisäksi vaihtonäppäintä nähdäksesi vain kustannusarvion +STR_PICKER_HOUSE_CLASS_TOOLTIP :Valitse näytettävä kunnan vyöhyke +STR_PICKER_HOUSE_TYPE_TOOLTIP :Valitse rakennettavan talon tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista + +STR_HOUSE_PICKER_CAPTION :Talojen valinta + +STR_HOUSE_PICKER_CLASS_ZONE1 :Reuna-alueet +STR_HOUSE_PICKER_CLASS_ZONE2 :Laitamat +STR_HOUSE_PICKER_CLASS_ZONE3 :Ulommat lähiöt +STR_HOUSE_PICKER_CLASS_ZONE4 :Sisemmät lähiöt +STR_HOUSE_PICKER_CLASS_ZONE5 :Keskusta STR_STATION_CLASS_DFLT :Oletus STR_STATION_CLASS_DFLT_STATION :Oletusasema @@ -5001,6 +5014,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... kart STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Tietyöt ovat käynnissä. STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Kuntaa ei voida poistaa...{}Asema tai varikko viittaa kuntaan tai kunnan omistamaa ruutua ei voida poistaa STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... tämän kunnan keskustassa ei ole sopivaa paikkaa patsaalle +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Taloa ei voida rakentaa… # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... liikaa teollisuuslaitoksia diff --git a/src/lang/french.txt b/src/lang/french.txt index 1d77071d49..a9aae4b6fb 100644 --- a/src/lang/french.txt +++ b/src/lang/french.txt @@ -438,6 +438,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Abandonner l'é STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Quitter +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Générer des villes +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Placer des maisons + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Options du Jeu @@ -1083,6 +1086,7 @@ 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_GAME_OPTIONS_ONLINE_CONTENT :Obtenir le contenu STR_GAME_OPTIONS_ONLINE_CONTENT_TOOLTIP :Vérifier les contenus nouveaux ou mis à jour téléchargeables STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :{LTBLUE}(aucun plugin d'intégration avec les plateformes sociales installé) @@ -2476,6 +2480,7 @@ STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION :Votre nom de je STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_TOOLTIP :{BLACK}Actions administratives à accomplir pour ce client STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_TOOLTIP :{BLACK}Actions administratives à accomplir pour cette compagnie STR_NETWORK_CLIENT_LIST_JOIN_TOOLTIP :{BLACK}Rejoindre cette compagnie +STR_NETWORK_CLIENT_LIST_COMPANY_AUTHORIZE_TOOLTIP :{BLACK}Autoriser ce client à joindre votre compagnie STR_NETWORK_CLIENT_LIST_CHAT_CLIENT_TOOLTIP :{BLACK}Envoyer un message à cette personne STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP :{BLACK}Envoyer un message à tous les joueurs de cette compagnie STR_NETWORK_CLIENT_LIST_CHAT_SPECTATOR_TOOLTIP :{BLACK}Envoyer un message à tous les spectateurs @@ -2796,7 +2801,33 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Choisir STR_STATION_BUILD_DRAG_DROP :{BLACK}Glisser/Déposer STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Construire une gare par glisser/déposer +STR_PICKER_MODE_ALL :Tout +STR_PICKER_MODE_ALL_TOOLTIP :Basculer l'affichage des éléments de toutes les classes +STR_PICKER_MODE_USED :Utilisé +STR_PICKER_MODE_USED_TOOLTIP :Basculer l'affichage exclusif d'éléments existants +STR_PICKER_MODE_SAVED :Sauvegardé +STR_PICKER_MODE_SAVED_TOOLTIP :Basculer l'affichage exclusif des éléments sauvegardés +STR_PICKER_STATION_CLASS_TOOLTIP :Séléctionner un type de station à afficher +STR_PICKER_STATION_TYPE_TOOLTIP :Séléctionner un type de station à construire. Ctrl+Clic pour ajouter ou retirer des éléments sauvegardés. +STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Séléctionner un type de point à afficher +STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Séléctionner un point à construire. Ctrl+Clic pour ajouter ou retirer des éléments sauvegardés. +STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Séléctionner un type d'arrêt de bus à afficher +STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Séléctionner un type d'arrêt de bus à construire. Ctrl+Clic pour ajouter ou retirer des éléments sauvegardés. +STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Séléctionner un type d'aire de chargement à afficher +STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Séléctionner un type d'aire de chargement à construire. Ctrl+Clic pour ajouter ou retirer des éléments sauvegardés. +STR_PICKER_OBJECT_CLASS_TOOLTIP :Séléctionner un type d'objet à afficher +STR_PICKER_OBJECT_TYPE_TOOLTIP :Séléctionner un type d'objet à construire. Ctrl+Clic pour ajouter ou retirer des éléments sauvegardés. Ctrl+Clic+Déplacer pour séléctionner en diagonale. Shift pour afficher seulement le coût estimé. +STR_PICKER_HOUSE_CLASS_TOOLTIP :Séléctionner un type de zone de ville à afficher +STR_PICKER_HOUSE_TYPE_TOOLTIP :Séléctionner un type de maison à construire. Ctrl+Clic pour ajouter ou retirer des éléments sauvegardés. + +STR_HOUSE_PICKER_CAPTION :Séléction de maison + +STR_HOUSE_PICKER_CLASS_ZONE1 :Bord +STR_HOUSE_PICKER_CLASS_ZONE2 :Périphérie +STR_HOUSE_PICKER_CLASS_ZONE3 :Banlieue extérieure +STR_HOUSE_PICKER_CLASS_ZONE4 :Banlieue intérieure +STR_HOUSE_PICKER_CLASS_ZONE5 :Centre-ville STR_STATION_CLASS_DFLT :Par défaut STR_STATION_CLASS_DFLT_STATION :Stations par défaut @@ -4984,6 +5015,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... il n STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Route en travaux STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Impossible de supprimer cette ville...{}Une station ou un dépôt fait référence à cette ville ou une propriété municipale ne peut pas être supprimée. STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... aucun emplacement convenable disponible pour une statue dans ce centre-ville +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Impossible de construire une maison # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... trop d'industries diff --git a/src/lang/frisian.txt b/src/lang/frisian.txt index 7717892a7f..18273a9050 100644 --- a/src/lang/frisian.txt +++ b/src/lang/frisian.txt @@ -381,6 +381,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Senariobouwer STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Ofslute + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spulopsjes @@ -2275,6 +2276,8 @@ STR_STATION_BUILD_DRAG_DROP :Sleepe en los l + + STR_STATION_CLASS_DFLT :Standert stasjon STR_STATION_CLASS_WAYP :Kontrôleposten diff --git a/src/lang/gaelic.txt b/src/lang/gaelic.txt index 1743fcc4b5..d92a3eb12e 100644 --- a/src/lang/gaelic.txt +++ b/src/lang/gaelic.txt @@ -568,6 +568,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Fàg deasaiche STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Fàg an-seo + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Roghainnean a' gheama @@ -2578,6 +2579,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Tog stè + + STR_STATION_CLASS_DFLT :Stèisean bunaiteach STR_STATION_CLASS_WAYP :Puingean-turais diff --git a/src/lang/galician.txt b/src/lang/galician.txt index a806c93b18..4f1ebb1365 100644 --- a/src/lang/galician.txt +++ b/src/lang/galician.txt @@ -438,6 +438,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Saír do editor STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Saír + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opcións do xogo @@ -2795,6 +2796,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Constru + + STR_STATION_CLASS_DFLT :Por defecto STR_STATION_CLASS_DFLT_STATION :Estación por defecto STR_STATION_CLASS_DFLT_ROADSTOP :Parada de estrada por defecto diff --git a/src/lang/german.txt b/src/lang/german.txt index 3717684bec..7e778f17e8 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -438,6 +438,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Editor verlasse STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Beenden + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spieleinstellungen @@ -2792,6 +2793,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Stations + + STR_STATION_CLASS_DFLT :Standard STR_STATION_CLASS_DFLT_STATION :Standart-Haltestelle STR_STATION_CLASS_DFLT_ROADSTOP :Standard-Staßenhaltestelle diff --git a/src/lang/greek.txt b/src/lang/greek.txt index c8b1f04429..6ea0bb8ae0 100644 --- a/src/lang/greek.txt +++ b/src/lang/greek.txt @@ -499,6 +499,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Έξοδος α STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Έξοδος + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Επιλογές παιχνιδιού @@ -2908,6 +2909,8 @@ STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Επιλογή STR_PICKER_OBJECT_CLASS_TOOLTIP :Επιλογή κατηγορίας αντικειμένων για εμφάνιση STR_PICKER_OBJECT_TYPE_TOOLTIP :Επιλογή κατηγορίας αντικειμένων για εμφάνιση. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία. Ctrl+κλικ+σύρσιμο για να επιλεγεί διαγώνια περιοχή. Επίσης, πατήστε Shift για εμφάνιση εκτιμώμενου κόστους μόνο + + STR_STATION_CLASS_DFLT :Προεπιλεγμένος STR_STATION_CLASS_DFLT_STATION :Προεπιλεγμένος σταθμός STR_STATION_CLASS_DFLT_ROADSTOP :Προεπιλεγμένη οδική στάση diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index 871d82b0bb..52631218fb 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -396,6 +396,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :עזוב את STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :יציאה + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :אפשרויות המשחק @@ -2452,6 +2453,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}בניי + + STR_STATION_CLASS_DFLT :תחנת בחירת מחדל STR_STATION_CLASS_WAYP :נקודות דרך diff --git a/src/lang/hindi.txt b/src/lang/hindi.txt index 3632773fca..d52fc63e1e 100644 --- a/src/lang/hindi.txt +++ b/src/lang/hindi.txt @@ -154,6 +154,7 @@ STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}वस STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :निकास + # Settings menu ###length 16 STR_SETTINGS_MENU_CONFIG_SETTINGS_TREE :समायोजन @@ -869,6 +870,8 @@ STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE :{BLACK}अक + + STR_STATION_CLASS_DFLT :मानक स्टेशन STR_STATION_CLASS_WAYP :पथ-संकेत diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt index 1cad1053dd..b006a75544 100644 --- a/src/lang/hungarian.txt +++ b/src/lang/hungarian.txt @@ -500,6 +500,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Pályaszerkeszt STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Kilépés az OpenTTD-ből + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Játékbeállítások @@ -2852,6 +2853,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Állomá + + STR_STATION_CLASS_DFLT :Alapértelmezett STR_STATION_CLASS_DFLT_STATION :Alapértelmezett állomás STR_STATION_CLASS_DFLT_ROADSTOP :Alapértelmezett úttorlasz diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt index bfde6f150b..2c85c9c275 100644 --- a/src/lang/icelandic.txt +++ b/src/lang/icelandic.txt @@ -360,6 +360,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Hætta í korta STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Hætta + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Stillingar @@ -2223,6 +2224,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Byggja l + + STR_STATION_CLASS_DFLT :Sjálfgefin stöð STR_STATION_CLASS_WAYP :Millistöð diff --git a/src/lang/ido.txt b/src/lang/ido.txt index f711c1fdca..0379d0a787 100644 --- a/src/lang/ido.txt +++ b/src/lang/ido.txt @@ -292,6 +292,7 @@ STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Pozez ob ###length 7 STR_SCENEDIT_FILE_MENU_SEPARATOR : + # Settings menu ###length 16 STR_SETTINGS_MENU_FULL_DETAIL :Plene detaloza @@ -945,6 +946,8 @@ STR_STATION_BUILD_ACCEPTS_CARGO :{BLACK}Aceptas: + + # Signal window # Bridge selection window diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index 41612ecd91..718a389cfb 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -432,6 +432,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Batalkan skenar STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Keluar + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Pengaturan permainan @@ -2735,6 +2736,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Membangu + + STR_STATION_CLASS_DFLT :Standar STR_STATION_CLASS_DFLT_STATION :Stasiun standar STR_STATION_CLASS_DFLT_ROADSTOP :Pemberhentian jalan standar diff --git a/src/lang/irish.txt b/src/lang/irish.txt index 0905a3b1f6..cf5f2851cd 100644 --- a/src/lang/irish.txt +++ b/src/lang/irish.txt @@ -395,6 +395,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Fág eagarthói STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Scoir + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Roghanna an chluiche @@ -2552,6 +2553,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Tóg st + + STR_STATION_CLASS_DFLT :Stáisiún réamhshocraithe STR_STATION_CLASS_WAYP :Pointí bealaigh diff --git a/src/lang/italian.txt b/src/lang/italian.txt index b5a27518c3..938191ea06 100644 --- a/src/lang/italian.txt +++ b/src/lang/italian.txt @@ -439,6 +439,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Esci dall'edito STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Esci + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opzioni gioco @@ -2830,6 +2831,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Costruis + + STR_STATION_CLASS_DFLT :Predefinita STR_STATION_CLASS_DFLT_STATION :Stazione predefinita STR_STATION_CLASS_DFLT_ROADSTOP :Fermata stradale predefinita diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt index f605687409..987bff5324 100644 --- a/src/lang/japanese.txt +++ b/src/lang/japanese.txt @@ -405,6 +405,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :タイトルに STR_SCENEDIT_FILE_MENU_SEPARATOR :――――――――― STR_SCENEDIT_FILE_MENU_QUIT :OpenTTDを終了 + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :ゲームオプション設定 @@ -2615,6 +2616,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}ドラ + + STR_STATION_CLASS_DFLT :標準駅 STR_STATION_CLASS_WAYP :中継駅 diff --git a/src/lang/korean.txt b/src/lang/korean.txt index 3cf61e8fe9..ad5d5f6664 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -438,6 +438,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :시나리오 STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :게임 종료 +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :도시 생성 +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :건물 건설 + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :게임 기본 설정 @@ -2710,7 +2713,7 @@ STR_MISSING_GRAPHICS_ERROR_QUIT :{BLACK}OpenTTD STR_TRANSPARENCY_CAPTION :{WHITE}투명 설정 STR_TRANSPARENT_SIGNS_TOOLTIP :{BLACK}역명판을 보여줄 지 선택합니다. 고정하려면 CTRL+클릭하세요 STR_TRANSPARENT_TREES_TOOLTIP :{BLACK}나무를 보여줄 지 선택합니다. 고정하려면 CTRL+클릭하세요 -STR_TRANSPARENT_HOUSES_TOOLTIP :{BLACK}집을 보여줄 지 선택합니다. 고정하려면 CTRL+클릭하세요 +STR_TRANSPARENT_HOUSES_TOOLTIP :{BLACK}건물을 보여줄 지 선택합니다. 고정하려면 CTRL+클릭하세요 STR_TRANSPARENT_INDUSTRIES_TOOLTIP :{BLACK}산업시설을 보여줄 지 선택합니다. 고정하려면 CTRL+클릭하세요 STR_TRANSPARENT_BUILDINGS_TOOLTIP :{BLACK}정거장, 차량기지, 경유지 등과 같은 건물을 보여줄 지 선택합니다. 고정하려면 CTRL+클릭하세요 STR_TRANSPARENT_BRIDGES_TOOLTIP :{BLACK}다리를 보여줄 지 선택합니다. 고정하려면 CTRL+클릭하세요 @@ -2815,6 +2818,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :표시할 트 STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :설치하려는 트럭 적하장 종류를 선택하세요. CTRL+클릭하면 즐겨찾기 추가/제거가 가능합니다 STR_PICKER_OBJECT_CLASS_TOOLTIP :표시할 오브젝트 종류를 선택하세요 STR_PICKER_OBJECT_TYPE_TOOLTIP :설치하려는 오브젝트 종류를 선택합니다. CTRL+클릭+드래그하면 대각선 방향의 영역을 선택할 수 있습니다. SHIFT 키를 누른 채로 사용하면 예상 비용을 볼 수 있습니다 +STR_PICKER_HOUSE_CLASS_TOOLTIP :표시할 도시 구역을 선택하세요 +STR_PICKER_HOUSE_TYPE_TOOLTIP :지으려는 건물 종류를 선택하세요. CTRL+클릭하면 즐겨찾기 추가/제거가 가능합니다 + +STR_HOUSE_PICKER_CAPTION :건물 선택 + +STR_HOUSE_PICKER_CLASS_ZONE1 :가장자리 +STR_HOUSE_PICKER_CLASS_ZONE2 :교외 +STR_HOUSE_PICKER_CLASS_ZONE3 :바깥쪽 시내 +STR_HOUSE_PICKER_CLASS_ZONE4 :안쪽 시내 +STR_HOUSE_PICKER_CLASS_ZONE5 :도시 중심 STR_STATION_CLASS_DFLT :기본 STR_STATION_CLASS_DFLT_STATION :기본 역 @@ -5002,6 +5015,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... 지 STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}도로 작업이 진행 중입니다 STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}이 도시를 삭제할 수 없습니다...{}도시나 도시 소유의 땅에 역, 정류장, 항구, 공항 또는 차량기지, 차고지, 정박소 등이 존재하면 도시를 삭제할 수 없습니다. STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... 이 도시의 중심에 동상을 세우기 적합한 장소가 없습니다 +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}건물을 지을 수 없습니다... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... 산업시설이 너무 많습니다 @@ -5015,7 +5029,7 @@ STR_ERROR_ONLY_ONE_ALLOWED_PER_TOWN :{WHITE}... 한 STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS_WITH_POPULATION_OF_1200 :{WHITE}... 인구 1200명 이상의 도시에만 지을 수 있습니다 STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}... 열대우림 지역에만 지을 수 있습니다 STR_ERROR_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}... 사막 지역에만 지을 수 있습니다 -STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}... 도시 안의 집이 있는 위치에만 지을 수 있습니다 +STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}... 도시 안의 건물이 있는 위치에만 지을 수 있습니다 STR_ERROR_CAN_ONLY_BE_BUILT_NEAR_TOWN_CENTER :{WHITE}... 도시의 가운데 근처에만 지을 수 있습니다 STR_ERROR_CAN_ONLY_BE_BUILT_IN_LOW_AREAS :{WHITE}... 낮은 지역에만 지을 수 있습니다 STR_ERROR_CAN_ONLY_BE_POSITIONED :{WHITE}... 지도 가장자리 근처에만 놓을 수 있습니다 diff --git a/src/lang/latin.txt b/src/lang/latin.txt index ffcd61eeb4..506a6c3a68 100644 --- a/src/lang/latin.txt +++ b/src/lang/latin.txt @@ -570,6 +570,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Relinquere scri STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Exire + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Ludi optiones @@ -2583,6 +2584,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Struere + + STR_STATION_CLASS_DFLT :Statio solita STR_STATION_CLASS_WAYP :Interloci diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt index 56b0adca4f..63df7d6c7e 100644 --- a/src/lang/latvian.txt +++ b/src/lang/latvian.txt @@ -439,6 +439,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Pamest scenāri STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Iziet + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spēles opcijas @@ -2801,6 +2802,10 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Izvēlē STR_STATION_BUILD_DRAG_DROP :{BLACK}Vilkt un nomest STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Būvēt staciju izmantojot "vilkt un nomest" +STR_PICKER_MODE_ALL :Visi +STR_PICKER_MODE_SAVED :Saglabāts + + STR_STATION_CLASS_DFLT :Noklusējuma diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt index 12f40f69b9..81941eac9f 100644 --- a/src/lang/lithuanian.txt +++ b/src/lang/lithuanian.txt @@ -625,6 +625,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Uždaryti redak STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Išeiti + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Pagrindinės nuostatos @@ -2950,6 +2951,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Statyti + + STR_STATION_CLASS_DFLT :Numatytoji STR_STATION_CLASS_DFLT_STATION :Numatytoji stotelė STR_STATION_CLASS_DFLT_ROADSTOP :Numatytoji kelio stotelė diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt index 618a02efec..1051e72608 100644 --- a/src/lang/luxembourgish.txt +++ b/src/lang/luxembourgish.txt @@ -437,6 +437,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Eraus aus dem E STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Eraus + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spilloptiounen @@ -2788,6 +2789,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}D'Statio + + STR_STATION_CLASS_DFLT :Standard STR_STATION_CLASS_DFLT_STATION :Standardstatioun STR_STATION_CLASS_DFLT_ROADSTOP :Standard Stroossenarrêt diff --git a/src/lang/macedonian.txt b/src/lang/macedonian.txt index b264482165..956400b4c8 100644 --- a/src/lang/macedonian.txt +++ b/src/lang/macedonian.txt @@ -358,6 +358,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Напушти STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Напушти + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :игра опции @@ -1288,6 +1289,8 @@ STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Изгр + + # Signal window STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Влез сигнализација (електрика){}Зелено е се додека има барем еден зелен излез-сигнал во продолжението на траката, во спротивно е црвено. STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Излез Сигнализација (електрика){}Се однесува на ист начин како блок-сигналот, но потребно е да ја има точната боја на влезен и комбо пресигнал. diff --git a/src/lang/malay.txt b/src/lang/malay.txt index aee8674dea..eca37f6f79 100644 --- a/src/lang/malay.txt +++ b/src/lang/malay.txt @@ -363,6 +363,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Abai penyunting STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Keluar + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Pilihan permainan @@ -2121,6 +2122,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Bina ste + + STR_STATION_CLASS_DFLT :Stesen lazim STR_STATION_CLASS_WAYP :Tandatuju diff --git a/src/lang/maltese.txt b/src/lang/maltese.txt index abc21a91a2..741139620f 100644 --- a/src/lang/maltese.txt +++ b/src/lang/maltese.txt @@ -272,6 +272,7 @@ STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Ibni ind ###length 7 STR_SCENEDIT_FILE_MENU_SEPARATOR : + # Settings menu ###length 16 @@ -874,6 +875,8 @@ STR_NETWORK_SERVER_MESSAGE :*** {1:STRING} + + # Signal window # Bridge selection window diff --git a/src/lang/marathi.txt b/src/lang/marathi.txt index 7bffb779ce..9a9d274186 100644 --- a/src/lang/marathi.txt +++ b/src/lang/marathi.txt @@ -352,6 +352,7 @@ STR_SCENEDIT_FILE_MENU_LOAD_SCENARIO :उद्दे STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :बंद करा + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :खेळाचे पर्याय @@ -1197,6 +1198,8 @@ STR_NETWORK_SERVER_MESSAGE :*** {1:STRING} + + # Signal window # Bridge selection window diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index d10c76178f..492d838973 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -439,6 +439,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Avslutt rediger STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Avslutt + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spillinnstillinger @@ -2798,6 +2799,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Bygg en + + STR_STATION_CLASS_DFLT :Standard STR_STATION_CLASS_DFLT_STATION :Standard stasjon STR_STATION_CLASS_DFLT_ROADSTOP :Standard veistans diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt index e58a70908d..ed2d9f398d 100644 --- a/src/lang/norwegian_nynorsk.txt +++ b/src/lang/norwegian_nynorsk.txt @@ -382,6 +382,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Avbryt redigeri STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Avslutt + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spelinstillingar @@ -2287,6 +2288,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Bygg sta + + STR_STATION_CLASS_DFLT :Standard stasjon STR_STATION_CLASS_WAYP :Kontrollpunkt diff --git a/src/lang/persian.txt b/src/lang/persian.txt index 3efb85ad35..b19a03818a 100644 --- a/src/lang/persian.txt +++ b/src/lang/persian.txt @@ -376,6 +376,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :خارج شدن STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :خروج + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :تنظیمات بازی @@ -2115,6 +2116,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}ساخت + + STR_STATION_CLASS_DFLT :ایستگاه پیش فرض STR_STATION_CLASS_WAYP :نقطه مسیر ها diff --git a/src/lang/polish.txt b/src/lang/polish.txt index ff954468cd..9b95092768 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -816,6 +816,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Opuść edytor STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Wyjście + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opcje gry @@ -3179,6 +3180,9 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Buduj st + +STR_HOUSE_PICKER_CLASS_ZONE5 :Centrum miasta + STR_STATION_CLASS_DFLT :Standardowa STR_STATION_CLASS_DFLT_STATION :Standardowa stacja STR_STATION_CLASS_DFLT_ROADSTOP :Standardowy przystanek diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index 4ba0ae0f46..ce832bde1d 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -438,6 +438,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Abandonar edito STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Sair +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Gerar localidades +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Colocar casas + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opções do Jogo @@ -2815,6 +2818,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Selecionar uma STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Escolher um tipo de estação de camiões para construir. Ctrl+Clique para adicionar ou remover nos itens guardados STR_PICKER_OBJECT_CLASS_TOOLTIP :Selecionar uma classe de objeto para mostrar STR_PICKER_OBJECT_TYPE_TOOLTIP :Selecione um tipo de objeto para construir. Ctrl+Clique para adicionar ou remover nos itens guardados. Ctrl+Clique+Arrastar para selecionar a área diagonalmente. Pressione também Shift para apenas mostrar o custo estimado +STR_PICKER_HOUSE_CLASS_TOOLTIP :Selecione uma zona de localidade para mostrar +STR_PICKER_HOUSE_TYPE_TOOLTIP :Escolher um tipo de casa para construir. Ctrl+Clique para adicionar ou remover nos itens guardados + +STR_HOUSE_PICKER_CAPTION :Seleção de Casas + +STR_HOUSE_PICKER_CLASS_ZONE1 :Borda +STR_HOUSE_PICKER_CLASS_ZONE2 :Arredores +STR_HOUSE_PICKER_CLASS_ZONE3 :Subúrbios Externos +STR_HOUSE_PICKER_CLASS_ZONE4 :Subúrbios Internos +STR_HOUSE_PICKER_CLASS_ZONE5 :Centro da localidade STR_STATION_CLASS_DFLT :Padrão STR_STATION_CLASS_DFLT_STATION :Estação padrão @@ -3056,7 +3069,7 @@ STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP_TOOLTIP :{BLACK}Também STR_INDUSTRY_CARGOES_SELECT_CARGO :{BLACK}Selecionar carga STR_INDUSTRY_CARGOES_SELECT_CARGO_TOOLTIP :{BLACK}Selecione a carga que pretende mostrar STR_INDUSTRY_CARGOES_SELECT_INDUSTRY :{BLACK}Selecione a indústria -STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Selecione a industria que pretende mostrar +STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Selecione a indústria que pretende mostrar # Land area window STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Informações do Terreno @@ -3282,7 +3295,7 @@ STR_MAPGEN_BY :{BLACK}* STR_MAPGEN_NUMBER_OF_TOWNS :{BLACK}Num. de localidades: STR_MAPGEN_NUMBER_OF_TOWNS_TOOLTIP :{BLACK}Selecionar a densidade das cidades, ou um número personalizado STR_MAPGEN_TOWN_NAME_LABEL :{BLACK}Nomes das localidades: -STR_MAPGEN_TOWN_NAME_DROPDOWN_TOOLTIP :{BLACK}Seleccionar o estilo dos nomes das localidades +STR_MAPGEN_TOWN_NAME_DROPDOWN_TOOLTIP :{BLACK}Selecionar o estilo dos nomes das localidades STR_MAPGEN_DATE :{BLACK}Data: STR_MAPGEN_DATE_TOOLTIP :{BLACK}Selecionar a data inicial STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}Num. de indústrias: @@ -5002,6 +5015,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... não STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Trabalhos na estrada em curso STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Não é possível eliminar esta localidade...{}Uma estação ou depósito refere-se à localidade ou não é possível remover terreno pertencente à mesma STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... não há um sítio adequado para uma estátua no centro desta localidade +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Não é possível construir casa... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... demasiadas indústrias diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index 5ba59f559f..aa2c948f4e 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -437,6 +437,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Ieșire din edi STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Ieșire din joc + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opțiunile jocului @@ -2786,6 +2787,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Construi + + STR_STATION_CLASS_DFLT :Implicită STR_STATION_CLASS_DFLT_STATION :Stație implicită STR_STATION_CLASS_DFLT_ROADSTOP :Oprire implicită a drumului diff --git a/src/lang/russian.txt b/src/lang/russian.txt index 8b9e8e4566..4759fac882 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -563,6 +563,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Выйти из STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Выход +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Создание городов +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Размещение домов + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Основные настройки @@ -2985,6 +2988,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Выберит STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Выберите грузовой терминал для строительства. Ctrl+щелчок добавит его в «избранное» или удалит. STR_PICKER_OBJECT_CLASS_TOOLTIP :Выберите тип объектов для отображения STR_PICKER_OBJECT_TYPE_TOOLTIP :Выберите объект для строительства. Ctrl+щелчок добавит его в «избранное» или удалит. Ctrl+перетаскивание - выбор диагональной области. При нажатом Shift - оценка стоимости строительства. +STR_PICKER_HOUSE_CLASS_TOOLTIP :Выберите городскую зону для отображения соответствующих строений +STR_PICKER_HOUSE_TYPE_TOOLTIP :Выберите дом для строительства. Ctrl+щелчок добавит его в «избранное» или удалит. + +STR_HOUSE_PICKER_CAPTION :Выбор типов домов + +STR_HOUSE_PICKER_CLASS_ZONE1 :Край +STR_HOUSE_PICKER_CLASS_ZONE2 :Окраина +STR_HOUSE_PICKER_CLASS_ZONE3 :Периферия +STR_HOUSE_PICKER_CLASS_ZONE4 :Пригород +STR_HOUSE_PICKER_CLASS_ZONE5 :Центр STR_STATION_CLASS_DFLT :Стандартная станция STR_STATION_CLASS_DFLT_STATION :Стандартная ж/д станция @@ -5188,6 +5201,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... не STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Идут дорожные работы... STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Невозможно уничтожить город:{}к нему относится станция или депо, либо невозможно очистить одну из занимаемых им клеток. STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... в центре города нет места для статуи +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Невозможно поставить дом... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... слишком много предприятий diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt index e796c9afd2..0d452ad2e5 100644 --- a/src/lang/serbian.txt +++ b/src/lang/serbian.txt @@ -620,6 +620,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Napusti editor STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Izađi + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opcije @@ -2930,6 +2931,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Gradnja + + STR_STATION_CLASS_DFLT :Podrazumevana stanica STR_STATION_CLASS_WAYP :Putanje diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index 8947e1b6a2..eb61c4b4da 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :退出编辑器 STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :退出 +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :生成城镇 +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :放置房屋 + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :游戏选项 @@ -900,7 +903,7 @@ STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} 已经达到报废年限 STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD_AND :{WHITE}{VEHICLE} 已经达到报废年限,必须马上更新! STR_NEWS_TRAIN_IS_STUCK :{WHITE}{VEHICLE} 无法找到道路 -STR_NEWS_VEHICLE_IS_LOST :{WHITE}{VEHICLE} 无法找到路线. +STR_NEWS_VEHICLE_IS_LOST :{WHITE}{VEHICLE} 无法找到路线 STR_NEWS_VEHICLE_UNPROFITABLE_YEAR :{WHITE}{VEHICLE} 的去年损益为 {CURRENCY_LONG} STR_NEWS_VEHICLE_UNPROFITABLE_PERIOD :{WHITE}{VEHICLE} 上期的损益为 {CURRENCY_LONG} STR_NEWS_AIRCRAFT_DEST_TOO_FAR :{WHITE}{VEHICLE} 由于航程过远,航班无法到达。 @@ -2152,7 +2155,7 @@ STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_ALGORITHM :{WHITE}...存 STR_CONFIG_ERROR_INVALID_BASE_GRAPHICS_NOT_FOUND :{WHITE}... 禁用基础图形设置 '{STRING}': 未找到 STR_CONFIG_ERROR_INVALID_BASE_SOUNDS_NOT_FOUND :{WHITE}……禁用基础音效设置 '{STRING}': 未找到 STR_CONFIG_ERROR_INVALID_BASE_MUSIC_NOT_FOUND :{WHITE}... 禁用基础音乐设置 '{STRING}': 未找到 -STR_CONFIG_ERROR_OUT_OF_MEMORY :{WHITE}内存溢出 +STR_CONFIG_ERROR_OUT_OF_MEMORY :{WHITE}内存不足 STR_CONFIG_ERROR_SPRITECACHE_TOO_BIG :{WHITE}无法分配 {BYTES} 的 Sprite 缓存。Sprite 缓存的大小已降至 {BYTES}。OpenTTD 的性能将受到影响。请尝试停用 32bpp 图形及/或减少放大倍数,以降低内存需求 # Video initalization errors @@ -2640,9 +2643,9 @@ STR_CONTENT_SELECT_UPDATES_CAPTION_TOOLTIP :{BLACK}更新 STR_CONTENT_UNSELECT_ALL_CAPTION :{BLACK}取消全选 STR_CONTENT_UNSELECT_ALL_CAPTION_TOOLTIP :{BLACK}取消全部选择 STR_CONTENT_SEARCH_EXTERNAL :{BLACK}在外部网站搜索 -STR_CONTENT_SEARCH_EXTERNAL_TOOLTIP :{BLACK}在与 OpenTTD 没有联系的网站搜寻没有纳入 OpenTTD 內容服务的內容 +STR_CONTENT_SEARCH_EXTERNAL_TOOLTIP :{BLACK}在与 OpenTTD 没有联系的网站搜索没有纳入 OpenTTD 内容服务的内容 STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER_CAPTION :{WHITE}正在离开游戏! -STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER :{WHITE}在外部网站下载內容的规则及条款可能跟 OpenTTD 引用的规则及条款不同。{}您需要参照有关网站以取得在 OpenTTD 安装有关內容的资讯。{}您要継续吗? +STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER :{WHITE}在外部网站下载内容的规则及条款可能跟 OpenTTD 引用的规则及条款不同。{}您需要参照有关网站以取得在 OpenTTD 安装有关内容的资讯。{}您要继续吗? STR_CONTENT_FILTER_TITLE :{BLACK}标签/名称过滤器 STR_CONTENT_OPEN_URL :{BLACK}主页 STR_CONTENT_OPEN_URL_TOOLTIP :{BLACK}打开该扩展包主页 @@ -2814,6 +2817,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :选择显示的 STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :选择建造的汽车货场类型。按住 键操作以保存或删除当前项目 STR_PICKER_OBJECT_CLASS_TOOLTIP :选择显示的物件类别 STR_PICKER_OBJECT_TYPE_TOOLTIP :选择建造的物件类型。按住 键选择物件以保存或删除当前项目。按住 键拖拽以沿对角线放置,按住 键以显示预计费用 +STR_PICKER_HOUSE_CLASS_TOOLTIP :选择显示的城镇区域 +STR_PICKER_HOUSE_TYPE_TOOLTIP :选择建造的房屋类型。按住 键操作以保存或删除当前项目 + +STR_HOUSE_PICKER_CAPTION :房屋选择 + +STR_HOUSE_PICKER_CLASS_ZONE1 :城镇边缘 +STR_HOUSE_PICKER_CLASS_ZONE2 :郊区边缘 +STR_HOUSE_PICKER_CLASS_ZONE3 :外郊区 +STR_HOUSE_PICKER_CLASS_ZONE4 :内郊区 +STR_HOUSE_PICKER_CLASS_ZONE5 :城镇中心 STR_STATION_CLASS_DFLT :默认 STR_STATION_CLASS_DFLT_STATION :默认车站 @@ -2908,7 +2921,7 @@ STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}修建 STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}建设船闸。按住 键点选以显示预计费用。 STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}建造船坞(可以购买或保养船只),按住 键以显示预计费用。 STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}建造码头。按住 键以合并车站,按住 Shift 键以显示预计费用。 -STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}放置一个浮标,可以用作路点。按住 键操作以显示预计费用 +STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}放置浮标,可以用作路点。按住 键操作以显示预计费用 STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}建设渡槽,按住 Shift 键操作可以显示所需资金 STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}修建运河。在海平面按住 键则会淹没周围土地。 STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}放置河流。按住 键以沿对角线放置。 @@ -4850,8 +4863,8 @@ STR_TEXTFILE_JUMPLIST_TOOLTIP :{BLACK}通过 STR_TEXTFILE_JUMPLIST_ITEM :{WHITE}{STRING} STR_TEXTFILE_NAVBACK_TOOLTIP :{BLACK}退回到定位历史 STR_TEXTFILE_NAVFORWARD_TOOLTIP :{BLACK}取消定位历史撤回 -STR_TEXTFILE_WRAP_TEXT :{WHITE}強迫文字换行 -STR_TEXTFILE_WRAP_TEXT_TOOLTIP :{BLACK}強迫宽于窗格的內文自动换行 +STR_TEXTFILE_WRAP_TEXT :{WHITE}强制文字换行 +STR_TEXTFILE_WRAP_TEXT_TOOLTIP :{BLACK}强制宽于窗口的文本自动换行 STR_TEXTFILE_VIEW_README :{BLACK}查看说明 STR_TEXTFILE_VIEW_README_TOOLTIP :查看此项目的说明文件 STR_TEXTFILE_VIEW_CHANGELOG :{BLACK}更新日志 @@ -5001,6 +5014,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}地图 STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}正在进行道路工程 STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}无法删除城镇...{}城镇范围内还有车站、车库或无法移除的区块 STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... 城市中心没有合适的地方放置公司塑像 +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}不能建造房屋…… # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}…… 游戏中的工业过多 diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt index f34e689a7f..96d21e947a 100644 --- a/src/lang/slovak.txt +++ b/src/lang/slovak.txt @@ -501,6 +501,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Opustiť editor STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Ukončiť + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Možnosti hry @@ -2859,6 +2860,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Automati + + STR_STATION_CLASS_DFLT :Pôvodná STR_STATION_CLASS_DFLT_STATION :Predvolená stanica STR_STATION_CLASS_DFLT_ROADSTOP :Predvolená zastávka diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt index 38d257676b..b0bd09f3db 100644 --- a/src/lang/slovenian.txt +++ b/src/lang/slovenian.txt @@ -534,6 +534,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Izhod iz urejev STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Izhod + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Možnosti igre @@ -2522,6 +2523,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Zgradi p + + STR_STATION_CLASS_DFLT :Privzeta postaja STR_STATION_CLASS_WAYP :Točke poti diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index 0a83870f0e..06e4c73e93 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -438,6 +438,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Salir del edito STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Salir + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opciones de juego @@ -2792,6 +2793,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Construy + + STR_STATION_CLASS_DFLT :Por defecto STR_STATION_CLASS_DFLT_STATION :Estación por defecto STR_STATION_CLASS_DFLT_ROADSTOP :Estación de carretera por defecto diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index 1271954a8c..deb50f5ee6 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -433,6 +433,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Salir del edito STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Salir + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Opciones de juego @@ -2736,6 +2737,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Construi + + STR_STATION_CLASS_DFLT :por defecto STR_STATION_CLASS_DFLT_STATION :Estación por defecto STR_STATION_CLASS_DFLT_ROADSTOP :Estación de carretera por defecto diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index 575321c0c7..ac78e3304e 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Avsluta scenari STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Avsluta +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Generera städer +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Placera ut hus + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Spelinställningar @@ -1082,6 +1085,7 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Musikpak STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Välj vilket musikpaket som ska användas STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Yttligare information om musikpaketet +STR_GAME_OPTIONS_ONLINE_CONTENT_TOOLTIP :Kontrollera om det finns nytt och uppdaterat innehåll att ladda ned STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :{LTBLUE}(inga tillägg för att integrera med sociala plattformar installerade) @@ -2794,13 +2798,23 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Välj l STR_STATION_BUILD_DRAG_DROP :{BLACK}Drag & Släpp STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Bygg en station genom att dra & släppa +STR_PICKER_MODE_ALL :Alla +STR_PICKER_MODE_ALL_TOOLTIP :Slå av/på visning av objekt från alla klasser +STR_PICKER_MODE_USED :Använda +STR_PICKER_MODE_USED_TOOLTIP :Slå av/på visning av endast existerande objekt +STR_PICKER_HOUSE_CLASS_TOOLTIP :Välj vilken stadszon som ska visas + +STR_HOUSE_PICKER_CAPTION :Husval + +STR_HOUSE_PICKER_CLASS_ZONE4 :Innerförorterna +STR_HOUSE_PICKER_CLASS_ZONE5 :Stadskärnan STR_STATION_CLASS_DFLT :Original STR_STATION_CLASS_DFLT_STATION :Standardstation STR_STATION_CLASS_DFLT_ROADSTOP :Standardvägstopp STR_STATION_CLASS_WAYP :Riktmärken -STR_STATION_CLASS_WAYP_WAYPOINT :Standard vägpunkt +STR_STATION_CLASS_WAYP_WAYPOINT :Standardriktmärke # Signal window STR_BUILD_SIGNAL_CAPTION :{WHITE}Signalval @@ -4982,6 +4996,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... det STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Vägarbete pågår STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Kan inte ta bort den här staden...{}En station eller depå refererar till staden eller så kan inte en stadsägd ruta tas bort. STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... det finns ingen lämplig plats för en staty i stadens centrum +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Kan inte bygga hus... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... för många industrier diff --git a/src/lang/tamil.txt b/src/lang/tamil.txt index 33f70d8c45..ffceb12dd9 100644 --- a/src/lang/tamil.txt +++ b/src/lang/tamil.txt @@ -435,6 +435,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :சித்த STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :வெளியேறு + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :விளையாட்டு விருப்ப பேரம் @@ -2559,6 +2560,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}இழ + + STR_STATION_CLASS_DFLT :இயல்பிருப்பு STR_STATION_CLASS_DFLT_STATION :இயல்பிருப்பு நிலையம் STR_STATION_CLASS_DFLT_ROADSTOP :இயல்பிருப்பு சாலை நிறுத்தம் diff --git a/src/lang/thai.txt b/src/lang/thai.txt index 270ddb4edb..a784c6da8d 100644 --- a/src/lang/thai.txt +++ b/src/lang/thai.txt @@ -385,6 +385,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :ออกจา STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :ออก + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :ตัวเลือกเกม @@ -2412,6 +2413,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}สร + + STR_STATION_CLASS_DFLT :สถานีมาตรฐาน STR_STATION_CLASS_WAYP :จุดตรวจ diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt index c3a726b229..aae01a631e 100644 --- a/src/lang/traditional_chinese.txt +++ b/src/lang/traditional_chinese.txt @@ -435,6 +435,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :離開編輯器 STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :離開 + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :遊戲選項 @@ -2687,6 +2688,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}以拖 + + STR_STATION_CLASS_DFLT :預設 STR_STATION_CLASS_DFLT_STATION :預設車站 STR_STATION_CLASS_DFLT_ROADSTOP :預設車站 diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt index 022bda2835..36f2de1328 100644 --- a/src/lang/turkish.txt +++ b/src/lang/turkish.txt @@ -438,6 +438,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Editörden çı STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Oyundan Çık + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Seçenekler @@ -2791,6 +2792,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Sürükl + + STR_STATION_CLASS_DFLT :Varsayılan STR_STATION_CLASS_DFLT_STATION :Varsayılan istasyon STR_STATION_CLASS_DFLT_ROADSTOP :Varsayılan yol durağı diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index e54ac9bd0a..2ae0cb7e4a 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -571,6 +571,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Вийти з STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Вихід + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Налаштування гри @@ -2931,6 +2932,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Буду + + STR_STATION_CLASS_DFLT :Звичайна STR_STATION_CLASS_DFLT_STATION :Звичайна станція STR_STATION_CLASS_DFLT_ROADSTOP :Звичайна зупинка diff --git a/src/lang/urdu.txt b/src/lang/urdu.txt index 3d0dcc7c71..70c09e1d3a 100644 --- a/src/lang/urdu.txt +++ b/src/lang/urdu.txt @@ -366,6 +366,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :مدیر بند STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :باہر نکلو + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :کھیل کے اختیارات @@ -1981,6 +1982,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}کھین + + STR_STATION_CLASS_DFLT :طے شدہ اسٹیشن STR_STATION_CLASS_WAYP :گزرگاہیں diff --git a/src/lang/vietnamese.txt b/src/lang/vietnamese.txt index 0119ce112f..de61386a2d 100644 --- a/src/lang/vietnamese.txt +++ b/src/lang/vietnamese.txt @@ -437,6 +437,9 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Thoát khỏi t STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Thoát +STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Khởi tạo đô thị +STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Sắp xếp nhà + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Cấu hình trò chơi @@ -955,6 +958,7 @@ STR_GAME_OPTIONS_VOLUME :Âm lượng STR_GAME_OPTIONS_SFX_VOLUME :Hiệu ứng âm thanh STR_GAME_OPTIONS_MUSIC_VOLUME :Âm nhạc +STR_GAME_OPTIONS_VOLUME_MARK :{NUM}% STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME :{BLACK}Đơn vị tiền tệ STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP :{BLACK}Lựa chọn đơn vị tiền tệ @@ -1052,6 +1056,7 @@ STR_GAME_OPTIONS_GUI_FONT_SPRITE_TOOLTIP :{BLACK}Tuỳ ch STR_GAME_OPTIONS_GUI_FONT_AA :{BLACK}Phông chữ chống răng cưa STR_GAME_OPTIONS_GUI_FONT_AA_TOOLTIP :{BLACK}Tuỳ chọn này để chống răng cưa phông chữ co dãn được +STR_GAME_OPTIONS_GUI_SCALE_MARK :{DECIMAL}x STR_GAME_OPTIONS_PARTICIPATE_SURVEY_FRAME :{BLACK}Khảo sát tự động STR_GAME_OPTIONS_PARTICIPATE_SURVEY :{BLACK}Tham gia khảo sát tự động @@ -1080,6 +1085,8 @@ 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_GAME_OPTIONS_ONLINE_CONTENT :Tải Nội Dung +STR_GAME_OPTIONS_ONLINE_CONTENT_TOOLTIP :Kiểm tra những nội dung mới & cập nhật để tải về STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :{LTBLUE}(không có plugins được cài đặt để tích hợp vào nền tảng xã hội) @@ -1823,6 +1830,9 @@ STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Thiết lập k STR_CONFIG_SETTING_SERVINT_SHIPS :Tần suất bảo trì mặc định đối với tàu thủy: {STRING} STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Thiết lập khoảng thời gian bảo trì tùy chọn đối với các tàu thủy, nếu phương tiện không có riêng thời gian bảo trì này ###length 3 +STR_CONFIG_SETTING_SERVINT_VALUE_DAYS :{COMMA}{NBSP}Ngày +STR_CONFIG_SETTING_SERVINT_VALUE_MINUTES :{COMMA}{NBSP}Phút +STR_CONFIG_SETTING_SERVINT_VALUE_PERCENTAGE :{COMMA}{NBSP}% ###setting-zero-is-special STR_CONFIG_SETTING_SERVINT_DISABLED :tắt @@ -2469,6 +2479,7 @@ STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION :Tên người c STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_TOOLTIP :{BLACK}Các tác vụ quản lý thực hiện cho client này STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_TOOLTIP :{BLACK}Các tác vụ quản lý thực hiện cho công ty này STR_NETWORK_CLIENT_LIST_JOIN_TOOLTIP :{BLACK}Gia nhập công ty này +STR_NETWORK_CLIENT_LIST_COMPANY_AUTHORIZE_TOOLTIP :{BLACK}Cho phép máy khách này gia nhập công ty của bạn STR_NETWORK_CLIENT_LIST_CHAT_CLIENT_TOOLTIP :{BLACK}Gửi tin nhắn tới người chơi này STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP :{BLACK}Gửi tin nhắn tới tất cả người chơi trong công ty này STR_NETWORK_CLIENT_LIST_CHAT_SPECTATOR_TOOLTIP :{BLACK}Gửi tin nhắn tới tất cả người xem @@ -2789,6 +2800,10 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Độ d STR_STATION_BUILD_DRAG_DROP :{BLACK}Kéo & thả STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Xây dựng ga bằng các kéo & thả +STR_PICKER_MODE_ALL :Tất cả +STR_PICKER_MODE_SAVED :Đã lưu + + STR_STATION_CLASS_DFLT :Mặc định @@ -4977,6 +4992,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... khô STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Xây dựng cầu đường đang tiến hành STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Không thể xoá đo thị này...{}Có một ga, bến hoặc xưởng thuộc đô thị hoặc là 1 ô đất của đô thị không thể xoá được. STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... không có nơi nào hợp lý để dựng tượng đài ở trung tâm đô thị này +STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Không thể xây dựng nhà... # Industry related errors STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... quá nhiều nhà máy diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt index 167d33b58d..e4987f3bd1 100644 --- a/src/lang/welsh.txt +++ b/src/lang/welsh.txt @@ -437,6 +437,7 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Gwaredu a'r gol STR_SCENEDIT_FILE_MENU_SEPARATOR : STR_SCENEDIT_FILE_MENU_QUIT :Gadael + # Settings menu ###length 16 STR_SETTINGS_MENU_GAME_OPTIONS :Dewisiadau Gêm @@ -2796,6 +2797,8 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Adeiladu + + STR_STATION_CLASS_DFLT :Rhagosodiad STR_STATION_CLASS_DFLT_STATION :Gorsaf rhagosodedig STR_STATION_CLASS_DFLT_ROADSTOP :Gorsaf ffordd rhagosodedig diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 09a875d917..07a58596bd 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -143,7 +143,7 @@ void BaseNetworkContentDownloadStatusWindow::DrawWidget(const Rect &r, WidgetID /* Draw the % complete with a bar and a text */ DrawFrameRect(r, COLOUR_GREY, FR_BORDERONLY | FR_LOWERED); Rect ir = r.Shrink(WidgetDimensions::scaled.bevel); - DrawFrameRect(ir.WithWidth((uint64_t)ir.Width() * this->downloaded_bytes / this->total_bytes, false), COLOUR_MAUVE, FR_NONE); + DrawFrameRect(ir.WithWidth((uint64_t)ir.Width() * this->downloaded_bytes / this->total_bytes, _current_text_dir == TD_RTL), COLOUR_MAUVE, FR_NONE); SetDParam(0, this->downloaded_bytes); SetDParam(1, this->total_bytes); SetDParam(2, this->downloaded_bytes * 100LL / this->total_bytes); diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index fb8d884b68..44b5511f00 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -2145,7 +2145,7 @@ struct NetworkJoinStatusWindow : Window { progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total; break; } - DrawFrameRect(ir.WithWidth(ir.Width() * progress / 100, false), COLOUR_MAUVE, FR_NONE); + DrawFrameRect(ir.WithWidth(ir.Width() * progress / 100, _current_text_dir == TD_RTL), COLOUR_MAUVE, FR_NONE); DrawString(ir.left, ir.right, CenterBounds(ir.top, ir.bottom, GetCharacterHeight(FS_NORMAL)), STR_NETWORK_CONNECTING_1 + _network_join_status, TC_FROMSTRING, SA_HOR_CENTER); break; } diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp index bcfd53d6ec..8e4c9e3629 100644 --- a/src/newgrf_airport.cpp +++ b/src/newgrf_airport.cpp @@ -154,14 +154,14 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as) } } -/* virtual */ uint32_t AirportScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t AirportScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { switch (variable) { case 0x40: return this->layout; } if (this->st == nullptr) { - extra->available = false; + extra.available = false; return UINT_MAX; } @@ -173,7 +173,7 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as) case 0xFA: return ClampTo((this->st->build_date - CalTime::DAYS_TILL_ORIGINAL_BASE_YEAR).base()); } - return this->st->GetNewGRFVariable(this->ro, variable, parameter, &(extra->available)); + return this->st->GetNewGRFVariable(this->ro, variable, parameter, extra.available); } GrfSpecFeature AirportResolverObject::GetFeature() const diff --git a/src/newgrf_airport.h b/src/newgrf_airport.h index afdaa528ca..09daa39eef 100644 --- a/src/newgrf_airport.h +++ b/src/newgrf_airport.h @@ -167,7 +167,7 @@ struct AirportScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; void StorePSA(uint pos, int32_t value) override; }; diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp index 8261df07f0..92fe60d786 100644 --- a/src/newgrf_airporttiles.cpp +++ b/src/newgrf_airporttiles.cpp @@ -162,7 +162,7 @@ static uint32_t GetAirportTileIDAtOffset(TileIndex tile, const Station *st, uint return 0xFF << 8 | ats->grf_prop.subst_id; // so just give it the substitute } -/* virtual */ uint32_t AirportTileScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t AirportTileScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { assert(this->st != nullptr); @@ -180,7 +180,7 @@ static uint32_t GetAirportTileIDAtOffset(TileIndex tile, const Station *st, uint case 0x44: return GetAnimationFrame(this->tile); /* Land info of nearby tiles */ - case 0x60: return GetNearbyAirportTileInformation(parameter, this->tile, this->st->index, this->ro.grffile->grf_version >= 8, extra->mask); + case 0x60: return GetNearbyAirportTileInformation(parameter, this->tile, this->st->index, this->ro.grffile->grf_version >= 8, extra.mask); /* Animation stage of nearby tiles */ case 0x61: { @@ -203,7 +203,7 @@ static uint32_t GetAirportTileIDAtOffset(TileIndex tile, const Station *st, uint DEBUG(grf, 1, "Unhandled airport tile variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_airporttiles.h b/src/newgrf_airporttiles.h index 29cd0351cc..38a5684068 100644 --- a/src/newgrf_airporttiles.h +++ b/src/newgrf_airporttiles.h @@ -38,7 +38,7 @@ struct AirportTileScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** Resolver for tiles of an airport. */ diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 6e3ef5e0a8..5d4872f1d2 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -30,7 +30,7 @@ struct CanalScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** Resolver object for canals. */ @@ -59,7 +59,7 @@ struct CanalResolverObject : public ResolverObject { return IsTileType(this->tile, MP_WATER) ? GetWaterTileRandomBits(this->tile) : 0; } -/* virtual */ uint32_t CanalScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t CanalScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { switch (variable) { /* Height of tile */ @@ -102,7 +102,7 @@ struct CanalResolverObject : public ResolverObject { DEBUG(grf, 1, "Unhandled canal variable 0x%02X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index 8b3570ea2c..848759c30a 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -208,7 +208,7 @@ public: * @param avail Return whether the variable is available. * @return The resolved variable's value. */ - virtual uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const = 0; + virtual uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const = 0; /** * Used to decide if the PSA needs a parameter or not. @@ -725,7 +725,7 @@ struct NewGRFInspectWindow : Window { auto iter = this->var60params.find(niv->var); if (iter != this->var60params.end()) param = iter->second; } - uint value = nih->Resolve(index, niv->var, param, &extra); + uint value = nih->Resolve(index, niv->var, param, extra); if (!extra.available) continue; diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index dc3267d965..522c699345 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -430,7 +430,7 @@ static uint32_t PositionHelper(const Vehicle *v, bool consecutive) return chain_before | chain_after << 8 | (chain_before + chain_after + consecutive) << 16; } -static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *object, uint16_t variable, uint32_t parameter, GetVariableExtra *extra) +static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *object, uint16_t variable, uint32_t parameter, GetVariableExtra &extra) { if (_sprite_group_resolve_check_veh_check) { switch (variable) { @@ -476,7 +476,7 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec break; case 0x80 + 0x32: - if (extra->mask & (VS_HIDDEN | VS_TRAIN_SLOWING)) { + if (extra.mask & (VS_HIDDEN | VS_TRAIN_SLOWING)) { _sprite_group_resolve_check_veh_check = false; } break; @@ -507,7 +507,7 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec switch (v->type) { case VEH_TRAIN: case VEH_SHIP: - if (extra->mask & 0x7F) { + if (extra.mask & 0x7F) { _sprite_group_resolve_check_veh_check = false; } break; @@ -563,7 +563,7 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec return v->grf_cache.position_same_id_length; case 0x42: { // Consist cargo information - if ((extra->mask & 0x00FFFFFF) == 0) { + if ((extra.mask & 0x00FFFFFF) == 0) { if (!HasBit(v->grf_cache.cache_valid, NCVV_CONSIST_CARGO_INFORMATION_UD)) { uint8_t user_def_data = 0; if (v->type == VEH_TRAIN) { @@ -1102,11 +1102,11 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec DEBUG(grf, 1, "Unhandled vehicle variable 0x%X, type 0x%X", variable, (uint)v->type); - extra->available = false; + extra.available = false; return UINT_MAX; } -/* virtual */ uint32_t VehicleScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t VehicleScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (this->v == nullptr) { /* Vehicle does not exist, so we're in a purchase list */ @@ -1135,7 +1135,7 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec case 0xF2: return 0; // Cargo subtype } - extra->available = false; + extra.available = false; return UINT_MAX; } @@ -1600,7 +1600,7 @@ void FillNewGRFVehicleCache(const Vehicle *v) /* Only resolve when the cache isn't valid. */ if (HasBit(v->grf_cache.cache_valid, cache_entry[1])) continue; GetVariableExtra extra; - ro.GetScope(VSG_SCOPE_SELF)->GetVariable(cache_entry[0], 0, &extra); + ro.GetScope(VSG_SCOPE_SELF)->GetVariable(cache_entry[0], 0, extra); } /* Make sure really all bits are set. */ diff --git a/src/newgrf_engine.h b/src/newgrf_engine.h index effc8de570..d9ce71981c 100644 --- a/src/newgrf_engine.h +++ b/src/newgrf_engine.h @@ -39,7 +39,7 @@ struct VehicleScopeResolver : public ScopeResolver { void SetVehicle(const Vehicle *v) { this->v = v; } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; uint32_t GetTriggers() const override; }; diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index e38a733e2f..755815680f 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -46,7 +46,7 @@ struct GenericScopeResolver : public ScopeResolver { { } - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; private: bool ai_callback; ///< Callback comes from the AI. @@ -122,7 +122,7 @@ void AddGenericCallback(GrfSpecFeature feature, const GRFFile *file, const Sprit _gcl[feature].push_back(GenericCallback(file, group)); } -/* virtual */ uint32_t GenericScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t GenericScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (this->ai_callback) { switch (variable) { @@ -144,7 +144,7 @@ void AddGenericCallback(GrfSpecFeature feature, const GRFFile *file, const Sprit DEBUG(grf, 1, "Unhandled generic feature variable 0x%02X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 6987a980a7..607cb4f3dd 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -2281,7 +2281,7 @@ struct ScanProgressWindow : public Window { DrawFrameRect(r, COLOUR_GREY, FR_BORDERONLY | FR_LOWERED); Rect ir = r.Shrink(WidgetDimensions::scaled.bevel); uint percent = scanned * 100 / std::max(1U, _settings_client.gui.last_newgrf_count); - DrawFrameRect(ir.WithWidth(ir.Width() * percent / 100, false), COLOUR_MAUVE, FR_NONE); + DrawFrameRect(ir.WithWidth(ir.Width() * percent / 100, _current_text_dir == TD_RTL), COLOUR_MAUVE, FR_NONE); SetDParam(0, percent); DrawString(ir.left, ir.right, CenterBounds(ir.top, ir.bottom, GetCharacterHeight(FS_NORMAL)), STR_GENERATION_PROGRESS, TC_FROMSTRING, SA_HOR_CENTER); break; diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 8dd625ee47..7e0793a508 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -110,11 +110,14 @@ void ResetHouses() */ HouseResolverObject::HouseResolverObject(HouseID house_id, TileIndex tile, Town *town, CallbackID callback, uint32_t param1, uint32_t param2, - bool not_yet_constructed, uint8_t initial_random_bits, CargoTypes watched_cargo_triggers) + bool not_yet_constructed, uint8_t initial_random_bits, CargoTypes watched_cargo_triggers, int view) : ResolverObject(GetHouseSpecGrf(house_id), callback, param1, param2), - house_scope(*this, house_id, tile, town, not_yet_constructed, initial_random_bits, watched_cargo_triggers), + house_scope(*this, house_id, tile, town, not_yet_constructed, initial_random_bits, watched_cargo_triggers, view), town_scope(*this, town, not_yet_constructed) // Don't access StorePSA if house is not yet constructed. { + /* Tile must be valid and a house tile, unless not yet constructed in which case it may also be INVALID_TILE. */ + assert((IsValidTile(tile) && (not_yet_constructed || IsTileType(tile, MP_HOUSE))) || (not_yet_constructed && tile == INVALID_TILE)); + this->root_spritegroup = HouseSpec::Get(house_id)->grf_prop.spritegroup[0]; } @@ -203,6 +206,15 @@ void InitializeBuildingCounts() } } +/** + * Get read-only span of total HouseID building counts. + * @return span of HouseID building counts. + */ +std::span GetBuildingHouseIDCounts() +{ + return _building_counts.id_count; +} + /** * IncreaseBuildingCount() * Increase the count of a building when it has been added by a town. @@ -244,14 +256,12 @@ void DecreaseBuildingCount(Town *t, HouseID house_id) /* virtual */ uint32_t HouseScopeResolver::GetRandomBits() const { /* Note: Towns build houses over houses. So during construction checks 'tile' may be a valid but unrelated house. */ - assert_tile(IsValidTile(this->tile) && (this->not_yet_constructed || IsTileType(this->tile, MP_HOUSE)), this->tile); return this->not_yet_constructed ? this->initial_random_bits : GetHouseRandomBits(this->tile); } /* virtual */ uint32_t HouseScopeResolver::GetTriggers() const { /* Note: Towns build houses over houses. So during construction checks 'tile' may be a valid but unrelated house. */ - assert_tile(IsValidTile(this->tile) && (this->not_yet_constructed || IsTileType(this->tile, MP_HOUSE)), this->tile); return this->not_yet_constructed ? 0 : GetHouseTriggers(this->tile); } @@ -409,8 +419,34 @@ uint32_t HouseScopeResolver::OtherHouseIDVariable(uint32_t parameter, F func) co /** * @note Used by the resolver to get values for feature 07 deterministic spritegroups. */ -/* virtual */ uint32_t HouseScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t HouseScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { + if (this->tile == INVALID_TILE) { + /* House does not yet exist, nor is it being planned to exist. Provide some default values intead. */ + switch (variable) { + case 0x40: return TOWN_HOUSE_COMPLETED | this->view << 2; /* Construction stage. */ + case 0x41: return 0; + case 0x42: return 0; + case 0x43: return 0; + case 0x44: return 0; + case 0x45: return _generating_world ? 1 : 0; + case 0x46: return 0; + case 0x47: return 0; + case 0x60: return 0; + case 0x61: return 0; + case 0x62: return 0; + case 0x63: return 0; + case 0x64: return 0; + case 0x65: return 0; + case 0x66: return 0xFFFFFFFF; /* Class and ID of nearby house. */ + case 0x67: return 0; + } + + DEBUG(grf, 1, "Unhandled house variable 0x%X", variable); + extra.available = false; + return UINT_MAX; + } + switch (variable) { /* Construction stage. */ case 0x40: return (IsTileType(this->tile, MP_HOUSE) ? GetHouseBuildingStage(this->tile) : 0) | TileHash2Bit(TileX(this->tile), TileY(this->tile)) << 2; @@ -456,7 +492,7 @@ uint32_t HouseScopeResolver::OtherHouseIDVariable(uint32_t parameter, F func) co case A2VRI_HOUSE_OTHER_CLASS_TOWN_COUNT: return this->OtherHouseIDVariable(parameter, [&](HouseID new_house) { return this->town->cache.building_counts.class_count[HouseSpec::Get(new_house)->class_id]; }); /* Land info for nearby tiles. */ - case 0x62: return GetNearbyTileInformation(parameter, this->tile, this->ro.grffile->grf_version >= 8, extra->mask); + case 0x62: return GetNearbyTileInformation(parameter, this->tile, this->ro.grffile->grf_version >= 8, extra.mask); /* Current animation frame of nearby house tiles */ case 0x63: { @@ -532,7 +568,7 @@ uint32_t HouseScopeResolver::OtherHouseIDVariable(uint32_t parameter, F func) co DEBUG(grf, 1, "Unhandled house variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } @@ -540,7 +576,7 @@ uint32_t HouseScopeResolver::OtherHouseIDVariable(uint32_t parameter, F func) co /** * @note Used by the resolver to get values for feature 07 deterministic spritegroups. */ -/* virtual */ uint32_t FakeHouseScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t FakeHouseScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { switch (variable) { /* Construction stage. */ @@ -594,16 +630,16 @@ uint32_t HouseScopeResolver::OtherHouseIDVariable(uint32_t parameter, F func) co DEBUG(grf, 1, "Unhandled house variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } uint16_t GetHouseCallback(CallbackID callback, uint32_t param1, uint32_t param2, HouseID house_id, Town *town, TileIndex tile, - bool not_yet_constructed, uint8_t initial_random_bits, CargoTypes watched_cargo_triggers) + bool not_yet_constructed, uint8_t initial_random_bits, CargoTypes watched_cargo_triggers, int view) { if (tile != INVALID_TILE) { HouseResolverObject object(house_id, tile, town, callback, param1, param2, - not_yet_constructed, initial_random_bits, watched_cargo_triggers); + not_yet_constructed, initial_random_bits, watched_cargo_triggers, view); return object.ResolveCallback(); } else { FakeHouseResolverObject object(house_id, callback, param1, param2); diff --git a/src/newgrf_house.h b/src/newgrf_house.h index 071e1fc414..0838e0c77d 100644 --- a/src/newgrf_house.h +++ b/src/newgrf_house.h @@ -16,21 +16,15 @@ #include "newgrf_spritegroup.h" #include "newgrf_town.h" -struct CommonHouseScopeResolver : public ScopeResolver { - HouseID house_id; ///< Type of house being queried. - - CommonHouseScopeResolver(ResolverObject &ro, HouseID house_id) - : ScopeResolver(ro), house_id(house_id) - { } -}; - /** Scope resolver for houses. */ -struct HouseScopeResolver : public CommonHouseScopeResolver { +struct HouseScopeResolver : public ScopeResolver { + HouseID house_id; ///< Type of house being queried. TileIndex tile; ///< Tile of this house. Town *town; ///< Town of this house. bool not_yet_constructed; ///< True for construction check. uint16_t initial_random_bits; ///< Random bits during construction checks. CargoTypes watched_cargo_triggers; ///< Cargo types that triggered the watched cargo callback. + int view; ///< View when house does yet exist. /** * Constructor of a house scope resolver. @@ -43,14 +37,14 @@ struct HouseScopeResolver : public CommonHouseScopeResolver { * @param watched_cargo_triggers Cargo types that triggered the watched cargo callback. */ HouseScopeResolver(ResolverObject &ro, HouseID house_id, TileIndex tile, Town *town, - bool not_yet_constructed, uint8_t initial_random_bits, CargoTypes watched_cargo_triggers) - : CommonHouseScopeResolver(ro, house_id), tile(tile), town(town), not_yet_constructed(not_yet_constructed), - initial_random_bits(initial_random_bits), watched_cargo_triggers(watched_cargo_triggers) + bool not_yet_constructed, uint8_t initial_random_bits, CargoTypes watched_cargo_triggers, int view) + : ScopeResolver(ro), house_id(house_id), tile(tile), town(town), not_yet_constructed(not_yet_constructed), + initial_random_bits(initial_random_bits), watched_cargo_triggers(watched_cargo_triggers), view(view) { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; uint32_t GetTriggers() const override; private: @@ -71,12 +65,14 @@ private: * Since the building doesn't exists we have no real values that we can return. * Instead of failing, this resolver will return fake values. */ -struct FakeHouseScopeResolver : public CommonHouseScopeResolver { +struct FakeHouseScopeResolver : public ScopeResolver { + HouseID house_id; ///< Type of house being queried. + FakeHouseScopeResolver(ResolverObject &ro, HouseID house_id) - : CommonHouseScopeResolver(ro, house_id) + : ScopeResolver(ro), house_id(house_id) { } - /* virtual */ uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + /* virtual */ uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** Resolver object to be used for houses (feature 07 spritegroups). */ @@ -86,7 +82,7 @@ struct HouseResolverObject : public ResolverObject { HouseResolverObject(HouseID house_id, TileIndex tile, Town *town, CallbackID callback = CBID_NO_CALLBACK, uint32_t param1 = 0, uint32_t param2 = 0, - bool not_yet_constructed = false, uint8_t initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0); + bool not_yet_constructed = false, uint8_t initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0, int view = 0); ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, VarSpriteGroupScopeOffset relative = 0) override { @@ -147,6 +143,7 @@ void InitializeBuildingCounts(); void InitializeBuildingCounts(Town *t); void IncreaseBuildingCount(Town *t, HouseID house_id); void DecreaseBuildingCount(Town *t, HouseID house_id); +std::span GetBuildingHouseIDCounts(); void DrawNewHouseTile(TileInfo *ti, HouseID house_id); void DrawNewHouseTileInGUI(int x, int y, HouseID house_id, bool ground); @@ -154,8 +151,8 @@ void AnimateNewHouseTile(TileIndex tile); void AnimateNewHouseConstruction(TileIndex tile); uint8_t GetNewHouseTileAnimationSpeed(TileIndex tile); -uint16_t GetHouseCallback(CallbackID callback, uint32_t param1, uint32_t param2, HouseID house_id, Town *town = nullptr, TileIndex tile = INVALID_TILE, - bool not_yet_constructed = false, uint8_t initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0); +uint16_t GetHouseCallback(CallbackID callback, uint32_t param1, uint32_t param2, HouseID house_id, Town *town, TileIndex tile, + bool not_yet_constructed = false, uint8_t initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0, int view = 0); void WatchedCargoCallback(TileIndex tile, CargoTypes trigger_cargoes); bool HouseAllowsConstruction(HouseID house_id, TileIndex tile, Town *t, uint8_t random_bits); diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 78936a4400..c233ef19ad 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -178,7 +178,7 @@ uint32_t IndustriesScopeResolver::GetCountAndDistanceOfClosestInstance(uint8_t p return count << 16 | std::min(closest_dist, 0xFFFF); } -/* virtual */ uint32_t IndustriesScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t IndustriesScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (this->ro.callback == CBID_INDUSTRY_LOCATION) { /* Variables available during construction check. */ @@ -229,7 +229,7 @@ uint32_t IndustriesScopeResolver::GetCountAndDistanceOfClosestInstance(uint8_t p DEBUG(grf, 1, "Unhandled variable 0x%X (no available industry) in callback 0x%x", variable, this->ro.callback); - extra->available = false; + extra.available = false; return UINT_MAX; } @@ -292,7 +292,7 @@ uint32_t IndustriesScopeResolver::GetCountAndDistanceOfClosestInstance(uint8_t p /* Land info of nearby tiles */ case 0x62: if (this->tile == INVALID_TILE) break; - return GetNearbyIndustryTileInformation(parameter, this->tile, INVALID_INDUSTRY, false, this->ro.grffile->grf_version >= 8, extra->mask); + return GetNearbyIndustryTileInformation(parameter, this->tile, INVALID_INDUSTRY, false, this->ro.grffile->grf_version >= 8, extra.mask); /* Animation stage of nearby tiles */ case 0x63: { @@ -332,7 +332,7 @@ uint32_t IndustriesScopeResolver::GetCountAndDistanceOfClosestInstance(uint8_t p layout_filter = GB(reg, 0, 8); town_filter = HasBit(reg, 8); } - return this->GetCountAndDistanceOfClosestInstance(parameter, layout_filter, town_filter, extra->mask); + return this->GetCountAndDistanceOfClosestInstance(parameter, layout_filter, town_filter, extra.mask); } case 0x69: @@ -439,7 +439,7 @@ uint32_t IndustriesScopeResolver::GetCountAndDistanceOfClosestInstance(uint8_t p DEBUG(grf, 1, "Unhandled industry variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h index b415d9557f..aead3b9f0e 100644 --- a/src/newgrf_industries.h +++ b/src/newgrf_industries.h @@ -45,7 +45,7 @@ struct IndustriesScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; uint32_t GetTriggers() const override; void StorePSA(uint pos, int32_t value) override; diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index c6322a15a5..44cff6057c 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -62,7 +62,7 @@ uint32_t GetRelativePosition(TileIndex tile, TileIndex ind_tile) return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x; } -/* virtual */ uint32_t IndustryTileScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t IndustryTileScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { switch (variable) { /* Construction state of the tile: a value between 0 and 3 */ @@ -82,7 +82,7 @@ uint32_t GetRelativePosition(TileIndex tile, TileIndex ind_tile) /* Land info of nearby tiles */ case 0x60: return GetNearbyIndustryTileInformation(parameter, this->tile, - this->industry == nullptr ? (IndustryID)INVALID_INDUSTRY : this->industry->index, true, this->ro.grffile->grf_version >= 8, extra->mask); + this->industry == nullptr ? (IndustryID)INVALID_INDUSTRY : this->industry->index, true, this->ro.grffile->grf_version >= 8, extra.mask); /* Animation stage of nearby tiles */ case 0x61: { @@ -99,7 +99,7 @@ uint32_t GetRelativePosition(TileIndex tile, TileIndex ind_tile) DEBUG(grf, 1, "Unhandled industry tile variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_industrytiles.h b/src/newgrf_industrytiles.h index 681ee36450..3e5a9b6fc6 100644 --- a/src/newgrf_industrytiles.h +++ b/src/newgrf_industrytiles.h @@ -31,7 +31,7 @@ struct IndustryTileScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; uint32_t GetTriggers() const override; }; diff --git a/src/newgrf_newlandscape.cpp b/src/newgrf_newlandscape.cpp index bba54f4699..4337ae8355 100644 --- a/src/newgrf_newlandscape.cpp +++ b/src/newgrf_newlandscape.cpp @@ -21,7 +21,7 @@ std::vector _new_landscape_rocks_grfs; -/* virtual */ uint32_t NewLandscapeScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t NewLandscapeScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (unlikely(this->ti->tile == INVALID_TILE)) { switch (variable) { @@ -57,8 +57,8 @@ std::vector _new_landscape_rocks_grfs; TileIndex tile = this->ti->tile; if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required uint32_t result = 0; - if (extra->mask & ~0x100) result |= GetNearbyTileInformation(tile, this->ro.grffile == nullptr || this->ro.grffile->grf_version >= 8, extra->mask); - if (extra->mask & 0x100) { + if (extra.mask & ~0x100) result |= GetNearbyTileInformation(tile, this->ro.grffile == nullptr || this->ro.grffile->grf_version >= 8, extra.mask); + if (extra.mask & 0x100) { switch (this->landscape_type) { case NEW_LANDSCAPE_ROCKS: if (IsTileType(tile, MP_CLEAR) && IsClearGround(tile, CLEAR_ROCKS)) result |= 0x100; @@ -71,7 +71,7 @@ std::vector _new_landscape_rocks_grfs; DEBUG(grf, 1, "Unhandled new landscape tile variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_newlandscape.h b/src/newgrf_newlandscape.h index 8bf7d7acf7..0b399e377b 100644 --- a/src/newgrf_newlandscape.h +++ b/src/newgrf_newlandscape.h @@ -32,7 +32,7 @@ struct NewLandscapeScopeResolver : public ScopeResolver { { } - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; struct NewLandscapeResolverObject : public ResolverObject { diff --git a/src/newgrf_newsignals.cpp b/src/newgrf_newsignals.cpp index f5fc26e707..8247ef4e2d 100644 --- a/src/newgrf_newsignals.cpp +++ b/src/newgrf_newsignals.cpp @@ -46,7 +46,7 @@ uint32_t GetNewSignalsSideVariable() return side ? 1 : 0; } -/* virtual */ uint32_t NewSignalsScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t NewSignalsScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (this->tile == INVALID_TILE) { switch (variable) { @@ -72,7 +72,7 @@ uint32_t GetNewSignalsSideVariable() DEBUG(grf, 1, "Unhandled new signals tile variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_newsignals.h b/src/newgrf_newsignals.h index e58f46becb..6ce41aeca4 100644 --- a/src/newgrf_newsignals.h +++ b/src/newgrf_newsignals.h @@ -82,7 +82,7 @@ struct NewSignalsScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** Resolver object for rail types. */ diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index 270c4f95f1..b3a7c937cf 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -259,7 +259,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(uint32_t local_id, uint32_t } /** Used by the resolver to get values for feature 0F deterministic spritegroups. */ -/* virtual */ uint32_t ObjectScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t ObjectScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { /* We get the town from the object, or we calculate the closest * town if we need to when there's no object. */ @@ -357,7 +357,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(uint32_t local_id, uint32_t } /* Land info of nearby tiles */ - case 0x62: return GetNearbyObjectTileInformation(parameter, this->tile, this->obj == nullptr ? INVALID_OBJECT : this->obj->index, this->ro.grffile->grf_version >= 8, extra->mask); + case 0x62: return GetNearbyObjectTileInformation(parameter, this->tile, this->obj == nullptr ? INVALID_OBJECT : this->obj->index, this->ro.grffile->grf_version >= 8, extra.mask); /* Animation counter of nearby tile */ case 0x63: { @@ -387,7 +387,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(uint32_t local_id, uint32_t unhandled: DEBUG(grf, 1, "Unhandled object variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_object.h b/src/newgrf_object.h index 2deeaf86f2..a7914a3083 100644 --- a/src/newgrf_object.h +++ b/src/newgrf_object.h @@ -162,7 +162,7 @@ struct ObjectScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** A resolver object to be used with feature 0F spritegroups. */ diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp index f09f329d6f..d6dc1a609a 100644 --- a/src/newgrf_railtype.cpp +++ b/src/newgrf_railtype.cpp @@ -28,7 +28,7 @@ return GB(tmp, 0, 2); } -/* virtual */ uint32_t RailTypeScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t RailTypeScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (this->tile == INVALID_TILE) { switch (variable) { @@ -98,7 +98,7 @@ DEBUG(grf, 1, "Unhandled rail type tile variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_railtype.h b/src/newgrf_railtype.h index c723f6b6f6..b9cd153595 100644 --- a/src/newgrf_railtype.h +++ b/src/newgrf_railtype.h @@ -38,7 +38,7 @@ struct RailTypeScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** Resolver object for rail types. */ diff --git a/src/newgrf_roadstop.cpp b/src/newgrf_roadstop.cpp index 404ecc8304..26ad93345d 100644 --- a/src/newgrf_roadstop.cpp +++ b/src/newgrf_roadstop.cpp @@ -105,7 +105,7 @@ uint32_t RoadStopScopeResolver::GetNearbyRoadStopsInfo(uint32_t parameter, RoadS } } -uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { auto get_road_type_variable = [&](RoadTramType rtt) -> uint32_t { RoadType rt; @@ -191,7 +191,7 @@ uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t paramete if (this->tile == INVALID_TILE) return 0; TileIndex tile = this->tile; if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required - return GetNearbyTileInformation(tile, this->ro.grffile->grf_version >= 8, extra->mask); + return GetNearbyTileInformation(tile, this->ro.grffile->grf_version >= 8, extra.mask); } /* Road stop info of nearby tiles */ @@ -260,9 +260,9 @@ uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t paramete case 0xFA: return ClampTo((this->st == nullptr ? CalTime::CurDate() : this->st->build_date) - CalTime::DAYS_TILL_ORIGINAL_BASE_YEAR); // build date } - if (this->st != nullptr) return this->st->GetNewGRFVariable(this->ro, variable, parameter, &(extra->available)); + if (this->st != nullptr) return this->st->GetNewGRFVariable(this->ro, variable, parameter, extra.available); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_roadstop.h b/src/newgrf_roadstop.h index 2e6be1ea66..2a87f3103f 100644 --- a/src/newgrf_roadstop.h +++ b/src/newgrf_roadstop.h @@ -114,7 +114,7 @@ struct RoadStopScopeResolver : public ScopeResolver { uint32_t GetRandomBits() const override; uint32_t GetTriggers() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; private: enum class NearbyRoadStopInfoMode { diff --git a/src/newgrf_roadtype.cpp b/src/newgrf_roadtype.cpp index 0a8868ad1b..a2568c83ee 100644 --- a/src/newgrf_roadtype.cpp +++ b/src/newgrf_roadtype.cpp @@ -24,7 +24,7 @@ return GB(tmp, 0, 2); } -/* virtual */ uint32_t RoadTypeScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t RoadTypeScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (this->tile == INVALID_TILE) { switch (variable) { @@ -56,7 +56,7 @@ DEBUG(grf, 1, "Unhandled road type tile variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_roadtype.h b/src/newgrf_roadtype.h index c207b2b8d2..6b6c326996 100644 --- a/src/newgrf_roadtype.h +++ b/src/newgrf_roadtype.h @@ -33,7 +33,7 @@ struct RoadTypeScopeResolver : public ScopeResolver { } uint32_t GetRandomBits() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** Resolver object for road types. */ diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index ee9cab2f82..1554487daf 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -85,7 +85,7 @@ GrfSpecFeature GetGrfSpecFeatureForParentScope(GrfSpecFeature feature) } } -static inline uint32_t GetVariable(const ResolverObject &object, ScopeResolver *scope, uint16_t variable, uint32_t parameter, GetVariableExtra *extra) +static inline uint32_t GetVariable(const ResolverObject &object, ScopeResolver *scope, uint16_t variable, uint32_t parameter, GetVariableExtra &extra) { uint32_t value; switch (variable) { @@ -136,10 +136,10 @@ static inline uint32_t GetVariable(const ResolverObject &object, ScopeResolver * * @param[out] available Set to false, in case the variable does not exist. * @return Value */ -/* virtual */ uint32_t ScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t ScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { DEBUG(grf, 1, "Unhandled scope variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } @@ -304,9 +304,9 @@ const SpriteGroup *DeterministicSpriteGroup::Resolve(ResolverObject &object) con /* Note: 'last_value' and 'reseed' are shared between the main chain and the procedure */ } else if (adjust.variable == 0x7B) { _sprite_group_resolve_check_veh_check = false; - value = GetVariable(object, scope, adjust.parameter, last_value, &extra); + value = GetVariable(object, scope, adjust.parameter, last_value, extra); } else { - value = GetVariable(object, scope, adjust.variable, adjust.parameter, &extra); + value = GetVariable(object, scope, adjust.variable, adjust.parameter, extra); } if (!extra.available) { diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index d77f6ff2f8..b014ba48dd 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -634,7 +634,7 @@ struct ScopeResolver { virtual uint32_t GetRandomBits() const; virtual uint32_t GetTriggers() const; - virtual uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const; + virtual uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const; virtual void StorePSA(uint reg, int32_t value); }; diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 078935918f..0f7923fc68 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -298,7 +298,7 @@ uint32_t StationScopeResolver::GetNearbyStationInfo(uint32_t parameter, StationS } } -/* virtual */ uint32_t StationScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t StationScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { if (this->st == nullptr) { /* Station does not exist, so we're in a purchase list or the land slope check callback. */ @@ -316,8 +316,8 @@ uint32_t StationScopeResolver::GetNearbyStationInfo(uint32_t parameter, StationS TileIndex tile = this->tile; if (parameter != 0) tile = GetNearbyTile(parameter, tile, true, this->axis); // only perform if it is required - uint32_t result = GetNearbyTileInformation(tile, this->ro.grffile->grf_version >= 8, extra->mask); - if (extra->mask & SLOPE_EW) { + uint32_t result = GetNearbyTileInformation(tile, this->ro.grffile->grf_version >= 8, extra.mask); + if (extra.mask & SLOPE_EW) { Slope tileh = GetTileSlope(tile); if (this->axis == AXIS_Y && HasBit(tileh, CORNER_W) != HasBit(tileh, CORNER_E)) result ^= SLOPE_EW; } @@ -328,7 +328,7 @@ uint32_t StationScopeResolver::GetNearbyStationInfo(uint32_t parameter, StationS case 0xFA: return ClampTo(CalTime::CurDate() - CalTime::DAYS_TILL_ORIGINAL_BASE_YEAR); // Build date, clamped to a 16 bit value } - extra->available = false; + extra.available = false; return UINT_MAX; } @@ -377,8 +377,8 @@ uint32_t StationScopeResolver::GetNearbyStationInfo(uint32_t parameter, StationS TileIndex tile = this->tile; if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required - uint32_t result = GetNearbyTileInformation(tile, this->ro.grffile->grf_version >= 8, extra->mask); - if (extra->mask & SLOPE_EW) { + uint32_t result = GetNearbyTileInformation(tile, this->ro.grffile->grf_version >= 8, extra.mask); + if (extra.mask & SLOPE_EW) { Slope tileh = GetTileSlope(tile); if (axis == AXIS_Y && HasBit(tileh, CORNER_W) != HasBit(tileh, CORNER_E)) result ^= SLOPE_EW; } @@ -429,10 +429,10 @@ uint32_t StationScopeResolver::GetNearbyStationInfo(uint32_t parameter, StationS case 0xFA: return ClampTo(this->st->build_date - CalTime::DAYS_TILL_ORIGINAL_BASE_YEAR); } - return this->st->GetNewGRFVariable(this->ro, variable, parameter, &(extra->available)); + return this->st->GetNewGRFVariable(this->ro, variable, parameter, extra.available); } -uint32_t Station::GetNewGRFVariable(const ResolverObject &object, uint16_t variable, uint8_t parameter, bool *available) const +uint32_t Station::GetNewGRFVariable(const ResolverObject &object, uint16_t variable, uint8_t parameter, bool &available) const { switch (variable) { case 0x48: { // Accepted cargo types @@ -494,11 +494,11 @@ uint32_t Station::GetNewGRFVariable(const ResolverObject &object, uint16_t varia DEBUG(grf, 1, "Unhandled station variable 0x%X", variable); - *available = false; + available = false; return UINT_MAX; } -uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &object, uint16_t variable, uint8_t parameter, bool *available) const +uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &object, uint16_t variable, uint8_t parameter, bool &available) const { switch (variable) { case 0x48: return 0; // Accepted cargo types @@ -526,7 +526,7 @@ uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &object, uint16_t vari DEBUG(grf, 1, "Unhandled station variable 0x%X", variable); - *available = false; + available = false; return UINT_MAX; } diff --git a/src/newgrf_station.h b/src/newgrf_station.h index cf9ab76b61..dd50002e19 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -48,7 +48,7 @@ struct StationScopeResolver : public ScopeResolver { uint32_t GetRandomBits() const override; uint32_t GetTriggers() const override; - uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; private: enum class NearbyStationInfoMode { diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index f7c5c67945..ea3d5b9756 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -15,8 +15,13 @@ #include "safeguards.h" -/* virtual */ uint32_t TownScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t TownScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { + if (this->t == nullptr) { + extra.available = false; + return UINT_MAX; + } + CargoID cid; switch (variable) { /* Larger towns */ @@ -126,7 +131,7 @@ DEBUG(grf, 1, "Unhandled town variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } @@ -160,7 +165,7 @@ t->psa_list.push_back(psa); } -/* virtual */ uint32_t FakeTownScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const +/* virtual */ uint32_t FakeTownScopeResolver::GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const { switch (variable) { /* Town index */ @@ -188,7 +193,7 @@ DEBUG(grf, 1, "Unhandled town variable 0x%X", variable); - extra->available = false; + extra.available = false; return UINT_MAX; } diff --git a/src/newgrf_town.h b/src/newgrf_town.h index 2700c73ce0..9a007f66c4 100644 --- a/src/newgrf_town.h +++ b/src/newgrf_town.h @@ -34,7 +34,7 @@ struct TownScopeResolver : public ScopeResolver { { } - virtual uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + virtual uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; virtual void StorePSA(uint reg, int32_t value) override; }; @@ -53,7 +53,7 @@ struct FakeTownScopeResolver : public ScopeResolver { FakeTownScopeResolver(ResolverObject &ro) : ScopeResolver(ro) { } - virtual uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override; + virtual uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra &extra) const override; }; /** Resolver of town properties. */ diff --git a/src/os/macosx/font_osx.cpp b/src/os/macosx/font_osx.cpp index 06835f99a7..ee88821de7 100644 --- a/src/os/macosx/font_osx.cpp +++ b/src/os/macosx/font_osx.cpp @@ -207,18 +207,6 @@ GlyphID CoreTextFontCache::MapCharToGlyph(char32_t key, bool allow_fallback) return 0; } -const void *CoreTextFontCache::InternalGetFontTable(uint32_t tag, size_t &length) -{ - CFAutoRelease data(CTFontCopyTable(this->font.get(), (CTFontTableTag)tag, kCTFontTableOptionNoOptions)); - if (!data) return nullptr; - - length = CFDataGetLength(data.get()); - auto buf = MallocT(length); - - CFDataGetBytes(data.get(), CFRangeMake(0, (CFIndex)length), buf); - return buf; -} - const Sprite *CoreTextFontCache::InternalGetGlyph(GlyphID key, bool use_aa) { /* Get glyph size. */ diff --git a/src/os/macosx/font_osx.h b/src/os/macosx/font_osx.h index ca2ac1d5e9..3ef86fba99 100644 --- a/src/os/macosx/font_osx.h +++ b/src/os/macosx/font_osx.h @@ -23,7 +23,6 @@ class CoreTextFontCache : public TrueTypeFontCache { void SetFontSize(int pixels); const Sprite *InternalGetGlyph(GlyphID key, bool use_aa) override; - const void *InternalGetFontTable(uint32_t tag, size_t &length) override; public: CoreTextFontCache(FontSize fs, CFAutoRelease &&font, int pixels); ~CoreTextFontCache() {} diff --git a/src/os/windows/font_win32.cpp b/src/os/windows/font_win32.cpp index 115fe0271e..d2fc8fb671 100644 --- a/src/os/windows/font_win32.cpp +++ b/src/os/windows/font_win32.cpp @@ -282,20 +282,6 @@ void Win32FontCache::ClearFontCache() return allow_fallback && key >= SCC_SPRITE_START && key <= SCC_SPRITE_END ? this->parent->MapCharToGlyph(key) : 0; } -/* virtual */ const void *Win32FontCache::InternalGetFontTable(uint32_t tag, size_t &length) -{ - DWORD len = GetFontData(this->dc, tag, 0, nullptr, 0); - - void *result = nullptr; - if (len != GDI_ERROR && len > 0) { - result = MallocT(len); - GetFontData(this->dc, tag, 0, result, len); - } - - length = len; - return result; -} - static bool TryLoadFontFromFile(const std::string &font_name, LOGFONT &logfont) { diff --git a/src/os/windows/font_win32.h b/src/os/windows/font_win32.h index bdb2cc9a9b..5d5555341c 100644 --- a/src/os/windows/font_win32.h +++ b/src/os/windows/font_win32.h @@ -28,7 +28,6 @@ private: void SetFontSize(int pixels); protected: - const void *InternalGetFontTable(uint32_t tag, size_t &length) override; const Sprite *InternalGetGlyph(GlyphID key, bool aa) override; public: diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp index 9997d817ab..f40ee39ff8 100644 --- a/src/os/windows/string_uniscribe.cpp +++ b/src/os/windows/string_uniscribe.cpp @@ -303,7 +303,7 @@ static std::vector UniscribeItemizeString(UniscribeParagraphLayoutF /* Add a range that spans the intersection of the remaining item and font run. */ int stop_pos = std::min(i.first, (cur_item + 1)->iCharPos); assert(stop_pos - cur_pos > 0); - ranges.push_back(UniscribeRun(cur_pos, stop_pos - cur_pos, i.second, cur_item->a)); + ranges.emplace_back(cur_pos, stop_pos - cur_pos, i.second, cur_item->a); /* Shape the range. */ if (!UniscribeShapeRun(buff, ranges.back())) { diff --git a/src/station_base.h b/src/station_base.h index 07185f6097..def6c7bd8b 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -969,7 +969,7 @@ public: bool IsWithinRangeOfDockingTile(TileIndex tile, uint max_distance) const; - uint32_t GetNewGRFVariable(const ResolverObject &object, uint16_t variable, uint8_t parameter, bool *available) const override; + uint32_t GetNewGRFVariable(const ResolverObject &object, uint16_t variable, uint8_t parameter, bool &available) const override; void GetTileArea(TileArea *ta, StationType type) const override; }; diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index 73d4cae6b5..3e5fcaf0d8 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -150,7 +150,7 @@ class NIHVehicle : public NIHelper { void SetStringParameters(uint index) const override { this->SetSimpleStringParameters(STR_VEHICLE_NAME, Vehicle::Get(index)->First()->index); } uint32_t GetGRFID(uint index) const override { return Vehicle::Get(index)->GetGRFID(); } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { Vehicle *v = Vehicle::Get(index); VehicleResolverObject ro(v->engine_type, v, VehicleResolverObject::WO_CACHED); @@ -774,7 +774,7 @@ class NIHStation : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); } uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetStationSpec(index)->grf_prop.grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { StationResolverObject ro(GetStationSpec(index), BaseStation::GetByTile(index), index, INVALID_RAILTYPE); return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra); @@ -938,7 +938,7 @@ class NIHHouse : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_TOWN_NAME, GetTownIndex(index), index); } uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? HouseSpec::Get(GetHouseType(index))->grf_prop.grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { HouseResolverObject ro(GetHouseType(index), index, Town::GetByTile(index)); return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra); @@ -1035,7 +1035,7 @@ class NIHIndustryTile : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_INDUSTRY_NAME, GetIndustryIndex(index), index); } uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetIndustryTileSpec(GetIndustryGfx(index))->grf_prop.grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { IndustryTileResolverObject ro(GetIndustryGfx(index), index, Industry::GetByTile(index)); return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra); @@ -1198,7 +1198,7 @@ class NIHIndustry : public NIHelper { } } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { Industry *i = Industry::Get(index); IndustriesResolverObject ro(i->location.tile, i, i->type); @@ -1328,7 +1328,7 @@ class NIHCargo : public NIHelper { void SetStringParameters(uint index) const override { SetDParam(0, CargoSpec::Get(index)->name); } uint32_t GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? CargoSpec::Get(index)->grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { return 0; } @@ -1449,7 +1449,7 @@ class NIHSignals : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_SIGNALS, INVALID_STRING_ID, index); } uint32_t GetGRFID(uint index) const override { return 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { extern TraceRestrictProgram *GetFirstTraceRestrictProgramOnTile(TileIndex t); CustomSignalSpriteContext ctx = { CSSC_TRACK }; @@ -1584,7 +1584,7 @@ class NIHObject : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT, INVALID_STRING_ID, index); } uint32_t GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? ObjectSpec::GetByTile(index)->grf_prop.grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { ObjectResolverObject ro(ObjectSpec::GetByTile(index), Object::GetByTile(index), index); return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra); @@ -1716,7 +1716,7 @@ class NIHRailType : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE, INVALID_STRING_ID, index); } uint32_t GetGRFID(uint index) const override { return 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { /* There is no unique GRFFile for the tile. Multiple GRFs can define different parts of the railtype. * However, currently the NewGRF Debug GUI does not display variables depending on the GRF (like 0x7F) anyway. */ @@ -1865,7 +1865,7 @@ class NIHAirportTile : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); } uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? AirportTileSpec::Get(GetAirportGfx(index))->grf_prop.grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { AirportTileResolverObject ro(AirportTileSpec::GetByTile(index), index, Station::GetByTile(index)); return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra); @@ -1919,7 +1919,7 @@ class NIHAirport : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_STATION_NAME, index, Station::Get(index)->airport.tile); } uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? AirportSpec::Get(Station::Get(index)->airport.type)->grf_prop.grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { Station *st = Station::Get(index); AirportResolverObject ro(st->airport.tile, st, st->airport.type, st->airport.layout); @@ -1975,7 +1975,7 @@ class NIHTown : public NIHelper { uint32_t GetGRFID(uint index) const override { return 0; } bool PSAWithParameter() const override { return true; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { TownResolverObject ro(nullptr, Town::Get(index), true); return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra); @@ -2067,7 +2067,7 @@ class NIHStationStruct : public NIHelper { uint32_t GetGRFID(uint index) const override { return 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { return 0; } @@ -2213,7 +2213,7 @@ class NIHTraceRestrict : public NIHelper { uint32_t GetGRFID(uint index) const override { return 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { return 0; } @@ -2320,7 +2320,7 @@ class NIHRoadType : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_ROAD_TYPE, INVALID_STRING_ID, index); } uint32_t GetGRFID(uint index) const override { return 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { /* There is no unique GRFFile for the tile. Multiple GRFs can define different parts of the railtype. * However, currently the NewGRF Debug GUI does not display variables depending on the GRF (like 0x7F) anyway. */ @@ -2455,7 +2455,7 @@ class NIHRoadStop : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); } uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetRoadStopSpec(index)->grf_prop.grffile->grfid : 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { int view = GetRoadStopDir(index); if (IsDriveThroughStopTile(index)) view += 4; @@ -2525,7 +2525,7 @@ class NIHNewLandscape : public NIHelper { void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_LAI_CLEAR_DESCRIPTION_ROCKS, INVALID_STRING_ID, index); } uint32_t GetGRFID(uint index) const override { return 0; } - uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override + uint Resolve(uint index, uint var, uint param, GetVariableExtra &extra) const override { if (!IsTileType(index, MP_CLEAR)) return 0; diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index fe558d9b8c..d5bb361656 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -12,6 +12,7 @@ #include "clear_map.h" #include "company_func.h" #include "company_base.h" +#include "house.h" #include "gui.h" #include "window_gui.h" #include "window_func.h" diff --git a/src/tests/mock_fontcache.h b/src/tests/mock_fontcache.h index e6cee2d022..1a43cd1821 100644 --- a/src/tests/mock_fontcache.h +++ b/src/tests/mock_fontcache.h @@ -30,7 +30,6 @@ public: uint GetGlyphWidth(GlyphID) override { return this->height / 2; } bool GetDrawGlyphShadow() override { return false; } GlyphID MapCharToGlyph(char32_t key, [[maybe_unused]] bool allow_fallback = true) override { return key; } - const void *GetFontTable(uint32_t, size_t &length) override { length = 0; return nullptr; } std::string GetFontName() override { return "mock"; } bool IsBuiltInFont() override { return true; } diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 37f28dad4d..a81adcd42a 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -16,6 +16,7 @@ #include "dropdown_type.h" #include "dropdown_func.h" #include "dropdown_common_type.h" +#include "house.h" #include "vehicle_gui.h" #include "rail_gui.h" #include "road.h" @@ -1368,12 +1369,18 @@ static CallBackFunction ToolbarScenGenLand(Window *w) return CBF_NONE; } - -static CallBackFunction ToolbarScenGenTown(Window *w) +static CallBackFunction ToolbarScenGenTownClick(Window *w) { - w->HandleButtonClick(WID_TE_TOWN_GENERATE); - if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); - ShowFoundTownWindow(); + PopupMainToolbarMenu(w, WID_TE_TOWN_GENERATE, {STR_SCENEDIT_TOWN_MENU_BUILD_TOWN, STR_SCENEDIT_TOWN_MENU_PACE_HOUSE}); + return CBF_NONE; +} + +static CallBackFunction ToolbarScenGenTown(int index) +{ + switch (index) { + case 0: ShowFoundTownWindow(); break; + case 1: ShowBuildHousePicker(nullptr); break; + } return CBF_NONE; } @@ -2427,7 +2434,7 @@ static MenuClickedProc * const _scen_toolbar_dropdown_procs[] = { nullptr, // 9 nullptr, // 10 nullptr, // 11 - nullptr, // 12 + ToolbarScenGenTown, // 12 nullptr, // 13 ToolbarScenBuildRoad, // 14 ToolbarScenBuildTram, // 15 @@ -2453,7 +2460,7 @@ static ToolbarButtonProc * const _scen_toolbar_button_procs[] = { ToolbarZoomInClick, ToolbarZoomOutClick, ToolbarScenGenLand, - ToolbarScenGenTown, + ToolbarScenGenTownClick, ToolbarScenGenIndustry, ToolbarScenBuildRoadClick, ToolbarScenBuildTramClick, @@ -2592,7 +2599,7 @@ struct ScenarioEditorToolbarWindow : Window { case MTEHK_SETTINGS: ShowGameOptions(); break; case MTEHK_SAVEGAME: MenuClickSaveLoad(); break; case MTEHK_GENLAND: ToolbarScenGenLand(this); break; - case MTEHK_GENTOWN: ToolbarScenGenTown(this); break; + case MTEHK_GENTOWN: ToolbarScenGenTownClick(this); break; case MTEHK_GENINDUSTRY: ToolbarScenGenIndustry(this); break; case MTEHK_BUILD_ROAD: ToolbarScenBuildRoadClick(this); break; case MTEHK_BUILD_TRAM: ToolbarScenBuildTramClick(this); break; diff --git a/src/town.h b/src/town.h index 810bc84d9d..b5332dff62 100644 --- a/src/town.h +++ b/src/town.h @@ -383,6 +383,7 @@ inline uint16_t TownTicksToGameTicks(uint16_t ticks) RoadType GetTownRoadType(); bool CheckTownRoadTypes(); +std::span GetTownDrawTileData(); bool MayTownModifyRoad(TileIndex tile); #endif /* TOWN_H */ diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 8f21cda790..cb50160c59 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -3042,18 +3042,17 @@ static CommandCost CheckCanBuildHouse(HouseID house, const Town *t, bool manual) /** - * Really build a house. - * @param t town to build house in - * @param tile house location - * @param house house type - * @param random_bits random bits for the house + * Build a house at this tile. + * @param t The town the house will belong to. + * @param tile The tile to try building on. + * @param hs The @a HouseSpec of the house. + * @param house The @a HouseID of the house. + * @param random_bits The random data to be associated with the house. */ -static void DoBuildHouse(Town *t, TileIndex tile, HouseID house, uint8_t random_bits) +static void BuildTownHouse(Town *t, TileIndex tile, const HouseSpec *hs, HouseID house, uint8_t random_bits) { t->cache.num_houses++; - const HouseSpec *hs = HouseSpec::Get(house); - /* Special houses that there can be only one of. */ if (hs->building_flags & BUILDING_IS_CHURCH) { t->church_count++; @@ -3130,7 +3129,7 @@ CommandCost CmdBuildHouse(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint if (!HouseAllowsConstruction(house, tile, t, random_bits)) return_cmd_error(STR_ERROR_BUILDING_NOT_ALLOWED); } - if (flags & DC_EXEC) DoBuildHouse(t, tile, house, random_bits); + if (flags & DC_EXEC) BuildTownHouse(t, tile, HouseSpec::Get(house), house, random_bits); return CommandCost(); } @@ -3204,13 +3203,56 @@ static bool TryBuildTownHouse(Town *t, TileIndex tile) /* Check if GRF allows this house */ if (!HouseAllowsConstruction(house, tile, t, random_bits)) continue; - DoBuildHouse(t, tile, house, random_bits); + BuildTownHouse(t, tile, HouseSpec::Get(house), house, random_bits); return true; } return false; } +CommandCost CmdPlaceHouse(DoCommandFlag flags, TileIndex tile, HouseID house) +{ + if (_game_mode != GM_EDITOR) return CMD_ERROR; + if (Town::GetNumItems() == 0) return_cmd_error(STR_ERROR_MUST_FOUND_TOWN_FIRST); + + if (static_cast(house) >= HouseSpec::Specs().size()) return CMD_ERROR; + const HouseSpec *hs = HouseSpec::Get(house); + if (!hs->enabled) return CMD_ERROR; + + Town *t = ClosestTownFromTile(tile, UINT_MAX); + + int max_z = GetTileMaxZ(tile); + + /* Make sure there is no slope? */ + bool noslope = (hs->building_flags & TILE_NOT_SLOPED) != 0; + + uint w = (hs->building_flags & BUILDING_2_TILES_X) ? 2 : 1; + uint h = (hs->building_flags & BUILDING_2_TILES_Y) ? 2 : 1; + + CommandCost cost = CanBuildHouseHere(TileArea(tile, w, h), t->index, max_z, noslope); + if (!cost.Succeeded()) return cost; + + if (flags & DC_EXEC) { + BuildTownHouse(t, tile, hs, house, Random()); + } + + return CommandCost(); +} + +/** + * Place a town house (scenario editor or worldgen only). + * @param tile Tile to place house on. + * @param flags Type of operation. + * @param p1 House ID. + * @param p2 Unused. + * @param text Unused. + * @return Empty cost or an error. + */ +CommandCost CmdPlaceHouse(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text) +{ + return CmdPlaceHouse(flags, tile, static_cast(p1)); +} + /** * Update data structures when a house is removed * @param tile Tile of the house @@ -4619,3 +4661,8 @@ extern const TileTypeProcs _tile_type_town_procs = { GetFoundation_Town, // get_foundation_proc TerraformTile_Town, // terraform_tile_proc }; + +std::span GetTownDrawTileData() +{ + return _town_draw_tile_data; +} diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 82894390e4..d32fcf2b07 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -12,6 +12,9 @@ #include "viewport_func.h" #include "error.h" #include "gui.h" +#include "house.h" +#include "newgrf_house.h" +#include "picker_gui.h" #include "command_func.h" #include "company_func.h" #include "company_base.h" @@ -2247,3 +2250,319 @@ void InitializeTownGui() { _town_local_authority_kdtree.Clear(); } + +/** + * Draw representation of a house tile for GUI purposes. + * @param x Position x of image. + * @param y Position y of image. + * @param spec House spec to draw. + * @param house_id House ID to draw. + * @param view The house's 'view'. + */ +void DrawNewHouseTileInGUI(int x, int y, const HouseSpec *spec, HouseID house_id, int view) +{ + HouseResolverObject object(house_id, INVALID_TILE, nullptr, CBID_NO_CALLBACK, 0, 0, true, view); + const SpriteGroup *group = object.Resolve(); + if (group == nullptr || group->type != SGT_TILELAYOUT) return; + + uint8_t stage = TOWN_HOUSE_COMPLETED; + const DrawTileSprites *dts = reinterpret_cast(group)->ProcessRegisters(&stage); + + PaletteID palette = GENERAL_SPRITE_COLOUR(spec->random_colour[0]); + if (HasBit(spec->callback_mask, CBM_HOUSE_COLOUR)) { + uint16_t callback = GetHouseCallback(CBID_HOUSE_COLOUR, 0, 0, house_id, nullptr, INVALID_TILE, true, view); + if (callback != CALLBACK_FAILED) { + /* If bit 14 is set, we should use a 2cc colour map, else use the callback value. */ + palette = HasBit(callback, 14) ? GB(callback, 0, 8) + SPR_2CCMAP_BASE : callback; + } + } + + SpriteID image = dts->ground.sprite; + PaletteID pal = dts->ground.pal; + + if (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) image += stage; + if (HasBit(pal, SPRITE_MODIFIER_CUSTOM_SPRITE)) pal += stage; + + if (GB(image, 0, SPRITE_WIDTH) != 0) { + DrawSprite(image, GroundSpritePaletteTransform(image, pal, palette), x, y); + } + + DrawNewGRFTileSeqInGUI(x, y, dts, stage, palette); +} + +/** + * Draw a house that does not exist. + * @param x Position x of image. + * @param y Position y of image. + * @param house_id House ID to draw. + * @param view The house's 'view'. + */ +void DrawHouseInGUI(int x, int y, HouseID house_id, int view) +{ + auto draw = [](int x, int y, HouseID house_id, int view) { + if (house_id >= NEW_HOUSE_OFFSET) { + /* Houses don't necessarily need new graphics. If they don't have a + * spritegroup associated with them, then the sprite for the substitute + * house id is drawn instead. */ + const HouseSpec *spec = HouseSpec::Get(house_id); + if (spec->grf_prop.spritegroup[0] != nullptr) { + DrawNewHouseTileInGUI(x, y, spec, house_id, view); + return; + } else { + house_id = HouseSpec::Get(house_id)->grf_prop.subst_id; + } + } + + /* Retrieve data from the draw town tile struct */ + const DrawBuildingsTileStruct &dcts = GetTownDrawTileData()[house_id << 4 | view << 2 | TOWN_HOUSE_COMPLETED]; + DrawSprite(dcts.ground.sprite, dcts.ground.pal, x, y); + + /* Add a house on top of the ground? */ + if (dcts.building.sprite != 0) { + Point pt = RemapCoords(dcts.subtile_x, dcts.subtile_y, 0); + DrawSprite(dcts.building.sprite, dcts.building.pal, x + UnScaleGUI(pt.x), y + UnScaleGUI(pt.y)); + } + }; + + /* Houses can have 1x1, 1x2, 2x1 and 2x2 layouts which are individual HouseIDs. For the GUI we need + * draw all of the tiles with appropriate positions. */ + int x_delta = ScaleGUITrad(TILE_PIXELS); + int y_delta = ScaleGUITrad(TILE_PIXELS / 2); + + const HouseSpec *hs = HouseSpec::Get(house_id); + if (hs->building_flags & TILE_SIZE_2x2) { + draw(x, y - y_delta - y_delta, house_id, view); // North corner. + draw(x + x_delta, y - y_delta, house_id + 1, view); // West corner. + draw(x - x_delta, y - y_delta, house_id + 2, view); // East corner. + draw(x, y, house_id + 3, view); // South corner. + } else if (hs->building_flags & TILE_SIZE_2x1) { + draw(x + x_delta / 2, y - y_delta, house_id, view); // North east tile. + draw(x - x_delta / 2, y, house_id + 1, view); // South west tile. + } else if (hs->building_flags & TILE_SIZE_1x2) { + draw(x - x_delta / 2, y - y_delta, house_id, view); // North west tile. + draw(x + x_delta / 2, y, house_id + 1, view); // South east tile. + } else { + draw(x, y, house_id, view); + } +} + + +class HousePickerCallbacks : public PickerCallbacks { +public: + HousePickerCallbacks() : PickerCallbacks("fav_houses") {} + + /** + * Set climate mask for filtering buildings from current landscape. + */ + void SetClimateMask() + { + switch (_settings_game.game_creation.landscape) { + case LT_TEMPERATE: climate_mask = HZ_TEMP; break; + case LT_ARCTIC: climate_mask = HZ_SUBARTC_ABOVE | HZ_SUBARTC_BELOW; break; + case LT_TROPIC: climate_mask = HZ_SUBTROPIC; break; + case LT_TOYLAND: climate_mask = HZ_TOYLND; break; + default: NOT_REACHED(); + } + } + + HouseZones climate_mask; + + static inline int sel_class; ///< Currently selected 'class'. + static inline int sel_type; ///< Currently selected HouseID. + static inline int sel_view; ///< Currently selected 'view'. This is not controllable as its based on random data. + + /* Houses do not have classes like NewGRFClass. We'll make up fake classes based on town zone + * availability instead. */ + static inline const std::array zone_names = { + STR_HOUSE_PICKER_CLASS_ZONE1, + STR_HOUSE_PICKER_CLASS_ZONE2, + STR_HOUSE_PICKER_CLASS_ZONE3, + STR_HOUSE_PICKER_CLASS_ZONE4, + STR_HOUSE_PICKER_CLASS_ZONE5, + }; + + StringID GetClassTooltip() const override { return STR_PICKER_HOUSE_CLASS_TOOLTIP; } + StringID GetTypeTooltip() const override { return STR_PICKER_HOUSE_TYPE_TOOLTIP; } + bool IsActive() const override { return true; } + + bool HasClassChoice() const override { return true; } + int GetClassCount() const override { return static_cast(zone_names.size()); } + + void Close([[maybe_unused]] int data) override { ResetObjectToPlace(); } + + int GetSelectedClass() const override { return HousePickerCallbacks::sel_class; } + void SetSelectedClass(int cls_id) const override { HousePickerCallbacks::sel_class = cls_id; } + + StringID GetClassName(int id) const override + { + if (id < GetClassCount()) return zone_names[id]; + return INVALID_STRING_ID; + } + + int GetTypeCount(int cls_id) const override + { + if (cls_id < GetClassCount()) return static_cast(HouseSpec::Specs().size()); + return 0; + } + + PickerItem GetPickerItem(int cls_id, int id) const override + { + const auto *spec = HouseSpec::Get(id); + if (spec->grf_prop.grffile == nullptr) return {0, spec->Index(), cls_id, id}; + return {spec->grf_prop.grffile->grfid, spec->grf_prop.local_id, cls_id, id}; + } + + int GetSelectedType() const override { return sel_type; } + void SetSelectedType(int id) const override { sel_type = id; } + + StringID GetTypeName(int cls_id, int id) const override + { + const HouseSpec *spec = HouseSpec::Get(id); + if (spec == nullptr) return INVALID_STRING_ID; + if (!spec->enabled) return INVALID_STRING_ID; + if ((spec->building_availability & climate_mask) == 0) return INVALID_STRING_ID; + if (!HasBit(spec->building_availability, cls_id)) return INVALID_STRING_ID; + for (int i = 0; i < cls_id; i++) { + /* Don't include if it's already included in an earlier zone. */ + if (HasBit(spec->building_availability, i)) return INVALID_STRING_ID; + } + + return spec->building_name; + } + + bool IsTypeAvailable(int, int id) const override + { + const HouseSpec *hs = HouseSpec::Get(id); + return hs->enabled; + } + + void DrawType(int x, int y, int, int id) const override + { + DrawHouseInGUI(x, y, id, HousePickerCallbacks::sel_view); + } + + void FillUsedItems(btree::btree_set &items) override + { + auto id_count = GetBuildingHouseIDCounts(); + for (auto it = id_count.begin(); it != id_count.end(); ++it) { + if (*it == 0) continue; + HouseID house = static_cast(std::distance(id_count.begin(), it)); + const HouseSpec *hs = HouseSpec::Get(house); + int class_index = FindFirstBit(hs->building_availability & HZ_ZONALL); + items.insert({0, house, class_index, house}); + } + } + + btree::btree_set UpdateSavedItems(const btree::btree_set &src) override + { + if (src.empty()) return src; + + const auto specs = HouseSpec::Specs(); + btree::btree_set dst; + for (const auto &item : src) { + if (item.grfid == 0) { + dst.insert(item); + } else { + /* Search for spec by grfid and local index. */ + auto it = std::find_if(specs.begin(), specs.end(), [&item](const HouseSpec &spec) { return spec.grf_prop.grffile != nullptr && spec.grf_prop.grffile->grfid == item.grfid && spec.grf_prop.local_id == item.local_id; }); + if (it == specs.end()) { + /* Not preset, hide from UI. */ + dst.insert({item.grfid, item.local_id, -1, -1}); + } else { + int class_index = FindFirstBit(it->building_availability & HZ_ZONALL); + dst.insert( {item.grfid, item.local_id, class_index, it->Index()}); + } + } + } + + return dst; + } + + static HousePickerCallbacks instance; +}; +/* static */ HousePickerCallbacks HousePickerCallbacks::instance; + +struct BuildHouseWindow : public PickerWindow { + BuildHouseWindow(WindowDesc *desc, Window *parent) : PickerWindow(desc, parent, 0, HousePickerCallbacks::instance) + { + HousePickerCallbacks::instance.SetClimateMask(); + this->ConstructWindow(); + this->InvalidateData(); + } + + void UpdateSelectSize(const HouseSpec *spec) + { + if (spec == nullptr) { + SetTileSelectSize(1, 1); + ResetObjectToPlace(); + } else { + SetObjectToPlaceWnd(SPR_CURSOR_TOWN, PAL_NONE, HT_RECT | HT_DIAGONAL, this); + if (spec->building_flags & TILE_SIZE_2x2) { + SetTileSelectSize(2, 2); + } else if (spec->building_flags & TILE_SIZE_2x1) { + SetTileSelectSize(2, 1); + } else if (spec->building_flags & TILE_SIZE_1x2) { + SetTileSelectSize(1, 2); + } else if (spec->building_flags & TILE_SIZE_1x1) { + SetTileSelectSize(1, 1); + } + } + } + + void OnInvalidateData(int data = 0, bool gui_scope = true) override + { + this->PickerWindow::OnInvalidateData(data, gui_scope); + if (!gui_scope) return; + + if ((data & PickerWindow::PFI_POSITION) != 0) { + const HouseSpec *spec = HouseSpec::Get(HousePickerCallbacks::sel_type); + UpdateSelectSize(spec); + } + } + + void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override + { + const HouseSpec *spec = HouseSpec::Get(HousePickerCallbacks::sel_type); + DoCommandP(tile, spec->Index(), 0, CMD_PLACE_HOUSE | CMD_MSG(STR_ERROR_CAN_T_BUILD_HOUSE), CcPlaySound_CONSTRUCTION_OTHER); + } + + IntervalTimer view_refresh_interval = {std::chrono::milliseconds(2500), [this](auto) { + /* There are four different 'views' that are random based on house tile position. As this is not + * user-controllable, instead we automatically cycle through them. */ + HousePickerCallbacks::sel_view = (HousePickerCallbacks::sel_view + 1) % 4; + this->SetDirty(); + }}; + + static inline HotkeyList hotkeys{"buildhouse", { + Hotkey('F', "focus_filter_box", PCWHK_FOCUS_FILTER_BOX), + }}; +}; + +/** Nested widget definition for the build NewGRF rail waypoint window */ +static constexpr NWidgetPart _nested_build_house_widgets[] = { + NWidget(NWID_HORIZONTAL), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_HOUSE_PICKER_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), + EndContainer(), + NWidget(NWID_HORIZONTAL), + NWidgetFunction(MakePickerClassWidgets), + NWidgetFunction(MakePickerTypeWidgets), + EndContainer(), +}; + +static WindowDesc _build_house_desc(__FILE__, __LINE__, + WDP_AUTO, "build_house", 0, 0, + WC_BUILD_HOUSE, WC_BUILD_TOOLBAR, + WDF_CONSTRUCTION, + std::begin(_nested_build_house_widgets), std::end(_nested_build_house_widgets), + &BuildHouseWindow::hotkeys +); + +void ShowBuildHousePicker(Window *parent) +{ + if (BringWindowToFrontById(WC_BUILD_HOUSE, 0)) return; + new BuildHouseWindow(&_build_house_desc, parent); +} diff --git a/src/vehicle_base.h b/src/vehicle_base.h index c2f67b94cf..38ade16539 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -1422,7 +1422,7 @@ struct SpecializedVehicle : public Vehicle { /** * Set vehicle type correctly */ - inline SpecializedVehicle() : Vehicle(Type) + inline SpecializedVehicle() : Vehicle(Type) { this->sprite_seq.count = 1; } diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index de48ddbcb2..b184c001d2 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -1285,7 +1285,7 @@ static void LoadWGLExtensions() * regarding context creation. To get around this, we create * a dummy window with a dummy context. The extension functions * remain valid even after this context is destroyed. */ - HWND wnd = CreateWindow(_T("STATIC"), _T("dummy"), WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, nullptr, nullptr, GetModuleHandle(nullptr), nullptr); + HWND wnd = CreateWindow(L"STATIC", L"dummy", WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, nullptr, nullptr, GetModuleHandle(nullptr), nullptr); HDC dc = GetDC(wnd); /* Set pixel format of the window. */ diff --git a/src/waypoint_base.h b/src/waypoint_base.h index 753a99108a..ea5a028bd1 100644 --- a/src/waypoint_base.h +++ b/src/waypoint_base.h @@ -43,7 +43,7 @@ struct Waypoint final : SpecializedStation { return IsRailWaypointTile(tile) && GetStationIndex(tile) == this->index; } - uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint16_t variable, uint8_t parameter, bool *available) const override; + uint32_t GetNewGRFVariable(const struct ResolverObject &object, uint16_t variable, uint8_t parameter, bool &available) const override; void GetTileArea(TileArea *ta, StationType type) const override; diff --git a/src/window_type.h b/src/window_type.h index fbe25106b1..68a90832b2 100644 --- a/src/window_type.h +++ b/src/window_type.h @@ -403,8 +403,8 @@ enum WindowClass { /** * Build house; %Window numbers: - * - 0 = #BuildHouseWidgets - */ + * - 0 = #BuildHouseWidgets + */ WC_BUILD_HOUSE, /**