1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00
Commit Graph

31564 Commits

Author SHA1 Message Date
Rubidium
176eabf9b2 Codefix: replace 0 with STR_NULL 2025-01-03 08:44:53 +01:00
translators
3852a2a0b4 Update: Translations from eints
spanish (mexican): 17 changes by absay
2025-01-03 04:43:20 +00:00
Rubidium
08f3fa54d1 Codechange: manual conversions to remove the global SetDataTip 2025-01-02 23:28:43 +01:00
Rubidium
7c2668d10f Codechange: replace SetDataTip(0x0, with SetTooltip( 2025-01-02 23:28:43 +01:00
Rubidium
ee3ea57a85 Codechange: replace SetDataTip(RWV_ with SetResizeWidgetTypeTip(RWV_ 2025-01-02 23:28:43 +01:00
Rubidium
e3a5f9b040 Codechange: replace SetDataTip(AWV_ with SetArrowWidgetTypeTip(AWV_ 2025-01-02 23:28:43 +01:00
Rubidium
d8d03212b8 Codechange: replace SetDataTip(SPR_ with SetSpriteTip(STR_ 2025-01-02 23:28:43 +01:00
Rubidium
4bf36e3fa6 Codechange: replace SetDataTip(STR_ with SetStringTip(STR_ 2025-01-02 23:28:43 +01:00
Rubidium
7d8bbd4669 Codechange: add specific variants of SetDataTip 2025-01-02 23:28:43 +01:00
810e442203 Codechange: Split GoodsEntry cargo and flows data to unique_ptr. (#13058)
This allows cargo packets and cargo flow data to be empty if not in use, which is the case for the majority of station goods entries, and data is allocated when needed.

This reduces the initial size of a Station from 9192 bytes to 2024 bytes (on 64 bit platforms), although an allocation of 120 bytes is made for each active cargo type at a station.

Based on similar changes in JGRPP.
2025-01-02 20:48:23 +00:00
810dc23215 Codechange: Replace viewport StringID specialisation with flags. (#13237)
When drawing viewport strings, the StringID is used to determine how to draw the sign. Instead, allow the behaviour to be set by the caller with flags. This means that some of the viewport-specific strings are no longer necessary.

ViewportAddString() now returns a pointer to a string as it may not actually add the string, in which case preparing the string parameters in advance is a waste of time.
2025-01-02 20:47:12 +00:00
Rubidium
fd7a883cbd Codechange: make the StringIndex (within a StringTab) a strong type 2025-01-02 21:19:00 +01:00
2d372fa516 Codechange: NewGRF strings are not StringIDs.
Add GRFStringID type and use it when dealing with GRF-local string IDs.
2025-01-02 20:03:40 +00:00
Rubidium
a59cd8b2c0 Codefix: narrowing warnings with MSVC when base type is smaller than int 2025-01-02 20:03:40 +00:00
Rubidium
fedfacf472 Codechange: always do StringID + offset, instead of offset + StringID 2025-01-02 17:09:31 +01:00
4edde7d6de Change: [NewGRF] Use deferred string mapping for bridge and currency names. (#13230)
This means that the strings can now be defined after the properties using them, as is the case with all other features.
2025-01-02 09:35:15 +00:00
Rubidium
666f7bfe23 Doc: mention that frozen production can yield varying production per period 2025-01-02 06:01:37 +01:00
translators
8eb6e7116d Update: Translations from eints
spanish (mexican): 1 change by absay
chinese (simplified): 11 changes by WenSimEHRP
2025-01-02 04:42:37 +00:00
0464e6bd13 Codefix: Remove obsolete industry string mapping. (#13229)
These strings are already correctly mapped by the deferred AddStringForMapping() system.
2025-01-01 22:37:43 +00:00
d7235dc765 Codefix: Script's last_error is not a StringID. (#13227) 2025-01-01 21:35:41 +00:00
8dfab2a607 Fix #13225: Cargo payment graph key toggled wrong data sets. (#13226)
Cargo payment graph should now be filtered only by CargoID instead of sorted position.
2025-01-01 20:34:55 +00:00
Rubidium
c0df898ac5 Codechange: do not implicitly convert during assignment to StrongType 2025-01-01 21:32:51 +01:00
448d6ede4a Codechange: Use STR_NULL (or {}) instead of literal 0. (#13222) 2025-01-01 20:17:20 +00:00
e9e603b4fd Codefix: Company name is a StringID. (#13224)
StringID was passed to Company's constructor as a uint16_t.
2025-01-01 20:16:59 +00:00
31fd71e1ac Codefix: Use this->tile for member variable of Tile. (#13221) 2025-01-01 16:41:13 +00:00
Rubidium
a22e357911 Codechange: make strongtype constructor explicit 2025-01-01 17:40:00 +01:00
98e980c478 Codechange: WWT_TEXT, WWT_LABEL and WWT_EMPTY don't use colour. (#13218)
Set colour for these widget types to INVALID_COLOUR to avoid giving the impression that the colour has a purpose.

A runtime exception is added to catch this the existing widget unit test.
2025-01-01 15:38:19 +00:00
b1cac3c1a9 Codechange: Use _TOOLTIP suffix for another tooltip StringID. (#13219) 2025-01-01 15:38:02 +00:00
Rubidium
3956ed086a Codechange: use Date/Year constructor explicitly 2025-01-01 16:25:32 +01:00
Rubidium
f55ba40b13 Codechange: use TileIndex constructor explicitly 2025-01-01 16:25:23 +01:00
Rubidium
fd5f6caed4 Codechange: use explicit TileIndex constructor for tile 0 2025-01-01 08:26:54 +01:00
Rubidium
562ec74812 Codechange: use explicit TileIndex constructor for converting from window number 2025-01-01 08:26:54 +01:00
translators
91f8f8b7e1 Update: Translations from eints
spanish (mexican): 280 changes by absay
polish: 3 changes by pAter-exe
2025-01-01 04:43:09 +00:00
74087e6a2e Codechange: Use _TOOLTIP suffix for other tooltip StringIDs. 2025-01-01 02:28:08 +00:00
1ba0598a2c Codechange: Use _TOOLTIP suffix for scenario editor toolbar tooltip StringIDs. 2025-01-01 02:28:08 +00:00
ad26b1e8b1 Codechange: Use _TOOLTIP suffix for custom face tooltip StringIDs. 2025-01-01 02:28:08 +00:00
dba02edfa3 Codechange: Use _TOOLTIP suffix for depot tooltip StringIDs. 2025-01-01 02:28:08 +00:00
806831af46 Codechange: Use _TOOLTIP suffix for genworld tooltip StringIDs. 2025-01-01 02:28:08 +00:00
0e1002bca6 Codechange: Use _TOOLTIP instead of _TT suffix for tooltip StringIDs. 2025-01-01 02:28:08 +00:00
6b931667c9 Codechange: Use _TOOLTIP suffix fot replace vehicle tooltip StringIDs. 2025-01-01 02:28:08 +00:00
ab1f2683bc Codechange: Simplify initialisation of default CargoLabels. (#13214) 2025-01-01 00:23:28 +00:00
Rubidium
921980d5e2 Codechange: use explicit Year constructor call in data tables 2025-01-01 00:38:35 +01:00
Rubidium
5a4f802c2f Codechange: use RandomTile over Random() when looking for (part of) a random tile 2025-01-01 00:15:22 +01:00
Rubidium
9b3f4dff4c Codechange: swap int + year to year + int
This way the operator+ without implicit constructor call is used
2025-01-01 00:10:35 +01:00
Rubidium
58ba8c122b Codechange: use constructor instead of assignment for date/year constants 2025-01-01 00:10:35 +01:00
translators
41f7d54b4f Update: Translations from eints
czech: 75 changes by adamek0202
polish: 9 changes by pAter-exe
2024-12-31 04:42:20 +00:00
translators
3a05978cc4 Update: Translations from eints
chinese (simplified): 1 change by WenSimEHRP
luxembourgish: 5 changes by phreeze83
polish: 45 changes by pAter-exe
2024-12-30 04:43:05 +00:00
translators
f077dd7ce2 Update: Translations from eints
polish: 1 change by pAter-exe
2024-12-29 04:41:41 +00:00
Loïc Guilloux
d840152cb7 Codefix: [Script] incorrect end of class detection for doxygen (#13204) 2024-12-28 18:15:09 +00:00
translators
be33f29984 Update: Translations from eints
chinese (simplified): 2 changes by WenSimEHRP
luxembourgish: 10 changes by phreeze83
polish: 26 changes by pAter-exe
2024-12-28 04:41:43 +00:00