Commit Graph

23837 Commits

Author SHA1 Message Date
Loïc Guilloux
0d4346c8dc
Fix #13727, bdd1406: Incorrect ls.vehicle_names size for TTO saves (#13732) 2025-03-03 22:59:57 +00:00
Peter Nelson
aec1046d19 Codechange: Drop default widget strings for goal window. 2025-03-03 22:47:07 +00:00
Peter Nelson
3757d8affe Codechange: Drop default widget strings for league window. 2025-03-03 22:47:07 +00:00
Peter Nelson
d587426912 Codechange: Drop default widget strings for story window. 2025-03-03 22:47:07 +00:00
Peter Nelson
c7d6934816 Codechange: Move to GetWidgetString for town windows. 2025-03-03 22:34:22 +00:00
Peter Nelson
92e4ef7e77 Codechange: Move to GetWidgetString for toolbar windows. 2025-03-03 22:34:22 +00:00
Peter Nelson
e81884ab31 Codechange: Move to GetWidgetString for timetable window. 2025-03-03 22:34:22 +00:00
Rubidium
3880cc1b57 Codechange: swap x/y axes for dirty blocks around 2025-03-03 23:25:24 +01:00
Rubidium
ec1b9e53f4 Codechange: use std::vector over ReallocT for dirty blocks 2025-03-03 23:25:24 +01:00
Peter Nelson
92b723cb4e
Fix #13723: Invalid string parameters for build airport window. (#13724) 2025-03-03 22:17:54 +00:00
Peter Nelson
94c6221dff
Fix edf9f597ec: Screenshot with non-wallclock date saved with wrong filename. (#13721) 2025-03-03 21:44:48 +00:00
Peter Nelson
deb3755acb Codechange: Move to GetWidgetString for waypoint window. 2025-03-03 21:24:18 +00:00
Peter Nelson
a65db3be0d Codechange: Move to GetWidgetString for viewport window. 2025-03-03 21:24:18 +00:00
Peter Nelson
e1f9159b51 Codechange: Move to GetWidgetString for vehicle windows. 2025-03-03 21:24:18 +00:00
Peter Nelson
d58eb15a0f Fix #13706, Fix #13717: Replace single new line with double new line in precomposed errors. 2025-03-03 21:23:45 +00:00
Peter Nelson
92fa1b4444 Codechange: Move to GetWidgetString for station windows. 2025-03-03 21:23:13 +00:00
Peter Nelson
09806d6f9b Codechange: Move to GetWidgetString for smallmap window. 2025-03-03 21:23:13 +00:00
Peter Nelson
8f62e40bc7 Codechange: Move to GetWidgetString for sign windows. 2025-03-03 21:23:13 +00:00
Peter Nelson
3d253a9702 Codechange: Move to GetWidgetString for settings windows. 2025-03-03 21:23:13 +00:00
Peter Nelson
7a9a3ef94a Codechange: Move to GetWidgetString for script windows. 2025-03-03 21:23:13 +00:00
Peter Nelson
c7846f4629 Codechange: Move to GetWidgetString for road windows. 2025-03-03 21:20:14 +00:00
Peter Nelson
039b5a2662 Codechange: Move to GetWidgetString for rail windows. 2025-03-03 21:20:14 +00:00
Peter Nelson
ee07790a87 Codechange: Move to GetWidgetString for osk window. 2025-03-03 21:19:44 +00:00
Peter Nelson
06b2751b11 Codechange: Move to GetWidgetString for orders window. 2025-03-03 21:19:44 +00:00
Peter Nelson
6e0e46fd69 Codechange: Move to GetWidgetString for object window. 2025-03-03 21:19:44 +00:00
Peter Nelson
f6bc85aeb2 Codechange: Move to GetWidgetString for news windows. 2025-03-03 21:19:44 +00:00
Peter Nelson
3fbd6f776c Codechange: Move to GetWidgetString for newgrf windows. 2025-03-03 21:19:44 +00:00
Peter Nelson
6d1d320a7d Codechange: Move to GetWidgetString for music window. 2025-03-03 20:54:48 +00:00
Peter Nelson
7e43106a92 Codechange: Move to GetWidgetString for misc windows. 2025-03-03 20:54:48 +00:00
Peter Nelson
997b013e6b Codechange: Move to GetWidgetString for industry window. 2025-03-03 20:54:48 +00:00
Peter Nelson
a22b150c98 Codechange: Move to GetWidgetString for group window. 2025-03-03 20:54:09 +00:00
Peter Nelson
015c081cea Codechange: Move to GetWidgetString for graph window. 2025-03-03 20:54:09 +00:00
Peter Nelson
e959dcd49d Codechange: Move to GetWidgetString for world gen windows. 2025-03-03 20:54:09 +00:00
Peter Nelson
cd742aa97b
Codechange: Drop STR_JUST_STRING for goal window. (#13710)
Missed from previous changes.
2025-03-03 18:35:00 +00:00
Rubidium
bb2b890c88 Codechange: manage the ParagraphLayouter's buffer with std::unique_ptr 2025-03-03 16:42:48 +01:00
Rubidium
3790f29156 Codechange: use std::allocator over malloc/free for Squirrel memory management 2025-03-03 16:42:17 +01:00
Loïc Guilloux
c5e01c1907
Fix: More AI than max_no_competitors could start with competitors_interval=0 (#13670) 2025-03-03 13:39:31 +01:00
Peter Nelson
bb91113186 Codechange: Move to GetWidgetString for framerate window. 2025-03-03 08:53:14 +00:00
Peter Nelson
d7ccd6a413 Codechange: Move to GetWidgetString for error window. 2025-03-03 08:53:14 +00:00
Peter Nelson
16d985efe0 Codechange: Move to GetWidgetString for depot window. 2025-03-03 08:53:14 +00:00
Peter Nelson
d061c1293b Codechange: Move to GetWidgetString for date window. 2025-03-03 08:53:14 +00:00
Peter Nelson
72832894e4
Codechange: Drop SetToolTip for window caption. (#13708)
This is set by default so isn't needed.
2025-03-03 08:52:53 +00:00
translators
e43c4e375c Update: Translations from eints
chinese (traditional): 61 changes by KogentaSan
spanish (mexican): 35 changes by absay
chinese (simplified): 16 changes by WenSimEHRP
russian: 13 changes by Ln-Wolf
finnish: 13 changes by hpiirai
catalan: 9 changes by J0anJosep
portuguese: 10 changes by azulcosta, 3 changes by jcteotonio
portuguese (brazilian): 13 changes by pasantoro
polish: 13 changes by pAter-exe
2025-03-03 04:45:18 +00:00
Peter Nelson
a2accbccc3
Fix #13703: Don't set error owner for town-originated errors. (#13705) 2025-03-02 21:59:55 +00:00
Peter Nelson
712ed867b2
Codechange: Move to GetWidgetString for company windows. (#13704) 2025-03-02 21:45:17 +00:00
Peter Nelson
4ee57ed492
Codechange: Move to GetWidgetString for build vehicle window. (#13702) 2025-03-02 21:26:44 +00:00
Rubidium
7f674b09a4 Codefix: std::optional<const std::string> is weird; why is modifying the string copy not allowed? 2025-03-02 20:16:25 +01:00
Peter Nelson
e9609e4558
Codechange: Use GetWidgetString for network windows. (#13699) 2025-03-02 18:51:54 +00:00
Peter Nelson
2f75f3d147
Codechange: Use GetWidgetString for goal, league and story windows. (#13700) 2025-03-02 18:33:11 +00:00
Peter Nelson
913eadd6b0
Codechange: Use GetWidgetString for NewGRF debug window. (#13697) 2025-03-02 12:46:01 +00:00
glx22
a6f558ce2a Add: [Script] Saving/loading ScriptList 2025-03-02 13:41:12 +01:00
glx22
d6a261439b Add: [Script] Framework for loading/saving selected ScriptObject 2025-03-02 13:41:12 +01:00
Rubidium
8d63aea929 Codechange: replace SetStringParameters with GetWidgetString for AI, airport and autoreplace windows 2025-03-02 11:04:15 +01:00
Rubidium
d94d421772 Codechange: prepare for replacement of SetStringParameter by GetWidgetString 2025-03-02 11:04:15 +01:00
Peter Nelson
321debf7b1
Fix 4389321623: Invalid string parameters in cheat window. (#13696)
Strings unnecessarily consumed an extra parameter, and change company use unformatted string.
2025-03-02 09:02:14 +00:00
Peter Nelson
edf9f597ec Codechange: Use parameterised GetString() for remaining windows. 2025-03-02 07:29:25 +00:00
Peter Nelson
4889e4d7f1 Codechange: Use parameterised GetString() for statusbar. 2025-03-02 07:29:25 +00:00
Peter Nelson
3fda5a8a58 Codechange: Use parameterised GetString() for jukebox window. 2025-03-02 07:29:25 +00:00
Peter Nelson
5f073670d7 Codechange: Use parameterised GetString() for news window. 2025-03-02 07:29:25 +00:00
Peter Nelson
937fb12d9a Codechange: Use parameterised GetString() for file windows. 2025-03-02 07:29:25 +00:00
Peter Nelson
4389321623 Codechange: Use parameterised GetString() for cheat window. 2025-03-02 07:29:25 +00:00
Peter Nelson
382d30dbb2
Codechange: Use parameterised GetString() for settings window. (#13695) 2025-03-02 07:29:00 +00:00
translators
f360913ebf Update: Translations from eints
spanish (mexican): 6 changes by absay
korean: 45 changes by telk5093
2025-03-02 04:43:20 +00:00
Peter Nelson
9d7d24465d
Codechange: Use parameterised GetString() for group window. (#13693) 2025-03-01 23:42:01 +00:00
Peter Nelson
78aebfc693
Codechange: Use parameterised GetString() for station view. (#13692) 2025-03-01 23:04:51 +00:00
Peter Nelson
600450f8a4
Codechange: Use parameterised GetString() for depot window. (#13691) 2025-03-01 22:27:40 +00:00
Peter Nelson
2aa99a70ff
Codechange: Use parameterised GetString() for company windows. (#13690) 2025-03-01 22:25:11 +00:00
Peter Nelson
8216938276
Codechange: Use parameterised GetString() for world generation window. (#13689) 2025-03-01 22:18:36 +00:00
Peter Nelson
5d026ef118
Codechange: Use parameterised GetString() for framerate window. (#13688) 2025-03-01 22:17:48 +00:00
Peter Nelson
170002ff7e
Codechange: Use parameterised GetString() for industry window. (#13685) 2025-03-01 19:59:43 +00:00
Peter Nelson
b92172e3d2
Codechange: Use parameterised GetString() for smallmap window. (#13684) 2025-03-01 18:24:14 +00:00
Peter Nelson
1bd841b896
Codechange: Use parameterised GetString() for graph windows. (#13683) 2025-03-01 17:22:18 +00:00
Peter Nelson
e0e845fc4d
Fix #13681: Missing unused string parameter for NewGRF parameter string. (#13682) 2025-03-01 16:12:52 +00:00
Peter Nelson
c81d9b43ea
Codechange: Use parameterised GetString() for town windows. (#13679) 2025-03-01 13:20:05 +00:00
Peter Nelson
226a44bf86
Fix: NewGRF text with colour codes affects text in error window. (#13678)
Wrap text with push and pop colour commands so that the correct colour is used for the remainder of the string.
2025-03-01 12:51:50 +00:00
Rubidium
af1b1a31d1 Codechange: update string parameter numbers in translations 2025-03-01 12:42:55 +01:00
Rubidium
8886503ba9 Codechange: Use parameterised GetString for NetworkTextMessage 2025-03-01 12:42:55 +01:00
Peter Nelson
6d2f17b92f
Codechange: Use parameterised GetString() for various build windows. (#13676) 2025-03-01 11:08:46 +00:00
Peter Nelson
63812a45bb
Codechange: Pass single rect to DrawString calls instead of separate parameters. (#13675) 2025-03-01 10:12:43 +00:00
translators
6afde67872 Update: Translations from eints
spanish (mexican): 6 changes by absay
chinese (simplified): 34 changes by WenSimEHRP
dutch: 46 changes by Afoklala
2025-03-01 04:42:34 +00:00
Peter Nelson
57f0ed716e
Codechange: Use parameterised GetString() for drawing NewGRF info. (#13674) 2025-02-28 21:05:12 +00:00
Rubidium
09716dba75 Codechange: do not use MallocT for the pool
Needed to make the placement new operator use Tindex over size_t because of
ambiguity for the delete operator variant that also has the size.
2025-02-28 20:15:42 +01:00
Rubidium
426b03b31a Codechange: do not zero pool item upon allocation any more 2025-02-28 20:15:42 +01:00
Rubidium
15dcf56dad Codechange: remove ZeroedMemoryAllocator 2025-02-28 20:12:44 +01:00
Rubidium
adb0858c05 Codechange: remove ZeroedMemoryAllocator from Window 2025-02-28 20:12:44 +01:00
Peter Nelson
94783fe2ed
Codechange: Use EnumBitSet for ScriptConfigFlags. (#13669) 2025-02-28 18:57:40 +00:00
translators
e70f20a781 Update: Translations from eints
russian: 3 changes by Ln-Wolf
2025-02-28 04:44:13 +00:00
Peter Nelson
ddb502d097
Codechange: Use parameterised GetString() for script-related windows. (#13671) 2025-02-27 23:53:04 +00:00
Peter Nelson
e2c1b9f03e
Codechange: Use only raw strings in drop down lists. (#13667)
Strings with parameters are now pre-formatted, avoiding global parameters.

Helper functions still allow StringID.
2025-02-27 21:11:16 +00:00
Rubidium
fd8c33d051 Codechange: explicitly initialise member variables of Windows 2025-02-27 21:19:28 +01:00
Peter Nelson
8813a798e7
Codechange: Always pass raw strings to TextFilter's AddLine(). (#13666)
Remove StringID overload, so callers have to preformat the string.
2025-02-27 19:21:43 +00:00
Rubidium
b376e2655a Codechange: explicitly initialise member variables of Windows 2025-02-27 20:06:06 +01:00
Rubidium
c540c2bcf7 Codechange: explicitly initialise member variables of Windows 2025-02-27 19:58:31 +01:00
SamuXarick
af32ce3710
Cleanup: Remove unused member in ScriptDebugWindow (#13664) 2025-02-27 14:17:31 +01:00
Rubidium
f69968f2bc Codechange: explicitly initialise member variables of Windows 2025-02-27 12:21:06 +01:00
translators
566a5196f2 Update: Translations from eints
english (au): 3 changes by krysclarke
chinese (traditional): 6 changes by KogentaSan
spanish (mexican): 73 changes by absay
english (us): 43 changes by 2TallTyler
chinese (simplified): 3 changes by WenSimEHRP
greek: 3 changes by gh658804
finnish: 6 changes by hpiirai
portuguese: 3 changes by azulcosta
portuguese (brazilian): 3 changes by pasantoro
polish: 6 changes by pAter-exe
2025-02-27 04:45:11 +00:00
Loïc Guilloux
e769c0392e
Cleanup: [Script] Remove some dead code (#13660) 2025-02-26 21:37:07 +01:00
Peter Nelson
f10ece41f8
Codechange: Split SettingEntry-related code to own file. (#13663) 2025-02-26 19:50:02 +00:00
translators
dddad0dcc5 Update: Translations from eints
chinese (traditional): 37 changes by KogentaSan
spanish (mexican): 1 change by absay
chinese (simplified): 3 changes by WenSimEHRP
catalan: 38 changes by J0anJosep
portuguese: 42 changes by azulcosta
polish: 4 changes by pAter-exe
2025-02-26 04:46:09 +00:00
Peter Nelson
31bd85b743
Codechange: Use parameterised GetString() for goal, league and story windows. (#13662) 2025-02-25 22:55:06 +00:00
Peter Nelson
a8f56fe7b3
Add: Variable to test how many vehicles in a chain contain a specific badge. (#13594) 2025-02-25 20:55:11 +00:00
Loïc Guilloux
ae72e15951
Codefix b2c5712: [Script] Squirrel::GetRealInstance doesn't work with negative index (#13658) 2025-02-25 13:13:31 +01:00
Peter Nelson
f1b683b372 Change: Show the type of land covered by snow. 2025-02-25 08:22:46 +00:00
Peter Nelson
3cf9b15959 Codechange: Handle SnowTile state separately from ClearGround.
This removes the need for ClearGround to pretend that CLEAR_SNOW exists.
2025-02-25 08:22:46 +00:00
translators
02a1f59a6c Update: Translations from eints
english (au): 39 changes by krysclarke
chinese (traditional): 66 changes by KogentaSan
spanish (mexican): 65 changes by absay
chinese (simplified): 97 changes by WenSimEHRP
greek: 39 changes by gh658804
russian: 42 changes by Ln-Wolf
finnish: 39 changes by hpiirai
portuguese (brazilian): 39 changes by pasantoro
polish: 52 changes by pAter-exe
2025-02-25 04:43:08 +00:00
Loïc Guilloux
c06f5cff09
Codefix b2c5712: [Script] Properly check sq_instanceof return value (#13657) 2025-02-24 21:09:04 +00:00
Rubidium
02f040b22a Codechange: remove unused alloc_func.hpp includes 2025-02-24 20:00:19 +01:00
Rubidium
f6ce8d1b10 Codechange: replace C-style memory management in MacOS code 2025-02-24 16:04:22 +01:00
translators
416f6d54d2 Update: Translations from eints
spanish (mexican): 5 changes by absay
french: 6 changes by ottdfevr
portuguese: 1 change by azulcosta
polish: 6 changes by pAter-exe
2025-02-24 04:43:16 +00:00
Peter Nelson
96f260e718 Codechange: Pass TileDesc by reference. 2025-02-23 23:00:51 +00:00
Peter Nelson
012daaa3d9 Codechange: Use member initialisation for TileDesc members. 2025-02-23 23:00:51 +00:00
Peter Nelson
6e10584b91
Codechange: Use EncodedStrings for News messages. (#13654) 2025-02-23 20:24:02 +00:00
Rubidium
0afae7c546 Codechange: explicitly initialise member variables of Windows 2025-02-23 14:53:42 +01:00
Peter Nelson
1b6a77a190 Codechange: Update translations for parameter changes. 2025-02-23 13:52:13 +00:00
Peter Nelson
7fd0e6c27d Codechange: Use local string parameters for order and timetable windows.
Order display is now composed of concatenated strings instead of a complex 10-parameter format string, which simplifies things and fixes duplicate spaces.
2025-02-23 13:52:13 +00:00
Rubidium
23ba18ada7 Codechange: remove SimpleSpriteAllocator 2025-02-23 14:44:11 +01:00
Rubidium
b50cf8f252 Codechange: rework OpenGL backend to not need emplacement new and manual deconstructor calls 2025-02-23 14:44:11 +01:00
SamuXarick
718a45b845
Fix 11a8b71: Set direction and rotation of ships upon building (#13625) 2025-02-22 23:33:25 +00:00
Peter Nelson
b28dca2222
Codechange: Preprocess text ref stack parameters. (#13642)
NewGRF text ref stack is now processed in advance, creating parameters as necessary, and then encoding this into an EncodedString.
2025-02-22 22:03:38 +00:00
Peter Nelson
4ac81656ee
Codechange: Simplify some calls to DrawStringMultiLine(). (#13643)
Sometimes the bottom is passed as UINT16_MAX for no reason. In this case just pass the rect.

Other times it's to extend the window height; in that case just extend the rect itself.
2025-02-22 20:41:40 +00:00
Rubidium
b264a4864b Codechange: make statistics from CompanyEconomyEntry use C++ constructs 2025-02-22 16:33:05 +01:00
Rubidium
24a7cde9cc Codechange: explicitly initialise Company member variables 2025-02-22 16:33:05 +01:00
Rubidium
8b7c92dfe3 Codechange: explicitly initialise NewGRF-pool-object member variables 2025-02-22 15:34:44 +01:00
Rubidium
b64e8c0aea Codechange: use std::vector/std::span over MallocT for NewGRF bridge sprites 2025-02-22 15:34:32 +01:00
Rubidium
7121bc9f31 Codechange: remove ZeroedMemoryAllocator from OpenGLBackend 2025-02-22 15:22:44 +01:00
Rubidium
3e511f2ce7 Codechange: remove ZeroedMemoryAllocator from GRFFile 2025-02-22 14:58:26 +01:00
Rubidium
5cee804f98 Codechange: remove ZeroedMemoryAllocator from NWidgetBase 2025-02-22 14:38:33 +01:00
Peter Nelson
bb4ac915ff
Fix 8f14894024: Badge widths were not updated on interface scale change. (#13630)
Prepare GUI badge class lists in OnInit() method of Windows, so that they handle scaling changes.
2025-02-22 13:29:52 +00:00
Jonathan G Rennison
8566030c53
Cleanup: Adjustments to comments to match code changes (#13636) 2025-02-22 13:28:35 +00:00
Peter Nelson
2b80812922
Codechange: Use parameterised GetString() in network-related windows. (#13635) 2025-02-22 13:16:47 +00:00
SamuXarick
847fbe3348
Fix: [Script] Set DummyAI Api version to last available (#13610) 2025-02-22 12:58:29 +01:00
Peter Nelson
b13922fb48 Codechange: Update translations for parameter position changes. 2025-02-22 10:33:22 +00:00
Peter Nelson
24d327a30b Codechange: Use parameterised-GetString for vehicle related windows. 2025-02-22 10:33:22 +00:00
Peter Nelson
0428f8c667 Codechange: Add AppendStringWithArgsInPlace() function. 2025-02-22 10:33:22 +00:00
Peter Nelson
04a16a6b68 Codechange: Add GetParamMaxDigits/Value() functions.
Similar to SetDParamMaxDigits/Value(), except the value is returned instead of being set into a parameter.
2025-02-22 10:33:22 +00:00
Peter Nelson
4c99b5b368 Codechange: Return pair from GetBroadestDigit instead of out parameters. 2025-02-22 10:33:22 +00:00
translators
9a8d9e4e48 Update: Translations from eints
spanish (mexican): 9 changes by absay
galician: 30 changes by pvillaverde
chinese (simplified): 1 change by WenSimEHRP
catalan: 1 change by J0anJosep
latvian: 30 changes by lexuslatvia
dutch: 4 changes by Afoklala
2025-02-22 04:44:59 +00:00
translators
cc93699459 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
spanish (mexican): 3 changes by absay
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-02-21 04:45:52 +00:00
Peter Nelson
f4b1bd30f2 Codechange: Codestyle changes for Script League table window. 2025-02-20 22:41:50 +00:00
Peter Nelson
17a4fcefde Fix: League table window ignored the minimal size in its widget description. 2025-02-20 22:41:50 +00:00
Peter Nelson
9b65786055
Fix: Incorrect snow density when making rocks snowy. (#13626)
Rocks do not use density, but snowy rocks use snow density. Therefore it should start at zero like non-rocky land.
2025-02-20 18:57:17 +00:00
Rubidium
d0ba6ed1f4 Codechange: explicitly initialise network pool item related member variables 2025-02-20 16:58:51 +01:00
translators
f89924a727 Update: Translations from eints
spanish (mexican): 12 changes by absay
2025-02-20 04:42:49 +00:00
Peter Nelson
2f8be54567
Fix cb23bc5e2a: Cargo types not initialised for house picker produced display. (#13624)
Instead of using a CargoArray and passing to BuildCargoAcceptanceString, use the simpler CargoTypes with {CARGO_LIST}.
2025-02-19 19:01:03 +00:00
glx22
a577229e95 Revert d7bd67cda3: [Scripts] "_typeof" metamethod negatively affects old scripts 2025-02-19 19:21:50 +01:00
Peter Nelson
3d5083218d
Fix #13621: Incorrect Owner text in land area info. (#13622)
An if-condition was accidentally inverted in 2d7d085e8e, and an empty parameter is required.
2025-02-19 09:14:03 +00:00
translators
f4b75213d8 Update: Translations from eints
spanish (mexican): 76 changes by absay
korean: 4 changes by telk5093
catalan: 4 changes by J0anJosep
2025-02-19 04:45:02 +00:00
Peter Nelson
9de913dd21
Codechange: Use helper to set grf_prop's grffile and grfid together. (#13612) 2025-02-18 22:33:13 +00:00
Rubidium
37d549d395 Codefix 35e58f68e4: afterload did not properly set airport rotation 2025-02-18 23:09:02 +01:00
Rubidium
704f5e2500 Codechange: explicitly initialise Sign member variables 2025-02-18 22:41:20 +01:00
Rubidium
11a8b71504 Codechange: explicitly initialise Vehicle related member variables 2025-02-18 22:11:04 +01:00
Rubidium
6327fa4623 Codechange: explicitly initialise StoryPage and StoryPageElement member variables 2025-02-18 22:10:43 +01:00
Rubidium
8a4493f990 Codechange: explicitly initialise Town member variables 2025-02-18 22:10:31 +01:00
Rubidium
ce2ae07233 Codechange: explicitly initialise Subsidy member variables 2025-02-18 22:10:10 +01:00
glx22
d7bd67cda3 Add: [Scripts] "_typeof" metamethod 2025-02-18 21:19:15 +01:00
Rubidium
35e58f68e4 Codechange: explicitly initialise (Base)Station related member variables 2025-02-18 20:02:23 +01:00
Rubidium
5ccbaa6990 Codechange: explicitly initialise OrderBackup and OrderList member variables 2025-02-18 20:02:09 +01:00
Rubidium
0a285e1a86 Codechange: explicitly initialise Goal member variables 2025-02-18 20:01:58 +01:00
Rubidium
8682f39966 Codechange: explicitly initialise Object member variables 2025-02-18 18:51:44 +01:00
Rubidium
6eb2dec338 Codechange: explicitly initialise LinkGraph and LinkGraphJob member variables 2025-02-18 18:41:31 +01:00
Rubidium
35e7255a5a Codechange: explicitly initialise LeaugeTable and LeagueTableElement member variables 2025-02-18 18:41:14 +01:00
Rubidium
7e471bf04d Codechange: explicitly initialise Industry member variables 2025-02-18 18:18:14 +01:00
Rubidium
63e99871c1 Codechange: explicitly initialise Group member variables 2025-02-18 18:17:56 +01:00
Rubidium
b4a4ca83ff Codechange: explicitly initialise EngineRenew member variables 2025-02-18 07:21:11 +01:00
Rubidium
0449dc48c8 Codechange: explicitly initialise Depot member variables 2025-02-18 07:21:04 +01:00
Rubidium
1f3198a395 Codechange: explicitly initialise Engine member variables 2025-02-18 07:20:58 +01:00
Rubidium
bb81139c1f Codechange: explicitly initialise CargoPayment member variables 2025-02-18 07:20:49 +01:00
translators
53dd1258a7 Update: Translations from eints
english (au): 3 changes by krysclarke
norwegian (bokmal): 4 changes by eriksorngard
chinese (traditional): 4 changes by KogentaSan
spanish (mexican): 67 changes by absay
english (us): 4 changes by 2TallTyler
chinese (simplified): 54 changes by WenSimEHRP
arabic (egypt): 77 changes by ImMorrow
greek: 3 changes by gh658804
russian: 3 changes by Ln-Wolf
finnish: 3 changes by hpiirai
portuguese: 3 changes by azulcosta
portuguese (brazilian): 3 changes by pasantoro
polish: 3 changes by pAter-exe
2025-02-18 04:43:06 +00:00
Peter Nelson
370c702549
Add: Show badges in NewGRF debug window. (#13597) 2025-02-17 22:15:45 +00:00
Peter Nelson
7a23bfa747
Add: Filter purchase lists by badge text. (#13588) 2025-02-17 17:28:26 +00:00
Peter Nelson
5e43aaff35
Add: Also show badges in fund industry list. (#13590) 2025-02-17 17:27:57 +00:00
Peter Nelson
af7054dcb6
Fix 8f14894024: Badge name list did not use translatable separator. (#13591) 2025-02-17 17:27:22 +00:00
translators
2f66f74035 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
spanish (mexican): 264 changes by absay
greek: 1 change by gh658804
russian: 2 changes by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 4 changes by pAter-exe
2025-02-17 04:43:27 +00:00
Peter Nelson
ed57b9c297
Fix faa845398f: Crash when loading tile layout with no building sprites. (#13589)
Tile layouts are permitted to have no building sprites, therefore the test for an empty sequence of sprites is not valid.
2025-02-16 22:29:56 -05:00
Peter Nelson
13944222f3
Fix d13b0e0813: "New vehicle now available!" message is wrong colour. (#13586) 2025-02-16 23:00:24 +00:00
Peter Nelson
8f14894024 Add: NewGRF Badges. 2025-02-16 22:24:25 +00:00
Peter Nelson
ca3b5ed6c1 Codechange: Allow iterating a BaseBitSet. 2025-02-16 22:24:25 +00:00
Peter Nelson
0af5d5a9e6 Codechange: Make non-generic GRF string ids unique per feature.
This prevents engine name strings conflicting with generic strings if more than 53,248 engines are defined.
2025-02-16 22:24:25 +00:00
Peter Nelson
154896ce55
Codechange: Use GetString() with local parameters in script functions. (#13585) 2025-02-16 21:27:25 +00:00
Rubidium
fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Peter Nelson
d13b0e0813
Codechange: Build engine preview strings from separate strings. (#13579)
This replaces stuffing substrings and parameters in various global parameters and uses local parameters instead.
2025-02-16 19:02:02 +00:00
Rubidium
af00b835a1 Codechange: remove transitional supports from the pool 2025-02-16 19:31:37 +01:00
Rubidium
576a96c685 Codechange: let the ReusableBuffer use std::vector as storage 2025-02-16 19:31:13 +01:00
Rubidium
59df0ff496 Codechange: strongly type StationID 2025-02-16 18:25:51 +01:00
Patric Stout
155aaa5967 Fix fd2949d: use std::prev() to walk back from a possible string::end() 2025-02-16 16:36:25 +01:00
Patric Stout
2eb32ece6d Fix fd2949d: std::string can reallocate on insert() 2025-02-16 16:36:25 +01:00
Peter Nelson
3ade64954c
Change: Restore wider spacers in main toolbars. (#12039)
Width for all spacers was included only due to an off-by-one from counting buttons and not excluding the normally hidden switcher button.

Spacer width of quarter the button width is now included explicitly,
2025-02-16 14:51:07 +00:00
Rubidium
70c9f3963c Codechange: strongly type VehicleID 2025-02-16 14:50:15 +01:00
Rubidium
1003967267 Codechange: strongly type TownID 2025-02-16 14:50:15 +01:00
Rubidium
d3408a4542 Codechange: strongly type IndustryID 2025-02-16 14:50:15 +01:00
Rubidium
7e04651220 Codechange: strongly type EngineID 2025-02-16 14:50:15 +01:00
Rubidium
17b97e5d1b Codechange: introduce ConvertibleThroughBase helper 2025-02-16 14:50:15 +01:00
Rubidium
380e7b48ce Codechange: use std::variant instead of a custom version for news references 2025-02-16 14:50:15 +01:00
Rubidium
2cb59b1856 Codechange: make VehicleID an enum 2025-02-16 14:50:15 +01:00
Rubidium
c25c3e8710 Codechange: make IndustryID an enum 2025-02-16 14:50:15 +01:00
Rubidium
9015c3651f Codechange: make EngineID an enum 2025-02-16 14:50:15 +01:00
Rubidium
ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Rubidium
5401ab1f7b Codechange: use ReferenceThroughBaseContainer for containers that are index by CompanyID 2025-02-16 14:02:18 +01:00
Rubidium
1ffc950e22 Codechange: use prefix operator++ for CompanyID iterations 2025-02-16 14:02:18 +01:00
Rubidium
b0eb8fe4db Codechange: introduce ConvertibleThroughBase helpers 2025-02-16 14:02:18 +01:00
Rubidium
bdd14063a0 Codechange: move vehicle name to LoadgameState and change to std::vector 2025-02-16 13:45:07 +01:00
Rubidium
11d48aa47c Codechange: do not use ZeroedMemoryAllocator for NewGRFSpriteLayout 2025-02-16 13:44:46 +01:00
Rubidium
2d30df8110 Codefix: 'Declaration hides variable' 2025-02-16 13:44:37 +01:00
Peter Nelson
443d7ece29
Codefix 75387b9e2b: Prefer using EnumBitSet.base() instead of shifting StationFacility. (#13575) 2025-02-16 11:52:40 +00:00
Rubidium
e8beb0eff3 Codechange: add support for std::variant in EndianBuffer 2025-02-16 12:44:10 +01:00
Rubidium
a50c953854 Codefix: Clone should make a clone, not copy some data to another instance 2025-02-16 12:31:25 +01:00
Rubidium
faa845398f Codechange: use std::vector for NewGRFSpriteLayout registers 2025-02-16 12:31:25 +01:00
Rubidium
e7595c6c85 Codechange: pass oldloader LoadgameState by reference instead of pointer 2025-02-16 12:31:14 +01:00
Rubidium
44506ebc86 Codechange: use span size over terminator object 2025-02-16 11:19:12 +01:00
Peter Nelson
2d7d085e8e
Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00
Peter Nelson
43c7865ca2
Fix #13570: Query window's caption was no longer visible. (#13572) 2025-02-16 10:00:50 +00:00
translators
6283631155 Update: Translations from eints
spanish (mexican): 24 changes by absay
vietnamese: 2 changes by KhoiCanDev
french: 14 changes by glx22
2025-02-16 04:42:07 +00:00
Rubidium
8b7460759a Codechange: rework StringFilter to not need MallocT anymore 2025-02-15 23:43:57 +01:00
Su
4a37b6448f
Change: Make tree placement at world generation look more organic (#13515)
Trees are now placed in irregular blob shapes instead of repetitive diamond shapes.

---------

Co-authored-by: Susan <su+git@angel-island.zone>
Co-authored-by: Peter Nelson <peter1138@openttd.org>
2025-02-15 20:54:02 +00:00
Rubidium
fd2949d559 Codechange: use std::string as backing for textbuf 2025-02-15 21:52:55 +01:00
Rubidium
ad8f394835 Codechange: introduce string::iterator aware Utf8Decode, Utf8Encode and Utf8PrevChar 2025-02-15 21:52:55 +01:00
Rubidium
672c5f0d98 Codefix: 'Short global name' 2025-02-15 21:06:28 +01:00
Peter Nelson
cb23bc5e2a
Add: Show cargo types produced by building in house picker. (#13561) 2025-02-15 15:06:58 +00:00
Peter Nelson
04708736d9
Codechange: Use EnumBitSet for CommandFlags. (#13560) 2025-02-15 09:36:20 +00:00
translators
f620ba9d05 Update: Translations from eints
dutch: 25 changes by Afoklala
2025-02-15 04:44:38 +00:00
Peter Nelson
ff7eb996e6
Codechange: Use variable storage for GrfProps with cargo-type groups. (#13557)
Slots are only allocated when used instead of being reserved.

Array-based GrfProps are still used when the number of options is more limited.
2025-02-14 18:30:17 +00:00
Rubidium
4fe3f0ccdd Codechange: simplify management of temporary Engine in saveload 2025-02-14 18:35:12 +01:00
Rubidium
069ff846e4 Codechange: use std::vector/std::span for DrawTileSprites over malloc-ed table 2025-02-14 16:01:45 +01:00
Peter Nelson
6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. (#13553) 2025-02-14 08:30:04 +00:00
translators
3518d7e0f1 Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
2025-02-14 04:42:55 +00:00
merni-ns
b678e5ddd1 Fix #12925: Prevent cost estimates for settings changes 2025-02-14 04:36:24 +01:00
Peter Nelson
20e57a02a2
Codechange: Use GetString() with argument parameters in simple cases. (#13551)
Avoids using global string parameters.
2025-02-14 00:10:56 +00:00
Rubidium
c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Peter Nelson
f309b90a1d Codechange: Use EnumBitSet for Airport blocks. 2025-02-13 22:02:02 +00:00
Peter Nelson
9049710051 Codechange: Allow (Re)setting a range of values in a BaseBitSet. 2025-02-13 22:02:02 +00:00
Peter Nelson
f0777737af Fix #13459, Fix #13546: Crash when changing NewGRFs in game with picker window open. 2025-02-13 21:07:37 +00:00
Peter Nelson
71dafdb21e Codechange: Use EnumBitSet for picker window invalidation flags. 2025-02-13 21:07:37 +00:00
Peter Nelson
75387b9e2b Codechange: Use EnumBitSet for StationFacility. 2025-02-13 18:03:13 +00:00
Peter Nelson
8d38308ebb Codechange: Allow ConvertibleThroughBase to be used as One/ManyOfManySetting. 2025-02-13 18:03:13 +00:00
Peter Nelson
7975145080
Codechange: Use EnumBitSet for TownActions. (#13542) 2025-02-13 18:02:39 +00:00
Loïc Guilloux
b2c5712319
Fix: [Script] Improve type checking of parameters (#13522) 2025-02-13 13:46:21 +01:00
Loïc Guilloux
dc311d7c38
Fix: [Script] Report errors happening during 'Load()' (#13537) 2025-02-13 12:41:39 +01:00
translators
47fca6d8e6 Update: Translations from eints
spanish (mexican): 1 change by absay
2025-02-13 04:44:12 +00:00
Jonathan G Rennison
d06b371254 Cleanup: Fix various spelling errors 2025-02-12 22:44:51 +01:00
Jonathan G Rennison
4d0682d034
Fix 1d04d402: Inverted visibility state in SettingsPage::UpdateFilterState (#13543) 2025-02-12 21:34:59 +00:00
translators
3bbc80f1d9 Update: Translations from eints
norwegian (bokmal): 23 changes by eriksorngard
spanish (mexican): 1 change by absay
korean: 14 changes by telk5093
catalan: 13 changes by J0anJosep
2025-02-12 04:43:37 +00:00
Peter Nelson
1d04d4027a
Codechange: Use EnumBitSet for SettingEntryFlags. (#13534) 2025-02-11 22:18:06 +00:00
Peter Nelson
0d5708ba86
Codechange: Use EnumBitSet for AirportFTAClass::Flags (#13535) 2025-02-11 21:49:18 +00:00
Peter Nelson
9cdf740097
Codechange: Use ProviderManager to define screenshot generators. (#13526) 2025-02-11 21:38:20 +00:00
Jonathan G Rennison
23dc393822
Codechange: Compile fmt internals in a separate translation unit (#13527)
Instead of defining FMT_HEADER_ONLY to include fmt internals
in the headers included by all fmt-using translation units.
2025-02-11 20:11:50 +01:00
Peter Nelson
984da2455b
Codechange: Use EncodedString for Query window. (#13528)
This removes the need to separately capture and store global parameters.
2025-02-11 17:30:16 +00:00
translators
08e451e6d9 Update: Translations from eints
english (au): 14 changes by krysclarke
chinese (traditional): 14 changes by KogentaSan
english (us): 14 changes by 2TallTyler
vietnamese: 3 changes by KhoiCanDev
greek: 14 changes by gh658804
russian: 16 changes by Ln-Wolf
finnish: 14 changes by hpiirai
portuguese: 14 changes by azulcosta
portuguese (brazilian): 15 changes by pasantoro
polish: 12 changes by pAter-exe
2025-02-11 04:43:06 +00:00
Peter Nelson
7c1898eaf1 Codechange: Store EncodedString for text effects.
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Peter Nelson
2cb9f55183 Codechange: Store EncodedString for tooltip text.
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Peter Nelson
1f21e9dc74 Codechange: String parameter encoding for regular strings.
This allows a string and its parameters to be encoded and stored as just one string, instead of juggling with capturing and restoring string parameters.

The advantage of EncodedStrings over raw strings is they use current language and parameter values at the point of decoding.
2025-02-10 22:49:14 +00:00