frosch
131b7c7122
Codechange: Replace Utf8Decode usages with StringConsumer.
2025-04-13 21:59:10 +02:00
frosch
9bcd3feb17
Codechange: Make SQFile a buffered reader, based on StringConsumer.
2025-04-13 21:59:10 +02:00
frosch
3964d053b5
Codechange: Replace BufState with StringConsumer.
2025-04-13 21:59:10 +02:00
frosch
96eee0e8e4
Codechange: Base ByteReader on StringConsumer.
2025-04-13 21:59:10 +02:00
frosch
800d6e339d
Codechange: Add StringConsumer.
2025-04-13 21:59:10 +02:00
Peter Nelson
4721a1f93e
Fix: Don't display badges if the class has no name. ( #13994 )
...
Unnamed badges are intended to be for internal-use, not for player information.
Additionally if there is no name to the class, then is causes problems when user configuration comes.
2025-04-13 18:00:41 +01:00
frosch
7157e96664
Remove: Drop support for UCS2/UTF-16 encoded scripts. ( #13992 )
2025-04-13 15:52:01 +02:00
frosch
7f82b181da
Add #12939 : [NewGRF] Add road-/tram-/rail-type variable 0x45 to get mutual road-/tram-/rail-type on same tile. ( #13934 )
2025-04-13 13:23:10 +02:00
translators
04c41bf731
Update: Translations from eints
...
galician: 63 changes by pvillaverde
2025-04-13 05:04:53 +00:00
Richard Wheeler
a93087ec5c
Fix #13980 : Allow diagonal selection for road convert ( #13983 )
...
Fixes #13980
2025-04-12 18:50:11 +01:00
Kuhnovic
319a657454
Fix 42fbcec76f41: Fixed accidental changes to autorail/road AI behavior ( #13968 )
...
* Revert 4bd72e4a78
, Fix #11528 : Starting autorail dragging from existing track tiles resulted in adding non-continuous tracks.
* Fix 4bd72e4a7846af: Fixed accidental changes to autorail/road AI behavior
2025-04-12 16:09:10 +02:00
Peter Nelson
34b1f7a992
Fix: Make GrfMsg() behave like Debug() when not loading NewGRFs. ( #13991 )
...
GrfMsg() outputs the currently loading NewGRF and current line/sprite number. This is invalid when not NewGRFs are not actually being loaded.
2025-04-12 13:05:33 +01:00
Peter Nelson
1744156149
Change: Queue content ID information requests. ( #13990 )
...
Instead of requesting content one ID at a time, queue them up to be requested in one go.
* Avoids sending many small requests.
* Avoids sending requests for content which is likely to be arriving anyway.
2025-04-12 12:50:36 +01:00
translators
c29ef5cfc2
Update: Translations from eints
...
english (us): 1 change by 2TallTyler
2025-04-12 04:44:34 +00:00
Peter Nelson
3347919fb2
Codechange: Remove empty destructor and use member init for ClientNetworkContentSocketHandler.
2025-04-11 23:08:59 +01:00
Peter Nelson
20d83677eb
Codechange: Use unique_ptr to manage ContentInfo lifetime.
...
Removes manually managed new/delete.
2025-04-11 23:08:59 +01:00
Peter Nelson
7b31f26611
Codechange: Pass ContentInfo by reference.
...
Many functions take a ContentInfo pointer, but do not check for nullptr.
Pass by reference instead to assure it is present.
2025-04-11 23:08:59 +01:00
frosch
1cfad1474a
Codechange: Rename _cur to _cur_gps.
2025-04-11 22:11:28 +02:00
frosch
e89be12ebb
Codechange: Rename _library to _ft_library.
2025-04-11 22:11:28 +02:00
frosch
b0d678e375
Codechange: Rename _ignore_restrictions to _ignore_industry_restrictions.
2025-04-11 22:11:28 +02:00
frosch
c9c9973884
Codechange: Rename _circle_size to _setting_circle_size.
2025-04-11 22:11:28 +02:00
frosch
35cd05b27d
Codechange: Rename _current_data to _current_gamestrings_data.
2025-04-11 22:11:28 +02:00
frosch
ae51308615
Codechange: Remove unused extern declarations.
2025-04-11 22:11:28 +02:00
frosch
e2ebf3a0f3
Codechange: Move global strgen state into a single struct.
2025-04-11 22:11:28 +02:00
Peter Nelson
786893a844
Fix: NewGRF Global variables 0D, 0E and 1E refer to wrong GRFFile. ( #13986 )
...
These variables used GrfProcessingState, which is only valid while loading GRFs, after which they always point to the last loaded GRFFile.
2025-04-11 19:53:05 +02:00
translators
eaa2afda5e
Update: Translations from eints
...
dutch: 1 change by Afoklala
2025-04-11 13:06:07 +00:00
translators
cbbbf6cccc
Update: Translations from eints
...
french: 7 changes by Athozus
2025-04-11 04:46:01 +00:00
Peter Nelson
413087df9d
Codechange: Use small function to get check handler for content type. ( #13988 )
...
This reduces a long switch block with (multiple) breaks with the power of early return.
2025-04-10 20:45:43 +00:00
Peter Nelson
936d78fefc
Codefix: Avoid uppercase characters in variable names. ( #13985 )
2025-04-10 07:19:27 +01:00
translators
59aceee887
Update: Translations from eints
...
chinese (simplified): 6 changes by WenSimEHRP
catalan: 1 change by J0anJosep
portuguese: 2 changes by azulcosta
2025-04-10 04:47:16 +00:00
Peter Nelson
c982816c0e
Codechange: Manage window viewport via unique_ptr.
2025-04-09 22:03:23 +01:00
Peter Nelson
8275bbfb87
Codechange: Pass Viewport by reference.
...
This means we do not have to care what type of pointer is used.
2025-04-09 22:03:23 +01:00
Peter Nelson
70b4beb8e7
Codechange: Return screenshot viewport instead of using out parameter.
2025-04-09 22:03:23 +01:00
Peter Nelson
f57065dd41
Codefix: Avoid using override keyword as variable names.
...
Rename variables named `override`.
2025-04-09 22:02:35 +01:00
Peter Nelson
91ab7f10cd
Codefix: Avoid using override keyword as member name.
...
Rename `GRFFileProps` `override` member to `override_id`.
2025-04-09 22:02:35 +01:00
frosch
294f826364
Codechange: Replace last usage of Utf8CharLen with Utf8View.
2025-04-09 17:19:11 +02:00
frosch
9229956f04
Codechange: Replace strcasestr with StrContainsIgnoreCase.
2025-04-09 17:19:11 +02:00
frosch
14bab7d76b
Codechange: Remove unused Utf8TrimString, Utf8PrevChar.
2025-04-09 17:19:11 +02:00
translators
b1582b815c
Update: Translations from eints
...
english (au): 1 change by krysclarke
chinese (simplified): 1 change by WenSimEHRP
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese (brazilian): 1 change by pasantoro
polish: 4 changes by pAter-exe
2025-04-09 04:46:50 +00:00
frosch
9dc751ed8a
Codechange: Remove now unused Utf8Encode.
2025-04-08 23:10:58 +02:00
frosch
fa284af263
Codechange: Replace remaining Utf8Encode usages with StringBuilder.
2025-04-08 23:10:58 +02:00
frosch
5878db1d02
Codechange: Replace strgen Buffer with StringBuilder.
2025-04-08 23:10:58 +02:00
frosch
9b87f306ca
Fix: StringFilter included quotes in the search and failed.
2025-04-08 23:10:58 +02:00
frosch
1d879f3043
Codechange: Use StringBuilder to create the gender-scan-string.
2025-04-08 23:10:58 +02:00
frosch
dd073eb38d
Codechange: Use StringBuilder to create encoded strings.
2025-04-08 23:10:58 +02:00
frosch
128e0fcde2
Codechange: Use StringBuilder in TranslateTTDPatchCodes.
2025-04-08 23:10:58 +02:00
frosch
ad8e9634ec
Codechange: Generalize StringBuilder.
2025-04-08 23:10:58 +02:00
frosch
f306f9726c
Codechange: If modifying already written data in a StringBuilder, do this via the underlying std::string.
2025-04-08 23:10:58 +02:00
frosch
c5a43e705c
Codechange: Simplify Original English townname generator.
2025-04-08 23:10:58 +02:00
frosch
04246c530f
Codechange: Use fmt::format instead of stringstream with iomanip flags. ( #13964 )
2025-04-08 20:57:50 +00:00
Peter Nelson
5b9d171e63
Codechange: Use EnumBitSet for StringValidationSettings. ( #13974 )
2025-04-08 21:19:17 +01:00
Richard Wheeler
4e4f413913
Fix: Capitalise "Disabled" for the "maximum non-sticky open windows" setting. ( #13975 )
2025-04-07 19:33:09 +02:00
frosch
3f2b58d6e1
Fix: Validate raw strings from game-scripts, and strip invalid and control characters. ( #13976 )
2025-04-07 19:30:36 +02:00
frosch
2cdf2bedfa
Codechange: Add a std::string overload for StrMakeValidInPlace() and a moving std::string&& overload for StrMakeValid(). ( #13962 )
2025-04-07 18:22:47 +02:00
Peter Nelson
981b2a94db
Codechange: Store loaded GRFFiles in vector directly. ( #13940 )
...
Removes pointer management.
2025-04-06 20:16:57 +01:00
Loïc Guilloux
49ce7fe169
Fix 8846f347f2: Check bridge/tunnel transport type before querying road type ( #13969 )
2025-04-06 15:01:23 +02:00
translators
bc78efeec1
Update: Translations from eints
...
catalan: 9 changes by J0anJosep
2025-04-06 04:48:09 +00:00
Peter Nelson
2a47afad89
Fix d94d421772: Frame widget with label had incorrect spacing. ( #13967 )
...
Caused by the frame widget not testing GetStringForWidget properly.
2025-04-05 19:12:42 +01:00
translators
5e1dc081ee
Update: Translations from eints
...
chinese (simplified): 3 changes by WenSimEHRP
hindi: 1 change by NisheshTyagi
2025-04-05 04:43:45 +00:00
Peter Nelson
68fd949a52
Fix 44984f8410: Changing ownership of a tunnel/bridge did not check for road transport type. ( #13963 )
...
Changing ownership changed ownership of road components without checking if the tunnel/bridge is actually a road tunnel/bridge.
2025-04-04 17:11:19 +00:00
SamuXarick
4310d7c7f5
Fix: [Script] Only run the Game::GameLoop() in-game ( #13896 )
2025-04-04 17:29:48 +02:00
Kuhnovic
4bd72e4a78
Fix #11528 : Starting autorail dragging from existing track tiles resulted in adding non-continuous tracks. ( #13885 )
2025-04-04 15:21:04 +00:00
Loïc Guilloux
f35fa6679b
Change: [Script] Start GS (but don't run it) when generating world in scenario editor ( #13961 )
2025-04-04 12:52:02 +02:00
frosch
8846f347f2
Fix: MayHaveRoad claimed rail station tiles had road, so the custom stationspec index would be read as roadtype. ( #13949 )
2025-04-04 11:49:10 +02:00
frosch
cedc511324
Fix: Numbers were left-aligned for RTL languages in several windows. ( #13959 )
2025-04-04 11:48:50 +02:00
frosch
44984f8410
Codechange: Remove broken and unused StrMakeValidInPlace overload. ( #13960 )
...
If an otherwise valid string without NUL termination was passed, a NUL was appended out of bounds.
2025-04-04 11:48:32 +02:00
translators
1befa1ccb0
Update: Translations from eints
...
chinese (simplified): 119 changes by WenSimEHRP
2025-04-04 04:46:26 +00:00
John Taylor
7c1649d524
Fix #13955 : Make graphs respect RTL ( #13957 )
...
Co-authored-by: John Taylor <gitea@johntaylor.hu>
Co-authored-by: frosch <frosch@openttd.org>
2025-04-03 21:17:34 +02:00
Loïc Guilloux
b25daba561
Fix: [Script] Reset instance when changing running scripts in scenario editor ( #13906 )
2025-04-03 21:14:45 +02:00
frosch
20805ba84b
Codechange: Use EncodeUtf8 and DecodeUtf8 directly, when dealing with a single character.
2025-04-03 18:43:41 +02:00
frosch
f640daee4c
Codechange: No need for Utf8Consume and Utf8Encode, if only ASCII characters are checked.
2025-04-03 18:43:41 +02:00
frosch
f06bfc0dad
Codechange: Use Utf8View to const-iterate over strings, if no particular error handling is needed.
2025-04-03 18:43:41 +02:00
frosch
22ab0244d8
Codechange: Use Utf8View in Textbuf.
2025-04-03 18:43:41 +02:00
frosch
f19e75b606
Codechange: Use Utf8View in Utf8StringLength.
2025-04-03 18:43:41 +02:00
frosch
83401ad5e2
Codechange: Use Utf8View::iterator in StringIterator.
2025-04-03 18:43:41 +02:00
frosch
b19e43ae99
Add: Utf8View and iterator.
2025-04-03 18:43:41 +02:00
frosch
e6a0cf75a9
Codechange: Shift suffixes between _name_czech_adj and _name_czech_patmod to simplify code.
2025-04-03 13:58:07 +02:00
frosch
d8333fe3d7
Codechange: Czech town names unconditionally removed the last codepoint in _name_czech_adj; already do this in the source table.
2025-04-03 13:58:07 +02:00
frosch
86bb30acbe
Codefix dccc6185: Incorrect encoding of empty parameters in ScriptText. ( #13951 )
2025-04-03 13:57:30 +02:00
frosch
061b5630ee
Codefix: Conversion from char to char32_t requires cast to unsigned first. ( #13950 )
2025-04-03 13:56:50 +02:00
stormcone
ced8fd9936
Fix: Reference to the correct section of the README, if a graphics or a sound set is incomplete. ( #13946 )
2025-04-03 13:40:16 +02:00
Peter Nelson
33a8c1c6fc
Codechange: Use default operator<=> to compare Linkgraph Hop. ( #13944 )
2025-04-02 23:00:06 +01:00
John Taylor
2f36e3e3a1
Fix #13075 , #13893 : Reversed all x-axis labels for company related and industry production graphs in wallclock mode. ( #13894 )
2025-04-02 19:04:49 +02:00
Loïc Guilloux
827b03a32c
Fix: [Script] Prevent cloning of API instances ( #13947 )
2025-04-02 12:30:57 +02:00
Peter Nelson
2ae84f3c9e
Codechange: CargoSpec::Iterate already tests cargo validity. ( #13941 )
2025-04-01 18:23:26 +01:00
stormcone
8d0ba5649a
Fix 667d0137: NewGRF details view does not show the "No information available", if the NewGRF sets an empty description. ( #13939 )
2025-04-01 16:10:59 +02:00
stormcone
f8f76eb9f3
Fix 089c7a2: SDL2 application name hint was not effective. ( #13926 )
2025-04-01 16:07:38 +02:00
Rubidium
3c15e0c889
Codefix: return right type to prevent casting
2025-03-31 21:44:53 +02:00
Rubidium
023bf38338
Codefix: std::string_view does not accept nullptr
2025-03-31 21:44:44 +02:00
Peter Nelson
e200e9b401
Codechange: Use EnumBitSet for Linkgraph RefreshFlags. ( #13930 )
2025-03-31 20:33:32 +01:00
Peter Nelson
047497734b
Cleanup: Remove redundant NewGRF clean up functions. ( #13927 )
...
These functions no longer clean up manually managed memory, they simply clear GRFFile's vectors of unique_ptrs. This will happen anyway when the GRFFile is deleted.
2025-03-31 20:33:09 +01:00
Peter Nelson
6a3d17923b
Codechange: Use range filter to simplify picking a random AI. ( #13897 )
2025-03-31 20:32:16 +01:00
frosch
dc956a758d
Fix: Draw the bevel around the music track name as inset. ( #13935 )
2025-03-31 18:54:02 +02:00
frosch
fe50f061a9
Fix #13923 : Padding in music GUI was asymmetric, so it looked different for LTR and RTL languages. ( #13933 )
2025-03-31 18:53:51 +02:00
frosch
6c569f36e6
Fix #13925 , 667d0137: Ancient NewGRF have empty name and description, show the filename instead. ( #13932 )
2025-03-31 14:25:47 +02:00
translators
0055e168f0
Update: Translations from eints
...
chinese (traditional): 7 changes by KogentaSan
vietnamese: 1 change by KhoiCanDev
2025-03-31 04:46:08 +00:00
Loïc Guilloux
dc3e8a07e6
Fix #13928 , 35e58f6: BuildOilRig did not properly set airport rotation ( #13929 )
2025-03-30 22:33:01 +00:00
Peter Nelson
99c6e85356
Codefix: Timetable display rows are not related to OrderID. ( #13909 )
2025-03-30 20:25:55 +01:00
Michael Lutz
68ff7e5209
Fix #13921 , d95422561b: [Win32] Don't try close an already closed event handle during destruction.
2025-03-30 19:01:45 +02:00
Michael Lutz
56af0b29f5
Fix #13921 , a908c7bed0: Don't reject MIDI files with a valid file magic value.
2025-03-30 19:01:45 +02:00