Commit Graph

24467 Commits

Author SHA1 Message Date
Rubidium
ec79ceb2be Codechange: use std::string_view for sq_pushstring 2025-05-03 23:02:09 +02:00
Rubidium
3020e615a9 Codechange: use std::string_view for squirrel compilation 2025-05-03 23:02:09 +02:00
Rubidium
26a4da9b01 Codechange: replace last strncmp uses 2025-05-03 21:51:01 +02:00
Peter Nelson
31754a0afd
Fix: Changing monospace font didn't refresh the monospace width cache. (#14185) 2025-05-03 18:34:45 +01:00
Peter Nelson
7596f98e2d
Codechange: Cache layouted text for the last used width. (#14177) 2025-05-03 18:33:47 +01:00
Peter Nelson
bd1a3fe0b7
Change: Remove the limit of 20 parameters to a Script Text string. (#14193) 2025-05-03 18:33:29 +01:00
frosch
518a34c286 Codechange: Use std::byte for generic buffers. 2025-05-03 18:43:20 +02:00
frosch
02082a0211 Codechange: Deduplicate array lookup. 2025-05-03 18:43:20 +02:00
frosch
bb767608de Codechange: Pass SpriteType as direct parameter to SpriteEncoder::Encoder. 2025-05-03 18:43:20 +02:00
frosch
c3aa3f140c
Codechange: Use more std::string_view. (#14197) 2025-05-03 18:40:37 +02:00
frosch
74a275f37b
Add: [NewGRF] Add purchase list Action3 CID for houses, industries, industry tiles, airports and airport tiles. (#14121) 2025-05-03 17:50:20 +02:00
frosch
9ac9798d7f
Codechange: Remove usages of stoi and stol. (#14196) 2025-05-03 17:46:30 +02:00
Rubidium
b6afd8d2b6 Codechange: remove some completely unused squirrel files 2025-05-03 17:14:10 +02:00
Rubidium
85f1110569 Codechange: rewrite ini file parsing with the StringConsumer 2025-05-03 17:13:33 +02:00
Rubidium
6a9f694158 Codechange: remove StrEmpty 2025-05-03 15:58:14 +02:00
Rubidium
d037dbb42a Codechange: use std::string_view for locales 2025-05-03 15:58:14 +02:00
Rubidium
96fd291693 Codechange: introduce GetEnv that returns optional based on std::getenv 2025-05-03 15:58:14 +02:00
Rubidium
04a6a55e94 Codechange: replace StripTrailingWhitespace with StrTrimView 2025-05-03 15:57:53 +02:00
Rubidium
1f39d469ff Codechange: pass the characters to trim to StrTrimView 2025-05-03 15:57:53 +02:00
Rubidium
e2db8277b8 Codefix: implement StrTrimInPlace without assigning a borrowed view of itself 2025-05-03 15:57:53 +02:00
Rubidium
4109b6848b Codechange: replace manual trim and std::from_chars with ParseInteger 2025-05-03 15:57:53 +02:00
Rubidium
414f6a3067 Codechange: add support for parsing octal numbers 2025-05-03 15:57:53 +02:00
Rubidium
c79abc6da6 Codechange: reduce dependence on C-style strings in OpenGL 2025-05-03 14:24:49 +02:00
Rubidium
278aee2c19 Codechange: use std::string_view for sq_getstring 2025-05-03 14:24:28 +02:00
translators
f4f05dea33 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 1 change by WenSimEHRP
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
dutch: 8 changes by Afoklala
portuguese: 3 changes by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-05-03 04:45:31 +00:00
Peter Nelson
8b14faaa40
Codechange: Add version of DrawStringMultiLine that performs clipping test. (#14189)
Normally DrawStringMultiLine does not perform any clipping, as the return value may be needed if it the text is not drawn.

In some specific cases the height is already known, so it is possible to test for clipping, which can cut down on layouting time for text which won't be visible.
2025-05-02 22:59:55 +01:00
Iris-Persephone
2f020abe74
Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on new game settings (#14158) 2025-05-02 22:54:21 +01:00
Peter Nelson
3eba97f67c
Codechange: Scrollbar Count no longer needs to be clamped to uint16_t. (#14184) 2025-05-02 22:21:05 +01:00
Peter Nelson
f7db4938ce
Fix #14098: Use 64-bit type for MIDI realtime information. (#14144) 2025-05-02 22:20:44 +01:00
Rubidium
c420ba349d Codechange: use std::string_view over char* 2025-05-02 23:12:43 +02:00
Rubidium
f2a32c6d13 Codechange: use std::byte instead of char for calculating arbitrary byte offsets 2025-05-02 23:12:43 +02:00
Peter Nelson
932dca927b
Fix: Crash/Undefined behaviour in station view window. (#14183)
No column limit was applied when drawing waiting cargo, which could cause out-of-bounds array access.
2025-05-02 08:02:35 +01:00
translators
e0a9c7d818 Update: Translations from eints
english (au): 2 changes by krysclarke
chinese (traditional): 3 changes by KogentaSan
chinese (simplified): 6 changes by WenSimEHRP
greek: 2 changes by gh658804
russian: 2 changes by Ln-Wolf
finnish: 3 changes by hpiirai
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-05-02 04:45:34 +00:00
Peter Nelson
ae9646eb0a
Change: Use same padding as NewGRF parameters for AI/GS parameters lists. (#14118) 2025-05-01 22:36:53 +01:00
Rubidium
5ca686261e Codechange: use std::string_view for the string setting defaults 2025-05-01 23:24:43 +02:00
Rubidium
5c7b04a0c2 Codechange: use std::string_view for 'x-of-many' settings 2025-05-01 23:24:43 +02:00
Rubidium
7805c1c189 Codechange: use std::string_view for ini_key 2025-05-01 23:24:43 +02:00
Peter Nelson
d958d50985
Fix: Small order list arrow was wrong direction for RTL text. (#14174)
Add sprite for small left arrow and use for small order list when using an RTL language.
2025-05-01 22:08:24 +01:00
Loïc Guilloux
41b113840a
Fix: [Script] Access to enum/consts defined outside of main.nut (#14176) 2025-05-01 18:16:32 +02:00
Loïc Guilloux
1f212e6f2a
Fix: Handle \t when loading GS strings from savegame (#14180) 2025-05-01 16:48:02 +02:00
Loïc Guilloux
6f4994329c
Fix bf8a241f: Handle \t in trailing whitespaces (#14178) 2025-05-01 12:32:00 +02:00
translators
a30f251d05 Update: Translations from eints
hungarian: 99 changes by meskobalazs
russian: 8 changes by Ln-Wolf
finnish: 24 changes by hpiirai
latvian: 70 changes by lexuslatvia
2025-05-01 04:47:22 +00:00
Rubidium
fbe80f31fe Codechange: replace char* in GetOptData with std::string_view 2025-04-30 23:49:06 +02:00
Rubidium
c1a287ad17 Codechange: make some saveload functions work natively with std::string_view 2025-04-30 23:49:06 +02:00
Rubidium
855377191e Codechange: replace some more char*s with std::string_view 2025-04-30 23:49:06 +02:00
frosch
a80c11a6e8
Fix 66733e2a: Textbuf was broken, and did not insert any input. (#14173) 2025-04-30 19:31:52 +00:00
Peter Nelson
7dd3bed10f
Fix #14170, 7fd0e6c27d: Missing spaces for timetabled order strings. (#14172) 2025-04-30 19:54:54 +01:00
frosch
316279f4b4 Codechange: Use more std::string_view. 2025-04-30 19:33:56 +02:00
frosch
9cf36dac39 Codechange: Use data() instead of c_str(), if no NUL termination is needed. 2025-04-30 19:33:56 +02:00
frosch
9e90d4ed79 Codefix: Do not assign nullptr to std::string_view. 2025-04-30 19:33:56 +02:00
frosch
36ce1f890a Codechange: Remove c_str, if std::string_view is already accepted. 2025-04-30 19:33:56 +02:00
frosch
b564fbb5e6 Codechange: Use StringConsumer to parse hotkeys. 2025-04-30 19:33:56 +02:00
frosch
66733e2a50 Codechange: Use std::string_view in IME input handling. 2025-04-30 19:33:56 +02:00
frosch
6db13df3b5 Add: [BaseSet] Allow basesets to set minor and patch versions in obg/obs/obm files. 2025-04-30 15:23:27 +02:00
frosch
d30fee4a99 Codechange: Improve debug/error messages when reading baseset metadata. 2025-04-30 15:23:27 +02:00
Rubidium
708e6a512d Codechange: replace char* with C++ style strings 2025-04-30 12:05:04 +02:00
Peter Nelson
356b0159c7
Fix 261e09a549: Compilation failure with Fluidsynth enabled. (#14167) 2025-04-30 07:27:57 +01:00
translators
7bec2029fa Update: Translations from eints
english (au): 4 changes by krysclarke
norwegian (bokmal): 5 changes by eriksorngard
chinese (traditional): 4 changes by KogentaSan
greek: 8 changes by gh658804
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 4 changes by pasantoro
polish: 4 changes by pAter-exe
2025-04-30 04:46:51 +00:00
Peter Nelson
0abebfce1c
Codechange: Use result of .find() instead of looking up multiple times. (#14154) 2025-04-29 23:52:46 +01:00
Peter Nelson
aa9e8b422c
Fix #14166, dfd9fbf873: Loan was no longer invalidated when refreshing finance window. (#14168)
In most cases the company loan does not change, but it should be updated in case it does.
2025-04-29 23:52:11 +01:00
Rubidium
f4ad614285 Codechange: use std::string_view for FS2OTTD and OTTD2FS 2025-04-29 22:33:32 +02:00
Rubidium
ef71ce0a9d Codechange: return std::string_view for Textbuf::GetText() 2025-04-29 22:15:49 +02:00
Rubidium
261e09a549 Codechange: remove char* from base driver code 2025-04-29 21:09:18 +02:00
frosch
d030d17bd6 Codechange: Do not use a mutable global to return calculated VarAction2 results. 2025-04-29 20:35:46 +02:00
frosch
e90b68d504 Codechange: Pass SpriteGroup as reference to ResolveReal. 2025-04-29 20:35:46 +02:00
frosch
7c946d97da Codefix: Build with OPTION_DEDICATED=OFF and CMAKE_DISABLE_PRECOMPILE_HEADERS=ON. 2025-04-29 20:26:23 +02:00
frosch
afe3dfb3a4 Codechange: Use format instead of to_string. 2025-04-29 20:26:23 +02:00
frosch
fda93b6f35 Codechange: Add format_append as short-hand to format_to + back_inserter. 2025-04-29 20:26:23 +02:00
frosch
98481ecc01 Codechange: Replace strtol, strtoll, stroul and strtoull with ParseInteger. 2025-04-29 20:14:56 +02:00
frosch
cdafc50c94 Codechange: Replace atoi and atoll with ParseInteger. 2025-04-29 20:14:56 +02:00
frosch
3973199879 Change: ParseInteger now checks for trailing junk chars. 2025-04-29 20:14:56 +02:00
frosch
79b2202f2e Codechange: Use StringConsumer for parsing more strings. 2025-04-29 20:14:56 +02:00
frosch
e7d758c82a Codechange: Replace sscanf with StringConsumer. 2025-04-29 20:14:56 +02:00
frosch
8027e31f47 Codechange: Remove virtual functions SpriteGroup::GetResult and GetNumResults. They are only implemented in and called via ResultSpriteGroup. 2025-04-29 10:35:10 +02:00
frosch
010b944173 Codechange: Move SpriteGroup cast from callers into Resolve. 2025-04-29 10:35:10 +02:00
Rubidium
af25eecc15 Codechange: use const for std::string_view where appropriate 2025-04-29 10:15:18 +02:00
Rubidium
78250c3bba Codechange: remove const char* overloads when there are std::string_view and std::string& overloads 2025-04-29 10:14:53 +02:00
Peter Nelson
a5578166bb Codechange: Pass Script Info by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson
341cdbc16b Codechange: Pass Script engine by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson
72ca962b84 Codechange: Pass ScriptInstance by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson
13fcc0900e
Change: Use enum/bitset to track which script configuration items are defined. (#14150)
Removes magic numbers, and simplifies compatibility. It is no longer necessary to provide values which won't be used.
2025-04-28 23:07:57 +01:00
Rubidium
b20b56d5fc Codechange: store revision information in C++ style strings 2025-04-28 23:48:32 +02:00
Rubidium
8b1c1cc33d Codechange: provide 'sv' (string_view) literals globally 2025-04-28 23:39:33 +02:00
Rubidium
be53bd320d Codechange: replace char* from settingsgen 2025-04-28 23:27:46 +02:00
frosch
47b5ca6115 Fix: [NewGRF] Computed VarAction2 callback results were not always properly masked to 15 bit results. 2025-04-28 23:25:31 +02:00
frosch
d90f6f01cc Codechange: CALLBACK_FAILED is an internal constant, do not use it as numeric value in VA2 computations. 2025-04-28 23:25:31 +02:00
frosch
30b1eb6e5f
Fix: [NewGRF] The result of Action123 evaluation affected rerandomisation in a weird corner case. (#14139)
Rerandomisation does not care about the Resolve result.
But we skipped it, in case of 'invalid SpriteGroup reference'.
2025-04-28 23:24:42 +02:00
frosch
b281c5616e Change: [NewGRF] If Action123 does not resolve in a valid SpriteSet, prefer drawing the default sprite instead of an invalid sprite. 2025-04-28 22:20:54 +02:00
frosch
7b08170ac8 Codechange: Replace a magic value with a maybe less magical constant. 2025-04-28 22:20:54 +02:00
Rubidium
360670626b Codechange: replace char* with std::string_view 2025-04-28 21:31:12 +02:00
Rubidium
9107c3f6c6 Codechange: add std::string_view variant of FileHandle::Open 2025-04-28 21:31:12 +02:00
Peter Nelson
2c4897c2cd
Codechange: Use EnumBitSet for HouseZones. (#14137) 2025-04-28 20:27:43 +01:00
frosch
f5a9eae8b1 Fix: [NewGRF] AI station construction callback did not work for stations with ID >= 0x100. 2025-04-28 20:50:13 +02:00
frosch
e2084bbdcd Codechange: Replace out parameters with result tuples. 2025-04-28 20:50:13 +02:00
frosch
0c6426cb2d Fix: Out-of-bounds read, if NewGRF stations provided no spritesets. 2025-04-28 20:49:20 +02:00
frosch
0f1ef96ca1 Codechange: Road stops do not use RealSpriteGroup, ResolveReal is never called. 2025-04-28 20:49:20 +02:00
Rubidium
9116f96e2e Codechange: replace char * with std::string_view 2025-04-28 17:53:18 +02:00
Rubidium
c6ea0ce961 Codechange: use std::span for transferring data in network code 2025-04-28 17:53:18 +02:00
frosch
b7e7f08f78 Codechange: Simplify usage of GRFFileProps by adding some common helper methods. 2025-04-28 13:44:46 +02:00
frosch
46494c6d44 Codechange: Rename GRFFileProps to SubstituteGRFFileProps. 2025-04-28 13:44:46 +02:00
Richard Wheeler
298e02d593
Fix: List Ctrl+Click behaviour for vehicle details tooltip (#14127)
Also change mention of "road vehicle" to "vehicle", in line with vehicle order, refit, reverse, etc. tooltips. Fixes #14128
2025-04-28 07:00:18 +01:00
translators
68ba2735ea Update: Translations from eints
swedish: 109 changes by Brickblock1
spanish (mexican): 1 change by absay
english (us): 1 change by 2TallTyler
2025-04-28 04:46:30 +00:00
Rubidium
794ba1f5da Fix 29ceaf0a8: checking std::optional against nullptr caused crash 2025-04-27 21:10:12 +02:00
Rubidium
49ef3eee13 Codechange: replace char* with std::string_view 2025-04-27 20:08:02 +02:00
frosch
e1859df1c0 Codechange: Use enums as keys for the spritegroups in FixedGRFFileProps. 2025-04-27 19:50:51 +02:00
frosch
05504ec463 Codechange: Use SingleGRFFileProps, if the feature has no spritegroup keys. 2025-04-27 19:50:51 +02:00
frosch
41a20e512d Codechange: Use proper enum type to index sprite groups in VariableGRFFileProps. 2025-04-27 19:50:51 +02:00
frosch
893aa0fb91 Codechange: Add an explicit enum member for the default spritegroup of badges. 2025-04-27 19:50:51 +02:00
Rubidium
29ceaf0a84 Codechange: use std::string_view over const char * 2025-04-27 18:04:04 +02:00
Rubidium
c7056866a3 Codechange: remove manual param count; in all cases strlen(params) == nparams 2025-04-27 17:57:53 +02:00
Rubidium
781187b8a6 Codechange: replace C-style strings with std::string_view related to strings functions 2025-04-27 17:57:42 +02:00
Rubidium
4e3e3d5be6 Codechange: introduce transparent hash lookup for strings 2025-04-27 17:57:42 +02:00
Peter Nelson
7bbf380931
Fix #14125, 828e808444: NewGRF sounds were not loaded. (#14130)
NewGRF Action 11 should be handled in both INIT and ACTIVATION stages for sounds to be loaded.

Additionally the Action 0 feature test failed due to offsets involved.
2025-04-27 15:20:38 +00:00
Rubidium
b9667ec3d1 Codechange: use std::string_view for scripts 2025-04-27 17:00:25 +02:00
translators
864fe29028 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
galician: 66 changes by pvillaverde
chinese (simplified): 1 change by WenSimEHRP
korean: 72 changes by telk5093
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-04-27 04:44:13 +00:00
Peter Nelson
5a7893b730
Fix #14104, 67a0fcc: Don't base timetable timing decisions on client settings. (#14105)
Client settings different between clients so the resultant timings may be different.

Partially reverts 67a0fcc.
2025-04-26 22:39:01 +01:00
Peter Nelson
b87ce9c845
Change: Draw info headers as shade of window colour instead of pixel colour. (#14123)
Use the normal or lightest colour gradient to pick a suitable colour, instead of an arbitrary pixel colour.

(Except for the NewGRF window's info panel, this happens to be the same colour.)
2025-04-26 22:38:24 +01:00
frosch
55fad9c78a
Add: Limit height of settings description, and add scrollbar. (#14102) 2025-04-26 22:34:18 +02:00
frosch
d85f6dccc5
Fix 5575379: Crash with default airports. (#14120) 2025-04-26 22:29:01 +02:00
frosch
f62f728187
Codechange: Move usage of ResolverObjects to newgrf_xxx.cpp (#14116) 2025-04-26 20:53:50 +02:00
frosch
be39a05327 Fix: Road vehicle blocking and train collissions used slightly inconsistent distance thresholds. 2025-04-26 19:32:59 +02:00
frosch
3a70d1e2f7 Codechange: Pass the max-distance as parameter to VehiclesNearTileXY. 2025-04-26 19:32:59 +02:00
frosch
2df1233f1f Codechange: Clamp the search area to valid values for the hash bucket selection.
The bucket selection uses a truncating division instead of a flooring division, so it does not work for negative positions.
Anyhow, there are no negative tile coordinates, so just clamp the search area.
2025-04-26 19:32:59 +02:00
frosch
0f76ba122c Codefix: VehiclesNearTileXY yielded all vehicles with matching hashes, even if they are far away. 2025-04-26 19:32:59 +02:00
frosch
c14e4a6db1 Codefix: Rect::Contains did not consider the bottom/right edges as inside. 2025-04-26 19:32:59 +02:00
Rubidium
3235ec4cf8 Codefix: checking unsigned int >= 0 is pointless, check before subtraction 2025-04-26 18:31:36 +02:00
frosch
ce2155ab27 Codechange: Remove unused FindVehicleOnPosXY/HasVehicleOnPosXY. 2025-04-26 16:54:56 +02:00
frosch
98ac75e74f Codechange: Replace FindVehicleOnPosXY/HasVehicleOnPosXY with VehiclesNearTileXY/HasVehicleNearTileXY. 2025-04-26 16:54:56 +02:00
frosch
9f1c04c0e1 Codechange: Add VehiclesNearTileXY and HasVehicleNearTileXY to iterate over/check for ground vehicles near a tile coordinate. 2025-04-26 16:54:56 +02:00
frosch
ac3ed9f3ad Codechange: Deduplicate and simplify tile hash arithmetic. 2025-04-26 16:54:56 +02:00
Rubidium
b4d4d730a5 Codechange: use std::string_view for town name generation 2025-04-26 16:30:30 +02:00
Rubidium
30f381acee Codechange: use std::string_view for NetworkAddress 2025-04-26 16:30:16 +02:00
Rubidium
e1db09a41f Codechange: use std::string_view for NewsTypeData 2025-04-26 16:30:16 +02:00
Rubidium
42f0aa24f6 Codechange: use std::string_view for connection/URI strings 2025-04-26 16:30:16 +02:00
Rubidium
a5812a45f8 Codechange: use std::string view for URI and std::move for data 2025-04-26 16:30:16 +02:00
Rubidium
d1a7d30572 Codechange: use std::string_view for some settings functions 2025-04-26 16:30:16 +02:00
Rubidium
4476ce804d Codechange: use std::string_view for GetNextParameterString 2025-04-26 16:30:16 +02:00
frosch
398524e49a
Add: [NewGRF] Provide random bits in var10 of house callback 1C 'construction stage changed'. (#14095) 2025-04-26 15:58:44 +02:00
frosch
55753795bf
Fix: [NewGRF] Cargo-types for airport-tile animation-triggers were not properly translated. (#14092) 2025-04-26 15:58:30 +02:00
frosch
1ea1dbd19e
Add: [NewGRF] Station/roadstop animation-triggers 'tile loop' (bit 7) and 'path reservation' (bit 8). (#14080) 2025-04-26 14:44:55 +02:00
frosch
d3ae6bc9a8
Fix: [NewGRF] For animation-triggers which do not supply a cargo-type in var18, the var18 bits should remain empty. (#14091) 2025-04-26 14:44:07 +02:00
frosch
0d9074769d
Change: [NewGRF] Animation-trigger 'construction stage changed' of houses and industries now also triggers at construction start. (#14089) 2025-04-26 14:42:49 +02:00
Rubidium
365eed533d Codechange: use std::string_view for console commands 2025-04-26 14:15:10 +02:00
Rubidium
f04cf54939 Codechange: make IConsoleCmdExec use C++ strings internally 2025-04-26 14:15:10 +02:00
Loïc Guilloux
28d0e6dfc0
Change: [Script] Reject scripts using negative version (#14096) 2025-04-26 14:02:36 +02:00
Peter Nelson
4a5db57f7b
Fix #14107: Mark the company value in the company view window dirty when it changes. (#14112) 2025-04-26 11:56:11 +00:00
Peter Nelson
dfd9fbf873
Codechange: Defer refreshing company finance windows. (#14111)
During each game tick every cargo payment will issue an Invalidate of the status bar and company finance window. While this doesn't paint the window yet, it does need to search for open windows, and then mark a area of dirty blocks, which is done for every Invalidate.

Instead, set a bit in a CompanyMask, and test these bits once after the game tick is complete.

This reduces the amount of dirtying, and allows more specific widgets to be dirtied instead of the whole window.
2025-04-26 10:50:51 +00:00
Peter Nelson
a1f086e60c
Fix #14107: Invalidate all shared vehicle windows when changing group. (#14110)
Previously only windows of the first vehicle were invalidated.
2025-04-26 10:49:41 +00:00
translators
bb1d561369 Update: Translations from eints
chinese (traditional): 9 changes by KogentaSan
english (us): 66 changes by 2TallTyler
greek: 65 changes by gh658804
russian: 77 changes by Ln-Wolf
dutch: 66 changes by Afoklala
portuguese: 65 changes by jcteotonio
polish: 68 changes by pAter-exe
2025-04-26 04:44:12 +00:00
Rubidium
08ce16018b Codechange: make start-ai console command parsing work with std::string_view 2025-04-25 19:04:22 +02:00
Rubidium
ccbf7f4a46 Codechange: validate the given seed 2025-04-25 19:04:22 +02:00
Rubidium
86039a5b69 Codechange: make SetDebugString use C++-style strings and function types 2025-04-25 19:04:22 +02:00
Rubidium
498a0f1c1b Codechange: use C++ strings over C-strings 2025-04-25 19:04:22 +02:00
frosch
4a09860c53
Fix: Focus settings filter box (only) when the tab becomes active. (#14100) 2025-04-25 12:04:26 +02:00
frosch
f554d799d7
Change: [NewGRF] Provide shared random bits in multi-tile animation-triggers of airport tiles and objects, just like for other features. (#14090) 2025-04-25 10:01:01 +02:00
Peter Nelson
8b927220c7
Change: Move Game Options toggles to before label, add Off/On text. (#14097) 2025-04-25 07:49:33 +01:00
translators
e61762a805 Update: Translations from eints
english (au): 65 changes by krysclarke
norwegian (bokmal): 67 changes by eriksorngard
chinese (traditional): 67 changes by KogentaSan
spanish (mexican): 66 changes by absay
chinese (simplified): 91 changes by WenSimEHRP
finnish: 65 changes by hpiirai
french: 61 changes by ottdfevr
portuguese (brazilian): 65 changes by pasantoro
2025-04-25 04:46:37 +00:00
Peter Nelson
87b5b0ffa3
Fix 2b80812922: Map size column in server list may be too wide. (#14094)
Incorrect change from SetDParamMaxValue to GetParamMaxValue.
2025-04-24 21:05:31 +01:00
Rubidium
2087bca87d Codechange: replace atoi with ParseInteger in console commands 2025-04-24 18:10:01 +02:00
Rubidium
ddc0d6ead3 Codechange: use string comparision for ConExec's second parameter 2025-04-24 18:10:01 +02:00
frosch
880a947eb3 Fix: [NewGRF] Randomisation-trigger 'path reservation' did not work for waypoints. 2025-04-24 09:19:43 +02:00
frosch
bc0eaf9ac4 Codechange: Allow passing waypoints to Trigger(Station|RoadStop)Randomisation. 2025-04-24 09:19:43 +02:00
Peter Nelson
c0cd7cafe4
Change: Remove minimum width from advanced settings panel of Game Options window. (#14088)
Previous minimum width of 400 was fairly arbitrary and isn't necessary when
the minimum size is suitably constrained by other widgets in the window.

This allows the window to be narrower for CJK languages.
2025-04-23 23:39:35 +00:00
Peter Nelson
7846f0f4ee
Fix a4dc7249ee: Changing language or interface scale could hang. (#14087)
A bit of hysteresis caused by OnResize calling ReInit calling OnResize calling ReInit calling OnResize calling ReInit ...
2025-04-24 00:29:54 +01:00
Peter Nelson
78d3eaf3e2 Change: Slider widget can now be colourful. 2025-04-23 19:07:52 +01:00
Peter Nelson
20738865f0 Change: Use standard mauve/yellow scheme for game options window.
This is the colour scheme used by AI/GS settings, NewGRF settings and (previously) advanced settings.
2025-04-23 19:07:52 +01:00
Peter Nelson
17e7dafa2a Change: Add alternate_colour widget data for boolean button.
Allows boolean button to have different background and button colours.
2025-04-23 19:07:52 +01:00
Peter Nelson
7953a97cbb Change: Adjust section names in Graphics options tab.
"Interface size" and "Graphics" section names do not make much sense any more.
2025-04-23 19:07:52 +01:00
Peter Nelson
77da79a052 Codechange: Remove unnecessary SetMinimalSize from Game Options window. 2025-04-23 19:07:52 +01:00
Peter Nelson
a4dc7249ee Change: Merge Game Options and Game Settings together.
Game Settings is now an additional 'Advanced' tab in the Game Options window.
2025-04-23 19:07:52 +01:00
frosch
6f056283f2
Fix: [NewGRF] For roadstop multi-tile-animation-triggers, the upper 16 bits were not the same for all tiles. (#14084) 2025-04-23 19:26:09 +02:00
Loïc Guilloux
f8bdc1e612
Fix f5ffd47: Don't skip separator while reading a record (#14083) 2025-04-23 17:30:51 +02:00
Peter Nelson
6d5aee0545
Codechange: Restructure RoadStop Entries to reduce pointers. (#14069)
A RoadStop must own both west and east `Entry`s, but they are allocated separately.

Combine this allocation into one instead.
2025-04-23 08:29:34 +01:00
Peter Nelson
41ed5f9822
Fix c7d6934816: Town view caption lost "(City)" flag. (#14082) 2025-04-23 08:14:08 +01:00
translators
d9dc6cb5e4 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 7 changes by KogentaSan
chinese (simplified): 201 changes by WenSimEHRP
greek: 1 change by gh658804
hungarian: 9 changes by meskobalazs
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
latvian: 1 change by lexuslatvia
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-04-23 04:46:38 +00:00
Peter Nelson
d028c7f9e2
Codefix: Incorrect type for OnDropdownSelect widget parameter. (#14074) 2025-04-22 22:44:25 +01:00
Rubidium
4149384ebc Codechange: simplify and move GetArgumentInteger 2025-04-22 23:16:15 +02:00
frosch
2bee313642 Codechange: Replace FindVehicleOnPos with 'for' loop. 2025-04-22 22:12:59 +02:00
frosch
06c399b79e Codechange: Replace HasVehicleOnPos and callbacks with HasVehicleOnTile and lambda-predicates. 2025-04-22 22:12:59 +02:00
frosch
dacd77b2bd Codechange: Use FindVehicleOnPos instead of HasVehicleOnPos, if there is no stop condition. 2025-04-22 22:12:59 +02:00
frosch
fca3103d8c Codechange: Add iterator for vehicles on a tile. 2025-04-22 22:12:59 +02:00
Rubidium
917ef03e97 Codechange: use std::string_view in IConsole settings API 2025-04-22 19:52:37 +02:00
Rubidium
b279bc37e7 Codechange: use std::string_view to set string settings 2025-04-22 19:52:37 +02:00
Rubidium
fdb8defa64 Codechange: use std::string_view to parse setting values 2025-04-22 19:52:37 +02:00
Peter Nelson
12118b201c
Change: Enhance visibility of disabled bool button. (#14071)
Apply masked fill to background as well.
2025-04-22 17:37:30 +01:00
translators
415ac07a08 Update: Translations from eints
chinese (simplified): 32 changes by WenSimEHRP
hungarian: 38 changes by meskobalazs
2025-04-22 04:46:01 +00:00
Peter Nelson
3aa82d5e63
Codechange: Use EnumBitSet for RoadStopStatusFlags. (#14068) 2025-04-21 20:16:23 +01:00
Peter Nelson
81edd1123a
Change: Use scaled instead of fixed dimensions for framerate graphs. (#14039) 2025-04-21 20:15:57 +01:00
frosch
d7ddea4032
Codechange: Turn AnimationTrigger enums into enum classes. (#14067) 2025-04-21 20:53:31 +02:00
frosch
61a0a520f6
Codechange: Unify random trigger enums and turn them into enum classes. (#14066) 2025-04-21 20:03:34 +02:00
frosch
f399b8eb29 Codechange: Unify naming of NewGRF animation callbacks. 2025-04-21 19:06:13 +02:00
frosch
264abfafe6 Codechange: Rename storage of random triggers to include the term 'random'. 2025-04-21 19:06:13 +02:00
frosch
39220a5feb Codechange: Unify naming of NewGRF random trigger functions. 2025-04-21 19:06:13 +02:00
frosch
368d131fb7 Codechange: Use 'construction stage' consistently, instead of 'construction state'. 2025-04-21 19:06:13 +02:00
frosch
98445088b1
Codechange: Move VehicleEnteredDepotThisTick call to a more suitable position. (#14065) 2025-04-21 17:52:03 +02:00
Peter Nelson
7d03cee512
Change: Include dragged train in depot tile length display. (#14060)
In the depot, when dragging a train over another train, the tile length displayed now includes the length of the dragged train.

As the parts are not moved yet, length changes due to callbacks are not taken into account.
2025-04-21 16:37:10 +01:00
frosch
2a62eea005
Codefix: Comment style. (#14064) 2025-04-21 17:25:09 +02:00
Peter Nelson
5b2754fdee Change: Use standard boolean toggle buttons for game options toggles. 2025-04-21 16:23:11 +01:00
Peter Nelson
d89753b88d Codechange: Add dedicated widget for boolean toggle buttons. 2025-04-21 16:23:11 +01:00
Peter Nelson
e3d2d68bd4 Change: Draw boolean toggle as a slider widget.
This improves usability as the slider position indicates the state instead of a red/green colour change.
2025-04-21 16:23:11 +01:00
Rubidium
e3858e81dc Codechange: use std::string_view over const std::string& for finding files 2025-04-21 17:20:00 +02:00
frosch
354ad43edb
Codechange: Remove unnecessary string constructions. (#14063) 2025-04-21 16:46:31 +02:00
Peter Nelson
e1fdc10227
Fix e114ed357d: Incorrect test of object flags allowed HQ to be removed. (#14062) 2025-04-21 15:45:29 +01:00
Loïc Guilloux
305c892b3a
Change: "setting" console command now shows default value (#14061) 2025-04-21 16:00:37 +02:00
Peter Nelson
788845f731
Change: Allow Double-Ctrl+Click on default size box to clear saved size. (#14055) 2025-04-21 14:16:29 +01:00
Peter Nelson
0cf7048a67
Change: Don't select content when toggling its download status. (#14059)
This improves usability when toggling content sorted by status, as the list position no longer jumps to the now (de)selected item, making it easier to (de)select multiple items.
2025-04-21 13:20:52 +01:00
Peter Nelson
9ff2b4991f
Change: Add scrollbar to infrastructure window. (#14056)
Company infrastructure window will no longer overflow the screen when lots of rail and road types are present.

To further declutter the list, we now only show a value when the count for that item is non-zero.
2025-04-21 08:46:09 +01:00
translators
5502618ac3 Update: Translations from eints
romanian: 1 change by ALEX11BR
2025-04-21 04:45:21 +00:00
Peter Nelson
e9a92b8795
Fix: Odd drawing and crash if scrollbar is not tall enough. (#14052)
Under certain conditions the scrollbar "tab" could be too large for the scrollbar, and cause issues.

Caused by an off-by-one in height calculation.
2025-04-20 23:23:52 +01:00
frosch
689f55a0ea
Fix #14044: Negative string parameters from GS were rendered as zero. (#14049)
String parameters are always stored as uint64_t. Negative values are sign-extended to int64_t and then casted to uint64_t.
The same applies to encoded strings. But ScriptText encoded them as int64_t.

Co-authored-by: rubidium42 <rubidium42@users.noreply.github.com>
2025-04-20 23:01:49 +02:00
Rubidium
4e14f0ac3f Codechange: pass network tokens as std::string_view or with move semantics where appropriate 2025-04-20 22:43:24 +02:00
Rubidium
c13956a58a Codechange: use std::string_view for connection strings 2025-04-20 22:43:24 +02:00
Rubidium
31433882a4 Codechange: use std::string_view for passing NetworkError strings 2025-04-20 22:43:24 +02:00
frosch
8aa2f6b8a6
Codefix: StringConsumer integer parsing failed for the most negative value, which has no positive equivalent. (#14048) 2025-04-20 22:20:53 +02:00
Peter Nelson
fc45bb5a2b
Codechange: Replace bitstuffed VehicleEnterTileStatus. (#14027)
VehicleEnterTileStatus was an bitset-style enum, but bitstuffed with a StationID. However the StationID part was only used by trains, and only in two locations.

Instead, return just the enum bitset. The two places which require the StationID just call GetStationIndex() directly.
2025-04-20 21:10:02 +01:00
frosch
cb113cfed0 Codefix: Add missing header includes. 2025-04-20 22:06:18 +02:00
frosch
461b73e21b Codefix: stdafx.h and safeguards.h should be the first and last include in every source file, and not appear in any header file. 2025-04-20 22:06:18 +02:00
Rubidium
26de3404a4 Codechange: use std::string_view for sending chat messages 2025-04-20 13:31:41 +02:00
Rubidium
bb259b8e77 Codechange: use std::string_view for sending a remote console command (result) 2025-04-20 13:31:41 +02:00
Rubidium
d99edf2bbc Codechange: use std::string_view for kicking/banning 2025-04-20 13:31:41 +02:00
Rubidium
a0246bc8a7 Codechange: use std::string_view over std::string for NetworkTextMessage 2025-04-20 13:31:41 +02:00
Rubidium
a0e4dab771 Codechange: use std::string_view for NetworkAddress::IsInNetmask of std::string 2025-04-20 13:31:41 +02:00
frosch
ff2da0fc73 Codechange: Remove CircularTileSearch. 2025-04-20 12:50:45 +02:00
frosch
b956af631e Codechange: Replace CircularTileSearch with SpiralTileSequence. 2025-04-20 12:50:45 +02:00
frosch
0dada5a750 Codechange: Add SpiralTileSequence to iterate over a tile area the same ways as CircularTileSearch. 2025-04-20 12:50:45 +02:00
frosch
b9bd7b2cfe Codechange: Confusion of 'radius' and 'diameter' in variable names and comments. 2025-04-20 12:50:45 +02:00
Peter Nelson
e43e4327a7
Fix: Incorrect string display for autoreplace wagon removal status. (#14038) 2025-04-20 10:44:37 +01:00
translators
ee81313254 Update: Translations from eints
welsh: 1 change by Ansbaradigeidfran
vietnamese: 2 changes by KhoiCanDev
2025-04-20 04:43:37 +00:00
Peter Nelson
2b92d76e9d
Fix e49150f9ca: House picker crashes if selection is not available. (#14030)
This occurs because the extra invalidation in OnInit() also happens on construction, and too early.

Solution is to validate all instead of just position when invalidating in OnInit().
2025-04-19 15:04:18 +01:00
translators
d248f45d67 Update: Translations from eints
vietnamese: 7 changes by KhoiCanDev
2025-04-19 04:44:03 +00:00
frosch
43ea6c9b88 Codechange: Turn AyStar into an actual class with virtual methods instead of function pointers. 2025-04-19 00:24:15 +02:00
frosch
97ead8e241 Codechange: Remove unused options from AyStar. 2025-04-19 00:24:15 +02:00
frosch
53899c3c21 Codechange: Replace vehicle viewport hash macros with functions. 2025-04-18 23:41:37 +02:00
frosch
cde350dc01 Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette. 2025-04-18 23:41:37 +02:00
frosch
c2c5dae760 Codechange: Turn GREY_SCALE macro into constexpr function. 2025-04-18 23:41:37 +02:00
frosch
8f335a84cf Codechange: Turn GetCustom(Vehicle|Rotor)(Sprite|Icon) macros into functions. 2025-04-18 23:41:37 +02:00
frosch
8f8e997575 Codechange: Replace local macro with lambda. 2025-04-18 23:41:37 +02:00
frosch
68016031cf Codechange: Turn macros GetCompanyHQSize and IncreaseCompanyHQSize into functions. 2025-04-18 23:41:37 +02:00
frosch
0eb6964311 Codechange: Change ScreenshotCallback into a std::function, so there is no need for void* user data. 2025-04-18 22:43:41 +02:00
frosch
c09e825e0b Codechange: Change SetDateCallback into a std::function, so there is no need for void* user data. 2025-04-18 22:43:41 +02:00
frosch
0d4588688f Codechange: Manage script event queue using smart pointers. 2025-04-18 19:47:28 +02:00
frosch
b9f4ef3d78 Codechange: Move ScriptStorage constructor into source file, so private members can have partially incomplete types. 2025-04-18 19:47:28 +02:00
frosch
af14809697
Codechange: Add filename and line number to errors/warnings of the squirrel-exporters. (#14031) 2025-04-18 19:43:32 +02:00
frosch
50252cb5df
Codechange: Ini(Load|Save)WindowSettings expect a WindowDesc*, no void*. (#14029) 2025-04-18 18:44:58 +02:00
Peter Nelson
394adb654e
Codechange: Move GUI parts of badges to a separate file. (#14023) 2025-04-18 17:20:31 +01:00
Peter Nelson
67d6089f39
Change: Don't replace stripped control codes with '?' for scripts. (#14028) 2025-04-18 17:20:08 +01:00
frosch
45917dbaa3 Codechange: Remove unused macro strncasecmp. 2025-04-18 17:16:48 +02:00
frosch
84e175ce63 Codechange: Determine array length using 'std::size' instead of using a separate constant. 2025-04-18 17:16:48 +02:00
frosch
7cbf4f5560 Codechange: Expand the single usage of the macro CLRBITS. 2025-04-18 17:16:48 +02:00
frosch
d97936e77a Codechange: Replace ALIGN macro with C++11 alignas specifier. 2025-04-18 17:16:48 +02:00
frosch
f82e172610 Codechange: Expand and remove DEF_CONSOLE_CMD and DEF_CONSOLE_HOOK macros. 2025-04-18 17:16:48 +02:00
frosch
42deccc4f5 Codechange: Merge (IsOn|Toggle)(Snow|Desert) into (IsOn|Toggle)SnowOrDesert. 2025-04-18 16:33:26 +02:00
frosch
252376ce3e Codechange: Rename DrawRoadAsSnowDesert to DrawRoadAsSnowOrDesert to be consistent with other functions. 2025-04-18 16:33:26 +02:00
frosch
26db4ccf09
Codechange: Turn bit-stuffed FiosType enum into a struct. (#14019) 2025-04-18 15:20:55 +02:00
frosch
b862d4937f
Codechange: Turn custom vehicle spritenums into enum, and use them consistently. (#14022) 2025-04-18 15:19:28 +02:00
Peter Nelson
2c59838acb
Codechange: (re)set multiple bitset flags in one call. (#14017) 2025-04-18 14:07:57 +01:00
frosch
31e716449d
Codechange: Change StationNameInformation to not use macros. (#14020) 2025-04-18 15:06:46 +02:00
frosch
5aed046d11
Fix: [NewGRF] Strange things happened, when using the synchronised tile loop animation trigger for houses. (#14011) 2025-04-17 12:15:49 +02:00
translators
421f202539 Update: Translations from eints
luxembourgish: 103 changes by phreeze83
latvian: 1 change by lexuslatvia
2025-04-17 04:45:26 +00:00
Peter Nelson
1f83ea41fc
Fix: [NewGRF] PrepareLayout worked on a copy of the data resulting in bad sprite layouts. (#14013) 2025-04-16 21:27:36 +00:00
Peter Nelson
378ea52ac6 Codechange: Use EnumBitSet for CzechChooseFlags. 2025-04-16 19:44:28 +01:00
Peter Nelson
ea0817390f Codechange: Use EnumBitSet for CzechAllowFlags. 2025-04-16 19:44:28 +01:00
Peter Nelson
6ea10edef8
Codechange: Use std::unique_ptrs for handling station cargo display. (#14009)
Replaces manual management of raw pointers.
2025-04-16 19:43:45 +01:00
Peter Nelson
a281ac4674 Codefix: Information for NewGRF specs remained duplicated after loading.
After loading airports+tiles, industries+tiles, houses and objects, their specs are copied from the NewGRF's loading storage to the final global storage.

Instead, move the specs to the their new storage, and clear the NewGRF's storage once done. (Stations and RoadStops are different, and the NewGRF's storage is the final storage location.)
2025-04-16 19:43:07 +01:00
Peter Nelson
f9ab492e64 Codechange: Pass HouseSpec by reference to IsHouseSpecValid(). 2025-04-16 19:43:07 +01:00
translators
b57f3262ec Update: Translations from eints
spanish: 101 changes by MontyMontana
2025-04-16 04:44:48 +00:00
Peter Nelson
fa0814e257
Codefix: Codestyle consistency fixes. (#14008) 2025-04-15 20:57:13 +00:00
frosch
03ed59a004 Codechange: Turn AnimationStatus into an enum class. 2025-04-15 20:42:44 +02:00
frosch
47f0f4dd9e Fix: [NewGRF] Animation speed properties of houses and stations had wrong default. 2025-04-15 20:42:44 +02:00
frosch
301b209b87
Fix: [NewGRF] Roadstop animation/randomisation was not triggered on vehicle arrival. (#14003) 2025-04-15 14:53:29 +02:00
translators
5fad689782 Update: Translations from eints
norwegian (bokmal): 1 change by eriksorngard
2025-04-15 04:44:48 +00:00
Peter Nelson
5008568dfc
Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01:00
frosch
d2c9828b4c Codechange: Move IsUtf8Part to only file using it. 2025-04-14 18:56:23 +02:00
frosch
588fedb5db Codechange: Remove unused Utf8Consume, Utf8Decode, Utf8EncodedCharLen. 2025-04-14 18:56:23 +02:00
frosch
bf8a241f69 Codechange: Parse translation files using StringConsumer. 2025-04-14 18:10:14 +02:00
frosch
b27fd83ff1 Codechange: Parse translation strings using StringConsumer. 2025-04-14 18:10:14 +02:00
frosch
b81a35ea89 Codechange: Use StringConsumer and Builder in StrMakeValid and StrValid. 2025-04-14 18:07:23 +02:00
frosch
dc21fae18e Codechange: Add InPlaceReplacement to couple StringConsumer and Builder on the same buffer. 2025-04-14 18:07:23 +02:00
frosch
f5ffd4789b Codechange: Use StringConsumer in FormatString. 2025-04-14 16:57:41 +02:00
frosch
15a17d832f Codechange: Use StringConsumer in HandleNewGRFStringControlCodes. 2025-04-14 16:57:41 +02:00
frosch
98efd3c96e Codefix #13872: Use StringConsumer in TranslateTTDPatchCodes. 2025-04-14 16:57:41 +02:00
John Taylor
069edc1a4b
Fix #13954: Plotting graphs with limited data to the right. (#13956) 2025-04-14 16:57:07 +02:00
translators
3dacf46870 Update: Translations from eints
vietnamese: 7 changes by KhoiCanDev
2025-04-14 04:44:46 +00:00
Peter Nelson
d48bc18721
Codechange: Rename badge_class to class_index and badge_classes to gui_classes internally. (#13995)
These names are already used in some places, so this brings a bit of consistency.
2025-04-13 21:06:09 +01:00
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 42fbcec76f: 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 4bd72e4a78: 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