diff --git a/Makefile.src.in b/Makefile.src.in index 0589ba69a6..c07015cfe8 100644 --- a/Makefile.src.in +++ b/Makefile.src.in @@ -159,6 +159,19 @@ $(SRC_OBJS_DIR)/$(DEPEND): $(SRC_DIR)/depend/depend.cpp $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) -o $@ $< endif +# Macro for invoking a command on groups of 100 words at a time +# (analogous to xargs(1)). The macro invokes itself recursively +# until the list of words is depleted. +# +# Usage: $(call xargs,COMMAND,LIST) +# +# COMMAND should be a shell command to which the words will be +# appended as arguments in groups of 100. +define xargs +$(1) $(wordlist 1,100,$(2)) +$(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2)))) +endef + # Make sure that only 'make depend' ALWAYS triggers a recheck ifeq ($(filter depend, $(MAKECMDGOALS)),) Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(CONFIG_CACHE_SOURCE) $(DEP) @@ -170,14 +183,7 @@ endif $(Q)touch Makefile.dep.tmp # Calculate the deps via makedepend - $(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -- $(CFLAGS_MAKEDEP) -- $(SRCS:%=$(SRC_DIR)/%) 2>/dev/null - -# Convert x:/... paths to /x/... for mingw -ifeq ($(OS), MINGW) - @cat Makefile.dep.tmp | sed 's@/\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw - @cp Makefile.dep.tmp.mingw Makefile.dep.tmp - @rm -f Makefile.dep.tmp.mingw -endif + $(call xargs,$(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -a -- $(CFLAGS_MAKEDEP) -- 2>/dev/null,$(SRCS:%=$(SRC_DIR)/%)) # Remove all comments and includes that don't start with $(SRC_DIR) # Remove $(SRC_DIR) from object-file-name diff --git a/azure-pipelines/templates/windows-dependencies.yml b/azure-pipelines/templates/windows-dependencies.yml index 06f56e626b..c6fc6e407c 100644 --- a/azure-pipelines/templates/windows-dependencies.yml +++ b/azure-pipelines/templates/windows-dependencies.yml @@ -1,7 +1,7 @@ steps: - bash: | set -ex - curl -L https://github.com/OpenTTD/OpenTTD-CF/releases/download/latest/windows-dependencies.zip > windows-dependencies.zip + curl -L https://github.com/OpenTTD/CompileFarm/releases/download/latest/windows-dependencies.zip > windows-dependencies.zip unzip windows-dependencies.zip rm -f windows-dependencies.zip displayName: 'Download dependencies' diff --git a/config.lib b/config.lib index 3fda9727bc..6154f3822d 100644 --- a/config.lib +++ b/config.lib @@ -376,6 +376,7 @@ detect_params() { --with-fluidsynth) with_fluidsynth="2";; --without-fluidsynth) with_fluidsynth="0";; + --with-fluidsynth=*) with_fluidsynth="$optarg";; --with-freetype) with_freetype="2";; --without-freetype) with_freetype="0";; @@ -1524,7 +1525,7 @@ make_cflags_and_ldflags() { CXXFLAGS_ENV="$CXXFLAGS" CXXFLAGS="" # Libs to compile. In fact this is just LDFLAGS - LIBS="-lstdc++" + LIBS="" # LDFLAGS used for HOST LDFLAGS_ENV="$LDFLAGS" LDFLAGS="" @@ -1975,7 +1976,7 @@ make_cflags_and_ldflags() { cflags_makedep="`echo | $cxx_host $CXXFLAGS -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`" # Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations - cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" \"$CXXFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`" + cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" \"$CXXFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g;s@[ ]*-[^D][^ ]*@@g'`" else makedepend="" fi diff --git a/projects/generate_vs140.vcxproj b/projects/generate_vs140.vcxproj index e505315153..b17142050b 100644 --- a/projects/generate_vs140.vcxproj +++ b/projects/generate_vs140.vcxproj @@ -31,7 +31,6 @@ Running %27generate.vbs%27 ... cscript "$(ProjectDir)generate.vbs" %(FullPath);%(AdditionalInputs) - $(SolutionDir)openttd_vs80.vcproj;$(SolutionDir)openttd_vs90.vcproj;$(SolutionDir)openttd_vs100.vcxproj;$(SolutionDir)openttd_vs100.vcxproj.filters;$(SolutionDir)langs_vs80.vcproj;$(SolutionDir)langs_vs90.vcproj;$(SolutionDir)langs_vs100.vcxproj;%(Outputs) diff --git a/projects/generate_vs141.vcxproj b/projects/generate_vs141.vcxproj index 2db93cf097..d7a877db17 100644 --- a/projects/generate_vs141.vcxproj +++ b/projects/generate_vs141.vcxproj @@ -31,7 +31,6 @@ Running %27generate.vbs%27 ... cscript "$(ProjectDir)generate.vbs" %(FullPath);%(AdditionalInputs) - $(SolutionDir)openttd_vs80.vcproj;$(SolutionDir)openttd_vs90.vcproj;$(SolutionDir)openttd_vs100.vcxproj;$(SolutionDir)openttd_vs100.vcxproj.filters;$(SolutionDir)langs_vs80.vcproj;$(SolutionDir)langs_vs90.vcproj;$(SolutionDir)langs_vs100.vcxproj;%(Outputs) diff --git a/projects/openttd_vs140.sln b/projects/openttd_vs140.sln index 32f3033fb2..c9beb2a1e1 100644 --- a/projects/openttd_vs140.sln +++ b/projects/openttd_vs140.sln @@ -4,10 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs140.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}" - ProjectSection(ProjectDependencies) = postProject - {0817F629-589E-4A3B-B81A-8647BC571E35} = {0817F629-589E-4A3B-B81A-8647BC571E35} - {E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs140.vcxproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}" EndProject @@ -18,9 +14,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate", "generate_vs140.vcxproj", "{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings_vs140.vcxproj", "{0817F629-589E-4A3B-B81A-8647BC571E35}" - ProjectSection(ProjectDependencies) = postProject - {E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settingsgen", "settingsgen_vs140.vcxproj", "{E9548DE9-F089-49B7-93A6-30BE2CC311C7}" EndProject diff --git a/projects/openttd_vs140.vcxproj b/projects/openttd_vs140.vcxproj index 7f5e1291c7..5b6f403014 100644 --- a/projects/openttd_vs140.vcxproj +++ b/projects/openttd_vs140.vcxproj @@ -1351,6 +1351,14 @@ {0f066b23-18df-4284-8265-f4a5e7e3b966} false + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + + {0817f629-589e-4a3b-b81a-8647bc571e35} + false + {a133a442-bd0a-4ade-b117-ad7545e4bdd1} false diff --git a/projects/openttd_vs140.vcxproj.in b/projects/openttd_vs140.vcxproj.in index 75aac94bab..c5e120401f 100644 --- a/projects/openttd_vs140.vcxproj.in +++ b/projects/openttd_vs140.vcxproj.in @@ -349,6 +349,14 @@ {0f066b23-18df-4284-8265-f4a5e7e3b966} false + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + + {0817f629-589e-4a3b-b81a-8647bc571e35} + false + {a133a442-bd0a-4ade-b117-ad7545e4bdd1} false diff --git a/projects/openttd_vs141.sln b/projects/openttd_vs141.sln index 86f2685cd9..f163125cbe 100644 --- a/projects/openttd_vs141.sln +++ b/projects/openttd_vs141.sln @@ -4,10 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs141.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}" - ProjectSection(ProjectDependencies) = postProject - {0817F629-589E-4A3B-B81A-8647BC571E35} = {0817F629-589E-4A3B-B81A-8647BC571E35} - {E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs141.vcxproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}" EndProject @@ -18,9 +14,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate", "generate_vs141.vcxproj", "{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings_vs141.vcxproj", "{0817F629-589E-4A3B-B81A-8647BC571E35}" - ProjectSection(ProjectDependencies) = postProject - {E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settingsgen", "settingsgen_vs141.vcxproj", "{E9548DE9-F089-49B7-93A6-30BE2CC311C7}" EndProject diff --git a/projects/openttd_vs141.vcxproj b/projects/openttd_vs141.vcxproj index 6214c2c07a..f5192c10e0 100644 --- a/projects/openttd_vs141.vcxproj +++ b/projects/openttd_vs141.vcxproj @@ -1349,6 +1349,14 @@ {0f066b23-18df-4284-8265-f4a5e7e3b966} false + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + + {0817f629-589e-4a3b-b81a-8647bc571e35} + false + {a133a442-bd0a-4ade-b117-ad7545e4bdd1} false diff --git a/projects/openttd_vs141.vcxproj.in b/projects/openttd_vs141.vcxproj.in index a054c2580e..2a8a78af75 100644 --- a/projects/openttd_vs141.vcxproj.in +++ b/projects/openttd_vs141.vcxproj.in @@ -349,6 +349,14 @@ {0f066b23-18df-4284-8265-f4a5e7e3b966} false + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + + {0817f629-589e-4a3b-b81a-8647bc571e35} + false + {a133a442-bd0a-4ade-b117-ad7545e4bdd1} false diff --git a/projects/settings_vs140.vcxproj b/projects/settings_vs140.vcxproj index 4fe07dbd64..9952df47bb 100644 --- a/projects/settings_vs140.vcxproj +++ b/projects/settings_vs140.vcxproj @@ -48,6 +48,12 @@ + + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + diff --git a/projects/settings_vs140.vcxproj.in b/projects/settings_vs140.vcxproj.in index 71ea738dcf..9bb0cc7f0b 100644 --- a/projects/settings_vs140.vcxproj.in +++ b/projects/settings_vs140.vcxproj.in @@ -42,6 +42,12 @@ + + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + diff --git a/projects/settings_vs141.vcxproj b/projects/settings_vs141.vcxproj index ed6f5bab18..9c20f1407e 100644 --- a/projects/settings_vs141.vcxproj +++ b/projects/settings_vs141.vcxproj @@ -48,6 +48,12 @@ + + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + diff --git a/projects/settings_vs141.vcxproj.in b/projects/settings_vs141.vcxproj.in index e4a60227cb..23e044cc17 100644 --- a/projects/settings_vs141.vcxproj.in +++ b/projects/settings_vs141.vcxproj.in @@ -42,6 +42,12 @@ + + + {e9548de9-f089-49b7-93a6-30be2cc311c7} + false + + diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index b495a1dff5..6799f7c643 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -37,6 +37,7 @@ #include "core/backup_type.hpp" #include "zoom_func.h" #include "disaster_vehicle.h" +#include "newgrf_airporttiles.h" #include "framerate_type.h" #include "table/strings.h" @@ -1370,8 +1371,14 @@ static void AircraftEntersTerminal(Aircraft *v) */ static void AircraftLandAirplane(Aircraft *v) { + Station *st = Station::Get(v->targetairport); + + TileIndex vt = TileVirtXY(v->x_pos, v->y_pos); + v->UpdateDeltaXY(); + AirportTileAnimationTrigger(st, vt, AAT_STATION_AIRPLANE_LAND); + if (!PlayVehicleSound(v, VSE_TOUCHDOWN)) { SndPlayVehicleFx(SND_17_SKID_PLANE, v); } diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 2149d1d269..81237e4245 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -370,6 +370,23 @@ static inline int RoundDivSU(int a, uint b) } } +/** + * Computes (a / b) rounded away from zero. + * @param a Numerator + * @param b Denominator + * @return Quotient, rounded away from zero + */ +static inline int DivAwayFromZero(int a, uint b) +{ + const int _b = static_cast(b); + if (a > 0) { + return (a + _b - 1) / _b; + } else { + /* Note: Behaviour of negative numerator division is truncation toward zero. */ + return (a - _b + 1) / _b; + } +} + uint32 IntSqrt(uint32 num); #endif /* MATH_FUNC_HPP */ diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp index f57acba25c..9f8de891bd 100644 --- a/src/depend/depend.cpp +++ b/src/depend/depend.cpp @@ -1008,7 +1008,7 @@ int main(int argc, char *argv[]) fclose(src); /* Then append it to the real file. */ - src = fopen(backup, "rb"); + src = fopen(backup, "r"); while (fgets(content, size, src) != NULL) { fputs(content, dst); if (!strncmp(content, delimiter, strlen(delimiter))) found_delimiter = true; diff --git a/src/fontcache.cpp b/src/fontcache.cpp index 55da0c55c8..98e8bdf41c 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -546,7 +546,7 @@ const Sprite *FreeTypeFontCache::GetGlyph(GlyphID key) return glyph->sprite; } } - FT_Load_Glyph(this->face, key, FT_LOAD_DEFAULT); + FT_Load_Glyph(this->face, key, aa ? FT_LOAD_TARGET_NORMAL : FT_LOAD_TARGET_MONO); FT_Render_Glyph(this->face->glyph, aa ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO); /* Despite requesting a normal glyph, FreeType may have returned a bitmap */ diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 05cc67ee2b..a1030122e5 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -280,6 +280,8 @@ class BuildIndustryWindow : public Window { /** The offset for the text in the matrix. */ static const int MATRIX_TEXT_OFFSET = 17; + /** The largest allowed minimum-width of the window, given in line heights */ + static const int MAX_MINWIDTH_LINEHEIGHTS = 20; void SetupArrays() { @@ -337,6 +339,53 @@ class BuildIndustryWindow : public Window { this->SetWidgetDisabledState(WID_DPI_DISPLAY_WIDGET, this->selected_type == INVALID_INDUSTRYTYPE && this->enabled[this->selected_index]); } + /** + * Build a string of cargo names with suffixes attached. + * This is distinct from the CARGO_LIST string formatting code in two ways: + * - This cargo list uses the order defined by the industry, rather than alphabetic. + * - NewGRF-supplied suffix strings can be attached to each cargo. + * + * @param cargolist Array of CargoID to display + * @param cargo_suffix Array of suffixes to attach to each cargo + * @param cargolistlen Length of arrays + * @param prefixstr String to use for the first item + * @return A formatted raw string + */ + std::string MakeCargoListString(const CargoID *cargolist, const CargoSuffix *cargo_suffix, int cargolistlen, StringID prefixstr) const + { + std::string cargostring; + char buf[1024]; + int numcargo = 0; + int firstcargo = -1; + + for (byte j = 0; j < cargolistlen; j++) { + if (cargolist[j] == CT_INVALID) continue; + numcargo++; + if (firstcargo < 0) { + firstcargo = j; + continue; + } + SetDParam(0, CargoSpec::Get(cargolist[j])->name); + SetDParamStr(1, cargo_suffix[j].text); + GetString(buf, STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION, lastof(buf)); + cargostring += buf; + } + + if (numcargo > 0) { + SetDParam(0, CargoSpec::Get(cargolist[firstcargo])->name); + SetDParamStr(1, cargo_suffix[firstcargo].text); + GetString(buf, prefixstr, lastof(buf)); + cargostring = std::string(buf) + cargostring; + } else { + SetDParam(0, STR_JUST_NOTHING); + SetDParamStr(1, ""); + GetString(buf, prefixstr, lastof(buf)); + cargostring = std::string(buf); + } + + return cargostring; + } + public: BuildIndustryWindow() : Window(&_build_industry_desc) { @@ -378,42 +427,39 @@ public: case WID_DPI_INFOPANEL: { /* Extra line for cost outside of editor + extra lines for 'extra' information for NewGRFs. */ int height = 2 + (_game_mode == GM_EDITOR ? 0 : 1) + (_loaded_newgrf_features.has_newindustries ? 4 : 0); + uint extra_lines_req = 0; + uint extra_lines_prd = 0; + uint max_minwidth = FONT_HEIGHT_NORMAL * MAX_MINWIDTH_LINEHEIGHTS; Dimension d = {0, 0}; for (byte i = 0; i < this->count; i++) { if (this->index[i] == INVALID_INDUSTRYTYPE) continue; const IndustrySpec *indsp = GetIndustrySpec(this->index[i]); - CargoSuffix cargo_suffix[lengthof(indsp->accepts_cargo)]; - GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_FUND, NULL, this->index[i], indsp, indsp->accepts_cargo, cargo_suffix); - StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO; - byte p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->accepts_cargo); j++) { - if (indsp->accepts_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); - } - d = maxdim(d, GetStringBoundingBox(str)); - /* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */ - GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_FUND, NULL, this->index[i], indsp, indsp->produced_cargo, cargo_suffix); - str = STR_INDUSTRY_VIEW_PRODUCES_CARGO; - p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->produced_cargo); j++) { - if (indsp->produced_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); + /* Measure the accepted cargoes, if any. */ + GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_FUND, NULL, this->index[i], indsp, indsp->accepts_cargo, cargo_suffix); + std::string cargostring = this->MakeCargoListString(indsp->accepts_cargo, cargo_suffix, lengthof(indsp->accepts_cargo), STR_INDUSTRY_VIEW_REQUIRES_N_CARGO); + Dimension strdim = GetStringBoundingBox(cargostring.c_str()); + if (strdim.width > max_minwidth) { + extra_lines_req = max(extra_lines_req, strdim.width / max_minwidth + 1); + strdim.width = max_minwidth; } - d = maxdim(d, GetStringBoundingBox(str)); + d = maxdim(d, strdim); + + /* Measure the produced cargoes, if any. */ + GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_FUND, NULL, this->index[i], indsp, indsp->produced_cargo, cargo_suffix); + cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, lengthof(indsp->produced_cargo), STR_INDUSTRY_VIEW_PRODUCES_N_CARGO); + strdim = GetStringBoundingBox(cargostring.c_str()); + if (strdim.width > max_minwidth) { + extra_lines_prd = max(extra_lines_prd, strdim.width / max_minwidth + 1); + strdim.width = max_minwidth; + } + d = maxdim(d, strdim); } /* Set it to something more sane :) */ + height += extra_lines_prd + extra_lines_req; size->height = height * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM; size->width = d.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT; break; @@ -502,36 +548,17 @@ public: y += FONT_HEIGHT_NORMAL; } - /* Draw the accepted cargoes, if any. Otherwise, will print "Nothing". */ CargoSuffix cargo_suffix[lengthof(indsp->accepts_cargo)]; + + /* Draw the accepted cargoes, if any. Otherwise, will print "Nothing". */ GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_FUND, NULL, this->selected_type, indsp, indsp->accepts_cargo, cargo_suffix); - StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO; - byte p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->accepts_cargo); j++) { - if (indsp->accepts_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); - } - DrawString(left, right, y, str); - y += FONT_HEIGHT_NORMAL; + std::string cargostring = this->MakeCargoListString(indsp->accepts_cargo, cargo_suffix, lengthof(indsp->accepts_cargo), STR_INDUSTRY_VIEW_REQUIRES_N_CARGO); + y = DrawStringMultiLine(left, right, y, bottom, cargostring.c_str()); /* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */ GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_FUND, NULL, this->selected_type, indsp, indsp->produced_cargo, cargo_suffix); - str = STR_INDUSTRY_VIEW_PRODUCES_CARGO; - p = 0; - SetDParam(0, STR_JUST_NOTHING); - SetDParamStr(1, ""); - for (byte j = 0; j < lengthof(indsp->produced_cargo); j++) { - if (indsp->produced_cargo[j] == CT_INVALID) continue; - if (p > 0) str++; - SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name); - SetDParamStr(p++, cargo_suffix[j].text); - } - DrawString(left, right, y, str); - y += FONT_HEIGHT_NORMAL; + cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, lengthof(indsp->produced_cargo), STR_INDUSTRY_VIEW_PRODUCES_N_CARGO); + y = DrawStringMultiLine(left, right, y, bottom, cargostring.c_str()); /* Get the additional purchase info text, if it has not already been queried. */ if (HasBit(indsp->callback_mask, CBM_IND_FUND_MORE_TEXT)) { @@ -540,7 +567,7 @@ public: if (callback_res > 0x400) { ErrorUnknownCallbackResult(indsp->grf_prop.grffile->grfid, CBID_INDUSTRY_FUND_MORE_TEXT, callback_res); } else { - str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string + StringID str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string if (str != STR_UNDEFINED) { StartTextRefStackUsage(indsp->grf_prop.grffile, 6); DrawStringMultiLine(left, right, y, bottom, str, TC_YELLOW); diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt index eca60e70a4..56cbe04a04 100644 --- a/src/lang/afrikaans.txt +++ b/src/lang/afrikaans.txt @@ -3286,18 +3286,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Skuif sk STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksie vlak: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Die nywerheid het aangekondig dat dit binnekort gaan sluit! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Vereis: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vereis: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vereis: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produseer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produseer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Verander produksie (veelvoude van 8, tot en met 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Verander produksie vlakke (persentasie, tot 800%) diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index 7dfda5029b..2eb29baa31 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -2813,18 +2813,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}وسط الشاشة على المصنع STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}نسبة الانتاج: {YELLOW}{COMMA}% -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}يحتاج: {YELLOW}{STRING} {STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}يحتاج: {YELLOW}{STRING}{STRING}، {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}يحتاج: {YELLOW}{STRING}{STRING}, {STRING}{STRING} , {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}ينتج: {YELLOW}{STRING} {STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}ينتج: {YELLOW}{STRING} {STRING}, {STRING} {STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}تغيير الانتاج مضاعف من 8 الى 2040 STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}غير مستوى الانتاج{}نسبة مئوية حتى 800%. diff --git a/src/lang/basque.txt b/src/lang/basque.txt index ee74b92372..0c2e09e24d 100644 --- a/src/lang/basque.txt +++ b/src/lang/basque.txt @@ -3174,18 +3174,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Ikuspegi STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ekoizpen kopurua: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industriak berehalako itxiera iragarri du! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Ekoizpena: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Ekoizpena: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ekoizpena aldatu (8 eta 2040 arteko multiploa) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ekoizpen ehunekoa aldatu (ehunekoa, %800 arte) diff --git a/src/lang/belarusian.txt b/src/lang/belarusian.txt index ada14f8931..c2e3a1435d 100644 --- a/src/lang/belarusian.txt +++ b/src/lang/belarusian.txt @@ -3635,21 +3635,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Пака STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Прадукцыйнасьць: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Прадпрыемства хутка закрываецца! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Патрабуецца: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Патрабуецца: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Патрабуецца: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Патрабуецца: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} чакае{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Вырабляе: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Вырабляе: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Зьмяніць прадукцыйнасьць (кратна 8, да 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Зьмяніць прадукцыйнасьць (у адсотках, да 800%) diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index 0126a33428..ffa56055fd 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -3345,21 +3345,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou fechamento iminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requer: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Necessita: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} aguardando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Modificar produção (múltiplo de 8, até 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mudar nível de produção (porcentagem, até 800%) diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt index 9c24ed8a74..d674c67d40 100644 --- a/src/lang/bulgarian.txt +++ b/src/lang/bulgarian.txt @@ -3215,19 +3215,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Фоку STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ниво на производство: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Индустрията обяви незабавна ликвидация! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Нуждае се от: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Нуждае се от: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Нуждае се от: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} чакащ{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Произвежда: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Произвежда: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Промени производството STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Промени нивото на производство(процент, до 800%) diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt index 59e0e3b55c..57d4e57322 100644 --- a/src/lang/catalan.txt +++ b/src/lang/catalan.txt @@ -3347,21 +3347,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra l STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivell de producció: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La indústria ha anunciat la seva clausura imminent! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Necessita: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Necessita: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Necessita: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Necessita: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} esperant{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produeix: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produeix: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Canvia la producció (múltiple de 8, fins a 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Canvia el nivell de producció (en percentatge, fins a 800%) diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index dac4678a8e..de8a0e641a 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -3451,21 +3451,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrira STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Razina proizvodnje: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrija je najavila uskoro zatvaranje! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Treba: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Treba: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Treba: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Treba: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} čeka{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Promijeni proizvodnju (višekratnik broja 8, do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Promijeni razinu proizvodnje (postotak, do najviše 800%) diff --git a/src/lang/czech.txt b/src/lang/czech.txt index 530738b6f4..17a09c6ac9 100644 --- a/src/lang/czech.txt +++ b/src/lang/czech.txt @@ -3405,21 +3405,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vystřed STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produkce: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Průmysl oznámila blížící se uzavření! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Vyžaduje: {YELLOW}{STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vyžaduje: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vyžaduje: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING}, {STRING.acc}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Vyžaduje: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} ček{P á ají á}{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Změnit produkci (násobky 8, až do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Změna velikosti produkce (procentuelně, do 800%) diff --git a/src/lang/danish.txt b/src/lang/danish.txt index d278cd277f..93fa13575c 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -3295,21 +3295,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktions niveauet: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrien har rapporteret øjeblikkelig nedlukning! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Kræver: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Kræver: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Kræver: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Kræver: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} venter{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Producerer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Producerer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Skift produktion (multipla af 8, op til 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ændre produktions niveauet (Op til 800%) diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt index 0bde237c7e..3a932ae17f 100644 --- a/src/lang/dutch.txt +++ b/src/lang/dutch.txt @@ -3347,21 +3347,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centreer STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Productieniveau: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}De industrie heeft een dreigende sluiting aangekondigd! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Vereist: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vereist: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vereist: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Vereist: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} wachtend{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produceert: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produceert: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Verander productie (veelvoud van 8, maximaal 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Verander productieniveau (percentage, maximaal 800%) diff --git a/src/lang/english.txt b/src/lang/english.txt index 0bb6ff9c5b..7ad560bdff 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -3355,21 +3355,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre t STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING}, {STRING}{RAW_STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{RAW_STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requires: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:RAW_STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} waiting{RAW_STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production (multiple of 8, up to 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Change production level (percentage, up to 800%) diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index bf71047a94..403cd8eade 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -3252,18 +3252,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre t STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production (multiple of 8, up to 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Change production level (percentage, up to 800%) diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index 98e007bc1b..6e03e5b242 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -3302,21 +3302,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Center t STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requires: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} waiting{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produces: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production (multiple of 8, up to 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Change production level (percentage, up to 800%) diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt index bff065d1fa..d8a78e8ed2 100644 --- a/src/lang/esperanto.txt +++ b/src/lang/esperanto.txt @@ -2726,18 +2726,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centri ĉefvidon ĉe la industrio. Stir+Klak por malfermi novan vidujon ĉe la industrioloko. STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produkta nivelo: {YELLOW}{COMMA}% -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Bezonas: {YELLOW}{STRING.n}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Bezonas: {YELLOW}{STRING.n}{STRING}, {STRING.n}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Bezonas: {YELLOW}{STRING.n}{STRING}, {STRING.n}{STRING}, {STRING.n}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produktas: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produktas: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ŝanĝu produktadon (multoble de 8, ĝis 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ŝanĝu produktan nivelon (procento, limigo je 800%) diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt index a8f130e67d..8ff3974270 100644 --- a/src/lang/estonian.txt +++ b/src/lang/estonian.txt @@ -3343,18 +3343,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vaate ke STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tootlikkuse tase: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Tööstus teatab kohesest sulgemisest! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Vajab: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vajab: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vajab: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Toodab: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Toodab: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Tootlikuse muutmine (kaheksaga jaguv, kuni 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Muuda tootlikkuse taset (protsent, kuni 800%) diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt index 3465a72111..9dd30eb324 100644 --- a/src/lang/faroese.txt +++ b/src/lang/faroese.txt @@ -2916,18 +2916,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Savna høvuðs sýni á ídnaðin. Ctrl+trýst letur nýggjan sýnisglugga upp við sýni á ídnaðin STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Framleiðslu støði: {YELLOW}{COMMA}% -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Tørvar: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Tørvar: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Tørvar: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Framleiður: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Framleiður: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Broyt framleiðslu (fald av 8, upp til 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Broyt framleiðslu støði (prosent, upp til 800%) diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index 0450afa0b3..86edbf439c 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -189,6 +189,7 @@ STR_COLOUR_ORANGE :Oranssi STR_COLOUR_BROWN :Ruskea STR_COLOUR_GREY :Harmaa STR_COLOUR_WHITE :Valkoinen +STR_COLOUR_RANDOM :Satunnainen # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -927,6 +928,7 @@ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Oma... STR_GAME_OPTIONS_CURRENCY_GEL :Georgian lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranin rial (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Uusi Venäjän rupla (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Meksikon peso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Kulkuneuvot @@ -3326,21 +3328,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Keskitä STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tuotantotaso: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Teollisuuslaitos ilmoittaa pikaisesta sulkeutumisestaan! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Tarvitsee: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Tarvitsee: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Tarvitsee: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Tarvitsee: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} odottamassa{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Tuottaa: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Tuottaa: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Muokkaa tuotantoa (8:n kerroin, 2040 asti) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Muuta tuotantotasoa (prosentteina, 800{NBSP}% asti) diff --git a/src/lang/french.txt b/src/lang/french.txt index cc5b331ea0..c5d1526763 100644 --- a/src/lang/french.txt +++ b/src/lang/french.txt @@ -931,6 +931,7 @@ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personnalisée. STR_GAME_OPTIONS_CURRENCY_GEL :Lari Géorgien (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iranien (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Nouveau rouble russe (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso méxicain (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Véhicules routiers @@ -2381,9 +2382,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Signal c STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Signal de chemin (électrique){}Un signal de chemin autorise plus d'un train à entrer dans un bloc de signaux en même temps, si le train peut réserver un chemin jusqu'à un point d'attente sûr. Les signaux de chemin peuvent être passés par l'arrière. STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Signal de chemin à sens unique (électrique){}Un signal de chemin autorise plus d'un train à entrer dans un bloc de signaux en même temps, si le train peut réserver un chemin jusqu'à un point d'attente sûr. Les signaux de chemin à sens unique ne peuvent pas être passés par l'arrière. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversion de signal.{}Si sélectionné, cliquer sur un signal existant le convertit vers le type et la variante choisis.{}Ctrl-clic pour alterner entre les variantes existantes.{}Shift pour afficher seulement le coût estimé. -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densité de signaux -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Réduire l'intervalle entre les signaux (augmenter la densité) -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augmenter l'intervalle entre les signaux (réduire la densité) +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Intervalle entre les signaux +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Réduire l'intervalle entre les signaux +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augmenter l'intervalle entre les signaux # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Choisir un pont ferroviaire @@ -3355,21 +3356,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Niveau de production{NBSP}: {YELLOW}{COMMA}{NBSP}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}L'industrie a annoncé sa fermeture imminente{NBSP}! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Nécessite{NBSP}: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produit{NBSP}: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Nécessite{NBSP}: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}{NBSP}: {CARGO_SHORT} en attente{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produit{NBSP}: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produit{NBSP}: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Changer la production (multiple de 8, max. 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Changer le niveau de production (pourcentage, max. 800{NBSP}%) diff --git a/src/lang/gaelic.txt b/src/lang/gaelic.txt index 2cbd7023b1..af5049d114 100644 --- a/src/lang/gaelic.txt +++ b/src/lang/gaelic.txt @@ -3530,21 +3530,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Meadhana STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ìre an dèanadais: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Tha an gnìomhachas gu bhith a dhùnadh a dh'aithghearr! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Feum air: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Feum air: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Feum air: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Feum air: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} a' feitheamh{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Toradh: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Toradh: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Atharraich an saothrachaidh (iomadach aig 8, suas gu 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Atharraich ìre an saothrachaidh (ceudad, suas gu 800%) diff --git a/src/lang/galician.txt b/src/lang/galician.txt index c0896f1728..f3fddb5821 100644 --- a/src/lang/galician.txt +++ b/src/lang/galician.txt @@ -3290,21 +3290,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de produción: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A industria anunció un peche inminente -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Require: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Require: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Require: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Require: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} agardando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambiar produción (múltiplo de 8, ata 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambiar o nivel de produción (porcentaxe, ata 800%) diff --git a/src/lang/german.txt b/src/lang/german.txt index c7a63de4e4..4902216617 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -3290,21 +3290,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Hauptans STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsrate: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Diese Industrie wird in Kürze schließen! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Benötigt: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Benötigt: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Benötigt: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}benötigt: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} wartend{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produziert: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produziert: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Produktion ändern (Vielfache von 8, maximal 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Produktionsrate ändern (prozentual, bis zu 800%) diff --git a/src/lang/greek.txt b/src/lang/greek.txt index 8251cfa6e7..64471ad58e 100644 --- a/src/lang/greek.txt +++ b/src/lang/greek.txt @@ -3433,21 +3433,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Κεντ STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Επίπεδο παραγωγής: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Η βιομηχανία έχει ανακοινώσει άμεσο κλείσιμο! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Απαιτεί: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Απαιτεί: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Απαιτεί: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Απαιτεί: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} σε αναμονή{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Παράγει: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Παράγει: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Αλλαγή παραγωγής (πολλαπλάσιο του 8, μέχρι το 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Αλλαγή του επιπέδου παραγωγής (ποσοστιαία, μέχρι το 800%) diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index 8ef90cdc7c..bc5f563889 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -3343,21 +3343,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}מקד STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}רמת הפקה: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}התעשייה הכריזה על סגירה מתקרבת! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{YELLOW}{1:STRING}{0:STRING}{BLACK} : דורש -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{YELLOW}{3:STRING}{2:STRING},{1:STRING}{0:STRING}{BLACK} :דורש -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{YELLOW}{5:STRING}{4:STRING},{3:STRING}{2:STRING},{1:STRING}{0:STRING}{BLACK} :דורש -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}דורש: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} ממתין{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{YELLOW}{1:STRING}{0:STRING}{BLACK} :מייצר -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{YELLOW}{3:STRING}{2:STRING},{1:STRING}{0:STRING}{BLACK} :מייצר -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}שנה תפוקה (כפולות של 8, עד 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}שינוי ברמת ההפקה (עד 800% אחוז) diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt index 8125f2a649..8eb63547f5 100644 --- a/src/lang/hungarian.txt +++ b/src/lang/hungarian.txt @@ -941,9 +941,9 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}{COMMA}. látkép -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Látkép aktualizálása +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Látkép átállítása STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}A látképre a fő nézet pozícióját másolja -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Látkép visszatöltése +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Fő nézet ideállítása STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}A látkép pozícióját a fő nézetre másolja # Game options window @@ -2427,9 +2427,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Kombiná STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Irányjelző (fény){}Egy irányjelző lehetővé teszi, hogy amennyiben a vonatok le tudnak foglalni maguknak egy biztonságos vágányutat a következő jelzőig, több vonat is beléphessen ugyanabba a jelzőblokkba. Az irányjelzők mellett hátulról is el lehet haladni STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Egyirányú irányjelző (fény){}Egy irányjelző lehetővé teszi, hogy amennyiben a vonatok le tudnak foglalni maguknak egy biztonságos vágányutat a következő jelzőig, több vonat is beléphessen ugyanabba a jelzőblokkba. Az egyirányú jelzők mellett nem lehet hátulról elhaladni STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Jelző átalakítás{}Amikor ki van jelölve, egy meglévő jelzőre való kattintással átkonvertálja a kiválasztott jelzőtípusra és -variációra, CTRL+kattintás a variációt fogja változtatni. Shift+kattintással megmutatja a becsült átalakítási költséget -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Automata jelzőtelepítés sűrűsége -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Automata jelzőtelepítés-sűrűség csökkentése -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Automata jelzőltelepítés-sűrűség növelése +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Automata jelzőtelepítés esetén a jelzők távolsága +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Automata jelzőtelepítés esetén a jelzők távolságának csökkentése +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Automata jelzőtelepítés esetén a jelzők távolságának növelése # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Válassz egy vasúti hidat @@ -3353,21 +3353,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}A fő n STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Termelési szint: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A gyár bejelentette a közelgő bezárását! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Felhasznál: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Felhasznál: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Felhasznál: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Elfogad: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} várakozik{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Gyárt: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Gyárt: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Termelés megváltoztatása (8 többszörösei 2040-ig) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Termelési szint megváltoztatása (százalékosan, 800%-ig) diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt index d847ba02e4..8b05505cfa 100644 --- a/src/lang/icelandic.txt +++ b/src/lang/icelandic.txt @@ -3076,18 +3076,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Miðja a STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Framleiðsla: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Iðnaðurinn hefur tilkynnt yfirvofandi lokun. -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Þarf: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Þarf: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Þarf: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Framleiðir: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Framleiðir: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Breyta framleiðslu (margfeldi af 8, allt að 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Breyta framleiðslumagni (prósentu hámark er 800%) diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index 30447a88a8..1a7728cccc 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -3319,20 +3319,10 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Arahkan STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tingkat produksi: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industri akan segera ditutup! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Membutuhkan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Membutuhkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Membutuhkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Membutuhkan: STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} menunggu{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Menghasilkan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Menghasilkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Perubahan produksi (kelipatan 8, hingga 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ubah tingkat produksi (dalam persen, hingga 800%) diff --git a/src/lang/irish.txt b/src/lang/irish.txt index 86dbcbcb62..d4679ded9e 100644 --- a/src/lang/irish.txt +++ b/src/lang/irish.txt @@ -3285,18 +3285,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Láraigh STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Leibhéal táirgeachta: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}D'fhógair an tionscal go ndúnfaidh sé gan mhoill! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Teastaíonn: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Teastaíonn: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Teastaíonn: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Táirgtear: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Táirgtear: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Athraigh táirgeacht (iolra de 8, suas go 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Athraigh an ráta táirgeachta (céatadán, suas go 800%) diff --git a/src/lang/italian.txt b/src/lang/italian.txt index c16354f1ce..3d2291fc7a 100644 --- a/src/lang/italian.txt +++ b/src/lang/italian.txt @@ -3381,21 +3381,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra l STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Livello di produzione: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}L'industria ha annunciato che a breve chiuderà! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Richiede: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Richiede: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Richiede: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Richiede: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} in attesa{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambia produzione (multiplo di 8, fino a 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambia livello di produzione (percentuale, fino a 800%) diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt index 880866c945..a6aa2f127e 100644 --- a/src/lang/japanese.txt +++ b/src/lang/japanese.txt @@ -3286,19 +3286,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}メイ STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}生産量: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}この産業拠点は間もなく閉鎖されます! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING}と{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING}、{STRING}{STRING}、{STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES : {BLACK}必要物資: -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}生産品: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}生産品: {YELLOW}{STRING}{STRING}、{STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}生産量を変更 (8の倍数、最大2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}生産量を変更 (%表記、最大800%) diff --git a/src/lang/korean.txt b/src/lang/korean.txt index 8c5736136c..73cfe66b30 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -3352,21 +3352,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}이 산 STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}생산 수준: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}산업시설이 곧 폐쇄됩니다! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}필요함: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}필요함: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}필요함: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}받는 화물: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} 대기중{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}생산: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}생산: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}생산량 변경 (8의 배수, 최대 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}생산 등급 변경 (퍼센트, 800%까지) diff --git a/src/lang/latin.txt b/src/lang/latin.txt index d5a4a744dd..5de041dcf7 100644 --- a/src/lang/latin.txt +++ b/src/lang/latin.txt @@ -3503,21 +3503,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Movere c STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Quantitas productionis: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Haec industria mox claudetur! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Postulat: {YELLOW}{STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Postulat: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Postulat: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING}, {STRING.acc}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Postulat: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING.acc}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} manet{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Efficit: {YELLOW}{STRING.acc}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Efficit: {YELLOW}{STRING.acc}{STRING}, {STRING.acc}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Mutare productionem (per octo multiplicatur, ad 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mutare productionem (centesima, ad 800%) diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt index 79788a54c1..0db5c191c9 100644 --- a/src/lang/latvian.txt +++ b/src/lang/latvian.txt @@ -3229,18 +3229,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrēt STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ražošanas līmenis: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nozare ir paziņojusi par nenovēršamu slēgšanu! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Nepieciešams: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Nepieciešams: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Nepieciešams: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Ražo: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Ražo: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Mainīt ražošanu (dalāmais ar 8, līdz pat 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mainīt ražošanas līmeni (procentos, līdz 800%) diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt index 631613d82d..f2309f9674 100644 --- a/src/lang/lithuanian.txt +++ b/src/lang/lithuanian.txt @@ -3504,18 +3504,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centruot STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Gamybos sparta: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Pramonės įmonė paskelbė apie jos neišvengiamą uždarymą! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Reikalauja: {YELLOW}{STRING.ko}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Reikalauja: {YELLOW}{STRING.ko}{STRING}, {STRING.ko}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Reikalauja: {YELLOW}{STRING.ko}{STRING}, {STRING.ko}{STRING}, {STRING.ko}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Gamina: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Gamina: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Keisti gamybos apimtį (8 daugiklis, iki 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Pakeisti gamybos spartą (procentais, iki 800%) diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt index 044d1b82f0..ae7f63000d 100644 --- a/src/lang/luxembourgish.txt +++ b/src/lang/luxembourgish.txt @@ -3289,21 +3289,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Zentréi STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktiounslevel: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}D'Industrie annoncéiert dass se zougemaach gëtt -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Brauch: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Brauch: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Brauch: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Brauch: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} um waarden{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produzéiert: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produzéiert: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}D'Produktioun änneren (Multipel vun 8, bis op 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Änner de Produktiounslevel (Prozenter, bis zu 800%) diff --git a/src/lang/malay.txt b/src/lang/malay.txt index 956b5c38f0..d17a9c4437 100644 --- a/src/lang/malay.txt +++ b/src/lang/malay.txt @@ -2984,19 +2984,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Pusatkan STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tahap produksi: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW} Industri mengumumkan penutupan serta merta! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Memerlukan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Memerlukan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Memerlukan: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Diperlukan: -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Mengeluarkan: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Mengeluarkan: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ubah pengeluaran (gandaan 8, sehingga 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ubah tahap produksi (peratus, hingga 800%) diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index 55b78fec69..8573b31c8e 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -3293,21 +3293,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Gå til STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksjonsnivå: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Næringen har annonsert snarlig nedleggelse! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Trenger: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Trenger: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Trenger: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Krever: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} venter{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produserer: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produserer: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Endre produksjon (multiplum av 8, opptil 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Endre produksjonsnivå (prosentsats, opptil 800{NBSP}%) diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt index 587ce0cce1..d102229539 100644 --- a/src/lang/norwegian_nynorsk.txt +++ b/src/lang/norwegian_nynorsk.txt @@ -3204,18 +3204,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Midtstil STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksjonsnivå: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Verksemda legg snarleg ned drifta! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Treng: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Treng: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Treng: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Lagar: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Lagar: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Byt produksjon (8-gongen, opptil 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Endre produksjonsnivå (prosent, opp til 800%) diff --git a/src/lang/polish.txt b/src/lang/polish.txt index 628a398f29..9ff5c6d0a7 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -3682,21 +3682,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centruj STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Poziom produkcji: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Przedsiębiorstwo ogłosiło likwidację! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Wymaga: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Wymaga: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Wymaga: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Potrzebuje: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} oczekuje{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Zmiana produkcji (wielokrotność 8, do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Zmiana poziomu produkcji (procentowo, do 800%) diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index e50745fc71..020f304f76 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -3290,21 +3290,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou encerramento iminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Necessário: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Necessário: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Necessário: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requer: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} a aguardar{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produz: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Modificar produção (múltiplo de 8, até 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mudar o nível de produção (percentagem, até 800%) diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index 14bd028643..45f6ad4158 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -3243,18 +3243,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centreaz STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivelul producţiei: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industria a anunţat închiderea iminentă! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Are nevoie de: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Are nevoie de: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Are nevoie de: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Schimba productia (multiplu de 8, până la 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Modifică nivelul producţiei (procent, până la 800%) diff --git a/src/lang/russian.txt b/src/lang/russian.txt index 7574bd8bfb..a56ff783e9 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -315,6 +315,7 @@ STR_COLOUR_ORANGE :Оранжев STR_COLOUR_BROWN :Коричневый STR_COLOUR_GREY :Серый STR_COLOUR_WHITE :Белый +STR_COLOUR_RANDOM :Случайный # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}мил{P я и ь}/ч @@ -1074,6 +1075,7 @@ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Своя... STR_GAME_OPTIONS_CURRENCY_GEL :Грузинский лари (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Иранский риал (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Российский новый рубль (RUR) +STR_GAME_OPTIONS_CURRENCY_MXN :Мексиканский песо (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Движение автомобилей @@ -1410,6 +1412,8 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Изме STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Обслуживание инфраструктуры: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Включает затраты на содержание инфраструктуры. Стоимость непропорционально увеличивается с ростом транспортной сети, оказывая, таким образом, большее влияние на крупные компании, чем на малые. +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Фирменный цвет компании: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Выберите начальный фирменный цвет компании STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аэропорты не устаревают: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :При включении все типы аэропортов доступны для строительства в любое время после их первоначального появления @@ -2925,6 +2929,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Инфо STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Нет информации. STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Фильтр: STR_SAVELOAD_OSKTITLE :{BLACK}Введите название сохраняемой игры @@ -3123,6 +3128,7 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Чтение з STR_NEWGRF_ERROR_GRM_FAILED :Запрошенные ресурсы GRF недоступны (спрайт {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} был отключён из-за {2:STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Недопустимый/неизвестный формат расположения спрайтов (спрайт {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Слишком много элементов в списке значений (спрайт {3:NUM}, свойство {4:HEX}) # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Осторожно! @@ -3500,21 +3506,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Пока STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Производительность: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Предприятие скоро закрывается! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Требуется: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Требуется: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Требуется: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Требует: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Производит: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Требуется: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} ожидает{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Производит: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Производит: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Изменить производительность (кратно 8, до 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Изменить производительность (в процентах, до 800%) @@ -4019,6 +4018,7 @@ STR_ORDER_CONDITIONAL_AGE :Возраст STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Требуется обслуживание STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Всегда STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Оставшийся срок службы (лет) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Максимальная надёжность STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Условие перехода STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :равно diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt index 74b99a1f72..556d844512 100644 --- a/src/lang/serbian.txt +++ b/src/lang/serbian.txt @@ -3496,21 +3496,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Prebacuj STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivo proizvodnje: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Fabrika je objavila da može svakog trenutka da se zatvori! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Potražuje: {YELLOW}{STRING.aku}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Potražuje: {YELLOW}{STRING.aku}{STRING}, {STRING.aku}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Potražuje: {YELLOW}{STRING.aku}{STRING}, {STRING.aku}{STRING}, {STRING.aku}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK} Zahteva: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} čekaje {STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Proizvodi: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Promena proizvodnje STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Promena nivoa proizvodnje (u procentima, do 800%) diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index 652972818d..78365fe130 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -3310,20 +3310,10 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}将屏 STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}生产程度: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}此工业已经宣布即刻停业倒闭! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} 等待中{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}产出: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}产出: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}改变产量 STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}修改产量 (百分比, 最高 800%) diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt index 0a127f4d61..6ef55d7cf0 100644 --- a/src/lang/slovak.txt +++ b/src/lang/slovak.txt @@ -3353,18 +3353,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vycentro STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Úroveň produkcie: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Priemysel oznámil blížiace sa uzatvorenie! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produkuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Zmeniť produkciu (násobky 8, až do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Zmeniť úroveň produkcie (percentuálne, až do 800%) diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt index ee1a36e19f..657fa8af6f 100644 --- a/src/lang/slovenian.txt +++ b/src/lang/slovenian.txt @@ -3439,18 +3439,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Osredoto STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivo proizvodnje: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrija je napovedala zaprtje! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Potrebuje: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Proizvaja: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Proizvaja: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Spremeni proizvodnjo (večkratnik 8, do 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Spremeni nivo proizvodnje (odstotki, do 800%) diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index 2679486be2..1c258e2e34 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -1529,7 +1529,7 @@ STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Cuando se activ STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Porcentaje del beneficio total a pagar en transferencias: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Porcentaje de los beneficios dados a los transportes intermedios en sistemas de transferencias, dando un mayor control sobre el beneficio de cada vehículo STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Al arrastrar, colocar señales cada: {STRING} -STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_HELPTEXT :Fija la distancia de separación entre señales al construir señales hasta el próximo obstáculo al arrastrar el ratón +STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_HELPTEXT :Fija la distancia a la que se construirán las señales hasta el próximo obstáculo (señal, cruce), si estas son arrastradas STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_VALUE :{COMMA} casilla{P 0 "" s} STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE :Al arrastrar, mantener distancia fija entre señales: {STRING} STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE_HELPTEXT :Fija el comportamiento de la construcción de señales cuando se usa Ctrl+Arrastrar. Si se deshabilita, se colocan señales cerca de túneles y puentes para evitar largos trozos de vía sin señales. Si se activa, se colocan señales cada N casillas, haciendo que el alineamiento de vías paralelas sea más sencillo @@ -2373,9 +2373,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Señal c STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Señal de ruta (eléctrica){}Una señal de ruta permite a más de un tren entrar a un bloque de señales a la vez, si el tren puede reservar una ruta hasta un lugar seguro. Pueden ser traspasadas desde atrás STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Señal de ruta de un sentido (eléctrica){}Una señal de ruta permite a más de un tren entrar a un bloque de señales a la vez, si el tren puede reservar una ruta hasta un lugar seguro. No pueden ser traspasadas desde atrás STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Convertir señal{}Cuando es seleccionado, pulsar sobre una señal existente la convierte en el tipo y variante indicados. Pulsar Ctrl+Click permite cambiar de variante. Shift+Click muestra una estimación del precio de conversión -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densidad de arrastre de señales -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reducir arrastre de intensidad de señales -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Incrementar arrastre de intensidad de señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Distancia del arrastre de señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reducir distancia del arrastre de señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Incrementar distancia del arrastre de señales # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Seleccione Puente de Ferrocarril @@ -2717,8 +2717,11 @@ STR_FRAMERATE_GL_ROADVEHS :{BLACK} Ticks STR_FRAMERATE_GL_SHIPS :{BLACK} Ticks de barcos: STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Ticks de aeronaves: STR_FRAMERATE_DRAWING :{BLACK}Renderizado gráfico: +STR_FRAMERATE_VIDEO :{BLACK}Salida de vídeo: +STR_FRAMERATE_SOUND :{BLACK}Mezcla de sonido: ############ End of leave-in-this-order ############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GL_TRAINS :Ticks de trenes STR_FRAMETIME_CAPTION_DRAWING :Renderizado gráfico STR_FRAMETIME_CAPTION_VIDEO :Salida de vídeo STR_FRAMETIME_CAPTION_SOUND :Mezcla de sonido @@ -3324,21 +3327,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La industria ha anunciado su cierre inminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Necesita: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Necesita: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} esperando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambiar producción (múltiplo de 8, máximo 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambiar nivel de producción (porcentaje, hasta un máximo de 800%) diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index 6807929a4f..b2755ecb9e 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -931,6 +931,7 @@ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Personalizada.. STR_GAME_OPTIONS_CURRENCY_GEL :Lari georgiano (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial iraní (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Nuevo rublo ruso (RUR) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso mexicano (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vehículos de carretera @@ -2381,9 +2382,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Señal c STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Señal de ruta (eléctrica){}Una señal de ruta permite a más de un tren entrar al mismo tiempo en un tramo de vía con señales, en tanto que el tren pueda reservar una ruta hasta un lugar seguro. Puede ser pasada por detrás STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Señal de ruta de un sentido (eléctrica){}Igual que una señal de ruta pero no puede ser pasada por detrás STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversión de señal{}Activar para pulsar sobre una señal existente y convertirla en el tipo y variante elegidos. Ctrl+Clic permite cambiar entre variantes de señales. Mayús+Clic muestra una estimación del precio de conversión -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Cantidad de señales instaladas al arrastrar -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Más -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Menos +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Distancia entre señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reducir distancia entre señales +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar distancia entre señales # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selección de puente de ferrocarril @@ -3355,21 +3356,14 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}¡La industria ha anunciado su cierre inminente! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Requiere: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Requiere: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} esperando{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Cambiar producción (múltiplo de 8, máximo 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Cambiar nivel de producción (porcentaje, máximo 800%) diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index 30bd9ea8ff..00ce1dd183 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -3289,21 +3289,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrera STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsnivå: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrin har annonserat att den snart kommer att stänga! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Kräver: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Kräver: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Kräver: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Kräver: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} väntar{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Producerar: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Producerar: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Ändra produktion (produkt av 8, upp till 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Ändra produktionsnivå (procent, upp till 800%) diff --git a/src/lang/tamil.txt b/src/lang/tamil.txt index a42fa3440a..7985fed264 100644 --- a/src/lang/tamil.txt +++ b/src/lang/tamil.txt @@ -2908,18 +2908,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}தயாரிப்பு அளவு: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}தொழிற்சாலை உடனடியாக மூடப்படும் என்று அறிவிக்கப்பட்டுள்ளது! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}தேவைப்படுகிறது: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}தேவைப்படுகிறது: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}தேவைப்படுகிறது: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}தயாரிப்பு: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}தயாரிக்கிறது: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}தயாரிப்பினை மாற்றவும் (8 இன் பெருக்கங்கள், 2040 வரை) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}தயாரிப்பு அளவினை மாற்றவும் (சதவிகிதம், 800% வரை) diff --git a/src/lang/thai.txt b/src/lang/thai.txt index c3584238f5..c1e82e18f5 100644 --- a/src/lang/thai.txt +++ b/src/lang/thai.txt @@ -3217,18 +3217,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}กด STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}ระดับการผลิต: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}อุตสาหกรรมนี้ได้มีการประกาศปิดตัวลงอย่างเป็นทางการ! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}มีความต้องการ: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}มีความต้องการ: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}มีความต้องการ: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}ผลผลิต: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}ผลผลิต: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}ปรับเปลี่ยนปริมาณผลผลิต (ระหว่าง 8 ถึง 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}เปลี่ยนระดับการผลิต (เปอร์เซ็นต์เพิ่มมากสุดถึง 800%) diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt index 621572e561..ae1170aee8 100644 --- a/src/lang/traditional_chinese.txt +++ b/src/lang/traditional_chinese.txt @@ -3285,18 +3285,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}將工 STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}產出等級:{YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}該工業已宣佈關閉! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING},{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}需要:{YELLOW}{STRING}{STRING},{STRING}{STRING},{STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}產出:{YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}產出:{YELLOW}{STRING}{STRING},{STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}修改產量 (以 8 為倍數增減,最大為 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}變更產出等級 (百分比,最高可到800%) diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt index a92a09f38a..ac7f22c24e 100644 --- a/src/lang/turkish.txt +++ b/src/lang/turkish.txt @@ -3290,21 +3290,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Görünt STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Üretim seviyesi: %{YELLOW}{COMMA} STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Fabrika çok yakında kapanacağını duyurdu! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}İstenen: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}İstenenler: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}İstenenler: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Gereken: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} bekliyor{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Üretir: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Üretir: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Üretimi değiştir (8'in katı, 2040'a kadar) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Üretim seviyesini değiştir (yüzde olarak, %800'e kadar) diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index 22f5d8f677..cacc4210dd 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -3416,18 +3416,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Пока STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Обсяг виробництва: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Підприємство оголосило про близьке закриття! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Потребує: {YELLOW}{STRING.z}{STRING.z} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Потребує: {YELLOW}{STRING.z}{STRING.z}, {STRING.z}{STRING.z} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Потребує: {YELLOW}{STRING.z}{STRING.z}, {STRING.z}{STRING.z}, {STRING.z}{STRING.z} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Продукція: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Продукція: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Змінити виробництво (кратне 8, до 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Змінити обсяг виробництва (до 800%) diff --git a/src/lang/unfinished/chuvash.txt b/src/lang/unfinished/chuvash.txt index d8661586bc..5598dd1da0 100644 --- a/src/lang/unfinished/chuvash.txt +++ b/src/lang/unfinished/chuvash.txt @@ -1116,13 +1116,8 @@ STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ҫу # Industry view -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists diff --git a/src/lang/unfinished/frisian.txt b/src/lang/unfinished/frisian.txt index 2b3b80966e..05cc5f6c8d 100644 --- a/src/lang/unfinished/frisian.txt +++ b/src/lang/unfinished/frisian.txt @@ -3036,18 +3036,8 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Sintrear STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksje nivo: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Yndustry kundicht drigend sluten oan! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Nedich: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Nedich: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Nedich: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produseart: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produseart: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Feroaring produksje nivo (percentage, up to 800%) # Vehicle lists diff --git a/src/lang/unfinished/ido.txt b/src/lang/unfinished/ido.txt index 41317c107c..e843f645f3 100644 --- a/src/lang/unfinished/ido.txt +++ b/src/lang/unfinished/ido.txt @@ -925,13 +925,8 @@ STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Vehili: # Industry view -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} Tren{P o i} diff --git a/src/lang/unfinished/macedonian.txt b/src/lang/unfinished/macedonian.txt index 7e19065f8b..40e162d2ff 100644 --- a/src/lang/unfinished/macedonian.txt +++ b/src/lang/unfinished/macedonian.txt @@ -1414,13 +1414,8 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry view STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Производство ниво: {YELLOW}{COMMA}% -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Промена на производство на ниво (процент, до 800%) # Vehicle lists diff --git a/src/lang/unfinished/maltese.txt b/src/lang/unfinished/maltese.txt index b0f3aecdda..ac07641452 100644 --- a/src/lang/unfinished/maltese.txt +++ b/src/lang/unfinished/maltese.txt @@ -822,13 +822,8 @@ STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURREN # Industry view -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists diff --git a/src/lang/unfinished/marathi.txt b/src/lang/unfinished/marathi.txt index f5ff89ac9e..b6a39a168d 100644 --- a/src/lang/unfinished/marathi.txt +++ b/src/lang/unfinished/marathi.txt @@ -1278,18 +1278,8 @@ STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUST # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}लाग्त: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}लाग्त: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}लाग्त: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}बनव्त: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}बनव्त: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - # Vehicle lists STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING} - {COMMA} विमान diff --git a/src/lang/unfinished/persian.txt b/src/lang/unfinished/persian.txt index 618375a246..80059f1186 100644 --- a/src/lang/unfinished/persian.txt +++ b/src/lang/unfinished/persian.txt @@ -2903,18 +2903,8 @@ STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}مرکز تصویر را روی کارخانه قرار بده.Ctrl+Click کنید تا پنجره نمایی از کارخانه نمایش داده شود STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}این کارخانه اعلام کرده است که به زودی بسته خواهد شد! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}مواد اولیه: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}مواد اولیه: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}مواد اولیه: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}محصولات: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}محصولات: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - # Vehicle lists STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} قطار diff --git a/src/lang/unfinished/urdu.txt b/src/lang/unfinished/urdu.txt index fd42e84d90..0cc3ba7b68 100644 --- a/src/lang/unfinished/urdu.txt +++ b/src/lang/unfinished/urdu.txt @@ -2323,13 +2323,8 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry view STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}گزشتہ ماہ کی پیداوار: -############ range for requires starts -############ range for requires ends -############ range for produces starts -############ range for produces ends - # Vehicle lists diff --git a/src/lang/vietnamese.txt b/src/lang/vietnamese.txt index 92ae0f40bb..e098ee47e6 100644 --- a/src/lang/vietnamese.txt +++ b/src/lang/vietnamese.txt @@ -3348,21 +3348,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Xem vị STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Mức sản lượng: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nhà máy này đã thông báo sắp đóng cửa! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Yêu cầu: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Yêu cầu: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Yêu cầu: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Cần cung cấp: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} đang chờ{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Sản xuất: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Sản xuất: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Thay đổi sản lượng (bội số của 8, max 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Thay đổi mức sản lượng (theo phần trăm, cao nhất 800%) diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt index 14277fdd7a..a6444cc81c 100644 --- a/src/lang/welsh.txt +++ b/src/lang/welsh.txt @@ -3289,21 +3289,11 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Canoli'r STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Lefel cynhyrchu: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Mae'r diwydiant wedi datgan ei fod ar fin cau! -############ range for requires starts -STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Angen: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Angen: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Angen: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING} -############ range for requires ends STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Angen: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} yn disgwyl{STRING} -############ range for produces starts -STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Cynhyrchu: {YELLOW}{STRING}{STRING} -STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Cynhyrchu: {YELLOW}{STRING}{STRING}, {STRING}{STRING} -############ range for produces ends - STR_CONFIG_GAME_PRODUCTION :{WHITE}Newid cynnyrch (lluosrif o 8, hyd at 2040) STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Newid y lefel cynhyrchu (canran, hyd at 800%) diff --git a/src/network/core/os_abstraction.h b/src/network/core/os_abstraction.h index c320cd9102..32c6cffff2 100644 --- a/src/network/core/os_abstraction.h +++ b/src/network/core/os_abstraction.h @@ -38,93 +38,7 @@ typedef unsigned long in_addr_t; typedef SSIZE_T ssize_t; typedef int socklen_t; # define IPPROTO_IPV6 41 -#else -#include "../../os/windows/win32.h" -#include "../../core/alloc_func.hpp" - -#define AI_ADDRCONFIG 0x00000400 /* Resolution only if global address configured */ -#define IPV6_V6ONLY 27 - -static inline int OTTDgetnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, DWORD hostlen, char *serv, DWORD servlen, int flags) -{ - static int (WINAPI *getnameinfo)(const struct sockaddr *, socklen_t, char *, DWORD, char *, DWORD, int) = NULL; - static bool first_time = true; - - if (first_time) { - LoadLibraryList((Function*)&getnameinfo, "ws2_32.dll\0getnameinfo\0\0"); - first_time = false; - } - - if (getnameinfo != NULL) return getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); - - strncpy(host, inet_ntoa(((const struct sockaddr_in *)sa)->sin_addr), hostlen); - return 0; -} -#define getnameinfo OTTDgetnameinfo - -static inline int OTTDgetaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res) -{ - static int (WINAPI *getaddrinfo)(const char *, const char *, const struct addrinfo *, struct addrinfo **) = NULL; - static bool first_time = true; - - if (first_time) { - LoadLibraryList((Function*)&getaddrinfo, "ws2_32.dll\0getaddrinfo\0\0"); - first_time = false; - } - - if (getaddrinfo != NULL) return getaddrinfo(nodename, servname, hints, res); - - *res = NULL; - - in_addr_t ip = inet_addr(nodename); - if (ip == INADDR_NONE) { - struct hostent *he = gethostbyname(nodename); - if (he == NULL) return EAI_NONAME; - ip = (*(struct in_addr *)he->h_addr).s_addr; - } - - struct sockaddr_in *sin = CallocT(1); - sin->sin_family = AF_INET; - sin->sin_port = htons(strtoul(servname, NULL, 10)); - sin->sin_addr.s_addr = ip; - - struct addrinfo *ai = CallocT(1); - ai->ai_family = PF_INET; - ai->ai_addr = (struct sockaddr*)sin; - ai->ai_addrlen = sizeof(*sin); - ai->ai_socktype = hints->ai_socktype; - - *res = ai; - return 0; -} -#define getaddrinfo OTTDgetaddrinfo - -static inline void OTTDfreeaddrinfo(struct addrinfo *ai) -{ - static int (WINAPI *freeaddrinfo)(struct addrinfo *) = NULL; - static bool first_time = true; - - if (ai == NULL) return; - - if (first_time) { - LoadLibraryList((Function*)&freeaddrinfo, "ws2_32.dll\0freeaddrinfo\0\0"); - first_time = false; - } - - if (freeaddrinfo != NULL) { - freeaddrinfo(ai); - return; - } - - do { - struct addrinfo *next = ai->ai_next; - free(ai->ai_addr); - free(ai); - ai = next; - } while (ai != NULL); -} -#define freeaddrinfo OTTDfreeaddrinfo -#endif /* __MINGW32__ && __CYGWIN__ */ +#endif /* !(__MINGW32__ && __CYGWIN__) */ #endif /* _WIN32 */ /* UNIX stuff */ diff --git a/src/newgrf_animation_type.h b/src/newgrf_animation_type.h index 1f3995f46d..8eec6ada9c 100644 --- a/src/newgrf_animation_type.h +++ b/src/newgrf_animation_type.h @@ -46,11 +46,12 @@ enum IndustryAnimationTrigger { /** Animation triggers for airport tiles */ enum AirpAnimationTrigger { - AAT_BUILT, ///< Triggered when the airport is built (for all tiles at the same time). - AAT_TILELOOP, ///< Triggered in the periodic tile loop. - AAT_STATION_NEW_CARGO, ///< Triggered when new cargo arrives at the station (for all tiles at the same time). - AAT_STATION_CARGO_TAKEN, ///< Triggered when a cargo type is completely removed from the station (for all tiles at the same time). - AAT_STATION_250_TICKS, ///< Triggered every 250 ticks (for all tiles at the same time). + AAT_BUILT, ///< Triggered when the airport is built (for all tiles at the same time). + AAT_TILELOOP, ///< Triggered in the periodic tile loop. + AAT_STATION_NEW_CARGO, ///< Triggered when new cargo arrives at the station (for all tiles at the same time). + AAT_STATION_CARGO_TAKEN, ///< Triggered when a cargo type is completely removed from the station (for all tiles at the same time). + AAT_STATION_250_TICKS, ///< Triggered every 250 ticks (for all tiles at the same time). + AAT_STATION_AIRPLANE_LAND, ///< Triggered when an airplane (not a helicopter) touches down at the airport (for all tiles at the same time). }; /** Animation triggers for objects. */ diff --git a/src/openttd.cpp b/src/openttd.cpp index fd4a1f9e18..76ff878419 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -310,7 +310,7 @@ static void ParseResolution(Dimension *res, const char *s) /** - * Unitializes drivers, frees allocated memory, cleans pools, ... + * Uninitializes drivers, frees allocated memory, cleans pools, ... * Generally, prepares the game for shutting down */ static void ShutdownGame() diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index ba8a1a060d..d9d741dbce 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -23,6 +23,7 @@ #include "core/random_func.hpp" #include "aircraft.h" #include "roadveh.h" +#include "ship.h" #include "station_base.h" #include "waypoint_base.h" #include "company_base.h" @@ -929,7 +930,7 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 dist = GetOrderDistance(prev, &new_order, v); } - if (dist >= 130) { + if (dist >= SHIP_MAX_ORDER_DISTANCE) { return_cmd_error(STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION); } } @@ -2040,13 +2041,13 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool { if (conditional_depth > v->GetNumOrders()) { v->current_order.Free(); - v->dest_tile = 0; + v->SetDestTile(0); return false; } switch (order->GetType()) { case OT_GOTO_STATION: - v->dest_tile = v->GetOrderStationLocation(order->GetDestination()); + v->SetDestTile(v->GetOrderStationLocation(order->GetDestination())); return true; case OT_GOTO_DEPOT: @@ -2067,7 +2068,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool /* PBS reservations cannot reverse */ if (pbs_look_ahead && reverse) return false; - v->dest_tile = location; + v->SetDestTile(location); v->current_order.MakeGoToDepot(destination, v->current_order.GetDepotOrderType(), v->current_order.GetNonStopType(), (OrderDepotActionFlags)(v->current_order.GetDepotActionType() & ~ODATFB_NEAREST_DEPOT), v->current_order.GetRefitCargo()); /* If there is no depot in front, reverse automatically (trains only) */ @@ -2091,14 +2092,14 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool v->IncrementRealOrderIndex(); } else { if (v->type != VEH_AIRCRAFT) { - v->dest_tile = Depot::Get(order->GetDestination())->xy; + v->SetDestTile(Depot::Get(order->GetDestination())->xy); } return true; } break; case OT_GOTO_WAYPOINT: - v->dest_tile = Waypoint::Get(order->GetDestination())->xy; + v->SetDestTile(Waypoint::Get(order->GetDestination())->xy); return true; case OT_CONDITIONAL: { @@ -2126,7 +2127,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool } default: - v->dest_tile = 0; + v->SetDestTile(0); return false; } @@ -2142,7 +2143,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool if (order == NULL) { v->current_order.Free(); - v->dest_tile = 0; + v->SetDestTile(0); return false; } @@ -2218,7 +2219,7 @@ bool ProcessOrders(Vehicle *v) } v->current_order.Free(); - v->dest_tile = 0; + v->SetDestTile(0); return false; } diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index bb1a0a4209..4a49555492 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -17,6 +17,7 @@ #include #include #include +#define NO_SHOBJIDL_SORTDIRECTION // Avoid multiple definition of SORT_ASCENDING #include /* SHGetFolderPath */ #include #include "win32.h" @@ -30,10 +31,7 @@ #include #include "../../language.h" -/* Due to TCHAR, strncat and strncpy have to remain (for a while). */ #include "../../safeguards.h" -#undef strncat -#undef strncpy static bool _has_console; static bool _cursor_disable = true; diff --git a/src/pathfinder/pathfinder_type.h b/src/pathfinder/pathfinder_type.h index 73031d5c81..0ecf00bbd2 100644 --- a/src/pathfinder/pathfinder_type.h +++ b/src/pathfinder/pathfinder_type.h @@ -40,6 +40,9 @@ static const int YAPF_TILE_CORNER_LENGTH = 71; */ static const int YAPF_INFINITE_PENALTY = 1000 * YAPF_TILE_LENGTH; +/** Maximum length of ship path cache */ +static const int YAPF_SHIP_PATH_CACHE_LENGTH = 32; + /** * Helper container to find a depot */ diff --git a/src/pathfinder/yapf/yapf.h b/src/pathfinder/yapf/yapf.h index 00eb7e5625..84bd35c8b0 100644 --- a/src/pathfinder/yapf/yapf.h +++ b/src/pathfinder/yapf/yapf.h @@ -15,6 +15,7 @@ #include "../../direction_type.h" #include "../../track_type.h" #include "../../vehicle_type.h" +#include "../../ship.h" #include "../pathfinder_type.h" /** @@ -26,7 +27,7 @@ * @param path_found [out] Whether a path has been found (true) or has been guessed (false) * @return the best trackdir for next turn or INVALID_TRACK if the path could not be found */ -Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found); +Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, ShipPathCache &path_cache); /** * Returns true if it is better to reverse the ship before leaving depot using YAPF. diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index 44a5c0cfa7..7ca95ae698 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -54,7 +54,7 @@ public: return 'w'; } - static Trackdir ChooseShipTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found) + static Trackdir ChooseShipTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, ShipPathCache &path_cache) { /* handle special case - when next tile is destination tile */ if (tile == v->dest_tile) { @@ -90,9 +90,17 @@ public: Node *pNode = pf.GetBestNode(); if (pNode != NULL) { + uint steps = 0; + for (Node *n = pNode; n->m_parent != NULL; n = n->m_parent) steps++; + /* walk through the path back to the origin */ Node *pPrevNode = NULL; while (pNode->m_parent != NULL) { + if (steps > 1 && --steps < YAPF_SHIP_PATH_CACHE_LENGTH) { + TrackdirByte td; + td = pNode->GetTrackdir(); + path_cache.push_front(td); + } pPrevNode = pNode; pNode = pNode->m_parent; } @@ -100,6 +108,8 @@ public: Node &best_next_node = *pPrevNode; assert(best_next_node.GetTile() == tile); next_trackdir = best_next_node.GetTrackdir(); + /* remove last element for the special case when tile == dest_tile */ + if (path_found && !path_cache.empty()) path_cache.pop_back(); } return next_trackdir; } @@ -222,10 +232,10 @@ struct CYapfShip2 : CYapfT > {}; /** Ship controller helper - path finder invoker */ -Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found) +Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, ShipPathCache &path_cache) { /* default is YAPF type 2 */ - typedef Trackdir (*PfnChooseShipTrack)(const Ship*, TileIndex, DiagDirection, TrackBits, bool &path_found); + typedef Trackdir (*PfnChooseShipTrack)(const Ship*, TileIndex, DiagDirection, TrackBits, bool &path_found, ShipPathCache &path_cache); PfnChooseShipTrack pfnChooseShipTrack = CYapfShip2::ChooseShipTrack; // default: ExitDir, allow 90-deg /* check if non-default YAPF type needed */ @@ -235,7 +245,7 @@ Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, pfnChooseShipTrack = &CYapfShip1::ChooseShipTrack; // Trackdir, allow 90-deg } - Trackdir td_ret = pfnChooseShipTrack(v, tile, enterdir, tracks, path_found); + Trackdir td_ret = pfnChooseShipTrack(v, tile, enterdir, tracks, path_found, path_cache); return (td_ret != INVALID_TRACKDIR) ? TrackdirToTrack(td_ret) : INVALID_TRACK; } diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 207a3f23b2..bd7dced9bf 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1639,7 +1639,7 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v) SetBit(v->gv_flags, GVF_SUPPRESS_IMPLICIT_ORDERS); v->current_order.MakeGoToDepot(depot, ODTFB_SERVICE); - v->dest_tile = rfdd.tile; + v->SetDestTile(rfdd.tile); SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 9e43c5eef1..2b5f4a411a 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -21,6 +21,8 @@ *
  • repeat this until everything is done, and flush any remaining output to file * */ +#include + #include "../stdafx.h" #include "../debug.h" #include "../station_base.h" @@ -276,8 +278,9 @@ * 200 #6805 Extend railtypes to 64, adding uint16 to map array. * 201 #6885 Extend NewGRF persistant storages. * 202 #6867 Increase industry cargo slots to 16 in, 16 out + * 203 #7072 Add path cache for ships */ -extern const uint16 SAVEGAME_VERSION = 202; ///< Current savegame version of OpenTTD. +extern const uint16 SAVEGAME_VERSION = 203; ///< Current savegame version of OpenTTD. const uint16 SAVEGAME_VERSION_EXT = 0x8000; ///< Savegame extension indicator mask SavegameType _savegame_type; ///< type of savegame we are loading @@ -1605,6 +1608,129 @@ static void SlVarList(void *list, VarType conv) } } +/** + * Template class to help with std::deque. + */ +template +class SlDequeHelper { + typedef std::deque SlDequeT; +public: + /** + * Internal templated helper to return the size in bytes of a std::deque. + * @param deque The std::deque to find the size of + * @param conv VarType type of variable that is used for calculating the size + */ + static size_t SlCalcDequeLen(const void *deque, VarType conv) + { + const SlDequeT *l = (const SlDequeT *)deque; + + int type_size = 4; + /* Each entry is saved as type_size bytes, plus type_size bytes are used for the length + * of the list */ + return l->size() * SlCalcConvFileLen(conv) + type_size; + } + + /** + * Internal templated helper to save/load a std::deque. + * @param deque The std::deque being manipulated + * @param conv VarType type of variable that is used for calculating the size + */ + static void SlDeque(void *deque, VarType conv) + { + SlDequeT *l = (SlDequeT *)deque; + + switch (_sl.action) { + case SLA_SAVE: { + SlWriteUint32((uint32)l->size()); + + typename SlDequeT::iterator iter; + for (iter = l->begin(); iter != l->end(); ++iter) { + SlSaveLoadConv(&(*iter), conv); + } + break; + } + case SLA_LOAD_CHECK: + case SLA_LOAD: { + size_t length = SlReadUint32(); + + /* Load each value and push to the end of the deque */ + for (size_t i = 0; i < length; i++) { + T data; + SlSaveLoadConv(&data, conv); + l->push_back(data); + } + break; + } + case SLA_PTRS: + break; + case SLA_NULL: + l->clear(); + break; + default: NOT_REACHED(); + } + } +}; + + +/** + * Return the size in bytes of a std::deque. + * @param deque The std::deque to find the size of + * @param conv VarType type of variable that is used for calculating the size + */ +static inline size_t SlCalcDequeLen(const void *deque, VarType conv) +{ + switch (GetVarMemType(conv)) { + case SLE_VAR_BL: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I8: + case SLE_VAR_U8: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I16: + case SLE_VAR_U16: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I32: + case SLE_VAR_U32: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + case SLE_VAR_I64: + case SLE_VAR_U64: + return SlDequeHelper::SlCalcDequeLen(deque, conv); + default: NOT_REACHED(); + } +} + + +/** + * Save/load a std::deque. + * @param deque The std::deque being manipulated + * @param conv VarType type of variable that is used for calculating the size + */ +static void SlDeque(void *deque, VarType conv) +{ + switch (GetVarMemType(conv)) { + case SLE_VAR_BL: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I8: + case SLE_VAR_U8: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I16: + case SLE_VAR_U16: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I32: + case SLE_VAR_U32: + SlDequeHelper::SlDeque(deque, conv); + break; + case SLE_VAR_I64: + case SLE_VAR_U64: + SlDequeHelper::SlDeque(deque, conv); + break; + default: NOT_REACHED(); + } +} + + /** Are we going to save this object or not? */ static inline bool SlIsObjectValidInSavegame(const SaveLoad *sld) { @@ -1656,8 +1782,8 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld) case SL_ARR: case SL_STR: case SL_LST: - case SL_DEQ: case SL_VEC: + case SL_DEQUE: case SL_STDSTR: case SL_VARVEC: /* CONDITIONAL saveload types depend on the savegame version */ @@ -1669,8 +1795,9 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld) case SL_ARR: return SlCalcArrayLen(sld->length, sld->conv); case SL_STR: return SlCalcStringLen(GetVariableAddress(object, sld), sld->length, sld->conv); case SL_LST: return SlCalcListLen>(GetVariableAddress(object, sld)); - case SL_DEQ: return SlCalcListLen>(GetVariableAddress(object, sld)); + case SL_PTRDEQ: return SlCalcListLen>(GetVariableAddress(object, sld)); case SL_VEC: return SlCalcListLen>(GetVariableAddress(object, sld)); + case SL_DEQUE: return SlCalcDequeLen(GetVariableAddress(object, sld), sld->conv); case SL_VARVEC: { const size_t size_len = SlCalcConvMemLen(sld->conv); switch (size_len) { @@ -1753,8 +1880,9 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld) case SL_ARR: case SL_STR: case SL_LST: - case SL_DEQ: + case SL_PTRDEQ: case SL_VEC: + case SL_DEQUE: case SL_STDSTR: case SL_VARVEC: /* CONDITIONAL saveload types depend on the savegame version */ @@ -1784,8 +1912,9 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld) case SL_ARR: SlArray(ptr, sld->length, conv); break; case SL_STR: SlString(ptr, sld->length, sld->conv); break; case SL_LST: SlList>(ptr, (SLRefType)conv); break; - case SL_DEQ: SlList>(ptr, (SLRefType)conv); break; + case SL_PTRDEQ: SlList>(ptr, (SLRefType)conv); break; case SL_VEC: SlList>(ptr, (SLRefType)conv); break; + case SL_DEQUE: SlDeque(ptr, conv); break; case SL_VARVEC: { const size_t size_len = SlCalcConvMemLen(sld->conv); switch (size_len) { diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index c8381c45a4..ff675e1e50 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -204,15 +204,17 @@ enum SaveLoadTypes { SL_ARR = 2, ///< Save/load an array. SL_STR = 3, ///< Save/load a string. SL_LST = 4, ///< Save/load a list. - SL_DEQ = 5, ///< Save/load a deque. + SL_DEQUE = 5, ///< Save/load a primitive type deque. SL_VEC = 6, ///< Save/load a vector. SL_STDSTR = 7, ///< Save/load a std::string. + /* non-normal save-load types */ SL_WRITEBYTE = 8, SL_VEH_INCLUDE = 9, SL_ST_INCLUDE = 10, - /* primitive type vector */ - SL_VARVEC = 14, + + SL_PTRDEQ = 13, ///< Save/load a pointer type deque. + SL_VARVEC = 14, ///< Save/load a primitive type vector. SL_END = 15 }; @@ -335,8 +337,8 @@ typedef SaveLoad SaveLoadGlobVarList; * @param to Last savegame version that has the list. * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ -#define SLE_CONDDEQ_X(base, variable, type, from, to, extver) SLE_GENERAL_X(SL_DEQ, base, variable, type, 0, from, to, extver) -#define SLE_CONDDEQ(base, variable, type, from, to) SLE_CONDDEQ_X(base, variable, type, from, to, SlXvFeatureTest()) +#define SLE_CONDPTRDEQ_X(base, variable, type, from, to, extver) SLE_GENERAL_X(SL_PTRDEQ, base, variable, type, 0, from, to, extver) +#define SLE_CONDPTRDEQ(base, variable, type, from, to) SLE_CONDPTRDEQ_X(base, variable, type, from, to, SlXvFeatureTest()) /** * Storage of a vector in some savegame versions. @@ -362,6 +364,18 @@ typedef SaveLoad SaveLoadGlobVarList; #define SLE_CONDVARVEC_X(base, variable, type, from, to, extver) SLE_GENERAL_X(SL_VARVEC, base, variable, type, 0, from, to, extver) #define SLE_CONDVARVEC(base, variable, type, from, to) SLE_CONDVARVEC_X(base, variable, type, from, to, SlXvFeatureTest()) +/** + * Storage of a deque in some savegame versions. + * @param base Name of the class or struct containing the list. + * @param variable Name of the variable in the class or struct referenced by \a base. + * @param type Storage of the data in memory and in the savegame. + * @param from First savegame version that has the list. + * @param to Last savegame version that has the list. + * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field + */ +#define SLE_CONDDEQUE_X(base, variable, type, from, to, extver) SLE_GENERAL_X(SL_DEQUE, base, variable, type, 0, from, to, extver) +#define SLE_CONDDEQUE(base, variable, type, from, to) SLE_CONDDEQUE_X(base, variable, type, from, to, SlXvFeatureTest()) + /** * Storage of a variable in every version of a savegame. * @param base Name of the class or struct containing the variable. @@ -418,7 +432,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param variable Name of the variable in the class or struct referenced by \a base. * @param type Storage of the data in memory and in the savegame. */ -#define SLE_DEQ(base, variable, type) SLE_CONDDEQ(base, variable, type, 0, SL_MAX_VERSION) +#define SLE_PTRDEQ(base, variable, type) SLE_CONDPTRDEQ(base, variable, type, 0, SL_MAX_VERSION) /** * Storage of a vector in every savegame version. @@ -531,8 +545,8 @@ typedef SaveLoad SaveLoadGlobVarList; * @param to Last savegame version that has the list. * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ -#define SLEG_CONDDEQ_X(variable, type, from, to, extver) SLEG_GENERAL_X(SL_DEQ, variable, type, 0, from, to, extver) -#define SLEG_CONDDEQ(variable, type, from, to) SLEG_CONDDEQ_X(variable, type, from, to, SlXvFeatureTest()) +#define SLEG_CONDPTRDEQ_X(variable, type, from, to, extver) SLEG_GENERAL_X(SL_PTRDEQ, variable, type, 0, from, to, extver) +#define SLEG_CONDPTRDEQ(variable, type, from, to) SLEG_CONDPTRDEQ_X(variable, type, from, to, SlXvFeatureTest()) /** * Storage of a global vector in some savegame versions. @@ -585,7 +599,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param variable Name of the global variable. * @param type Storage of the data in memory and in the savegame. */ -#define SLEG_DEQ(variable, type) SLEG_CONDDEQ(variable, type, 0, SL_MAX_VERSION) +#define SLEG_PTRDEQ(variable, type) SLEG_CONDPTRDEQ(variable, type, 0, SL_MAX_VERSION) /** * Storage of a global vector in every savegame version. diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index bb3db3fe3e..1e01f3f67e 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -753,7 +753,8 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) static const SaveLoad _ship_desc[] = { SLE_WRITEBYTE(Vehicle, type, VEH_SHIP), SLE_VEH_INCLUDE(), - SLE_VAR(Ship, state, SLE_UINT8), + SLE_VAR(Ship, state, SLE_UINT8), + SLE_CONDDEQUE(Ship, path, SLE_UINT8, 203, SL_MAX_VERSION), SLE_CONDNULL(16, 2, 143), // old reserved space diff --git a/src/script/api/squirrel_export.awk b/src/script/api/squirrel_export.awk index 2cb47deddd..ef0a74c8db 100644 --- a/src/script/api/squirrel_export.awk +++ b/src/script/api/squirrel_export.awk @@ -29,46 +29,46 @@ function dump_class_templates(name) realname = name gsub("^Script", "", realname) - print " template <> inline " name " *GetParam(ForceType<" name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" - print " template <> inline " name " &GetParam(ForceType<" name " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" - print " template <> inline const " name " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" - print " template <> inline const " name " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" + print " template <> inline " name " *GetParam(ForceType<" name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" CR + print " template <> inline " name " &GetParam(ForceType<" name " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" CR + print " template <> inline const " name " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" CR + print " template <> inline const " name " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" CR if (name == "ScriptEvent") { - print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" + print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" CR } else if (name == "ScriptText") { - print "" - print " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" - print " if (sq_gettype(vm, index) == OT_INSTANCE) {" - print " return GetParam(ForceType(), vm, index, ptr);" - print " }" - print " if (sq_gettype(vm, index) == OT_STRING) {" - print " return new RawText(GetParam(ForceType(), vm, index, ptr));" - print " }" - print " return NULL;" - print " }" + print "" CR + print " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" CR + print " if (sq_gettype(vm, index) == OT_INSTANCE) {" CR + print " return GetParam(ForceType(), vm, index, ptr);" CR + print " }" CR + print " if (sq_gettype(vm, index) == OT_STRING) {" CR + print " return new RawText(GetParam(ForceType(), vm, index, ptr));" CR + print " }" CR + print " return NULL;" CR + print " }" CR } else { - print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" + print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" CR } } function dump_fileheader() { # Break the Id tag, so SVN doesn't replace it - print "/* $I" "d$ */" - print "" - print "/*" - print " * This file is part of OpenTTD." - print " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." - print " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - print " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see ." - print " */" - print "" - print "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" - print "" - print "#include \"../" filename "\"" + print "/* $I" "d$ */" CR + print "" CR + print "/*" CR + print " * This file is part of OpenTTD." CR + print " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." CR + print " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." CR + print " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see ." CR + print " */" CR + print "" CR + print "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" CR + print "" CR + print "#include \"../" filename "\"" CR if (api != "Template") { gsub("script_", "template_", filename) - print "#include \"../template/" filename ".sq\"" + print "#include \"../template/" filename ".sq\"" CR } } @@ -103,11 +103,12 @@ BEGIN { start_squirrel_define_on_next_line = "false" has_fileheader = "false" cls_level = 0 - RS = "\r|\n" apis = tolower(api) if (apis == "gs") apis = "game" } +{ CR = (match($0, "\\r$") > 0 ? "\r" : "") } + /@file/ { filename = $3 gsub("^" apis "_", "script_", filename) @@ -136,13 +137,13 @@ BEGIN { if (api == "Template") { api_selected = "true" - if ($0 == "none" || $0 == "-all") api_selected = "false" + if ($0 == "none" CR || $0 == "-all" CR) api_selected = "false" next } - if ($0 == "none") { + if ($0 == "none" CR) { api_selected = "false" - } else if ($0 == "-all") { + } else if ($0 == "-all" CR) { api_selected = "false" } else if (match($0, "-" apis)) { api_selected = "false" @@ -259,7 +260,7 @@ BEGIN { } # Empty/white lines. When we may do the Squirrel export, do that export. -/^([ ]*)$/ { +/^([ ]*)\r*$/ { if (start_squirrel_define_on_next_line == "false") next if (cls_in_api != "true") { @@ -280,19 +281,19 @@ BEGIN { api_super_cls = super_cls gsub("^Script", api, api_super_cls) - print "" + print "" CR if (api == "Template") { # First check whether we have enums to print if (enum_size != 0) { if (namespace_opened == "false") { - print "namespace SQConvert {" + print "namespace SQConvert {" CR namespace_opened = "true" } - print " /* Allow enums to be used as Squirrel parameters */" + print " /* Allow enums to be used as Squirrel parameters */" CR for (i = 1; i <= enum_size; i++) { - print " template <> inline " enums[i] " GetParam(ForceType<" enums[i] ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" enums[i] ")tmp; }" - print " template <> inline int Return<" enums[i] ">(HSQUIRRELVM vm, " enums[i] " res) { sq_pushinteger(vm, (int32)res); return 1; }" + print " template <> inline " enums[i] " GetParam(ForceType<" enums[i] ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" enums[i] ")tmp; }" CR + print " template <> inline int Return<" enums[i] ">(HSQUIRRELVM vm, " enums[i] " res) { sq_pushinteger(vm, (int32)res); return 1; }" CR delete enums[i] } } @@ -300,10 +301,10 @@ BEGIN { # Then check whether we have structs/classes to print if (struct_size != 0) { if (namespace_opened == "false") { - print "namespace SQConvert {" + print "namespace SQConvert {" CR namespace_opened = "true" } - print " /* Allow inner classes/structs to be used as Squirrel parameters */" + print " /* Allow inner classes/structs to be used as Squirrel parameters */" CR for (i = 1; i <= struct_size; i++) { dump_class_templates(structs[i]) delete structs[i] @@ -311,41 +312,41 @@ BEGIN { } if (namespace_opened == "false") { - print "namespace SQConvert {" + print "namespace SQConvert {" CR namespace_opened = "true" } else { - print "" + print "" CR } - print " /* Allow " cls " to be used as Squirrel parameter */" + print " /* Allow " cls " to be used as Squirrel parameter */" CR dump_class_templates(cls) - print "} // namespace SQConvert" + print "} // namespace SQConvert" CR reset_reader() next } - print ""; - print "template <> const char *GetClassName<" cls ", ST_" toupper(api) ">() { return \"" api_cls "\"; }" - print ""; + print "" CR + print "template <> const char *GetClassName<" cls ", ST_" toupper(api) ">() { return \"" api_cls "\"; }" CR + print "" CR # Then do the registration functions of the class. */ - print "void SQ" api_cls "_Register(Squirrel *engine)" - print "{" - print " DefSQClass<" cls ", ST_" toupper(api) "> SQ" api_cls "(\"" api_cls "\");" + print "void SQ" api_cls "_Register(Squirrel *engine)" CR + print "{" CR + print " DefSQClass<" cls ", ST_" toupper(api) "> SQ" api_cls "(\"" api_cls "\");" CR if (super_cls == "Text" || super_cls == "ScriptObject" || super_cls == "AIAbstractList::Valuator") { - print " SQ" api_cls ".PreRegister(engine);" + print " SQ" api_cls ".PreRegister(engine);" CR } else { - print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");" + print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");" CR } if (super_cls != "ScriptEvent") { if (cls_param[2] == "v") { - print " SQ" api_cls ".AddSQAdvancedConstructor(engine);" + print " SQ" api_cls ".AddSQAdvancedConstructor(engine);" CR } else { - print " SQ" api_cls ".AddConstructor(engine, \"" cls_param[2] "\");" + print " SQ" api_cls ".AddConstructor(engine, \"" cls_param[2] "\");" CR } } - print "" + print "" CR # Enum values mlen = 0 @@ -353,10 +354,10 @@ BEGIN { if (mlen <= length(enum_value[i])) mlen = length(enum_value[i]) } for (i = 1; i <= enum_value_size; i++) { - print " SQ" api_cls ".DefSQConst(engine, " cls "::" enum_value[i] ", " substr(spaces, 1, mlen - length(enum_value[i])) "\"" enum_value[i] "\");" + print " SQ" api_cls ".DefSQConst(engine, " cls "::" enum_value[i] ", " substr(spaces, 1, mlen - length(enum_value[i])) "\"" enum_value[i] "\");" CR delete enum_value[i] } - if (enum_value_size != 0) print "" + if (enum_value_size != 0) print "" CR # Const values mlen = 0 @@ -364,10 +365,10 @@ BEGIN { if (mlen <= length(const_value[i])) mlen = length(const_value[i]) } for (i = 1; i <= const_size; i++) { - print " SQ" api_cls ".DefSQConst(engine, " cls "::" const_value[i] ", " substr(spaces, 1, mlen - length(const_value[i])) "\"" const_value[i] "\");" + print " SQ" api_cls ".DefSQConst(engine, " cls "::" const_value[i] ", " substr(spaces, 1, mlen - length(const_value[i])) "\"" const_value[i] "\");" CR delete const_value[i] } - if (const_size != 0) print "" + if (const_size != 0) print "" CR # Mapping of OTTD strings to errors mlen = 0 @@ -375,11 +376,11 @@ BEGIN { if (mlen <= length(enum_string_to_error_mapping_string[i])) mlen = length(enum_string_to_error_mapping_string[i]) } for (i = 1; i <= enum_string_to_error_size; i++) { - print " ScriptError::RegisterErrorMap(" enum_string_to_error_mapping_string[i] ", " substr(spaces, 1, mlen - length(enum_string_to_error_mapping_string[i])) cls "::" enum_string_to_error_mapping_error[i] ");" + print " ScriptError::RegisterErrorMap(" enum_string_to_error_mapping_string[i] ", " substr(spaces, 1, mlen - length(enum_string_to_error_mapping_string[i])) cls "::" enum_string_to_error_mapping_error[i] ");" CR delete enum_string_to_error_mapping_string[i] } - if (enum_string_to_error_size != 0) print "" + if (enum_string_to_error_size != 0) print "" CR # Mapping of errors to human 'readable' strings. mlen = 0 @@ -387,10 +388,10 @@ BEGIN { if (mlen <= length(enum_error_to_string_mapping[i])) mlen = length(enum_error_to_string_mapping[i]) } for (i = 1; i <= enum_error_to_string_size; i++) { - print " ScriptError::RegisterErrorMapString(" cls "::" enum_error_to_string_mapping[i] ", " substr(spaces, 1, mlen - length(enum_error_to_string_mapping[i])) "\"" enum_error_to_string_mapping[i] "\");" + print " ScriptError::RegisterErrorMapString(" cls "::" enum_error_to_string_mapping[i] ", " substr(spaces, 1, mlen - length(enum_error_to_string_mapping[i])) "\"" enum_error_to_string_mapping[i] "\");" CR delete enum_error_to_string_mapping[i] } - if (enum_error_to_string_size != 0) print "" + if (enum_error_to_string_size != 0) print "" CR # Static methods mlen = 0 @@ -399,13 +400,13 @@ BEGIN { } for (i = 1; i <= static_method_size; i++) { if (static_methods[i, 2] == "v") { - print " SQ" api_cls ".DefSQAdvancedStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0]) - 8) "\"" static_methods[i, 0] "\");" + print " SQ" api_cls ".DefSQAdvancedStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0]) - 8) "\"" static_methods[i, 0] "\");" CR } else { - print " SQ" api_cls ".DefSQStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "\"" static_methods[i, 0] "\", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "" static_methods[i, 1] ", \"" static_methods[i, 2] "\");" + print " SQ" api_cls ".DefSQStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "\"" static_methods[i, 0] "\", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "" static_methods[i, 1] ", \"" static_methods[i, 2] "\");" CR } delete static_methods[i] } - if (static_method_size != 0) print "" + if (static_method_size != 0) print "" CR # Non-static methods mlen = 0 @@ -414,16 +415,16 @@ BEGIN { } for (i = 1; i <= method_size; i++) { if (methods[i, 2] == "v") { - print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\"" methods[i, 0] "\");" + print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\"" methods[i, 0] "\");" CR } else { - print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\"" methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");" + print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\"" methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");" CR } delete methods[i] } - if (method_size != 0) print "" + if (method_size != 0) print "" CR - print " SQ" api_cls ".PostRegister(engine);" - print "}" + print " SQ" api_cls ".PostRegister(engine);" CR + print "}" CR reset_reader() @@ -438,6 +439,7 @@ BEGIN { if (in_enum == "true") { enum_value_size++ sub(",", "", $1) + sub("\r", "", $1) enum_value[enum_value_size] = $1 # Check if this a special error enum @@ -475,7 +477,7 @@ BEGIN { } # Add a method to the list -/^.*\(.*\).*$/ { +/^.*\(.*\).*\r*$/ { if (cls_level != 1) next if (match($0, "~")) { if (api_selected != "") { diff --git a/src/script/api/squirrel_export.sh b/src/script/api/squirrel_export.sh index 92bd434b93..e1f5e8613c 100755 --- a/src/script/api/squirrel_export.sh +++ b/src/script/api/squirrel_export.sh @@ -26,7 +26,7 @@ apilc=`pwd | sed "s@/api@@;s@.*/@@"` # Check if we are in the root directory of the API, as then we generate all APIs if [ "$apilc" = "script" ]; then - for api in `find -type d | cut -b3- | grep -v '\.svn\|/'`; do + for api in `find . -type d | cut -b3-`; do if [ -z "$api" ]; then continue; fi echo "Generating for API '$api' ..." cd $api @@ -43,57 +43,34 @@ case $apilc in *) echo "Unknown API type."; exit 1 ;; esac -if [ -z "$1" ]; then - for f in `ls ../*.hpp`; do - bf=`basename ${f} | sed s@script_@${apilc}_@` +for f in `ls ../*.hpp`; do + bf=`basename ${f} | sed s@script_@${apilc}_@` - # ScriptController has custom code, and should not be generated - if [ "`basename ${f}`" = "script_controller.hpp" ]; then continue; fi - if [ "`basename ${f}`" = "script_object.hpp" ]; then continue; fi + # ScriptController has custom code, and should not be generated + if [ "`basename ${f}`" = "script_controller.hpp" ]; then continue; fi - ${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk ${f} > ${bf}.tmp + ${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk ${f} > ${bf}.tmp - if [ "`wc -l ${bf}.tmp | cut -d\ -f1`" = "0" ]; then - if [ -f "${bf}.sq" ]; then - echo "Deleted: ${bf}.sq" - svn del --force ${bf}.sq > /dev/null 2>&1 - fi - rm -f ${bf}.tmp - elif ! [ -f "${bf}.sq" ] || [ -n "`diff -I '$Id' ${bf}.tmp ${bf}.sq 2> /dev/null || echo boo`" ]; then - mv ${bf}.tmp ${bf}.sq - echo "Updated: ${bf}.sq" - svn add ${bf}.sq > /dev/null 2>&1 - svn propset svn:eol-style native ${bf}.sq > /dev/null 2>&1 - svn propset svn:keywords Id ${bf}.sq > /dev/null 2>&1 - else - rm -f ${bf}.tmp + if [ "`wc -l ${bf}.tmp | cut -d\ -f1`" = "0" ]; then + if [ -f "${bf}.sq" ]; then + echo "Deleted: ${bf}.sq" + rm -f ${bf}.sq fi - done -else - ${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk $1 > $1.tmp - if [ `wc -l $1.tmp | cut -d\ -f1` -eq "0" ]; then - if [ -f "$1.sq" ]; then - echo "Deleted: $1.sq" - svn del --force $1.sq > /dev/null 2>&1 - fi - rm -f $1.tmp - elif ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then - mv $1.tmp $1.sq - echo "Updated: $1.sq" - svn add $1.sq > /dev/null 2>&1 - svn propset svn:eol-style native $1.sq > /dev/null 2>&1 - svn propset svn:keywords Id $1.sq > /dev/null 2>&1 + rm -f ${bf}.tmp + elif ! [ -f "${bf}.sq" ] || [ -n "`diff -I '$Id' ${bf}.tmp ${bf}.sq 2> /dev/null || echo boo`" ]; then + mv ${bf}.tmp ${bf}.sq + echo "Updated: ${bf}.sq" else - rm -f $1.tmp + rm -f ${bf}.tmp fi -fi +done # Remove .hpp.sq if .hpp doesn't exist anymore for f in `ls *.hpp.sq`; do f=`echo ${f} | sed "s/.hpp.sq$/.hpp/;s@${apilc}_@script_@"` if [ ! -f ../${f} ];then echo "Deleted: ${f}.sq" - svn del --force ${f}.sq > /dev/null 2>&1 + rm -f ${f}.sq fi done diff --git a/src/script/api/squirrel_export.vbs b/src/script/api/squirrel_export.vbs new file mode 100644 index 0000000000..a13869509a --- /dev/null +++ b/src/script/api/squirrel_export.vbs @@ -0,0 +1,946 @@ +Option Explicit + +' $Id$ +' +' This file is part of OpenTTD. +' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + +Dim FSO +Dim enum_size, enums, enum_value_size, enum_value +Dim enum_string_to_error_size, enum_string_to_error_mapping_string, enum_string_to_error_mapping_error +Dim enum_error_to_string_size, enum_error_to_string_mapping, const_size, const_value +Dim struct_size, structs, method_size, methods, static_method_size, static_methods +Dim super_cls, cls, api_selected, cls_in_api, start_squirrel_define_on_next_line, has_fileheader, cls_level +Dim apis, filename, doxygen_skip, squirrel_stuff, is_public, cls_param(2), comment, in_enum + +Set FSO = CreateObject("Scripting.FileSystemObject") + +Function CompareFiles(filename1, filename2) + Dim file, lines1, lines2 + + If Not FSO.FileExists(filename1) Then + CompareFiles = False + Exit Function + End If + Set file = FSO.OpenTextFile(filename1, 1) + If Not file.AtEndOfStream Then + lines1 = file.ReadAll + End IF + file.Close + + If Not FSO.FileExists(filename2) Then + CompareFiles = False + Exit Function + End If + Set file = FSO.OpenTextFile(filename2, 1) + If Not file.AtEndOfStream Then + lines2 = file.ReadAll + End IF + file.Close + + CompareFiles = (lines1 = lines2) +End Function + +Function IsEmptyFile(filename) + Dim file + Set file = FSO.OpenTextFile(filename, 1) + IsEmptyFile = file.AtEndOfStream + file.Close +End Function + +Function DumpClassTemplates(name, file) + Dim re, realname + Set re = New RegExp + + re.Pattern = "^Script" + realname = re.Replace(name, "") + + file.WriteLine " template <> inline " & name & " *GetParam(ForceType<" & name & " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" & name & " *)instance; }" + file.WriteLine " template <> inline " & name & " &GetParam(ForceType<" & name & " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" & name & " *)instance; }" + file.WriteLine " template <> inline const " & name & " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" & name & " *)instance; }" + file.WriteLine " template <> inline const " & name & " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" & name & " *)instance; }" + If name = "ScriptEvent" Then + file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, NULL, DefSQDestructorCallback<" & name & ">, true); return 1; }" + ElseIf name = "ScriptText" Then + file.WriteLine "" + file.WriteLine " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" + file.WriteLine " if (sq_gettype(vm, index) == OT_INSTANCE) {" + file.WriteLine " return GetParam(ForceType(), vm, index, ptr);" + file.WriteLine " }" + file.WriteLine " if (sq_gettype(vm, index) == OT_STRING) {" + file.WriteLine " return new RawText(GetParam(ForceType(), vm, index, ptr));" + file.WriteLine " }" + file.WriteLine " return NULL;" + file.WriteLine " }" + Else + file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, NULL, DefSQDestructorCallback<" & name & ">, true); return 1; }" + End If +End Function + +Function DumpFileheader(api, file) + Dim re + Set re = New RegExp + ' Break the Id tag, so SVN doesn't replace it + file.WriteLine "/* $I" & "d$ */" + file.WriteLine "" + file.WriteLine "/*" + file.WriteLine " * This file is part of OpenTTD." + file.WriteLine " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." + file.WriteLine " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + file.WriteLine " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see ." + file.WriteLine " */" + file.WriteLine "" + file.WriteLine "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" + file.WriteLine "" + file.WriteLine "#include " & Chr(34) & "../" & filename & Chr(34) + If api <> "Template" Then + re.Pattern = "script_" + filename = re.Replace(filename, "template_") + file.WriteLine "#include " & Chr(34) & "../template/" & filename & ".sq" & Chr(34) + End If +End Function + +Function ResetReader() + enum_size = 0 + enums.RemoveAll + enum_value_size = 0 + enum_value.RemoveAll + enum_string_to_error_size = 0 + enum_string_to_error_mapping_string.RemoveAll + enum_string_to_error_mapping_error.RemoveAll + enum_error_to_string_size = 0 + enum_error_to_string_mapping.RemoveAll + const_size = 0 + const_value.RemoveAll + struct_size = 0 + structs.RemoveAll + method_size = 0 + methods.RemoveAll + static_method_size = 0 + static_methods.RemoveAll + cls = "" + start_squirrel_define_on_next_line = False + cls_level = 0 + cls_in_api = "" +End Function + +Sub SquirrelExportParse(api, line, file) + Dim re + Set re = New RegExp + + re.Pattern = "@file" + If re.Test(line) Then + filename = Split(line)(2) + re.Pattern = "^" & apis & "_" + filename = re.Replace(filename, "script_") + End If + + ' Ignore special doxygen blocks + re.Pattern = "^#ifndef DOXYGEN_API" + If re.Test(line) Then + doxygen_skip = "next" + Exit Sub + End If + re.Pattern = "^#ifdef DOXYGEN_API" + If re.Test(line) Then + doxygen_skip = "true" + Exit Sub + End If + re.Pattern = "^#endif /\* DOXYGEN_API \*/" + If re.Test(line) Then + doxygen_skip = "false" + Exit Sub + End If + re.Pattern = "^#else" + If re.Test(line) Then + If doxygen_skip = "next" Then + doxygen_skip = "true" + Else + doxygen_skip = "false" + End If + Exit Sub + End If + If doxygen_skip = "true" Then Exit Sub + + re.Pattern = "^([ ]*)\* @api" + If re.Test(line) Then + ' By default, classes are not selected + If cls_level = 0 Then api_selected = "false" + + re.Pattern = "^([ ]*)" + line = re.Replace(line, "") + re.Pattern = "\* @api " + line = re.Replace(line, "") + + If api = "Template" Then + api_selected = "true" + If line = "none" Or line = "-all" Then api_selected = "false" + Exit Sub + End If + + If line = "none" Then + api_selected = "false" + ElseIf line = "-all" Then + api_selected = "false" + Else + re.Pattern = "-" & apis + If re.Test(line) Then + api_selected = "false" + Else + re.Pattern = apis + If re.Test(line) Then + api_selected = "true" + End If + End If + End If + Exit Sub + End If + + ' Remove the old squirrel stuff + re.Pattern = "#ifdef DEFINE_SQUIRREL_CLASS" + If re.Test(line) Then + squirrel_stuff = True + Exit Sub + End If + re.Pattern = "^#endif /\* DEFINE_SQUIRREL_CLASS \*/" + If re.Test(line) Then + If squirrel_stuff Then squirrel_stuff = False + Exit Sub + End If + If squirrel_stuff Then Exit Sub + + ' Ignore forward declarations of classes + re.Pattern = "^( *)class(.*);" + If re.Test(line) Then Exit Sub + ' We only want to have public functions exported for now + re.Pattern = "^( *)class" + If re.Test(line) Then + line = Split(line) + If cls_level = 0 Then + If api_selected = "" Then + WScript.Echo "Class '" & line(1) & "' has no @api. It won't be published to any API." + api_selected = "false" + End If + is_public = False + cls_param(0) = "" + cls_param(1) = 1 + cls_param(2) = "x" + cls_in_api = api_selected + api_selected = "" + cls = line(1) + re.Pattern = "public|protected|private" + If UBound(line) > 2 Then + If re.Test(line(3)) Then + super_cls = line(4) + Else + super_cls = line(3) + End If + End If + ElseIf cls_level = 1 Then + If api_selected = "" Then api_selected = cls_in_api + + If api_selected = "true" Then + struct_size = struct_size + 1 + structs.Item(struct_size) = cls & "::" & line(1) + End If + api_selected = "" + End If + cls_level = cls_level + 1 + Exit Sub + End If + re.Pattern = "^( *)public" + If re.Test(line) Then + If cls_level = 1 Then is_public = True + Exit Sub + End If + re.Pattern = "^( *)protected" + If re.Test(line) Then + If cls_level = 1 Then is_public = False + Exit Sub + End If + re.Pattern = "^( *)private" + If re.Test(line) Then + If cls_level = 1 Then is_public = False + Exit Sub + End If + + ' Ignore the comments + re.Pattern = "^#" + If re.Test(line) Then Exit Sub + re.Pattern = "/\*.*\*/" + If re.Test(line) Then + comment = False + Exit Sub + End If + re.Pattern = "/\*" + If re.Test(line) Then + comment = True + Exit Sub + End If + re.Pattern = "\*/" + If re.Test(line) Then + comment = False + Exit Sub + End If + If comment Then Exit Sub + + ' We need to make specialized conversions for structs + re.Pattern = "^( *)struct" + If re.Test(line) Then + cls_level = cls_level + 1 + + ' Check if we want to publish this struct + If api_selected = "" Then api_selected = cls_in_api + If api_selected = "false" Then + api_selected = "" + Exit Sub + End If + api_selected = "" + + If Not is_public Then Exit Sub + If cls_level <> 1 Then Exit Sub + + struct_size = struct_size + 1 + structs.Item(struct_size) = cls & "::" & Split(line)(1) + Exit Sub + End If + + ' We need to make specialized conversions for enums + re.Pattern = "^( *)enum" + If re.Test(line) Then + cls_level = cls_level + 1 + + ' Check if we want to publish this enum + If api_selected = "" Then api_selected = cls_in_api + If api_selected = "false" Then + api_selected = "" + Exit Sub + End If + api_selected = "" + + If Not is_public Then Exit Sub + + in_enum = True + enum_size = enum_size + 1 + enums.Item(enum_size) = cls & "::" & Split(line)(1) + Exit Sub + End If + + ' Maybe the end of the class, if so we can start with the Squirrel export pretty soon + re.Pattern = "};" + If re.Test(line) Then + cls_level = cls_level - 1 + If cls_level <> 0 Then + in_enum = False + Exit Sub + End If + + If cls = "" Then Exit Sub + start_squirrel_define_on_next_line = True + Exit Sub + End If + + ' Empty/white lines. When we may do the Squirrel export, do that export. + re.Pattern = "^([ ]*)$" + If re.Test(line) Then + Dim namespace_opened, api_cls, api_super_cls, i, mlen, spaces + + If Not start_squirrel_define_on_next_line Then Exit Sub + + If cls_in_api <> "true" Then + ResetReader + Exit Sub + End If + If Not has_fileheader Then + DumpFileHeader api, file + has_fileheader = True + End If + + is_public = False + namespace_opened = False + + re.Pattern = "^Script" + api_cls = re.Replace(cls, api) + api_super_cls = re.Replace(super_cls, api) + + file.WriteLine "" + + If api = "Template" Then + ' First check whether we have enums to print + If enum_size <> 0 Then + If Not namespace_opened Then + file.WriteLine "namespace SQConvert {" + namespace_opened = True + End If + file.WriteLine " /* Allow enums to be used as Squirrel parameters */" + For i = 1 To enum_size + file.WriteLine " template <> inline " & enums.Item(i) & " GetParam(ForceType<" & enums.Item(i) & ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" & enums.Item(i) & ")tmp; }" + file.WriteLine " template <> inline int Return<" & enums.Item(i) & ">(HSQUIRRELVM vm, " & enums.Item(i) & " res) { sq_pushinteger(vm, (int32)res); return 1; }" + Next + End If + + ' Then check whether we have structs/classes to print + If struct_size <> 0 Then + If Not namespace_opened Then + file.WriteLine "namespace SQConvert {" + namespace_opened = True + End If + file.WriteLine " /* Allow inner classes/structs to be used as Squirrel parameters */" + For i = 1 To struct_size + DumpClassTemplates structs.Item(i), file + Next + End If + + If Not namespace_opened Then + file.WriteLine "namespace SQConvert {" + namespace_opened = True + Else + file.WriteLine "" + End If + file.WriteLine " /* Allow " & cls & " to be used as Squirrel parameter */" + DumpClassTemplates cls, file + + file.WriteLine "} // namespace SQConvert" + + ResetReader + Exit Sub + End If + + file.WriteLine "" + file.WriteLine "template <> const char *GetClassName<" & cls & ", ST_" & UCase(api) & ">() { return " & Chr(34) & api_cls & Chr(34) & "; }" + file.WriteLine "" + + ' Then do the registration functions of the class. + file.WriteLine "void SQ" & api_cls & "_Register(Squirrel *engine)" + file.WriteLine "{" + file.WriteLine " DefSQClass<" & cls & ", ST_" & UCase(api) & "> SQ" & api_cls & "(" & Chr(34) & api_cls & Chr(34) & ");" + If super_cls = "Text" Or super_cls = "ScriptObject" Or super_cls = "AIAbstractiveList::Valuator" Then + file.WriteLine " SQ" & api_cls & ".PreRegister(engine);" + Else + file.WriteLine " SQ" & api_cls & ".PreRegister(engine, " & Chr(34) & api_super_cls & Chr(34) & ");" + End If + If super_cls <> "ScriptEvent" Then + If cls_param(2) = "v" Then + file.WriteLine " SQ" & api_cls & ".AddSQAdvancedConstructor(engine);" + Else + file.WriteLine " SQ" & api_cls & ".AddConstructor(engine, " & Chr(34) & cls_param(2) & Chr(34) & ");" + End If + End If + file.WriteLine "" + + ' Enum values + mlen = 0 + For i = 1 To enum_value_size + If mlen <= Len(enum_value.Item(i)) Then mlen = Len(enum_value.Item(i)) + Next + For i = 1 To enum_value_size + file.WriteLine " SQ" & api_cls & ".DefSQConst(engine, " & cls & "::" & enum_value.Item(i) & ", " & Space(mlen - Len(enum_value.Item(i))) & Chr(34) & enum_value.Item(i) & Chr(34) & ");" + Next + If enum_value_size <> 0 Then file.WriteLine "" + + ' Const values + mlen = 0 + For i = 1 To const_size + If mlen <= Len(const_value.Item(i)) Then mlen = Len(const_value.Item(i)) + Next + For i = 1 To const_size + file.WriteLine " SQ" & api_cls & ".DefSQConst(engine, " & cls & "::" & const_value.Item(i) & ", " & Space(mlen - Len(const_value.Item(i))) & Chr(34) & const_value.Item(i) & Chr(34) & ");" + Next + If const_size <> 0 Then file.WriteLine "" + + ' Mapping of OTTD strings to errors + mlen = 0 + For i = 1 To enum_string_to_error_size + If mlen <= Len(enum_string_to_error_mapping_string.Item(i)) Then mlen = Len(enum_string_to_error_mapping_string.Item(i)) + Next + For i = 1 To enum_string_to_error_size + file.WriteLine " ScriptError::RegisterErrorMap(" & enum_string_to_error_mapping_string.Item(i) & ", " & Space(mlen - Len(enum_string_to_error_mapping_string.Item(i))) & cls & "::" & enum_string_to_error_mapping_error.Item(i) & ");" + Next + If enum_string_to_error_size <> 0 Then file.WriteLine "" + + ' Mapping of errors to human 'readable' strings. + mlen = 0 + For i = 1 To enum_error_to_string_size + If mlen <= Len(enum_error_to_string_mapping.Item(i)) Then mlen = Len(enum_error_to_string_mapping.Item(i)) + Next + For i = 1 To enum_error_to_string_size + file.WriteLine " ScriptError::RegisterErrorMapString(" & cls & "::" & enum_error_to_string_mapping.Item(i) & ", " & Space(mlen - Len(enum_error_to_string_mapping.Item(i))) & Chr(34) & enum_error_to_string_mapping.Item(i) & Chr(34) & ");" + Next + If enum_error_to_string_size <> 0 Then file.WriteLine "" + + ' Static methods + mlen = 0 + For i = 1 To static_method_size + If mlen <= Len(static_methods.Item(i)(0)) Then mlen = Len(static_methods.Item(i)(0)) + Next + For i = 1 To static_method_size + If static_methods.Item(i)(2) = "v" Then + spaces = mlen - Len(static_methods.Item(i)(0)) - 8 + If spaces < 0 Then spaces = 0 + file.WriteLine " SQ" & api_cls & ".DefSQAdvancedStaticMethod(engine, &" & cls & "::" & static_methods.Item(i)(0) & ", " & Space(spaces) & Chr(34) & static_methods.Item(i)(0) & Chr(34) & ");" + Else + file.WriteLine " SQ" & api_cls & ".DefSQStaticMethod(engine, &" & cls & "::" & static_methods.Item(i)(0) & ", " & Space(mlen - Len(static_methods.Item(i)(0))) & Chr(34) & static_methods.Item(i)(0) & Chr(34) & ", " & Space(mlen - Len(static_methods.Item(i)(0))) & static_methods.Item(i)(1) & ", " & Chr(34) & static_methods.Item(i)(2) & Chr(34) & ");" + End If + Next + If static_method_size <> 0 Then file.WriteLine "" + + ' Non-static methods + mlen = 0 + For i = 1 To method_size + If mlen <= Len(methods.Item(i)(0)) Then mlen = Len(methods.Item(i)(0)) + Next + For i = 1 To method_size + If methods.Item(i)(2) = "v" Then + spaces = mlen - Len(methods.Item(i)(0)) - 8 + If spaces < 0 Then spaces = 0 + file.WriteLine " SQ" & api_cls & ".DefSQAdvancedMethod(engine, &" & cls & "::" & methods.Item(i)(0) & ", " & Space(spaces) & Chr(34) & methods.Item(i)(0) & Chr(34) & ");" + Else + file.WriteLine " SQ" & api_cls & ".DefSQMethod(engine, &" & cls & "::" & methods.Item(i)(0) & ", " & Space(mlen - Len(methods.Item(i)(0))) & Chr(34) & methods.Item(i)(0) & Chr(34) & ", " & Space(mlen - Len(methods.Item(i)(0))) & methods.Item(i)(1) & ", " & Chr(34) & methods.Item(i)(2) & Chr(34) & ");" + End If + Next + If method_size <> 0 Then file.WriteLine "" + + file.WriteLine " SQ" & api_cls & ".PostRegister(engine);" + file.WriteLine "}" + + ResetReader + + Exit Sub + End If + + ' Skip non-public functions + If Not is_public Then Exit Sub + + ' Add enums + If in_enum Then + enum_value_size = enum_value_size + 1 + re.Pattern = "[, ]" + re.Global = True + enum_value.Item(enum_value_size) = re.Replace(split(line)(0), "") + + ' Check if this a special error enum + re.Pattern = ".*::ErrorMessages" + If re.Test(enums.Item(enum_size)) Then + ' syntax: + ' enum ErrorMessages { + ' ERR_SOME_ERROR, // [STR_ITEM1, STR_ITEM2, ...] + ' } + + ' Set the mappings + re.Pattern = "\[.*\]" + If re.Test(line) Then + Dim mappings + mappings = re.Execute(line)(0).Value + re.Pattern = "[\[ \]]" + mappings = re.Replace(mappings, "") + + mappings = Split(mappings, ",") + For i = LBound(mappings) To UBound(mappings) + enum_string_to_error_size = enum_string_to_error_size + 1 + enum_string_to_error_mapping_string.Item(enum_string_to_error_size) = mappings(i) + enum_string_to_error_mapping_error.Item(enum_string_to_error_size) = enum_value.Item(enum_value_size) + Next + + enum_error_to_string_size = enum_error_to_string_size + 1 + enum_error_to_string_mapping.Item(enum_error_to_string_size) = enum_value.Item(enum_value_size) + End If + End If + re.Global = False + Exit Sub + End If + + ' Add a const (non-enum) value + re.Pattern = "^[ ]*static const \w+ \w+ = -?\(?\w*\)?\w+;" + If re.Test(line) Then + const_size = const_size + 1 + const_value.Item(const_size) = Split(line)(3) + Exit Sub + End If + + ' Add a method to the list + re.Pattern = "^.*\(.*\).*$" + If re.Test(line) Then + Dim is_static, param_s, func, funcname, params, types + If cls_level <> 1 Then Exit Sub + re.Pattern = "~" + If re.Test(line) Then + If api_selected <> "" Then + WScript.Echo "Destructor for '" & cls & "' has @api. Tag ignored." + api_selected = "" + End If + Exit Sub + End If + + re.Pattern = "static" + is_static = re.Test(line) + re.Pattern = "\bvirtual\b" + line = re.Replace(line, "") + re.Pattern = "\bstatic\b" + line = re.Replace(line, "") + re.Pattern = "\bconst\b" + line = re.Replace(line, "") + re.Pattern = "{.*" + line = re.Replace(line, "") + param_s = line + re.Pattern = "\*" + line = re.Replace(line, "") + re.Pattern = "\(.*" + line = re.Replace(line, "") + re.Pattern = "^[ ]*" + line = re.Replace(line, "") + + re.Pattern = ".*\(" + param_s = re.Replace(param_s, "") + re.Pattern = "\).*" + param_s = re.Replace(param_s, "") + + func = Split(line) + If UBound(func) > 0 Then + funcname = func(1) + Else + funcname = "" + End If + If func(0) = cls And funcname = "" Then + If api_selected <> "" Then + WScript.Echo "Constructor for '" & cls & "' has @api. Tag ignored." + api_selected = "" + End If + cls_param(0) = param_s + If param_s = "" Then Exit Sub + ElseIf funcname = "" Then + Exit Sub + End If + + params = Split(param_s, ",") + If is_static Then + types = "." + Else + types = "x" + End If + For i = LBound(params) To UBound(params) + Do ' null loop for logic short-circuit + re.Pattern = "^[ ]*" + params(i) = re.Replace(params(i), "") + re.Pattern = "\*|&" + If re.Test(params(i)) Then + re.Pattern = "^char" + If re.test(params(i)) Then + ' Many types can be converted to string, so use '.', not 's'. (handled by our glue code) + types = types & "." + Exit Do + End If + re.Pattern = "^void" + If re.test(params(i)) Then + types = types & "p" + Exit Do + End If + re.Pattern = "^Array" + If re.test(params(i)) Then + types = types & "a" + Exit Do + End If + re.Pattern = "^struct Array" + If re.test(params(i)) Then + types = types & "a" + Exit Do + End If + re.Pattern = "^Text" + If re.test(params(i)) Then + types = types & "." + Exit Do + End If + types = types & "x" + Exit Do + End If + re.Pattern = "^bool" + If re.Test(params(i)) Then + types = types & "b" + Exit Do + End If + re.Pattern = "^HSQUIRRELVM" + If re.Test(params(i)) Then + types = "v" + Exit Do + End If + types = types & "i" + Loop While False ' end of null loop + Next + i = i + 1 + + ' Check if we want to publish this function + If api_selected = "" Then api_selected = cls_in_api + If api_selected = "false" Then + api_selected = "" + Exit Sub + End If + api_selected = "" + + If func(0) = cls And funcname = "" Then + cls_param(1) = i + cls_param(2) = types + Exit Sub + End If + If Left(funcname, 1) = "_" And types <> "v" Then Exit Sub + If is_static Then + static_method_size = static_method_size + 1 + static_methods.Item(static_method_size) = Array(funcname, i, types) + Exit Sub + End If + method_size = method_size + 1 + methods.Item(method_size) = Array(funcname, i, types) + Exit Sub + End If +End Sub + +Sub SquirrelExport(api, srcfilename, dstfilename) + Dim src, dst, line + Set src = FSO.OpenTextFile(srcfilename, 1) + Set dst = FSO.OpenTextFile(dstfilename, 2, True) + + enum_size = 0 + Set enums = CreateObject("Scripting.Dictionary") + enum_value_size = 0 + Set enum_value = CreateObject("Scripting.Dictionary") + enum_string_to_error_size = 0 + Set enum_string_to_error_mapping_string = CreateObject("Scripting.Dictionary") + Set enum_string_to_error_mapping_error = CreateObject("Scripting.Dictionary") + enum_error_to_string_size = 0 + Set enum_error_to_string_mapping = CreateObject("Scripting.Dictionary") + const_size = 0 + Set const_value = CreateObject("Scripting.Dictionary") + struct_size = 0 + Set structs = CreateObject("Scripting.Dictionary") + method_size = 0 + Set methods = CreateObject("Scripting.Dictionary") + static_method_size = 0 + Set static_methods = CreateObject("Scripting.Dictionary") + super_cls = "" + cls = "" + api_selected = "" + cls_in_api = "" + start_squirrel_define_on_next_line = False + has_fileheader = False + cls_level = 0 + apis = LCase(api) + If apis = "gs" Then apis = "game" + + While Not src.AtEndOfStream + line = src.ReadLine + SquirrelExportParse api, line, dst + Wend + + src.Close + dst.Close +End Sub + +Function SortDict(dict) + Set SortDict = CreateObject("Scripting.Dictionary") + While dict.Count <> 0 + Dim first, i + first = "" + For Each i in dict + If first = "" Or StrComp(first, i) = 1 Then first = i + Next + SortDict.Add first, first + dict.Remove(first) + Wend +End Function + +Sub ExportInstanceParse(apiuc, apilc, line, file) + Dim re, fname, f, files, r, regs + Set re = New RegExp + + re.Pattern = "\.hpp\.sq" + If re.Test(line) Then + re.Pattern = "template" + If re.Test(line) Then + file.WriteLine line + End If + Exit Sub + End If + + re.Pattern = "SQ" & apiuc & "Controller_Register" + If re.Test(line) Then + file.WriteLine line + Exit Sub + End If + + re.Pattern = "SQ" & apiuc & ".*_Register" + If re.Test(line) Then Exit Sub + + re.Pattern = "Note: this line is a marker in squirrel_export.sh. Do not change!" + If re.Test(line) Then + file.WriteLine line + Set files = CreateObject("Scripting.Dictionary") + For Each fname In FSO.GetFolder(".").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*_(.*)\.hpp\.sq" + If Not re.Test(fname) Then Exit Do + Set f = FSO.OpenTextFile(fname, 1) + fname = fname.Name + re.Pattern = "^void SQ" & apiuc & ".*Register\(Squirrel \*engine\)$" + While Not f.AtEndOfStream + If re.Test(f.ReadLine) And Not files.Exists(fname) Then + files.Add fname, fname + End If + Wend + f.Close + Loop While False ' end of null loop + Next + Set files = SortDict(files) + For Each f in files + file.WriteLine "#include " & Chr(34) & "../script/api/" & apilc & "/" & f & Chr(34) + Next + Exit Sub + End If + + re.Pattern = "/\* Register all classes \*/" + If re.Test(line) Then + file.WriteLine line + Set regs = CreateObject("Scripting.Dictionary") + ' List needs to be registered with squirrel before all List subclasses + file.WriteLine " SQ" & apiuc & "List_Register(this->engine);" + For Each fname In FSO.GetFolder(".").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*_(.*)\.hpp\.sq" + If Not re.Test(fname) Then Exit Do + Set f = FSO.OpenTextFile(fname, 1) + While Not f.AtEndOfStream + Do ' null loop for logic short-circuit + r = f.ReadLine + re.Pattern = "^void SQ" & apiuc & ".*Register\(Squirrel \*engine\)$" + If Not re.Test(r) Then Exit Do + re.Pattern = "SQ" & apiuc & "List_Register" + If re.Test(r) Then Exit Do + re.Pattern = "^.*void " + r = re.Replace(r, "") + re.Pattern = "Squirrel \*" + r = re.Replace(r, "this->") + re.Pattern = "$" + r = re.Replace(r, ";") + re.Pattern = "_Register" + r = re.Replace(r, "0000Register") + If Not regs.Exists(r) Then regs.Add r, r + Loop While False ' end of null loop + Wend + f.Close + Loop While False ' end of null loop + Next + Set regs = SortDict(regs) + re.Pattern = "0000Register" + For Each r in regs.Items + r = re.Replace(r, "_Register") + If r <> "SQ" & apiuc & "Controller_Register(this->engine);" Then file.WriteLine " " & r + Next + Exit Sub + End If + + file.WriteLine line +End Sub + +Sub ExportInstance(apiuc, apilc, srcfilename, dstfilename) + Dim src, dst, line + Set src = FSO.OpenTextFile(srcfilename, 1) + Set dst = FSO.OpenTextFile(dstfilename, 2, True) + + While Not src.AtEndOfStream + line = src.ReadLine + ExportInstanceParse apiuc, apilc, line, dst + Wend + + src.Close + dst.Close +End Sub + +' Recursive entry point +Sub Main + Dim WSH, scriptdir, apilc, re, api, apiuc, f, bf + Set WSH = CreateObject("WScript.Shell") + Set re = New RegExp + + ' This must be called from within a src/???/api directory. + scriptdir = FSO.GetParentFolderName(WScript.ScriptFullName) + apilc = WSH.CurrentDirectory + re.Pattern = "\\api" + apilc = re.Replace(apilc, "") + re.Pattern = ".*\\" + apilc = re.Replace(apilc, "") + + ' Check if we are in the root directory of the API, as then we generate all APIs + If apilc = "script" Then + For Each api In FSO.GetFolder(".").SubFolders + WScript.Echo "Generating for API '" & api.Name & "' ..." + WSH.CurrentDirectory = api + Main + Next + WScript.Quit 0 + End If + + Select Case apilc + Case "template" apiuc = "Template" + Case "ai" apiuc = "AI" + Case "game" apiuc = "GS" + Case Else + WScript.Echo "Unknown API type." + Exit Sub + End Select + + For Each f in FSO.GetFolder("..").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*\.hpp" + If Not re.Test(f) Then Exit Do + ' ScriptController has custom code, and should not be generated + If f.Name = "script_controller.hpp" Then Exit Do + re.Pattern = "script_" + bf = re.Replace(f.name, apilc & "_") + SquirrelExport apiuc, f, bf & ".tmp" + If IsEmptyFile(bf & ".tmp") Then + If FSO.FileExists(bf & ".sq") Then + WScript.Echo "Deleted: " & bf & ".sq" + FSO.DeleteFile bf & ".sq" + End If + FSO.DeleteFile bf & ".tmp" + ElseIf Not FSO.FileExists(bf & ".sq") Or Not CompareFiles(bf & ".sq", bf & ".tmp") Then + If FSO.FileExists(bf & ".sq") Then FSO.DeleteFile bf & ".sq" + FSO.MoveFile bf & ".tmp", bf & ".sq" + WScript.Echo "Updated: " & bf & ".sq" + Else + FSO.DeleteFile bf & ".tmp" + End If + Loop While False ' end of null loop + Next + + ' Remove .hpp.sq if .hpp doesn't exist anymore + For Each f in FSO.GetFolder(".").Files + Do ' null loop for logic short-circuit + re.Pattern = ".*\.hpp\.sq" + If Not re.Test(f) Then Exit Do + f = f.Name + re.Pattern = "\.hpp\.sq$" + f = re.Replace(f, ".hpp") + re.Pattern = apilc & "_" + f = re.Replace(f, "script_") + If Not FSO.FileExists("..\" & f) Then + WScript.Echo "Deleted: " & f & ".sq" + 'FSO.DeleteFile f & ".sq" + End If + Loop While False ' end of null loop + Next + + If apilc = "template" Then Exit Sub + + ' Add stuff to ${apilc}_instance.cpp + f = "..\..\..\" & apilc & "\" & apilc & "_instance.cpp" + ExportInstance apiuc, apilc, f, f & ".tmp" + If Not FSO.FileExists(f) Or Not CompareFiles(f, f & ".tmp") Then + If FSO.FileExists(f) Then FSO.DeleteFile f + FSO.MoveFile f & ".tmp", f + WScript.Echo "Updated: " & f + Else + FSO.DeleteFile f & ".tmp" + End If +End Sub + +Main diff --git a/src/settings.cpp b/src/settings.cpp index 110bb47640..c15e2da56e 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1317,6 +1317,15 @@ static bool MaxVehiclesChanged(int32 p1) return true; } +static bool InvalidateShipPathCache(int32 p1) +{ + Ship *s; + FOR_ALL_SHIPS(s) { + s->path.clear(); + } + return true; +} + #ifdef ENABLE_NETWORK diff --git a/src/ship.h b/src/ship.h index 0f396a237d..6e73332a57 100644 --- a/src/ship.h +++ b/src/ship.h @@ -12,17 +12,22 @@ #ifndef SHIP_H #define SHIP_H +#include + #include "vehicle_base.h" #include "water_map.h" void GetShipSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type); WaterClass GetEffectiveWaterClass(TileIndex tile); +typedef std::deque ShipPathCache; + /** * All ships have this type. */ struct Ship FINAL : public SpecializedVehicle { TrackBitsByte state; ///< The "track" the ship is following. + ShipPathCache path; ///< Cached path. /** We don't want GCC to zero our struct! It already is zeroed and has an index! */ Ship() : SpecializedVehicleBase() {} @@ -46,8 +51,11 @@ struct Ship FINAL : public SpecializedVehicle { TileIndex GetOrderStationLocation(StationID station); bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse); void UpdateCache(); + void SetDestTile(TileIndex tile); }; +static const uint SHIP_MAX_ORDER_DISTANCE = 130; + /** * Iterate over all ships. * @param var The variable used for iteration. diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index e606afc0ce..e3886aa34a 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -193,7 +193,7 @@ static void CheckIfShipNeedsService(Vehicle *v) } v->current_order.MakeGoToDepot(depot->index, ODTFB_SERVICE); - v->dest_tile = depot->xy; + v->SetDestTile(depot->xy); SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } @@ -319,6 +319,14 @@ void Ship::UpdateDeltaXY() this->z_extent = 6; } +/** + * Test-procedure for HasVehicleOnPos to check for a ship. + */ +static Vehicle *EnsureNoVisibleShipProc(Vehicle *v, void *data) +{ + return v->type == VEH_SHIP && (v->vehstatus & VS_HIDDEN) == 0 ? v : NULL; +} + static bool CheckShipLeaveDepot(Ship *v) { if (!v->IsChainInDepot()) return false; @@ -330,6 +338,13 @@ static bool CheckShipLeaveDepot(Ship *v) return true; } + /* Don't leave depot if no destination set */ + if (v->dest_tile == 0) return true; + + /* Don't leave depot if another vehicle is already entering/leaving */ + /* This helps avoid CPU load if many ships are set to start at the same time */ + if (HasVehicleOnPos(v->tile, NULL, &EnsureNoVisibleShipProc)) return true; + TileIndex tile = v->tile; Axis axis = GetShipDepotAxis(tile); @@ -443,11 +458,41 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr bool path_found = true; Track track; - switch (_settings_game.pf.pathfinder_for_ships) { - case VPF_OPF: track = OPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break; - case VPF_NPF: track = NPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break; - case VPF_YAPF: track = YapfShipChooseTrack(v, tile, enterdir, tracks, path_found); break; - default: NOT_REACHED(); + + if (v->dest_tile == 0 || DistanceManhattan(tile, v->dest_tile) > SHIP_MAX_ORDER_DISTANCE + 5) { + /* No destination or destination too far, don't invoke pathfinder. */ + track = TrackBitsToTrack(v->state); + if (track != TRACK_X && track != TRACK_Y) track = TrackToOppositeTrack(track); + if (!HasBit(tracks, track)) { + /* Can't continue in same direction so pick first available track. */ + if (_settings_game.pf.forbid_90_deg) { + tracks &= ~TrackCrossesTracks(TrackdirToTrack(v->GetVehicleTrackdir())); + if (tracks == TRACK_BIT_NONE) return INVALID_TRACK; + } + track = FindFirstTrack(tracks); + } + path_found = false; + } else { + /* Attempt to follow cached path. */ + if (!v->path.empty()) { + track = TrackdirToTrack(v->path.front()); + + if (HasBit(tracks, track)) { + v->path.pop_front(); + /* HandlePathfindResult() is not called here because this is not a new pathfinder result. */ + return track; + } + + /* Cached path is invalid so continue with pathfinder. */ + v->path.clear(); + } + + switch (_settings_game.pf.pathfinder_for_ships) { + case VPF_OPF: track = OPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break; + case VPF_NPF: track = NPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break; + case VPF_YAPF: track = YapfShipChooseTrack(v, tile, enterdir, tracks, path_found, v->path); break; + default: NOT_REACHED(); + } } v->HandlePathfindingResult(path_found); @@ -634,6 +679,7 @@ getout: reverse_direction: dir = ReverseDir(v->direction); v->direction = dir; + v->path.clear(); goto getout; } @@ -648,6 +694,13 @@ bool Ship::Tick() return true; } +void Ship::SetDestTile(TileIndex tile) +{ + if (tile == this->dest_tile) return; + this->path.clear(); + this->dest_tile = tile; +} + /** * Build a ship. * @param tile tile of the depot where ship is built. diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index b4c7523606..f088ccf6e2 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1767,16 +1767,16 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin bool distant_join = (station_to_join != INVALID_STATION); uint8 width = (uint8)GB(p1, 0, 8); - uint8 lenght = (uint8)GB(p1, 8, 8); + uint8 length = (uint8)GB(p1, 8, 8); /* Check if the requested road stop is too big */ - if (width > _settings_game.station.station_spread || lenght > _settings_game.station.station_spread) return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT); + if (width > _settings_game.station.station_spread || length > _settings_game.station.station_spread) return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT); /* Check for incorrect width / length. */ - if (width == 0 || lenght == 0) return CMD_ERROR; + if (width == 0 || length == 0) return CMD_ERROR; /* Check if the first tile and the last tile are valid */ - if (!IsValidTile(tile) || TileAddWrap(tile, width - 1, lenght - 1) == INVALID_TILE) return CMD_ERROR; + if (!IsValidTile(tile) || TileAddWrap(tile, width - 1, length - 1) == INVALID_TILE) return CMD_ERROR; - TileArea roadstop_area(tile, width, lenght); + TileArea roadstop_area(tile, width, length); if (distant_join && (!_settings_game.station.distant_join_stations || !Station::IsValidID(station_to_join))) return CMD_ERROR; @@ -1980,7 +1980,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags) FOR_ALL_ROADVEHICLES(v) { if (v->First() == v && v->current_order.IsType(OT_GOTO_STATION) && v->dest_tile == tile) { - v->dest_tile = v->GetOrderStationLocation(st->index); + v->SetDestTile(v->GetOrderStationLocation(st->index)); } } @@ -2604,7 +2604,7 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags) } if (s->dest_tile == docking_location) { - s->dest_tile = 0; + s->SetDestTile(0); s->current_order.Free(); } } @@ -3433,7 +3433,7 @@ void RerouteCargo(Station *st, CargoID c, StationID avoid, StationID avoid2) /* Reroute cargo in station. */ ge.cargo.Reroute(UINT_MAX, &ge.cargo, avoid, avoid2, &ge); - /* Reroute cargo staged to be transfered. */ + /* Reroute cargo staged to be transferred. */ for (std::list::iterator it(st->loading_vehicles.begin()); it != st->loading_vehicles.end(); ++it) { for (Vehicle *v = *it; v != NULL; v = v->Next()) { if (v->cargo_type != c) continue; @@ -3443,7 +3443,7 @@ void RerouteCargo(Station *st, CargoID c, StationID avoid, StationID avoid2) } /** - * Check all next hops of cargo packets in this station for existance of a + * Check all next hops of cargo packets in this station for existence of a * a valid link they may use to travel on. Reroute any cargo not having a valid * link and remove timed out links found like this from the linkgraph. We're * not all links here as that is expensive and useless. A link no one is using @@ -4230,7 +4230,7 @@ void FlowStat::Invalidate() } /** - * Change share for specified station. By specifing INT_MIN as parameter you + * Change share for specified station. By specifying INT_MIN as parameter you * can erase a share. Newly added flows will be unrestricted. * @param st Next Hop to be removed. * @param flow Share to be added or removed. diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 11af2f55f4..5c2e06070b 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -657,7 +657,7 @@ const CargoTypes CompanyStationsWindow::cargo_filter_max = ALL_CARGOTYPES; CargoTypes CompanyStationsWindow::cargo_filter = ALL_CARGOTYPES; const Station *CompanyStationsWindow::last_station = NULL; -/* Availible station sorting functions */ +/* Available station sorting functions */ GUIStationList::SortFunction * const CompanyStationsWindow::sorter_funcs[] = { &StationNameSorter, &StationTypeSorter, diff --git a/src/table/settings.ini b/src/table/settings.ini index 5a1b137a0f..989915c6a8 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -42,6 +42,7 @@ static bool InvalidateCompanyInfrastructureWindow(int32 p1); static bool InvalidateCompanyWindow(int32 p1); static bool ZoomMinMaxChanged(int32 p1); static bool MaxVehiclesChanged(int32 p1); +static bool InvalidateShipPathCache(int32 p1); #ifdef ENABLE_NETWORK static bool UpdateClientName(int32 p1); @@ -829,6 +830,7 @@ var = pf.forbid_90_deg def = false str = STR_CONFIG_SETTING_FORBID_90_DEG strhelp = STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT +proc = InvalidateShipPathCache cat = SC_EXPERT [SDT_VAR] @@ -951,6 +953,7 @@ interval = 1 str = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS strhelp = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT strval = STR_CONFIG_SETTING_PATHFINDER_OPF +proc = InvalidateShipPathCache cat = SC_EXPERT [SDT_BOOL] diff --git a/src/tgp.cpp b/src/tgp.cpp index 436870b412..02621f127e 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -47,7 +47,7 @@ * second sets the major variations to that, ... until finally the smallest * bumps are added. * - * Usefully, this routine is totally scaleable; so when 32bpp comes along, the + * Usefully, this routine is totally scalable; so when 32bpp comes along, the * terrain can be as bumpy as you like! It is also infinitely expandable; a * single random seed terrain continues in X & Y as far as you care to * calculate. In theory, we could use just one seed value, but randomly select @@ -262,7 +262,7 @@ static amplitude_t GetAmplitude(int frequency) * areas with a particular gradient so that we are able to create maps without too * many steep slopes up to the wanted height level. It's definitely not perfect since * it will bring larger rectangles with similar slopes which makes the rectangular - * behaviour of TGP more noticable. However, these height differentiations cannot + * behaviour of TGP more noticeable. However, these height differentiations cannot * happen over much smaller areas; we basically double the "range" to give a similar * slope for every doubling of map height. */ @@ -977,7 +977,7 @@ static void TgenSetTileHeight(TileIndex tile, int height) * The main new land generator using Perlin noise. Desert landscape is handled * different to all others to give a desert valley between two high mountains. * Clearly if a low height terrain (flat/very flat) is chosen, then the tropic - * areas wont be high enough, and there will be very little tropic on the map. + * areas won't be high enough, and there will be very little tropic on the map. * Thus Tropic works best on Hilly or Mountainous. */ void GenerateTerrainPerlin() diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 4289d901a1..986c52c4e3 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2945,7 +2945,7 @@ static CommandCost TownActionFundBuildings(Town *t, DoCommandFlag flags) * Also emulate original behaviour when town was only growing in * TOWN_GROWTH_TICKS intervals, to make sure that it's not too * tick-perfect and gives player some time window where he can - * spam funding with the exact same effeciency. + * spam funding with the exact same efficiency. */ t->grow_counter = min(t->grow_counter, 2 * TOWN_GROWTH_TICKS - (t->growth_rate - t->grow_counter) % TOWN_GROWTH_TICKS); diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 9015396a8b..46141ce265 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -723,7 +723,7 @@ bool Vehicle::IsEngineCountable() const /** * Check whether Vehicle::engine_type has any meaning. - * @return true if the vehicle has a useable engine type. + * @return true if the vehicle has a usable engine type. */ bool Vehicle::HasEngineType() const { @@ -2337,7 +2337,7 @@ CommandCost Vehicle::SendToDepot(DoCommandFlag flags, DepotCommand command) SetBit(gv_flags, GVF_SUPPRESS_IMPLICIT_ORDERS); } - this->dest_tile = location; + this->SetDestTile(location); this->current_order.MakeGoToDepot(destination, ODTF_MANUAL); if (!(command & DEPOT_SERVICE)) this->current_order.SetDepotActionType(ODATFB_HALT); SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, WID_VV_START_STOP); diff --git a/src/vehicle_base.h b/src/vehicle_base.h index b2a2a5d7a4..d02d33e2cc 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -749,6 +749,8 @@ public: */ virtual bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse) { return false; } + virtual void SetDestTile(TileIndex tile) { this->dest_tile = tile; } + CommandCost SendToDepot(DoCommandFlag flags, DepotCommand command); void UpdateVisualEffect(bool allow_power_change = true); diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 0655065a6c..6cee4fef28 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -238,7 +238,7 @@ int RedrawScreenDebug() #define TID_POLLMOUSE 1 #define MOUSE_POLL_DELAY 75 -static void CALLBACK TrackMouseTimerProc(HWND hwnd, UINT msg, UINT event, DWORD time) +static void CALLBACK TrackMouseTimerProc(HWND hwnd, UINT msg, UINT_PTR event, DWORD time) { RECT rc; POINT pt; @@ -636,7 +636,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP switch (msg) { case WM_CREATE: - SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, (TIMERPROC)TrackMouseTimerProc); + SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, TrackMouseTimerProc); SetCompositionPos(hwnd); _imm_props = ImmGetProperty(GetKeyboardLayout(0), IGP_PROPERTY); break; @@ -741,7 +741,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP _pTrackMouseEvent(&tme); } else { - SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, (TIMERPROC)TrackMouseTimerProc); + SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, TrackMouseTimerProc); } } diff --git a/src/viewport.cpp b/src/viewport.cpp index 350bb92381..5e72aaa23e 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -58,7 +58,7 @@ * * * Rows are horizontal sections of the viewport, also half a tile wide. - * This time the nothern most tile on the map defines 0 and + * This time the northern most tile on the map defines 0 and * everything south of that has a positive number. */ @@ -1813,8 +1813,8 @@ void UpdateViewportPosition(Window *w) if (_settings_client.gui.smooth_scroll) { int max_scroll = ScaleByMapSize1D(512 * ZOOM_LVL_BASE); /* Not at our desired position yet... */ - w->viewport->scrollpos_x += Clamp(delta_x / 4, -max_scroll, max_scroll); - w->viewport->scrollpos_y += Clamp(delta_y / 4, -max_scroll, max_scroll); + w->viewport->scrollpos_x += Clamp(DivAwayFromZero(delta_x, 4), -max_scroll, max_scroll); + w->viewport->scrollpos_y += Clamp(DivAwayFromZero(delta_y, 4), -max_scroll, max_scroll); } else { w->viewport->scrollpos_x = w->viewport->dest_scrollpos_x; w->viewport->scrollpos_y = w->viewport->dest_scrollpos_y; diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 816e981a14..61656c020e 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -352,8 +352,8 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b /* Longest item in the list, if auto_width is enabled */ uint max_item_width = 0; - /* Total length of list */ - int height = 0; + /* Total height of list */ + uint height = 0; for (const DropDownListItem * const *it = list->Begin(); it != list->End(); ++it) { const DropDownListItem *item = *it; @@ -361,53 +361,58 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b if (auto_width) max_item_width = max(max_item_width, item->Width() + 5); } - /* Check if the status bar is visible, as we don't want to draw over it */ - int screen_bottom = GetMainViewBottom(); + /* Scrollbar needed? */ bool scroll = false; - /* Check if the dropdown will fully fit below the widget */ - if (top + height + 4 >= screen_bottom) { - /* If not, check if it will fit above the widget */ - int screen_top = GetMainViewTop(); - if (w->top + wi_rect.top > screen_top + height) { - top = w->top + wi_rect.top - height - 4; - } else { - /* If it doesn't fit above the widget, we need to enable a scrollbar... */ - int avg_height = height / (int)list->Length(); - scroll = true; + /* Is it better to place the dropdown above the widget? */ + bool above = false; - /* ... and choose whether to put the list above or below the widget. */ - bool put_above = false; - int available_height = screen_bottom - w->top - wi_rect.bottom; - if (w->top + wi_rect.top - screen_top > available_height) { - // Put it above. - available_height = w->top + wi_rect.top - screen_top; - put_above = true; - } + /* Available height below (or above, if the dropdown is placed above the widget). */ + uint available_height = (uint)max(GetMainViewBottom() - top - 4, 0); + + /* If the dropdown doesn't fully fit below the widget... */ + if (height > available_height) { + + uint available_height_above = (uint)max(w->top + wi_rect.top - GetMainViewTop() - 4, 0); + + /* Put the dropdown above if there is more available space. */ + if (available_height_above > available_height) { + above = true; + available_height = available_height_above; + } + + /* If the dropdown doesn't fully fit, we need a dropdown. */ + if (height > available_height) { + scroll = true; + uint avg_height = height / list->Length(); /* Check at least there is space for one item. */ assert(available_height >= avg_height); - /* And lastly, fit the list... */ - int rows = available_height / avg_height; + /* Fit the list. */ + uint rows = available_height / avg_height; height = rows * avg_height; - /* Add space for the scroll bar if we automatically determined - * the width of the list. */ + /* Add space for the scrollbar. */ max_item_width += NWidgetScrollbar::GetVerticalDimension().width; + } - /* ... and set the top position if needed. */ - if (put_above) { - top = w->top + wi_rect.top - height - 4; - } + /* Set the top position if needed. */ + if (above) { + top = w->top + wi_rect.top - height - 4; } } if (auto_width) width = max(width, max_item_width); Point dw_pos = { w->left + (_current_text_dir == TD_RTL ? wi_rect.right + 1 - (int)width : wi_rect.left), top}; - Dimension dw_size = {width, (uint)height}; - new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll); + Dimension dw_size = {width, height}; + DropdownWindow *dropdown = new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll); + + /* The dropdown starts scrolling downwards when opening it towards + * the top and holding down the mouse button. It can be fooled by + * opening the dropdown scrolled to the very bottom. */ + if (above && scroll) dropdown->vscroll->UpdatePosition(INT_MAX); } /** diff --git a/src/window.cpp b/src/window.cpp index d67c7f2f70..2d03310337 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -655,7 +655,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count) /* Clicked on a widget that is not disabled. * So unless the clicked widget is the caption bar, change focus to this widget. - * Exception: In the OSK we always want the editbox to stay focussed. */ + * Exception: In the OSK we always want the editbox to stay focused. */ if (widget_type != WWT_CAPTION && w->window_class != WC_OSK) { /* focused_widget_changed is 'now' only true if the window this widget * is in gained focus. In that case it must remain true, also if the @@ -3516,8 +3516,9 @@ void ChangeVehicleViewports(VehicleID from_index, VehicleID to_index) */ void RelocateAllWindows(int neww, int newh) { - Window *w; + DeleteWindowById(WC_DROPDOWN_MENU, 0); + Window *w; FOR_ALL_WINDOWS_FROM_BACK(w) { int left, top; /* XXX - this probably needs something more sane. For example specifying