1
0
Fork 0
Commit Graph

23963 Commits (26db4ccf09f4615747aa92942f05cadb12edbb07)

Author SHA1 Message Date
Peter Nelson 762e2f76a3 Codechange: Avoid STR_NULL in header file. 2025-03-21 12:53:40 +00:00
Peter Nelson 4ffbf97770 Codechange: Move RawText::GetEncodedText() out of header.
This allows it to use StringID without polluting includes.
2025-03-21 12:53:40 +00:00
frosch 3b178bf58d Fix: NewGRF string interpolation did not process all string parameters, if certain string control codes were present.
String control codes with inline data may contain null characters, in particular plural/gender/case choice lists.
2025-03-21 11:03:24 +01:00
frosch 5d291317e7 Codechange: Two very different functions were named RemapNewGRFStringControlCode. 2025-03-21 11:03:24 +01:00
translators a678bb263d Update: Translations from eints
hungarian: 32 changes by vargaviktor
2025-03-21 04:45:21 +00:00
Peter Nelson 89948b941b
Codechange: Use emplace_back instead of push_back. (#13855) 2025-03-20 17:39:10 +00:00
Peter Nelson b98a7ff303
Fix f214c81e97: Signed overflow in collision test on large map when road vehicles are at just the right coordinates. (#13847)
If road vehicles are -32768 subtiles apart, the distance check will break.
2025-03-18 22:53:01 +00:00
Richard Wheeler 4ba69765be
Update: Developer credits (#13846)
<3
2025-03-18 20:57:25 +00:00
Rubidium a908c7bed0 Codechange: remove uses of MemCmpT (and MemMoveT) 2025-03-18 21:18:37 +01:00
Loïc Guilloux e55f54ce08
Fix #13843, 015c081c: Don't discard GetString() result (#13844) 2025-03-18 17:15:40 +00:00
Peter Nelson 17f7d0950e
Fix #13838: Formatted error message of sub-errors may be lost. (#13840) 2025-03-18 08:39:40 +00:00
Peter Nelson 5255aabe4d
Fix #13839: Incorrect colour of first company legend in smallmap window. (#13841)
Use the proper command to set the initial company colour.
2025-03-17 20:28:02 +00:00
translators ff275b805b Update: Translations from eints
welsh: 144 changes by Ansbaradigeidfran
catalan: 6 changes by J0anJosep
2025-03-17 04:46:50 +00:00
Rubidium 5ea5855677 Codechange: use std::move over copying where applicable 2025-03-16 17:33:06 +01:00
Rubidium f214c81e97 Codechange: simplify some complicated logic 2025-03-16 15:12:02 +01:00
Rubidium d6a1a0b058 Codechange: simplify logic and prevent invalid bit 2025-03-16 14:14:21 +01:00
Rubidium b4e5b12047 Codechange: remove unneeded locking from SmallStack 2025-03-16 14:13:51 +01:00
Rubidium ec647975ad Cleanup: remove ancient FIXME comments 2025-03-16 05:42:29 +01:00
Rubidium 2b9c94f55a Fix: don't show owner of non-existent road 2025-03-16 05:42:29 +01:00
Peter Nelson 3b004c57bc
Codechange: Use EnumBitSet for AdminUpdateFrequency. (#13819) 2025-03-15 21:18:20 +00:00
Koen Bussemaker 8d4639e525 Fix: Error message window timeout doesn't match setting 2025-03-15 22:08:19 +01:00
Rubidium ccca7fc2b4 Codechange: remove unused INVALID_TRACK_BIT 2025-03-15 22:03:17 +01:00
enveeed b0cc56a8b5
Fix: NewGRF vehicles display loading sprites when not actually loading or unloading (#13554) 2025-03-15 16:58:47 -04:00
rubidium42 2fed4b0059
Codechange: simplify code (#13822) 2025-03-15 21:49:07 +01:00
Rubidium c13226cdf8 Codefix: do not leave pointers to stack allocations in globals 2025-03-15 21:46:43 +01:00
Rubidium dae788e2e3 Codefix: do not trust allocation sizes coming from a file 2025-03-15 21:44:40 +01:00
Rubidium f794ee028b Codefix: potential division by zero in midi reader 2025-03-15 21:44:18 +01:00
Rubidium 6d0ba270d2 Codefix: do not use an invalid iterator 2025-03-15 21:43:56 +01:00
Rubidium 24f79d2ab7 Codefix: wrong type for choice list mapping 2025-03-15 21:43:18 +01:00
Rubidium cf96a97e95 Codefix: remove unneeded looping logic 2025-03-15 21:42:28 +01:00
Peter Nelson 62b8b93476 Codechange: Add default initialisation for Rect to remove MemSetT. 2025-03-15 20:09:38 +00:00
Peter Nelson c905472650 Codechange: Use std::array for vehicle sorting/grouping options to remove MemSetT. 2025-03-15 20:09:38 +00:00
Peter Nelson 653e886d26 Codechange: Use std::array in OpenGLSprite to remove MemSetT. 2025-03-15 20:09:38 +00:00
Peter Nelson a87b804386
Fix #13760: Store encoded error message inside CommandCost. (#13764)
Encoded error message was previously static to avoid memmory allocation, however this causes complications.
2025-03-15 20:09:11 +00:00
frosch 0cd87bc8c1
Fix: Don't add chars with unspecified signedness to pointers. (#13828) 2025-03-15 18:48:26 +01:00
frosch 4f63340f8d
Codechange: Replace a raw pointer with std::optional. (#13809) 2025-03-15 16:52:12 +01:00
SamuXarick f6b0f7848b
Add: [Script] Newer Cargo Classes (#13779) 2025-03-15 16:51:56 +01:00
Loïc Guilloux c5ec8fb05f
Fix #13814, 2824e790: A Set() became Reset() preventing initial sorting of lists (#13816) 2025-03-14 21:15:42 +01:00
Rubidium ac2087a3eb Codefix: remove some logically dead code 2025-03-14 16:26:21 +01:00
frosch dbea968f4f
Codefix 20e57a02a28: String parameters were off by one. (#13810) 2025-03-14 15:22:30 +01:00
Peter Nelson bd5d47836d
Codechange: Use EnumBitSet for EdgeUpdateMode. (#13808) 2025-03-14 09:01:10 +00:00
translators 8191f39649 Update: Translations from eints
chinese (traditional): 11 changes by KogentaSan
spanish (mexican): 5 changes by absay
2025-03-14 04:43:31 +00:00
Charles Pigott bcabc3b780
Codechange: Upgrade fmt to 11.1.4 (#13807) 2025-03-13 21:52:47 +00:00
Rubidium 18e1440947 Codefix: move or pass by reference instead of copy 2025-03-13 21:16:16 +01:00
Rubidium 754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
SamuXarick 05ce0828c0
Change: Use max of calculated and minimal heights in ScriptLeagueWindow (#13720) 2025-03-13 08:39:26 +00:00
Peter Nelson 8b39b23d2b
Codechange: Use EnumBitSet for VehicleFlags. (#13793) 2025-03-13 08:38:54 +00:00
Björn Wärmedal dc343ca141
Fix: GenerateCompanyName sends incorrect renaming event (#13794) 2025-03-13 08:24:35 +00:00
translators 70c2a666bc Update: Translations from eints
spanish (mexican): 7 changes by absay
czech: 39 changes by adamek0202
2025-03-13 04:45:10 +00:00
Rubidium 2b88f58384 Codefix: add move operators to SQObjectPtr 2025-03-12 22:05:02 +01:00
Rubidium 35ef197be4 Codefix: potential integer overflow before widening integer 2025-03-12 22:00:44 +01:00
Rubidium 02f1bc0880 Codefix: remove some logically dead code 2025-03-12 22:00:33 +01:00
Rubidium 8f3bfb61bd Codefix: remove structurally dead code 2025-03-12 21:03:55 +01:00
Rubidium d96f359b3c Codefix: potential dangling pointer in strgen 2025-03-12 20:59:47 +01:00
Rubidium 0fde979b21 Codefix: check for errors in the function getting the socket error 2025-03-12 17:55:34 +01:00
Rubidium 486ad7d416 Codefix: check curl_easy_setopt executes properly, or show a debug message 2025-03-12 17:55:34 +01:00
Rubidium 32b2de36ef Codefix: check the table header is actually being read 2025-03-12 17:55:34 +01:00
Rubidium 649ed702cc Codefix: potential unintended sign extension 2025-03-12 17:03:35 +01:00
translators cdcc6b491d Update: Translations from eints
spanish (mexican): 9 changes by absay
2025-03-12 04:46:00 +00:00
Peter Nelson 3336f13a63
Fix #13795: size_t mayn't be the same size as uint64_t. (#13796) 2025-03-11 17:55:33 +00:00
translators 40ddc03423 Update: Translations from eints
spanish (mexican): 62 changes by absay
2025-03-11 04:44:39 +00:00
Peter Nelson 3eb89f04b5
Codechange: Use EnumBitSet for QueryStringFlags. (#13792) 2025-03-10 18:59:35 +00:00
Peter Nelson 1a53b48422
Codechange: Use EnumBitSet for PartsOfSubsidy. (#13791) 2025-03-10 18:59:21 +00:00
Peter Nelson 8ba86c54b1
Add: Show hyperlink destination tooltips in text window. (#13742) 2025-03-10 18:12:42 +00:00
Loïc Guilloux c6cd1a4bca
Fix #13740: [Script] Handle implicit orders for jump orders (#13753) 2025-03-10 15:12:26 +01:00
Loïc Guilloux 59904e5f9b
Fix #13749: Apply callback when automatically changing timekeeping unit (#13751) 2025-03-10 14:55:19 +01:00
Rubidium 5721030bd2 Codefix: use Pool::Get if you know it's valid, especially if you don't check GetIfValid for nullptr 2025-03-10 12:46:29 +01:00
Rubidium 3c7506e07d Codefix: TrackdirCrossesTrackdirs does not work for turning RV TrackDirs 2025-03-10 12:46:03 +01:00
Rubidium 0d902c9f5c Codefix: possible out-of-bounds array indexing 2025-03-10 07:09:49 +01:00
translators cb3d3878fa Update: Translations from eints
swedish: 6 changes by joeax910
spanish (mexican): 5 changes by absay
greek: 17 changes by gh658804
2025-03-10 04:40:22 +00:00
Rubidium 2926dd2c2f Codefix: do not dereference the std::end() iterator 2025-03-09 23:33:25 +01:00
Rubidium afe66c7df4 Codefix: std::move string leaves the old one in an undefined state 2025-03-09 22:19:54 +01:00
Peter Nelson 7c97460080
Codechange: Use EnumBitSet for ConsistChangeFlags. (#13788) 2025-03-09 21:13:57 +00:00
Peter Nelson de45f5418b
Fix 0de7fd3c24: widget_lookup may contain non-NWidgetCore widgets. (#13787) 2025-03-09 19:49:26 +00:00
Rubidium 2000cea235 Codechange: initialise instance members 2025-03-09 20:41:03 +01:00
Rubidium 0de7fd3c24 Codefix: check the result of dynamic_cast for nullptr 2025-03-09 19:35:14 +01:00
Rubidium d07d75229b Codefix: data race in case of a spurious wake up 2025-03-09 19:34:47 +01:00
Richard Wheeler 1eddd7fed0 Fix: Improve manager face randomisation 2025-03-09 19:22:25 +01:00
Rubidium ee45c8ec1d Codefix: do not pass invalid file descriptor to fdatasync 2025-03-09 19:10:33 +01:00
Jonathan G Rennison 61e8dcfca7
Cleanup: Remove unused DepotCommandFlag::LocateHangar flag (#13775) 2025-03-09 18:07:47 +00:00
Peter Nelson 52bada216c Codechange: Use std::array for vehicle hashes.
This allows initialisation without memset.
2025-03-09 18:03:50 +00:00
Peter Nelson ec71f7a216 Codechange: Use std::array for temporary NewGRF loading data.
This allows initialisation without memset.
2025-03-09 18:03:50 +00:00
Peter Nelson 761c587940 Codechange: Use std::array to store most-used railtype.
This allows initialisation without memset.
2025-03-09 18:03:50 +00:00
Peter Nelson 61aa45071a
Codechange: Use EnumBitSet for SigFlags. (#13784) 2025-03-09 18:01:52 +00:00
Peter Nelson 572f2801ac
Codechange: Use emplace_back instead of back_inserter. (#13781)
This silences a warning produced by gcc.
2025-03-09 17:42:00 +00:00
translators 62a571c892 Update: Translations from eints
swedish: 89 changes by joeax910
norwegian (bokmal): 51 changes by eriksorngard
chinese (traditional): 1 change by KogentaSan
spanish (mexican): 195 changes by absay
chinese (simplified): 1 change by WenSimEHRP
finnish: 1 change by hpiirai
2025-03-09 04:38:41 +00:00
Rubidium a23dda7ffe Codechange: use const auto & instead of making a copy 2025-03-08 21:33:17 +01:00
Peter Nelson 91d22f7617
Codechange: Use EnumBitSet for VehStates. (#13755)
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Rubidium 0b102db421 Codefix: initialise a few uninitialised variables 2025-03-08 18:01:25 +01:00
Rubidium 8a243f7391 Fix: [Script] Getting expiry date could cause out of bounds access 2025-03-08 16:14:18 +01:00
Rubidium cfa31849be Fix: company livery window's instance variables were not set 2025-03-08 16:14:08 +01:00
Peter Nelson f8478cdee4
Fix 51fd2853cb: Different news widget layouts require different font sizes. (#13752) 2025-03-08 12:00:56 +00:00
translators a154df6549 Update: Translations from eints
norwegian (bokmal): 18 changes by eriksorngard
spanish (mexican): 48 changes by absay
czech: 1 change by LubosKolouch
danish: 15 changes by bscargo
dutch: 22 changes by Afoklala
portuguese: 1 change by azulcosta
2025-03-08 04:38:53 +00:00
Peter Nelson 794317e870
Fix #13758: Owned by error message consumed too many parameters. (#13762) 2025-03-07 23:36:18 +00:00
Peter Nelson 2c211630cb
Fix #13759: Really don't set error owner to OWNER_TOWN. (#13761) 2025-03-07 23:35:28 +00:00
translators 49c760a472 Update: Translations from eints
spanish (mexican): 41 changes by absay
korean: 21 changes by telk5093
italian: 1 change by quasimagia
latvian: 11 changes by lexuslatvia
2025-03-07 04:44:48 +00:00
Peter Nelson 3fde611012
Codechange: Use EnumBitSet for AirportMovingDataFlags. (#13754) 2025-03-06 19:03:41 +00:00
translators 84f093fc72 Update: Translations from eints
english (au): 8 changes by krysclarke
chinese (traditional): 5 changes by KogentaSan
spanish (mexican): 14 changes by absay
english (us): 2 changes by 2TallTyler
chinese (simplified): 4 changes by WenSimEHRP
greek: 2 changes by gh658804
russian: 14 changes by Ln-Wolf
finnish: 2 changes by hpiirai
portuguese: 2 changes by azulcosta
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-03-06 04:44:52 +00:00
Peter Nelson 274b7a0195
Fix #13645: "Follow vehicle" button not raised when following stopped. (#13746) 2025-03-06 00:00:57 +00:00
Peter Nelson 47ae285c9d
Fix 2d7d085e8e: Autorenew failed error string consumed too many parameters. (#13750) 2025-03-05 22:50:33 +00:00
frosch 72ddac02bd Codechange: Add plural genders by duplicating the singular ones 2025-03-05 20:49:27 +01:00
frosch 4b93a5240b Codechange: Example usage of plural genders 2025-03-05 20:49:27 +01:00
frosch 273bcf008b Codechange #13709: Update gender definitions for Spanish (es_ES and es_MX) 2025-03-05 20:49:27 +01:00
Peter Nelson 6d631d7a13
Fix f8b1e30: Fix recent savegames may have incorrect EngineFlags saved. (#13745)
Detect and update engines saved with invalid EngineFlags.
2025-03-05 17:58:03 +00:00
Loïc Guilloux 0ade7638df
Fix #13668, fd2949d: Include the `\0` in TextBuf max_chars cropping (#13672) 2025-03-05 12:05:19 +01:00
Loïc Guilloux 7723625823
Fix #13729, f8b1e30: Incorrect conversion of EngineFlags to EngineFlag (#13743) 2025-03-05 09:12:06 +00:00
translators 0cfcc07ee6 Update: Translations from eints
chinese (traditional): 8 changes by KogentaSan
spanish (mexican): 36 changes by absay
english (us): 19 changes by 2TallTyler
chinese (simplified): 5 changes by WenSimEHRP
greek: 6 changes by gh658804
finnish: 6 changes by hpiirai
french: 63 changes by glx22
portuguese: 5 changes by azulcosta
portuguese (brazilian): 6 changes by pasantoro
polish: 6 changes by pAter-exe
2025-03-05 04:44:13 +00:00
Peter Nelson 51fd2853cb
Fix 6e10584b91: Keep custom news from game scripts in encoded form. (#13741)
This allows the news message to translated as appropriate.
2025-03-04 23:15:50 +00:00
Peter Nelson b979f0414c Codechange: Prevent nested encoded strings. 2025-03-04 21:40:39 +00:00
Peter Nelson b55af05626 Codechange: Pass encoded script strings as EncodedString.
This removes the ambiguity of having std::strings that may or may not be encoded.
2025-03-04 21:40:39 +00:00
Peter Nelson 2a05a845df Feature: Snow-covered rocks are now visible. 2025-03-04 20:39:08 +00:00
Peter Nelson 28a1267e57 Change: Adjust costs for clearing snowy landscape tiles.
Rocks with snow is no longer cheaper to clear than rocks without snow.
2025-03-04 20:39:08 +00:00
Tyler Trahan 6acbc775e5
Fix #13725: Use proper query strings for changing timetable values (#13737) 2025-03-04 11:58:28 -05:00
Peter Nelson 8a09bb8127
Fix #11226: Don't draw story page elements that won't be visible. (#13736)
When drawing the story page elements, all of them were drawn even if they are not visible. This can be a significant performance hit for long strings.
2025-03-04 13:38:37 +00:00
Peter Nelson 27761ae431 Cleanup: Remove global string parameters.
Global parameters, and functions for dealing with them, are now gone.
2025-03-04 08:48:35 +00:00
Peter Nelson e818fcbf19 Codechange: Allow encoded strings to use as many parameters as necessary. 2025-03-04 08:48:35 +00:00
Peter Nelson 37b276b4b5 Cleanup: Remove STR_JUST_STRING2/4. 2025-03-04 08:23:28 +00:00
Peter Nelson a1bcfb836a Codechange: Remove leftover SetStringTips. 2025-03-04 08:23:28 +00:00
Peter Nelson e10e96b9d5 Codechange: Drop default widget strings for autoreplace window. 2025-03-04 08:23:28 +00:00
Peter Nelson 3d95a7813f Codechange: Drop default widget strings for AI config window. 2025-03-04 08:23:28 +00:00
Peter Nelson ab0d6e8b95 Codechange: Drop default widget strings for network windows. 2025-03-04 08:23:28 +00:00
Peter Nelson d7963f6eb7 Codechange: Drop default widget strings for NewGRF debug window. 2025-03-04 08:23:28 +00:00
translators 72a6d27252 Update: Translations from eints
english (au): 13 changes by krysclarke
chinese (traditional): 15 changes by KogentaSan
spanish (mexican): 2 changes by absay
chinese (simplified): 2 changes by WenSimEHRP
greek: 13 changes by gh658804
finnish: 2 changes by hpiirai
portuguese: 31 changes by jcteotonio, 2 changes by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 5 changes by pAter-exe
2025-03-04 04:44:36 +00:00
Peter Nelson 4e485cd083
Fix: Network relay question used string parameters unconventionally. (#13734) 2025-03-04 00:25:15 +00:00
Peter Nelson ed65fea7dd
Codechange: Move to GetWidgetString for help window. (#13733) 2025-03-03 23:32:08 +00:00
Rubidium c9624cef7c Codechange: remove MallocT, CallocT and ReallocT 2025-03-04 00:10:01 +01:00
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