Commit Graph

29717 Commits

Author SHA1 Message Date
Rubidium
1998e94ae7 Codechange: create the TileIndexDiff of the whole translation we want to execute 2024-10-20 15:49:32 +02:00
Rubidium
a6b7593a52 Codechange: use TileDiffXY(0, 0) over magic 0 2024-10-20 15:49:32 +02:00
Rubidium
3b0fcf442f Codefix: use actual type instead of int for TileIndexDiff 2024-10-20 15:49:32 +02:00
Jonathan G Rennison
3105f6391c
Fix #13002: Crash due to use of dangling types in picker GUI used/saved lists (#13008) 2024-10-20 09:37:17 +01:00
translators
582f37dc15 Update: Translations from eints
luxembourgish: 84 changes by phreeze83
2024-10-20 04:46:58 +00:00
Rubidium
4a359a4aed Fix 8ca417b: drying of (edge) tiles should consider MP_VOID tiles 2024-10-19 23:32:34 +02:00
Peter Nelson
147ac56f11
Fix: ScriptTile::PlantTreeRectangle does not check that the end tile is in bounds. (#13004)
If the starting tile is near the edge of the map, the width and height could overflow the map boundary.

In some cases this might result in a different area being planted than expected.
2024-10-19 20:52:02 +01:00
Rubidium
9d2e07b1f6 Codechange: simplify terraform recursion logic 2024-10-19 15:40:36 +02:00
Rubidium
8ca417baa9 Codefix: do not wrap-around the map when flooding tiles 2024-10-19 09:00:21 +02:00
translators
5e8da0479a Update: Translations from eints
luxembourgish: 23 changes by phreeze83
2024-10-19 04:45:07 +00:00
Jonathan G Rennison
ffcc594ea3 Codefix: Incorrect documentation comments in StringBuilder 2024-10-18 22:29:28 +02:00
Rubidium
b074a4d3ce Codefix: remove duplicate typedef 2024-10-18 16:43:17 +02:00
translators
35d37d4768 Update: Translations from eints
norwegian (nynorsk): 2 changes by Abaksle
luxembourgish: 33 changes by phreeze83
2024-10-18 04:47:11 +00:00
Peter Nelson
2fda7d8297
Codechange: Simplify Station::train_station iteration when marking tiles dirty. (#13003) 2024-10-17 23:01:04 +01:00
translators
ae4a723889 Update: Translations from eints
norwegian (nynorsk): 8 changes by Abaksle
2024-10-17 04:47:13 +00:00
Peter Nelson
bacd3e83c6 Codechange: Use ScriptObjectRef to handle Event reference counting.
This removes manual reference counting.
2024-10-16 21:52:00 +01:00
Peter Nelson
8360fab18a Codechange: Remove CCountedPtr.
This was originally generic and used by YAPF, but now it is used only by script objects.

CCountedPtr provided much more (untested) functionality than used.

ScriptObjectRef already exists for script objects and does the same thing, so use this instead.
2024-10-16 21:52:00 +01:00
Koen Bussemaker
d8029b1d84 Fix: CHashTableT's Clear function doesn't set number of items back to zero 2024-10-16 22:36:26 +02:00
Peter Nelson
d5b57a56f4
Codechange: Use std::unique_ptr for link graph schedule handlers. (#12988)
This removes manual memory management.
2024-10-15 02:11:06 +01:00
Rubidium
4a6ac52d8c Cleanup: remove some unused #defines 2024-10-14 21:37:00 +02:00
translators
c2d58bb88f Update: Translations from eints
vietnamese: 43 changes by KhoiCanDev
italian: 4 changes by Boh132Boh
2024-10-14 04:46:49 +00:00
glx22
45aef2c0b9 Change: [CI] Temporarily force ubuntu-24.04 runner for linux workflow
While ubuntu-latest is transitioning from ubuntu-22.04 to ubuntu-24.04, the one we actually run on is random.
But our workflow can work only with 22.04 (using clang15) or 24.04 (using clang) so just force 24.04 for now.
2024-10-14 00:53:47 +02:00
glx22
1a1cd2d495 Cleanup: [CI] Remove 'os' input for windows workflow 2024-10-14 00:53:47 +02:00
glx22
99e8534d76 Change: [CI] Use xxx-latest runners for all workflows 2024-10-14 00:53:47 +02:00
translators
79c8eac2ee Update: Translations from eints
vietnamese: 106 changes by KhoiCanDev
polish: 1 change by translators
2024-10-13 04:46:13 +00:00
translators
c813b2b42d Update: Translations from eints
swedish: 19 changes by joeax910
french: 6 changes by ottdfevr
2024-10-10 04:45:29 +00:00
Peter Nelson
446db2c826
Codechange: Remove redundant NewsStringData data. (#12983)
Since SetDParamStr() always owns a copy of the string, there is no need to make another copy of it to keep it around while the news item exists.

This also fixes a leak in `CmdIndustrySetProduction` as the allocated data wasn't passed to AddIndustryNewsItem.
2024-10-08 19:48:55 +01:00
Jonathan G Rennison
d53b681cf7 Codefix f481c9fc: Incorrect references to previous items in DumpTarget 2024-10-08 20:23:08 +02:00
Peter Nelson
14b986609b
Add: AppendStringInPlace() to append translated string ID into an existing string. (#12969)
This allows avoiding a string copy when building strings.
2024-10-07 19:05:38 +01:00
Peter Nelson
3cd1200668
Fix #12976: Incorrect widget rect scrolling for RTL languages. (#12978)
Industry directory, AS/GS and Textfile window did not consider RTL when applying horizontal scrolling.
2024-10-05 08:02:59 +01:00
translators
114c28e69c Update: Translations from eints
korean: 1 change by telk5093
latvian: 6 changes by lexuslatvia
2024-10-05 04:45:35 +00:00
translators
26c2255897 Update: Translations from eints
norwegian (bokmal): 15 changes by eriksorngard
french: 1 change by FiglidiGP
2024-10-03 04:47:03 +00:00
Jonathan G Rennison
22b4a77e37
Codefix: Debug fmt strings in ItemizeBidi (ICU layout) (#12965) 2024-10-01 14:28:40 +01:00
Peter Nelson
ccced859f5
Codechange: Mark some water region functions static. (#12964)
These functions are not used elsewhere. This may affect how compilers generate code.
2024-10-01 14:28:16 +01:00
Jonathan G Rennison
386dbb7c80
Codefix: First format argument of IConsolePrint not passed by reference (#12966) 2024-10-01 14:12:19 +01:00
translators
7a0e50002b Update: Translations from eints
galician: 5 changes by pvillaverde
2024-09-30 04:47:06 +00:00
translators
3ed2afa68e Update: Translations from eints
catalan: 5 changes by J0anJosep
2024-09-29 04:45:28 +00:00
translators
b4f96f54df Update: Translations from eints
danish: 14 changes by bscargo
dutch: 5 changes by Afoklala
2024-09-28 04:44:33 +00:00
translators
b42c4fa7ca Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
english (us): 5 changes by 2TallTyler
korean: 6 changes by telk5093
italian: 16 changes by ciampix
2024-09-26 04:45:59 +00:00
translators
1251638508 Update: Translations from eints
chinese (simplified): 8 changes by WenSimEHRP
portuguese: 5 changes by azulcosta
polish: 13 changes by pAter-exe
2024-09-25 04:45:43 +00:00
translators
528f047242 Update: Translations from eints
english (au): 4 changes by krysclarke
chinese (traditional): 18 changes by KogentaSan
greek: 4 changes by gh658804
italian: 11 changes by Boh132Boh
russian: 4 changes by Ln-Wolf
finnish: 5 changes by hpiirai
portuguese (brazilian): 4 changes by pasantoro
polish: 78 changes by pAter-exe
2024-09-24 04:45:19 +00:00
Peter Nelson
51bd344f10
Change: Use default NewGRF cargo translation table. (#12646)
Instead of falling back to bitnum lookup or climate-dependent cargo types, install a default cargo translation table that performs either of these functions instead.

This allows better mapping of climate-dependent or bitnum cargo slots, falling back to INVALID_CARGO if they are not defined, and reduces special-casing.
2024-09-23 23:48:03 +01:00
Peter Nelson
e60c5f30a3
Fix ddf1510a23: House animation random data flag ignored. (#12963)
In the refactor to unified tile animation code, the test for `CALLBACK_1A_RANDOM_BITS` incorrectly got changed to a `HasBit()` test preventing it from working.

Use `HasFlag()` instead.
2024-09-23 17:18:28 +00:00
Peter Nelson
f149d84d4c
Fix: Crash when exiting game with end game window open. (#12962)
Caused by the end game window opening the highscore window on close, which `UnInitWindowSystem()` does not expect.
2024-09-23 17:58:44 +01:00
translators
856ee2aaca Update: Translations from eints
english (au): 1 change by krysclarke
chinese (simplified): 1 change by WenSimEHRP
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
portuguese (brazilian): 1 change by pasantoro
2024-09-23 04:45:32 +00:00
Jonathan G Rennison
c1db57840e
Fix: DepotWindow::GetVehicleFromDepotWndPt not refreshing vehicle list (#12907) 2024-09-22 18:13:43 +01:00
Peter Nelson
eafee92476
Fix 3d4b98845a: TC_FORCED no longer working. (#12961)
Since initial colour is no longer passed to the text layout, TC_FORCED flag is not seen by the layouter, so it had no effect.

Instead, check for TC_FORCED when drawing and avoid using the string's colours if set.
2024-09-22 18:08:22 +01:00
Peter Nelson
0340e19e04
Codechange: Add to_underlying() to convert enum to underlying type. (#12958)
This simplifies and replaces static_cast and C-style casts doing the same.

`std::to_underlying()` exists in C++23 but not C++20.
2024-09-22 18:07:42 +01:00
Peter Nelson
376e882a14
Codechange: Add HasFlag() to test if a value is present in a bitset enum type. (#12959)
This simplifies tests for `(x & y) != y` with enum classes by reducing repetition, similar to HasBit(), and also makes the intent of the expression clearer.
2024-09-22 14:51:37 +01:00
Peter Nelson
d450d4743e
Fix #12957: 1-in-X proportion of towns being cities is unnecessarily random. (#12960)
Using an actual random chance to generate cities means that there may be far less or far more than 'expected' towns being made as cities.

While this is the point of randomness, the wording of the setting is "Proporation of towns that will become cities: 1 in X" and does not mention randomness at all.
2024-09-22 14:42:01 +01:00