Rubidium
e67fc33172
Codechange: Add support for NULL strings in SaveLoadCompat
2024-02-17 14:33:16 +01:00
Rubidium
9f8fd80112
Feature: Fully customisable number abbreviations per translation
2024-02-17 14:33:16 +01:00
Rubidium
a253205b93
Feature: Fully customisable number format per translation
2024-02-17 14:33:16 +01:00
Rubidium
819c6c756e
Codechange: Add support for number format and abbreviations pragmas/attributes to strgen
2024-02-17 14:33:16 +01:00
Rubidium
fca8166087
Codechange: Simplify FormatNumber by moving out zero fill and decimal support
2024-02-17 14:33:16 +01:00
Rubidium
a44bd81280
Codechange: Move determining the decimal separator to a separate function
2024-02-17 14:33:16 +01:00
Rubidium
f0c50ad529
Codechange: Add function to get the power of ten for a given number
2024-02-17 14:33:16 +01:00
rubidium42
8bccb5805a
Fix 0ca4b4e: Ctrl+Click style inconsistency in base language ( #12099 )
2024-02-17 06:26:09 +00:00
translators
bb2446c058
Update: Translations from eints
...
welsh: 5 changes by Ansbaradigeidfran
estonian: 108 changes by siimsoni, 50 changes by RM87
luxembourgish: 276 changes by phreeze83
hungarian: 81 changes by PstasDev
indonesian: 6 changes by tsaqibfs
italian: 191 changes by AlphaJack
bulgarian: 118 changes by lamarin1
ukrainian: 16 changes by StepanIvasyn
tamil: 408 changes by Aswn
turkish: 43 changes by metsysma
esperanto: 103 changes by JadedCtrl
portuguese (brazilian): 57 changes by pasantoro
polish: 61 changes by pAter-exe
2024-02-16 18:35:10 +00:00
Peter Nelson
adb796a21a
Change: Show 6 or 2 orientation buttons in NewGRF road stop picker as appropriate.
...
This replaces the normal method of masking unusable buttons.
2024-02-15 22:28:58 +00:00
Peter Nelson
8c22690ce1
Codechange: Update window's widget lookup map when switching displayed plane.
2024-02-15 22:28:58 +00:00
translators
3d591c2094
Update: Translations from eints
...
swedish: 1 change by SpamixOfficial
welsh: 280 changes by Ansbaradigeidfran
vietnamese: 245 changes by myquartz
estonian: 1 change by siimsoni
czech: 64 changes by LubosKolouch, 29 changes by adamek0202
arabic (egypt): 17 changes by AviationGamerX
luxembourgish: 247 changes by phreeze83
hungarian: 9 changes by nemesbala
indonesian: 21 changes by tsaqibfs, 19 changes by K4smun1
italian: 13 changes by AlphaJack
hebrew: 20 changes by Boltyansky
bulgarian: 107 changes by lamarin1
finnish: 4 changes by lanurmi
ukrainian: 18 changes by StepanIvasyn
catalan: 1 change by arnaullv
turkish: 120 changes by metsysma, 43 changes by EndChapter
danish: 23 changes by mamure, 23 changes by bscargo
dutch: 1 change by Jaws3rd
french: 1 change by Lishouuu
portuguese (brazilian): 362 changes by pasantoro
polish: 60 changes by pAter-exe
2024-02-15 18:34:46 +00:00
SamuXarick
8584d1b5bb
Add: [Script] GetAirportNumHelipads ( #12085 )
...
Adds a function for Scripts to get the number of helipads of an airport type.
2024-02-14 21:38:32 +01:00
Peter Nelson
a64ca2e0c5
Cleanup: Remove declaration of non-existent function. ( #12091 )
2024-02-14 20:28:03 +00:00
Peter Nelson
4ffe1da540
Fix: NewGRF roadstops were ignored if only in default class. ( #12089 )
...
If a NewGRF defines roadstops in the default class and no other classes are defined, they would be ignored and not selectable.
2024-02-14 19:21:13 +00:00
translators
ac5eaecd15
Update: Translations from eints
...
english (au): 1 change by krysclarke
english (us): 1 change by 2TallTyler
czech: 74 changes by adamek0202
chinese (simplified): 3 changes by WenSimEHRP
luxembourgish: 42 changes by phreeze83
korean: 1 change by telk5093
german: 1 change by Wuzzy2
romanian: 19 changes by ALEX11BR
russian: 1 change by Ln-Wolf
finnish: 6 changes by lanurmi
ukrainian: 13 changes by StepanIvasyn
turkish: 26 changes by metsysma
danish: 18 changes by bscargo
latvian: 3 changes by lexuslatvia
portuguese: 1 change by azulcosta
portuguese (brazilian): 273 changes by pasantoro
2024-02-14 18:37:05 +00:00
Peter Nelson
1e82d75fa2
Fix f1144de: "knots" missing from settings units list. ( #12082 )
...
Knots were added as a setting but not included in the settings list so were saved as a number instead of string.
2024-02-13 20:19:45 +00:00
translators
4cea9a61ce
Update: Translations from eints
...
swedish: 132 changes by sereneavatar
spanish (mexican): 31 changes by absay
english (us): 2 changes by 2TallTyler
czech: 6 changes by Caesar008
arabic (egypt): 76 changes by AviationGamerX
turkish: 91 changes by metsysma
danish: 9 changes by mamure
portuguese: 9 changes by azulcosta
portuguese (brazilian): 253 changes by pasantoro
polish: 14 changes by pAter-exe
2024-02-13 18:37:22 +00:00
Tyler Trahan
f5126cba08
Fix: Accurately describe Ctrl+Clicking on a waypoint in Go To tooltip ( #12081 )
2024-02-13 11:41:25 -05:00
Florian
02b59920ed
Fix #12050 : Add default size, shade and pin control buttons to company livery widget. ( #12080 )
2024-02-13 15:55:13 +00:00
Peter Nelson
14b31c8fed
Add: Show cargo icons on subsidy list window. ( #12079 )
2024-02-13 07:41:24 +00:00
Patric Stout
15c14a896f
Fix: survey-time seconds for clients was calculated wrong ( #12078 )
2024-02-12 21:56:27 +00:00
Patric Stout
bad31f2d42
Fix #10079 : don't render at 1000fps if HW acceleration + vsync is requested but not active ( #12067 )
2024-02-12 21:39:23 +00:00
Loïc Guilloux
79374bc003
Fix #12074 : Don't allow "part" command for dedicated servers ( #12075 )
2024-02-12 19:28:30 +00:00
translators
a3e6f82150
Update: Translations from eints
...
english (au): 2 changes by krysclarke
swedish: 307 changes by sereneavatar
galician: 127 changes by pvillaverde
romanian: 165 changes by bnegrut
spanish: 8 changes by MontyMontana
portuguese: 89 changes by azulcosta
portuguese (brazilian): 335 changes by pasantoro
2024-02-12 18:35:10 +00:00
Patric Stout
839f2e025c
Fix: visually also disable vsync when not using HW acceleration ( #12066 )
2024-02-12 03:19:08 +01:00
Jonathan G Rennison
5ab5f4ace7
Codefix df691eb3: Reloading GRFs destructed small UFO targeting road vehicle ( #12072 )
2024-02-12 00:51:18 +00:00
Peter Nelson
481fa7dbb5
Change: Show cargo icons on Industry View window. ( #12071 )
2024-02-12 00:50:58 +00:00
Loïc Guilloux
3ffa176870
Change: [Script] Store randomizers in savegame ( #12063 )
2024-02-12 01:22:57 +01:00
Peter Nelson
d6f34a21e8
Codefix: Incorrect storage type in cargo field of industry cargo chains window. ( #12051 )
...
`supp_cargoes` and `cust_cargoes` actually contains a column index, however this index is always stored at the indexed position...
Replace with a bitmask instead, which stores if the column indices are linked.
2024-02-11 23:05:29 +00:00
Peter Nelson
df691eb31e
Codechange: Don't scan vehicle pool to find targeting disaster vehicle when deleting any vehicle. ( #12064 )
...
* Codechange: Don't scan vehicle pool to find targeting disaster vehicle when deleting any vehicle.
When deleting a vehicle, the vehicle pool is scanned to find a targetting disaster vehicle. With lots of vehicles this can take some time, especially when deleting multiple consecutive vehicles.
Disasters vehicles can actually only target road vehicles. Store the DisasterVehicle index in the road vehicle, so that no pool scan is necessary.
* Change: Small UFOs no longer target a vehicle which is already a target.
2024-02-11 23:04:29 +00:00
Patric Stout
fa6f270f23
Codefix 36e1b32: remove left-over debug statement ( #12068 )
2024-02-11 21:36:37 +00:00
Peter Nelson
58ed38be03
Change: Avoid adjacent fence fields.
...
This restores pre-r23168 behaviour of only a single fence between adjacent fields.
2024-02-11 22:10:46 +01:00
Peter Nelson
d6c5efd795
Change: Draw north-side farm fences/hedges/walls on tile edge, instead of 1/16th in.
...
This matches original TTD drawing behaviour, which is what the original baseset sprites are designed for, and avoids alignment issues (which are more problematic with high detail 4x sprites.)
2024-02-11 22:10:46 +01:00
SamuXarick
fa64fff4a5
Fix #10405 , a3dd750: [Script] Test engine and vehicle type validity for ScriptGroup::GetNumEngines ( #11887 )
2024-02-11 22:09:23 +01:00
Patric Stout
5b3bfe4c4c
Fix fdfcb09: for content service, fallback to TCP downloads when HTTP stalls ( #12056 )
2024-02-11 20:24:28 +01:00
Loïc Guilloux
8d9fa0ea89
Change: [Script] Use company randomizer when adding random deviation ( #12065 )
2024-02-11 18:58:41 +00:00
translators
378dab3750
Update: Translations from eints
...
galician: 85 changes by pvillaverde
estonian: 1 change by RM87
czech: 7 changes by JakMel
chinese (simplified): 1 change by WenSimEHRP
korean: 10 changes by telk5093
german: 191 changes by Wuzzy2
romanian: 122 changes by bnegrut
russian: 29 changes by Ln-Wolf
catalan: 28 changes by J0anJosep
french: 6 changes by glx22
portuguese (brazilian): 252 changes by pasantoro
2024-02-11 18:34:45 +00:00
Joan Josep
1b33b4058e
Fix: Redraw orders when a station feature is added/removed. ( #12061 )
2024-02-11 12:47:49 -05:00
Peter Nelson
9ec9c8d8b5
Fix: Industry tiles and houses could accept incorrect cargo types. ( #12062 )
...
Ensure the default label is cleared when NewGRFs set industry tile or house acceptance.
This was missed by #12053 .
2024-02-11 17:42:04 +00:00
Patric Stout
d02b1547f6
Remove: setting "no_http_content_downloads" ( #12058 )
...
As we now use HTTPS, it is very likely this will work on most systems.
For systems that do have HTTPS blocked, it will fail instantly,
and it will fallback to TCP anyway. That makes this setting no longer
very useful.
2024-02-11 14:48:12 +00:00
Peter Nelson
8db08da148
Fix #12052 : NewGRFs clearing industry cargo slots could fallback to default instead of empty. ( #12053 )
...
Ensure the default label is cleared when NewGRF sets a produced/accepted cargo slot, so that default fallback isn't used.
2024-02-11 00:43:13 +00:00
Tyler Trahan
7b32d9cff5
Fix #12019 : Correctly highlight depot unbunch action in dropdown
2024-02-10 15:11:24 -05:00
Tyler Trahan
771615cb4b
Fix #12020 : Unbunch and service if needed should be mutually exclusive depot order types
2024-02-10 15:11:24 -05:00
translators
2f35a484fe
Update: Translations from eints
...
swedish: 1 change by SpamixOfficial
english (us): 7 changes by 2TallTyler
galician: 123 changes by pvillaverde
estonian: 5 changes by RM87
czech: 46 changes by justidan4
romanian: 19 changes by ALEX11BR
russian: 13 changes by gisterecis
finnish: 6 changes by rikkerton
catalan: 188 changes by J0anJosep
turkish: 29 changes by densxd
latvian: 7 changes by lexuslatvia
portuguese: 33 changes by azulcosta
portuguese (brazilian): 546 changes by pasantoro
polish: 24 changes by pAter-exe
2024-02-10 18:35:13 +00:00
Loïc Guilloux
977aba73be
Change: Store running AI config inside Company ( #12003 )
2024-02-09 22:55:49 +01:00
Peter Nelson
466e6bb524
Fix #12037 : Blurry OpenTTD font on Mac OS. ( #12047 )
2024-02-09 21:36:13 +01:00
Patric Stout
48e7dceb3c
Revert: Build signals to the next junction when dragging regardless of the Ctrl state ( #12034 )
...
This reverts commit b370ae1212
.
2024-02-09 19:34:03 +01:00
Jonathan G Rennison
bed3ef6f6b
Cleanup: Incorrect savegame number for SLV_DEPOT_UNBUNCHING constant ( #12045 )
2024-02-09 17:50:29 +00:00
Kuhnovic
e38c3c59f3
Fix #11840 : Ship pathfinder always returns a valid trackdir if one is available ( #12031 )
2024-02-09 12:31:38 -05:00
Loïc Guilloux
b68d263d5f
Fix #12014 : Remove water when area clearing ship depot ( #12030 )
2024-02-09 18:17:08 +01:00
Tyler Trahan
10bcf0172e
Fix #12022 : Adjust economy date when changing timekeeping units in Scenario Editor ( #12042 )
2024-02-09 11:45:32 -05:00
Loïc Guilloux
165f92c00b
Fix #12041 , 0c81579: Tarball extraction failing due to incorrect filename ( #12044 )
2024-02-09 17:25:56 +01:00
translators
9b323b4ef9
Update: Translations from eints
...
english (au): 7 changes by krysclarke
galician: 1 change by pvillaverde
chinese (simplified): 3 changes by WenSimEHRP
italian: 29 changes by Giredson
german: 53 changes by MagnumSociety
ukrainian: 37 changes by StepanIvasyn
dutch: 7 changes by rcpaul
spanish: 144 changes by MontyMontana
french: 4 changes by Lishouuu
portuguese: 48 changes by azulcosta
portuguese (brazilian): 156 changes by pasantoro
polish: 22 changes by azabost, 6 changes by pAter-exe
2024-02-08 18:34:34 +00:00
Tyler Trahan
16e6da020d
Cleanup: Remove unnecessary Trackdir casts ( #12038 )
2024-02-08 09:46:55 -05:00
Loïc Guilloux
82470f5c0d
Codechange 80ebcc7: OptionMenuEntries prefix is OME not ONE ( #12036 )
2024-02-08 00:22:01 +00:00
Patric Stout
11f5ac72a9
Fix #12029 : don't show Sandbox Options in multiplayer ( #12032 )
2024-02-08 00:33:24 +01:00
Heikki Piirainen
42a88fc1d6
Fix: Finnish thousands separator ( #12028 )
...
In Finnish, the recommended digit group separator is a space rather than a dot.
2024-02-07 13:35:56 -05:00
translators
d2a4f3123d
Update: Translations from eints
...
galician: 25 changes by pvillaverde
czech: 182 changes by justidan4
hungarian: 31 changes by titanicbobo, 13 changes by Norodix
indonesian: 27 changes by tsaqibfs
german: 58 changes by UnsuspiciousGooball
russian: 18 changes by Ln-Wolf
finnish: 6 changes by hpiirai, 5 changes by lanurmi
ukrainian: 39 changes by StepanIvasyn
turkish: 3 changes by metsysma
danish: 55 changes by mamure, 6 changes by bscargo
dutch: 111 changes by Afoklala, 2 changes by robert5800
spanish: 196 changes by MontyMontana
portuguese: 4 changes by azulcosta
portuguese (brazilian): 148 changes by pasantoro
polish: 42 changes by pAter-exe, 16 changes by azabost
2024-02-07 18:34:54 +00:00
Peter Nelson
2c78146da5
Change: Limit cargo types in station cargo filter, with "More..." option to show all.
2024-02-07 17:13:37 +00:00
Peter Nelson
e517e55620
Change: Include count of stations per cargo type in station cargo filter.
...
Cargo types with no stations are shaded to make the list clearer.
2024-02-07 17:13:37 +00:00
Peter Nelson
46da56b191
Change: Replace long list of cargo filter buttons with a multi-select dropdown list.
...
As before, hold ctrl while clicking on an item to toggle selections.
2024-02-07 17:13:37 +00:00
Peter Nelson
0ce30d05c8
Codechange: Add method to replace the content of a dropdown menu.
...
If necessary the dropdown list window will be resized and scrollbar enabled/disabled.
2024-02-07 17:13:37 +00:00
Peter Nelson
ac44c001a4
Codechange: Expose `FindChildWindow()` as a method of `Window`.
2024-02-07 17:13:37 +00:00
Peter Nelson
4c44e1eae0
Codechange: Add parameter to persist dropdown menus.
...
If a dropdown menu is set to persist, it will not close when an item is selected. It will close as normal if the window loses focus.
Closing the list is the responsibility of the caller.
2024-02-07 17:13:37 +00:00
Peter Nelson
b1c5e03df1
Fix: Don't issue autoreplace failed news message for command test mode. ( #12026 )
2024-02-07 12:07:00 +00:00
Peter Nelson
1f8533ebe0
Fix #12024 : Autoreplace failed news message for trains must go to lead engine. ( #12025 )
2024-02-07 08:51:03 +00:00
Loïc Guilloux
b0f3417025
Add: [Script] ScriptTileList_StationCoverage ( #12015 )
2024-02-06 20:22:18 +01:00
Loïc Guilloux
0858377e9e
Fix: [Script] Don't kill GS misusing GSText ( #12009 )
2024-02-06 19:58:30 +01:00
merni-ns
34b05465d5
Fix 5a88027: [Script] Avoid overflow in scripts when infinite money is enabled ( #12016 )
2024-02-06 19:54:38 +01:00
translators
02cdd5ba8b
Update: Translations from eints
...
spanish (mexican): 7 changes by Skinazo
english (us): 4 changes by 2TallTyler
czech: 37 changes by justidan4
chinese (simplified): 1 change by WenSimEHRP
finnish: 50 changes by Finjet-cyber, 22 changes by hpiirai
spanish: 13 changes by MontyMontana
french: 4 changes by ottdfevr
portuguese (brazilian): 141 changes by pasantoro
polish: 68 changes by pAter-exe
2024-02-06 18:35:32 +00:00
Peter Nelson
e9ea837311
Fix #12012 : Crash when opening orders of another company. ( #12013 )
...
Orders window changes tooltip depending on vehicle type but did check if widget exists.
2024-02-06 12:53:23 +00:00
dP
e2d36f626b
Fix: Focus hotkey in road/tram stop building window ( #12008 )
2024-02-05 18:14:21 -05:00
Peter Nelson
ae30ad7802
Fix #12001 : Use correct valid cargo check for old-style NewGRF town house 3rd cargo set up. ( #12006 )
2024-02-05 23:12:56 +00:00
Peter Nelson
5c630e10b7
Fix 2fd90960: Missing default vehicles and industry acceptance/production. ( #12000 )
...
* Fix 2fd90960: Missing default vehicles and industry acceptance/production.
Some default definitions are used across multiple climate types and relied on climate-independent cargo slot even though they specified a climate-dependent cargo type.
Add MixedCargoType that indirectly allows multiple labels to be specified for these.
2024-02-05 23:11:32 +00:00
Tyler Trahan
b2b4cceb49
Fix #11997 : Adjust economy date by 1920 when loading TTD/TTO savegames ( #12007 )
2024-02-05 18:09:29 -05:00
translators
05e23f8fc9
Update: Translations from eints
...
english (au): 4 changes by krysclarke
chinese (simplified): 21 changes by WenSimEHRP
korean: 4 changes by CoconutKR
finnish: 94 changes by hpiirai
catalan: 20 changes by J0anJosep
danish: 7 changes by bscargo
latvian: 4 changes by lexuslatvia
esperanto: 31 changes by JadedCtrl
portuguese (brazilian): 283 changes by pasantoro
polish: 75 changes by pAter-exe
2024-02-05 18:35:45 +00:00
Rubidium
3534214dfc
Codechange: use reference instead of pointer for CommandPacket
2024-02-05 18:57:58 +01:00
Rubidium
cb588d8d3f
Codechange: use std::vector for the incoming command queue
2024-02-05 18:57:58 +01:00
Rubidium
b3aa8a9c35
Codechange: use std::vector for the outgoing command "queues"
2024-02-05 18:57:58 +01:00
Peter Nelson
09a12f230f
Fix: Signals were incorrectly shifted by 1 pixel when selected. ( #12005 )
...
Most shifting when pressed was removed by 884b9e66
.
2024-02-05 17:55:04 +00:00
Rubidium
63708609fb
Codechange: define the size of the PacketType enumerations
2024-02-05 17:10:35 +01:00
Rubidium
6f77c2eaa2
Codechange: use size_t for the MTU limits and remove default parameter
2024-02-05 17:10:35 +01:00
Rubidium
72a44b0df6
Codechange: use references for handling received TCP packets
2024-02-05 16:30:49 +01:00
Rubidium
794f12dc24
Codechange: cascade through SendNeedGame/CompanyPassword functions, instead of duplicating logic for determining whether to call these functions
2024-02-05 16:30:49 +01:00
Rubidium
8add0bf8ec
Codechange: use references for game info serialization
2024-02-05 16:30:49 +01:00
Rubidium
84623d2123
Codechange: use references for UDP packets
2024-02-05 16:30:49 +01:00
Rubidium
031a9d4e26
Codechange: use std::unique_ptr for the Packets created to send via TCP
2024-02-05 16:30:49 +01:00
Rubidium
36e1b32ccf
Codechange: use std::deque of std::unique_ptr to queue packets
2024-02-05 16:30:49 +01:00
Rubidium
c77a45ed86
Codechange: use std::unique_ptr for receiving network packets
2024-02-05 16:30:49 +01:00
Koen Bussemaker
35c89d57f8
Codechange: Added debug printing for Water Regions
2024-02-04 22:50:04 +01:00
Koen Bussemaker
4b94457bf1
Fix #11802 : Made determining water region edge traversability more robust
2024-02-04 22:50:04 +01:00
translators
9cc17230e8
Update: Translations from eints
...
english (au): 11 changes by krysclarke
english (us): 11 changes by 2TallTyler
galician: 3 changes by pvillaverde
chinese (simplified): 17 changes by WenSimEHRP
korean: 14 changes by telk5093
german: 78 changes by SecretIdetity
russian: 11 changes by Ln-Wolf
catalan: 23 changes by J0anJosep
danish: 2 changes by bscargo
latvian: 229 changes by lexuslatvia
french: 29 changes by glx22
portuguese: 33 changes by azulcosta
portuguese (brazilian): 28 changes by pasantoro
2024-02-04 18:36:20 +00:00
Loïc Guilloux
64611a7d12
Fix #11975 , 27a920c: Running AIs also occupy a slot ( #11976 )
2024-02-04 13:19:35 +01:00
dP
ff618230fe
Codechange: Replace magic value with a variable ( #11980 )
2024-02-04 10:45:24 +00:00
Peter Nelson
2fd9096070
Change: Decouple and remove landscape-dependent cargo types. ( #11719 )
...
Cargo types of default engines, industries and houses are now specified in terms of label.
2024-02-04 10:16:08 +00:00
Peter Nelson
83d63464db
Fix #11966 : Scrollbar may be incorrect on first opening of text file window. ( #11981 )
...
The scrollbar is set up before the true monospace is loaded, so reinitialise the window after loading.
2024-02-04 10:15:20 +00:00
Loïc Guilloux
75015cdad2
Fix 6f6f099: Signals exist only on plain rail tiles ( #11977 )
2024-02-04 10:39:06 +01:00
Peter Nelson
d9461e52af
Fix #11972 : Incorrect minimum width allocated to graph. ( #11974 )
...
Width was based on actual number of data points instead of possible number of data points.
2024-02-04 08:51:19 +00:00
Jonathan G Rennison
cb13ee90ef
Fix: Second colour vehicle-type default liveries not being updated
...
When changing company default second colour
2024-02-04 07:14:39 +01:00
Tyler Trahan
d5e936c9d4
Fix #11968 : Always set string parameters to avoid undefined behavior ( #11973 )
2024-02-04 07:07:47 +01:00
Tyler Trahan
d0c753465d
Fix f6dd505: Remove unneeded error when switching between depot actions
2024-02-03 17:32:25 -05:00
Tyler Trahan
80a704ba11
Fix f6dd505: Split depot action tooltip by vehicle type
2024-02-03 17:32:25 -05:00
Rubidium
7a740eefa0
Codechange: use std::unique_ptr for managing SaveLoadParams
2024-02-03 21:38:33 +01:00
Rubidium
4b372b6050
Codechange: use std::shared_ptr to manage saveload filters instead of manually trying to avoid double frees
2024-02-03 21:38:33 +01:00
translators
bc4ed9085d
Update: Translations from eints
...
english (au): 3 changes by krysclarke
english (us): 3 changes by 2TallTyler
chinese (simplified): 3 changes by WenSimEHRP
korean: 4 changes by telk5093
russian: 19 changes by Ln-Wolf
latvian: 67 changes by lexuslatvia
portuguese: 3 changes by azulcosta
portuguese (brazilian): 3 changes by pasantoro
2024-02-03 18:34:44 +00:00
Patric Stout
0dfba564ab
Add: "restart current" console command to regenerate the map based on current settings ( #11963 )
2024-02-03 14:48:54 +00:00
Peter Nelson
17d02ed45f
Feature: NewGRF properties to set town production effect and multiplier. ( #11947 )
...
Town production effect is modelled on town acceptance (growth) effect, and so takes an original cargo slot for behaviour instead of a direct value.
NewGRF feature 0x0B, property 0x1E, takes 1 byte.
Valid values are:
- 0x00 to behave like passengers
- 0x02 to behave like mail
- 0xFF to behave like other cargo (i.e. not produced.)
If not set, town production effect is set based on the cargo label ('PASS' or 'MAIL').
Town production multiplier allows adjusting the amount of cargo produces when Town Production Effect is set, without needing to use callbacks.
NewGRF feature 0x0B (cargo), property 0x1F, accepts a 2 byte (word) value, similar to the cargo capacity multiplier property. The default value is 256 which means 100%, i.e. normal rate.
2024-02-03 13:58:31 +00:00
Tyler Trahan
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot ( #11945 )
2024-02-03 08:04:24 -05:00
Patric Stout
a0c480c4e4
Change: "restart" now uses your newgame settings, where "reload" uses the current settings ( #11962 )
2024-02-03 10:19:47 +00:00
Charles Pigott
59f6c199bf
Fix #11528 : Don't auto-build past tunnelbridge ends ( #11606 )
2024-02-03 11:18:10 +01:00
kiwitreekor
8d62a8f0f0
Add: Station variable 6B to get extended station id of nearby tiles ( #10953 )
2024-02-03 11:17:49 +01:00
Patric Stout
849fd5ae03
Change: [Script] replace easy/medium/hard values with default value ( #11959 )
2024-02-03 09:15:03 +00:00
Loïc Guilloux
27a920c4a8
Change: Allow to configure AI slots above max_no_competitors ( #11961 )
2024-02-03 09:42:16 +01:00
Patric Stout
fe4494ec11
Change: only open story-book in center when a GS does it ( #11916 )
2024-02-03 08:09:55 +01:00
Patric Stout
59a046de9c
Fix: don't use non-owning string pointer in StringParameter ( #11952 )
...
The string pointer can become invalid before the reference is
dropped, causing out-of-bound access in windows like ErrorWindow,
or News that copy 10 or 20 parameters for their internals.
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
2024-02-02 23:01:54 +01:00
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
frosch
8a4f0c4b02
Codechange: Simplify error throwing/catching in squirrel compiler.
2024-02-02 22:29:28 +01:00
Tyler Trahan
f2db624e85
Change: Add dividers between signal groups ( #11897 )
2024-02-02 15:52:20 -05:00
Tyler Trahan
6f6f09910d
Fix #10118 : Cycle through current signal group, not just path signals ( #11798 )
2024-02-02 15:51:57 -05:00
Peter Nelson
2e6c6b719f
Change: Link houses production on industry chain graph by TPE_PASSENGERS or TPE_MAIL cargo.
2024-02-02 20:37:49 +00:00
Peter Nelson
03b2640ea1
Change: Passenger subsidies are generated for any TPE_PASSENGER cargo type.
2024-02-02 20:37:49 +00:00
Peter Nelson
6d93fa649c
Change: Towns generate cargo based on town production effect.
...
This replaces the fixed handling of passengers and mail.
2024-02-02 20:37:49 +00:00
Peter Nelson
8d69d0549d
Codechange: Add town production effect type and assign to cargo types.
2024-02-02 20:37:49 +00:00
Peter Nelson
60dcf3b5e2
Codechange: Rename TownEffect to TownAcceptanceEffect.
...
This makes it clearer that TownEffect only affects acceptance behaviour.
2024-02-02 20:37:49 +00:00
translators
782cbe95d6
Update: Translations from eints
...
chinese (simplified): 49 changes by WenSimEHRP
russian: 47 changes by Ln-Wolf
catalan: 71 changes by J0anJosep
dutch: 114 changes by Afoklala
portuguese: 46 changes by azulcosta
portuguese (brazilian): 29 changes by pasantoro
2024-02-02 18:35:20 +00:00
Loïc Guilloux
4e26e33805
Change: Improve ScriptSettings windows ( #11958 )
2024-02-02 18:08:05 +00:00
Loïc Guilloux
0e738dda88
Fix #11948 : [Win32] Convert error messages to utf8 ( #11951 )
2024-02-02 16:30:23 +01:00
Loïc Guilloux
3545decf2d
Cleanup e28edf6945: [Script] Left over CONFIG_RANDOM reference in documentation ( #11954 )
2024-02-02 14:28:02 +00:00
Loïc Guilloux
a2f31c4e61
Change: Improve AIConfig window ( #11949 )
2024-02-02 14:34:49 +01:00
Jonathan G Rennison
c0b8e58404
Codechange: Simplify SetBitIterator
...
Use FindFirstBit and KillFirstBit, allowing simpler iterator equality
Add simple test
2024-02-01 23:05:57 +01:00
Patric Stout
dce7d5d9b0
Fix #8253 : allow rendering graphs with values over 2**31 / 10 ( #11915 )
2024-02-01 22:53:30 +01:00
Patric Stout
770ca3a624
Fix #8253 : don't use INVALID_DATAPOINT for a valid value ( #11913 )
2024-02-01 22:47:11 +01:00
dP
9a2f247de9
Fix: Display rank correcly with more than 15 companies in a league table
2024-02-01 20:17:31 +01:00
translators
e1fbaf6f7f
Update: Translations from eints
...
english (au): 5 changes by krysclarke
english (us): 5 changes by 2TallTyler
chinese (simplified): 8 changes by WenSimEHRP
korean: 5 changes by telk5093
russian: 14 changes by Ln-Wolf
latvian: 4 changes by lexuslatvia
portuguese: 11 changes by azulcosta
portuguese (brazilian): 5 changes by pasantoro
2024-02-01 18:36:06 +00:00
Loïc Guilloux
ab1407fc43
Fix: [Script] Apply random deviation only at script start ( #11944 )
2024-02-01 10:48:40 +01:00
Patric Stout
e28edf6945
Remove: [Script] CONFIG_RANDOM from AddSetting flags ( #11942 )
...
It had a very weird interaction, and was only ever used by a single
AI.
2024-01-31 22:24:36 +00:00
merni-ns
ccaa383e85
Fix #11938 : Check infinite money setting in cases where it was missed ( #11939 )
2024-01-31 20:11:48 +01:00
Patric Stout
363e251a10
Change: make -dnet=9 give traces of the details of the network protocol ( #11931 )
2024-01-31 19:36:41 +01:00
translators
bbae16574a
Update: Translations from eints
...
english (au): 10 changes by krysclarke
english (us): 10 changes by 2TallTyler
vietnamese: 10 changes by KhoiCanDev
chinese (simplified): 62 changes by WenSimEHRP, 4 changes by XiaoJi-Game
korean: 11 changes by telk5093
russian: 5 changes by Ln-Wolf
finnish: 32 changes by hpiirai
portuguese (brazilian): 12 changes by pasantoro
2024-01-31 18:34:42 +00:00
Patric Stout
3e6ed6f44a
Fix #9697 : don't extend the Online Players window too wide on opening ( #11936 )
2024-01-31 19:03:07 +01:00
frosch
4d2fc28834
Codechange: wrap 'if' in macros into 'do { ... } while (false)', so it does not break on following 'else'.
2024-01-30 23:43:42 +01:00
frosch
e0bd1dd42e
Codechange: replace a macro with a lambda.
2024-01-30 23:43:42 +01:00
Patric Stout
46b1114c67
Change: forcefully enable prefixing logs with date ( #11930 )
...
Additionally, add the log-level to the log message.
2024-01-30 22:02:16 +00:00
Tyler Trahan
41f2eed425
Feature: Settings to scale cargo production of towns and industries ( #10606 )
2024-01-30 15:11:46 -05:00
merni-ns
96651b5ada
Cleanup: Use standard comment format ( #11929 )
2024-01-30 18:43:42 +00:00
translators
3e5ba614ab
Update: Translations from eints
...
chinese (simplified): 7 changes by WenSimEHRP
russian: 24 changes by Ln-Wolf
finnish: 61 changes by hpiirai
spanish: 1 change by MontyMontana
french: 134 changes by glx22
portuguese: 22 changes by azulcosta
portuguese (brazilian): 57 changes by pasantoro
2024-01-30 18:36:34 +00:00
glx22
a502453033
Fix 48b6b18: Increase MAX_VALUATE_OPS to match the previous limit
2024-01-30 19:15:54 +01:00
dP
897b59c158
Add: [GS] Allow to set max loan for each company separately ( #11224 )
2024-01-30 19:15:19 +01:00
dP
b370ae1212
Change: Build signals to the next junction when dragging regardless of the Ctrl state ( #9637 )
2024-01-30 19:14:26 +01:00
merni-ns
5a88027a19
Feature: Infinite money mode ( #11902 )
2024-01-30 18:01:02 +00:00
Patric Stout
7acf78964f
Remove: "generation_seed" from config, as it was a write-only value ( #11927 )
2024-01-30 17:02:35 +00:00
Patric Stout
a05b7acec8
Change: position error window closer to cursor on large screens ( #11923 )
2024-01-30 14:57:49 +01:00
Tyler Trahan
2b1f78d2ca
Fix: Use alternate timekeeping units in savegame title ( #11912 )
2024-01-29 22:11:00 +00:00
Peter Nelson
435d48e182
Fix: Sandbox window does not reduce height when interface scale is reduced. ( #11924 )
...
line_height was only ever made larger, and icon.height ignored.
2024-01-29 22:01:22 +00:00
Patric Stout
4024bb5554
Fix #11910 : use economy timer for dmp_cmds files ( #11925 )
2024-01-29 21:58:22 +00:00
Patric Stout
f1842f9144
Add: {CURRENCY_SHORT} only did k / m suffix. Add bn / tn and make translatable. ( #11921 )
...
64bit numbers are REALLY large, but our compact method was build
for 32bit numbers. Extend it to 64bit.
2024-01-29 20:20:35 +00:00
translators
1d4b10a8b8
Update: Translations from eints
...
english (au): 86 changes by krysclarke
english (us): 105 changes by 2TallTyler
chinese (simplified): 29 changes by WenSimEHRP
korean: 156 changes by telk5093
russian: 4 changes by Ln-Wolf
danish: 1 change by bscargo
spanish: 132 changes by lrlopez
portuguese: 52 changes by azulcosta
portuguese (brazilian): 181 changes by pasantoro
2024-01-29 18:34:38 +00:00
dP
acaceb45ba
Codechange: Make command constant names consistent with command proc ( #11920 )
2024-01-29 13:41:36 +01:00
Peter Nelson
bf013097a7
Fix #11918 : Houses should build only next to road stops, not any station type. ( #11919 )
2024-01-29 01:27:34 +00:00
translators
809b599c21
Update: Translations from eints
...
english (au): 48 changes by krysclarke
english (us): 32 changes by 2TallTyler
vietnamese: 10 changes by KhoiCanDev
chinese (simplified): 46 changes by WenSimEHRP, 2 changes by XiaoJi-Game
korean: 58 changes by telk5093
russian: 57 changes by Ln-Wolf
finnish: 22 changes by hpiirai
catalan: 30 changes by J0anJosep
danish: 12 changes by bscargo
dutch: 45 changes by Afoklala
spanish: 214 changes by lrlopez
french: 8 changes by glx22
portuguese: 23 changes by azulcosta
portuguese (brazilian): 30 changes by pasantoro
polish: 4 changes by pAter-exe
2024-01-28 15:00:40 +00:00
Koen Bussemaker
5a55c4a934
Feature: [NewGRF] Allow higher max speeds for ships
2024-01-28 14:54:51 +01:00
Loïc Guilloux
461d69a8f6
Fix #11907 : Allow genders for time related {UNITS_XXX} ( #11908 )
2024-01-28 14:45:08 +01:00
frosch
17dfc1a49a
Codechange: Replace SF_GUI_NEGATIVE_IS_SPECIAL with a settings value callback.
2024-01-28 14:44:24 +01:00
frosch
28c83089f6
Codechange: Remove TKM string code.
2024-01-28 14:44:24 +01:00
frosch
9344b50435
Codechange: Remove TKM from settings texts.
2024-01-28 14:44:24 +01:00
frosch
9e9a8ca7f6
Codechange: Add callbacks to IntSettingDesc to support dynamic strings for title, help and values.
2024-01-28 14:44:24 +01:00
frosch
022b9e92d2
Codechange: Move settings string formatting into IntSettingDesc members.
2024-01-28 14:44:24 +01:00
frosch
a9d1078434
Codechange: Remove TKM from town action tooltips.
2024-01-28 14:44:24 +01:00
frosch
abfeeea849
Codechange: Compose engine preview text from multiple strings.
2024-01-28 14:44:24 +01:00
frosch
68c64d2511
Codechange: Remove TKM string codes by duplicating strings.
2024-01-28 14:44:24 +01:00
frosch
bd3d687bf9
Codechange: Merge all BaseGraphWindow widget enums into one.
...
Previously it relied on some enum entries using the same integer value.
2024-01-28 14:44:24 +01:00
frosch
69f47caf3f
Codechange: Remove TKM from vehicle list sorting dropdowns.
2024-01-28 14:44:24 +01:00
frosch
9741510396
Fix: Wallclock setting should not affect percent-based service interval increments.
2024-01-28 14:44:24 +01:00
Tyler Trahan
86981c0983
Fix: Extra refit button when train/RV is in a depot ( #11904 )
2024-01-28 08:01:09 -05:00
Patric Stout
05b253b33b
Fix ea8c1d85: improve smoothness of smooth-scrolling for 60+Hz screens ( #11884 )
2024-01-28 09:56:21 +00:00
SamuXarick
0c4e509b60
Fix #10439 : [GS] Validate story page button colour, flags, cursor and vehicle type ( #11892 )
...
Adds GSStoryPage::IsValidStoryPageButtonColour, GSStoryPage::IsValidStoryPageButtonFlags and GSStoryPage::IsValidStoryPageButtonCursor to the API.
Add missing enforced preconditions to validate parameters passed to MakePushButtonReference, MakeTileButtonReference and MakeVehicleButtonReference.
2024-01-28 00:29:10 +01:00
SamuXarick
76f0f9e386
Fix #10438 : [GS] Validate story page element type for ScriptStoryPage::NewElement ( #11888 )
...
Fixes a crash that happens if an invalid StoryPageElementType is passed to ScriptStoryPage::NewElement.
Adds an enforced precondition that tests the validity of StoryPageElementType.
Adds GSStoryPage::IsValidStoryPageElementType to the API.
2024-01-27 22:11:02 +01:00
Peter Nelson
6d276698b6
Fix: Memory leak in ICUParagraphLayout::NextLine() ( #11895 )
...
This function calls icu::BreakIterator::createLineInstance() but does not clean up after it.
Instead use a static instance that is cloned (for thread-safety) and deleted as necessary.
2024-01-27 20:13:42 +00:00
Jonathan G Rennison
1df7b21ee3
Fix #11889 : ConstructWindow not called from SurveyResultTextfileWindow constructor ( #11903 )
2024-01-27 19:44:10 +00:00
Peter Nelson
d3c673e20b
Fix #11894 : Defer window OnResize event to avoid processing multiple times per input tick. ( #11900 )
2024-01-27 18:44:27 +00:00
Patric Stout
8c5ad1ade7
Fix fd9e72a7: actually use the parameter value instead of the current date ( #11898 )
2024-01-27 17:34:04 +00:00
Peter Nelson
fef0bfcfd3
Fix: TextfileWindow called virtual methods before constructor completed. ( #11889 )
...
SetStringParameters() was called during widget tree init in the constructor.
Calls within a constructor cannot call the derived classes methods. This would result in invalid data being passed to the string system, which could then crash.
2024-01-27 14:45:37 +00:00
Kuhnovic
8a4a99b7e8
Fix #5713 : FindClosestShipDepot only considers depots that are actually reachable ( #11768 )
2024-01-27 15:06:14 +01:00
Patric Stout
89520f5665
Add: show in multiplayer the amount of hours a game has been unpaused ( #11886 )
2024-01-27 12:35:09 +01:00
Patric Stout
2bbc95cac3
Fix: update server as offline when unexpected disconnect during refresh ( #11891 )
2024-01-27 11:23:25 +01:00
Richard Wheeler
8770ef6bd9
Change: Make street lights transparent with houses ( #11828 )
2024-01-27 09:25:13 +00:00
Rubidium
7916e97c62
Update: opengl; glext header to 20231129, wglext header to 20231018
2024-01-27 09:57:25 +01:00
Rubidium
a23cd4aef7
Update: nlohmann/json to 3.11.3
2024-01-27 09:57:25 +01:00
Rubidium
79b684b8ac
Update: fmt to 10.2.0
2024-01-27 09:57:25 +01:00
Patric Stout
80ebcc72fb
Change: rebrand Cheats as Sandbox Options ( #11874 )
2024-01-26 19:56:01 +01:00
Tyler Trahan
28716548d2
Feature: Setting to automatically restart server based on hours played ( #11142 )
2024-01-26 10:25:25 -05:00
Loïc Guilloux
09b66751cf
Fix b38d3c2208: missing water regions invalidation when building locks ( #11879 )
2024-01-25 22:18:26 +00:00
Patric Stout
36579dd18b
Change: set smooth-scrolling on by default ( #11860 )
2024-01-25 11:07:36 +01:00
Patric Stout
ea8c1d8597
Change: make for smooth-scrolling based on actual time
...
This means if rendering takes a bit longer, scrolling goes a bit
quicker, making travel time always about the same time for the
same distance.
2024-01-25 10:29:48 +01:00
Jonathan G Rennison
cbb24b5d71
Codechange: Split bit numbers from values in RailTypeFlags, RoadTypeFlags enums ( #11877 )
2024-01-24 22:24:34 +01:00
Tyler Trahan
21581b6ab3
Feature: Setting for minutes per calendar year ( #11428 )
2024-01-23 18:33:54 -05:00
translators
be8ed26db6
Update: Translations from eints
...
norwegian (nynorsk): 5 changes by translators
slovenian: 5 changes by translators
faroese: 5 changes by translators
hebrew: 5 changes by translators
afrikaans: 5 changes by translators
urdu: 5 changes by translators
persian: 5 changes by translators
bulgarian: 5 changes by translators
belarusian: 5 changes by translators
basque: 5 changes by translators
russian: 23 changes by Ln-Wolf
finnish: 1 change by hpiirai
malay: 5 changes by translators
scottish gaelic: 5 changes by translators
croatian: 5 changes by translators
latin: 5 changes by translators
french: 49 changes by glx22, 8 changes by ottdfevr
portuguese (brazilian): 80 changes by pasantoro
icelandic: 5 changes by translators
2024-01-23 18:40:53 +00:00
Tyler Trahan
fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units ( #11341 )
2024-01-23 11:36:09 -05:00
Tyler Trahan
bbdbf9a589
Add: AI/GS Time Mode to choose between economy (default) and calendar time ( #11603 )
2024-01-23 10:42:10 -05:00
Patric Stout
a1487ce620
Add: list_[scenario|heightmap] and load_[scenario|height] console commands ( #11867 )
2024-01-23 14:01:25 +01:00
Tyler Trahan
76499b96fb
Fix fa479c4: Typo in vehicle list tooltip ( #11871 )
2024-01-22 23:17:26 +00:00
Patric Stout
090616b4c9
Add: allow loading heightmaps from command-line ( #11870 )
...
If you want to load a file from tar, you have to give the file
inside the tar in order for it to work:
<tar-file>/<dir-in-tar>/<file>.png
2024-01-22 22:35:25 +00:00
Kuhnovic
bf3fd6526b
Fix: use correct size parameter type in TileArea constructors ( #11869 )
2024-01-22 22:06:42 +00:00
Patric Stout
11d4f1b2bd
Fix d3b2a576: LOAD_HEIGHTMAP / LOAD_SCENARIO are Scenario Editor modes ( #11868 )
2024-01-22 21:28:00 +00:00
Patric Stout
d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc ( #11628 )
2024-01-22 19:22:45 +00:00
Patric Stout
75f21065c9
Codechange: refactor DecodeHexText to a generic purpose ConvertHexToBytes ( #11866 )
...
DecodeHexText() does more than just decoding hex. ConvertHexToBytes()
now only does pure hex decoding. This required a bit of refactoring
for the code using DecodeHexText().
2024-01-22 19:42:47 +01:00
translators
786cc85e86
Update: Translations from eints
...
english (au): 155 changes by krysclarke
norwegian (bokmal): 9 changes by v0nNemizez
english (us): 155 changes by 2TallTyler
chinese (simplified): 9 changes by WenSimEHRP
russian: 41 changes by Ln-Wolf
finnish: 1 change by hpiirai
2024-01-22 18:40:42 +00:00
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
EmperorJake
419f48dfb3
Change: set amount of smoke/sparks to "realistic" by default ( #11624 )
2024-01-21 21:23:35 +00:00
Kuhnovic
b38d3c2208
Change: simplified water region evaluation, removed savegame data ( #11750 )
2024-01-21 20:56:50 +00:00
Patric Stout
1985e7415b
Fix: smooth-scrolling large distances didn't got smoothly in one direction ( #11861 )
2024-01-21 20:52:44 +00:00
Peter Nelson
c7d5cedc7b
Codechange: Replace C-style TICC/TOCC macros with C++ RAII implementation. ( #11857 )
...
Usage is more robust, and will always include timing when the TicToc object goes out of scope.
2024-01-21 18:38:40 +00:00
Peter Nelson
691c628b07
Codechange: Use named initialization for unscaled WidgetDimensions. ( #11859 )
...
Remove now-unused WD_* enums.
2024-01-21 18:10:49 +00:00
Patric Stout
0c81579363
Fix #6377 : two tarballs with the same folder in them were considered as one ( #11855 )
2024-01-21 19:06:58 +01:00
SamuXarick
6588680ccc
Revert #6923 : start_date parameter is no longer in use
...
There was an issue with the start_date parameter for AIs. It did not let Random AIs to have their configure button clickable once the game has started, and this was due to the start_date not being pushed into the config.
But now that start_date is no longer in use since #10653 , this workaround can be safely removed.
2024-01-21 18:49:08 +01:00
Patric Stout
f35e257adc
Fix #9722 : create vital windows as soon as local_company is set ( #11858 )
...
Many places use local_company to detect whether world generation is
done, and blindly assume all vital windows exists when local_company
is set.
2024-01-21 17:36:33 +00:00
Peter Nelson
a9a0bfffc1
Change: Disable building rail infrastructure if train build limit is zero. ( #11847 )
...
This matches the behaviour of road, ship and aircraft infrastructure.
2024-01-21 16:51:23 +00:00
Peter Nelson
89474701bc
Codechange: Use templates to deduplicate goal widgets. ( #11852 )
2024-01-21 16:23:17 +00:00
Patric Stout
fa8294ebe7
Remove: rdtsc and TIC/TOC based on CPU ticks ( #11856 )
...
Use TIC/TOC based on std::chrono instead. This information is also
easier to compare with others, as although it depends on CPU, it
means a bit more if "yours takes 4ms and mine takes 10ms".
2024-01-21 15:38:15 +00:00
Patric Stout
fe035c306e
Codechange: prevent out-of-bound read (even if the result is never used) ( #11853 )
2024-01-21 14:25:00 +00:00
Peter Nelson
8797cc7ef2
Codechange: Replace GroupStatistics' num_engines with std::map. ( #11849 )
...
This removes manual memory management with calloc/free calls, and prevents potentially large arrays being allocated for each group.
2024-01-21 14:09:44 +00:00
Peter Nelson
c0ab436077
Codechange: Store Colours in Colours type. ( #11625 )
...
This reduces casts, some magic numbers, and introduces a bit of type-safety.
2024-01-21 13:23:04 +00:00
Peter Nelson
0841978304
Codechange: Use vector and iterators to store old/new vehicles during autoreplace. ( #11851 )
...
This avoids malloc/free of 3 arrays along index counting, and the data for each part is kept together.
2024-01-21 09:21:22 +00:00
Rubidium
2d77f09a81
Codechange: use std::shared_ptr for vector of TCPConnecters
2024-01-20 23:03:44 +01:00
Patric Stout
71b8801b61
Fix bd85f61a: [Linux] don't include sys/random.h on older glibc systems ( #11844 )
2024-01-20 20:43:06 +00:00
Tyler Trahan
fa479c4a7c
Cleanup: Describe modifier keys more consistently in tooltips ( #11716 )
2024-01-20 19:26:39 +00:00
Tyler Trahan
500870627d
Change: Rewrite a few main toolbar tooltips ( #11717 )
2024-01-20 13:49:34 -05:00
translators
4d79d86812
Update: Translations from eints
...
catalan: 18 changes by J0anJosep
2024-01-20 18:38:38 +00:00
Peter Nelson
d6ccfdbbd9
Fix #11827 : Make Layouter::GetCharPosition() aware of ligatures. ( #11831 )
...
When ligatures happen the precise individual character position is not known, so instead return the previous position (which is that of the ligature.)
2024-01-20 17:16:42 +00:00
Rubidium
086cbd0d72
Codechange: add constexpr to math functions where applicable
2024-01-20 17:30:36 +01:00
Rubidium
dfe70181f1
Codechange: add constexpr to bitmath functions where applicable
2024-01-20 17:30:36 +01:00
Rubidium
4c51534b6a
Remove: LeastCommonMultiple / GreatestCommonDivisor
...
Use std::lcm / std::gcd instead.
2024-01-20 16:45:21 +01:00
Rubidium
1403f24fa9
Codechange: replace LeastCommonMultiple with std::lcm
2024-01-20 16:45:21 +01:00
Patric Stout
bd85f61a40
Change: use a stronger hash and actual random information to generate Uids
2024-01-20 14:23:03 +01:00
Patric Stout
37244bc8c5
Codechange: MacOS already has MIN/MAX macros defined
...
This is caused because we use PreCompile Headers, and one of them
includes a system headers which defines MIN/MAX.
2024-01-20 14:23:03 +01:00
Patric Stout
63a3d56b8a
Add: monocypher 4.0.2
...
Monocypher will take care of all our encryption needs; as most
OSes and vcpkg doesn't have it available, we vendor it.
2024-01-20 14:23:03 +01:00
Rubidium
6b21368bc2
Codechange: replace FIND_FIRST_BIT/FindFirstBit2x64 with FindFirstBit
2024-01-19 21:10:39 +01:00
Rubidium
8faaedeff9
Codechange: replace hand written function to find first/last bit with C++ variant
2024-01-19 21:10:39 +01:00
Peter Nelson
903119115b
Fix 9602de4: FinaliseCargoArray did nothing. ( #11839 )
...
`CargoSpec::Iterate()` deliberately skips invalid cargo types, but `FinaliseCargoCarry()` is only interested in them.
2024-01-19 20:07:47 +00:00
translators
db7697bcdf
Update: Translations from eints
...
chinese (simplified): 22 changes by WenSimEHRP
romanian: 37 changes by bnegrut
2024-01-19 18:40:43 +00:00
Peter Nelson
9cf47af490
Change: Invalidate music volume when restarting music playback on Windows. ( #11836 )
2024-01-19 17:01:36 +00:00
Peter Nelson
6a2c37b4ed
Fix 09f585b: Crash if font name ends with comma or comma and whitespace on Linux. ( #11838 )
2024-01-19 08:03:32 +00:00
Rubidium
1c694e433d
Codechange: use std::popcount instead of hand written loop
2024-01-19 06:48:55 +01:00
Peter Nelson
ae575a7a5b
Codechange: Store text run positions in vector of points.
...
This simplifies the interlaced vector of x/y positions.
2024-01-19 00:08:31 +00:00
Peter Nelson
f7cc88f370
Codechange: Return vector references instead of pointer to first item.
2024-01-19 00:08:31 +00:00
Rubidium
2f8de227dc
Remove: unused OTTD_ALIGNMENT define and ReadLE16(Un)aligned
2024-01-18 23:29:15 +01:00
Rubidium
ee00c7b159
Codechange: use TO_LE16 directly when reading language file offsets
2024-01-18 23:29:15 +01:00
translators
32b99bf77c
Update: Translations from eints
...
portuguese: 4 changes by azulcosta
2024-01-18 18:40:14 +00:00
Loïc Guilloux
bf4b669628
Fix: [Script] Improve ScriptText validation ( #11721 )
...
The validation is now done in two steps:
- First we get the list of parameters in the same order they used to be in encoded string
- Then we validate the parameter types like FormatString would use them while encoding the string
2024-01-18 18:06:30 +01:00
Peter Nelson
28ef5146ba
Fix #11646 : Non-thread safe shared buffer returned from GetLogPrefix().
...
Return string from GetLogPrefix instead of shared string's buffer.
2024-01-18 17:40:25 +01:00
Patric Stout
2b599c9d00
Fix: [HarfBuzz] make HarfBuzz use the same glyphs as we render
2024-01-18 10:41:01 +01:00
Patric Stout
a24c2bf10a
Codechange: [HarfBuzz] hb-ft will set the scaling on its own
2024-01-18 10:41:01 +01:00
Peter Nelson
7faa3848de
Change: Mark whole screen dirty when toggling font AA. ( #11825 )
2024-01-17 23:04:07 +00:00
Rubidium
4cc97e04e6
Fix #11801 , 51f1e93: CalcClosestTownFromTile needs the kd-tree to be valid
2024-01-17 23:40:19 +01:00
Peter Nelson
0be26f5856
Change: Remove extra padding from query text. ( #11823 )
...
This window uses 'modalpopup' padding so does not need extra padding on its text.
2024-01-17 22:17:14 +00:00
Rubidium
47c0184a0b
Codechange: replace ROR/ROL with std::rotr/rotl
2024-01-17 23:05:40 +01:00
frosch
f457be5a27
Fix #11819 , aa5ba5b: Out-of-bounds access in linkgraph GUI. ( #11821 )
2024-01-17 22:26:33 +01:00
Rubidium
2d77cf9c80
Codechange: replace StrStartsWith/StrEndsWith with starts_with and ends_with
2024-01-17 19:48:22 +01:00
translators
384b804f9c
Update: Translations from eints
...
english (au): 1 change by krysclarke
chinese (simplified): 21 changes by WenSimEHRP
danish: 4 changes by bscargo
french: 2 changes by ottdfevr
portuguese (brazilian): 5 changes by pasantoro
polish: 5 changes by pAter-exe
2024-01-17 18:39:56 +00:00
Peter Nelson
341bdabc70
Fix #11815 , bb491127: Missing brackets prevented vehicles turning properly. ( #11816 )
2024-01-17 13:23:55 +00:00
Jonathan G Rennison
fd0528a9b4
Fix: Excessive switching of horizontal scale for FPS graph 60 Hz categories
2024-01-17 06:34:17 +01:00
Jonathan G Rennison
17d47ba06f
Fix 661bdae2: cargo_payment not cleared when aircraft loading cancelled
2024-01-17 06:33:54 +01:00
Patric Stout
fd073a2810
Remove: replace custom span with std::span
2024-01-17 00:25:08 +01:00
Patric Stout
bb49112784
Codechange: switch our codebase to C++20
2024-01-17 00:25:08 +01:00
Michael Lutz
fd59393899
Fix #11791 , e1f5be62: Run missing-glyph detection after toggling sprite font. ( #11812 )
2024-01-17 00:00:26 +01:00
Rubidium
aa5ba5bd7f
Codechange: allow certain enumeration to be added
...
Otherwise C++20 doesn't like it.
2024-01-16 23:30:23 +01:00
Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
2024-01-16 21:57:05 +00:00
Peter Nelson
71b7ba0daa
Codechange: Allow constexpr NWidgetPart construction.
2024-01-16 21:57:05 +00:00
Peter Nelson
a5b6e17556
Codechange: Make geometry methods constexpr.
2024-01-16 21:57:05 +00:00
Peter Nelson
68843e3a96
Codechange: Move WidgetDimensions::unscaled to header to allow const use.
2024-01-16 21:57:05 +00:00
Peter Nelson
7eecd7512f
Codechange: Remove redundant struct keyword.
2024-01-16 21:57:05 +00:00
Patric Stout
6860a86d45
Codechange: remove all u8 prefix in favour of compile-time option ( #11807 )
2024-01-16 21:33:53 +00:00
Patric Stout
6550682b49
Codechange: minor bits and pieces related to fmt::format() ( #11806 )
...
- Don't make run-time formatting what can be done compile-time.
- Be explicit about run-time formatting.
- Fix datetime printing.
2024-01-16 21:10:34 +00:00
Patric Stout
0b7410d979
Codechange: compile-time validate the string format of IConsolePrint ( #11804 )
...
This means we can no longer use runtime picking what string to use.
2024-01-16 21:04:35 +00:00
Patric Stout
8b4c5a6269
Codechange: compile-time validate the string format of SlErrorCorruptFmt ( #11805 )
2024-01-16 20:58:55 +00:00
Peter Nelson
d005e8f8bd
Fix 884b9e66: No need to include extra pixel for pressed state. ( #11803 )
2024-01-16 20:50:46 +00:00
translators
2efd897691
Update: Translations from eints
...
english (au): 4 changes by krysclarke
english (us): 4 changes by 2TallTyler
chinese (simplified): 8 changes by WenSimEHRP
korean: 4 changes by telk5093
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
french: 8 changes by ottdfevr
2024-01-16 18:39:39 +00:00
Rubidium
661bdae2e5
Fix #11785 , cf16f45: when bumping aircraft into the air, remove them from the loading vehicle list again
2024-01-16 00:08:19 +01:00
Rubidium
f99793547e
Fix fbd71a9: for TTO savegames, getting the savegame type left the file pointing to the wrong location
2024-01-16 00:08:19 +01:00
Rubidium
d5518f6263
Fix 36a0818: TTO did not save company shares
2024-01-16 00:08:19 +01:00
Rubidium
51f1e939e8
Change: be more resilient against missing towns in old loader
2024-01-16 00:08:19 +01:00
Rubidium
67b405d2f6
Fix #11783 , 953445a: TTO savegames are not 65536 by 65536
2024-01-16 00:08:19 +01:00
Rubidium
f5b320e502
Codechange: use range based for loop, instead of tile numbers
2024-01-16 00:08:19 +01:00
Rubidium
b09a4384d9
Codechange: remove need to use separate array for old_map3
2024-01-16 00:08:19 +01:00
Peter Nelson
8510f7bd00
Fix: NWidgetParts must use unscaled dimensions. ( #11794 )
2024-01-15 23:02:25 +00:00
EmperorJake
64bc07ff4e
Change: Make "middle" the default stopping location for trains in platforms ( #11605 )
2024-01-15 22:10:27 +01:00
Patric Stout
375074577f
Fix: [SDL] remove hint to avoid hardware acceleration ( #11790 )
...
This hint was once needed because of the way we handled surfaces.
But as OpenGL already uses a hardware surface, we already had to
fix all the issues that comes with it. As that is generic code,
this hint is no longer actually needed. Further more, recent SDL
versions break because of it on Wayland.
2024-01-15 21:57:55 +01:00
Loïc Guilloux
b18e78e21d
Change: Redesign script debug window ( #11782 )
2024-01-15 21:41:44 +01:00
Tyler Trahan
68814bd912
Codechange: Rename SIGTYPE_NORMAL to SIGTYPE_BLOCK ( #11788 )
2024-01-15 15:27:48 -05:00
Tyler Trahan
4a194482ea
Fix e1f5be6: Typo when selecting traditional sprite font ( #11789 )
2024-01-15 20:24:26 +00:00
translators
a1690d5b7b
Update: Translations from eints
...
portuguese (brazilian): 1 change by pasantoro
2024-01-15 18:39:20 +00:00
Jonathan G Rennison
94e74a45c2
Fix: Viewport virt coords not updated when sprite font toggled ( #11784 )
2024-01-15 19:16:04 +01:00
Peter Nelson
53fa54f8e9
Fix e1f5be62: Clear font cache when toggling sprite font. ( #11780 )
...
This is necessary for the sprite font height and ascender to be updated correctly.
2024-01-15 00:21:11 +00:00
Patric Stout
32fc740582
Fix: [SDL2] fullscreen always used the resolution of the first display ( #11779 )
2024-01-14 22:41:51 +00:00
Patric Stout
302ba93471
Fix: [SDL2] only resolutions of the first display were shown ( #11778 )
2024-01-14 22:25:54 +00:00
Michael Lutz
e1f5be6244
Add: GUI options to select sprite font and AA mode for all fonts.
2024-01-14 22:50:56 +01:00
Michael Lutz
20f1a0dc57
Fix: [OSX] Spurious log message when a sprite glyph was layouted.
2024-01-14 22:50:56 +01:00
Michael Lutz
36cf6b1d13
Feature: Scalable OpenTTD TrueType font made by Zephyris.
...
This uses the normal variant for the small font, not the all-caps version.
2024-01-14 22:50:56 +01:00
Michael Lutz
6e766a2e81
Change: Allow TrueType fonts to provide our private-use glyphs.
2024-01-14 22:50:56 +01:00
Loïc Guilloux
37610af0e4
Fix: Don't replace stripped characters with '?' in console ( #11777 )
2024-01-14 21:49:42 +00:00
Rubidium
564441e822
Remove: Debug redirect over network
...
It does not work for dedicated servers because upon starting the process to
resolve the address to redirect to gets killed. Also with all the async going
on in the network code, the debug redirection will start very late in the
process.
2024-01-14 22:14:31 +01:00
Peter Nelson
a6873ef7dd
Codechange: Avoid repeatedly calling virtual methods in text drawing loop. ( #11774 )
2024-01-14 19:06:50 +00:00
translators
e8d6b496c2
Update: Translations from eints
...
english (au): 1 change by krysclarke
english (us): 1 change by 2TallTyler
chinese (simplified): 9 changes by WenSimEHRP
korean: 1 change by telk5093
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
danish: 2 changes by bscargo
french: 2 changes by ottdfevr
portuguese: 1 change by azulcosta
2024-01-14 18:39:10 +00:00
Peter Nelson
f219557cf2
Codechange: List functions in gui.h under correct source file. ( #11775 )
2024-01-14 18:12:40 +00:00
Peter Nelson
71aaed860b
Codechange: Missing some conversions to WidgetID. ( #11773 )
2024-01-14 16:47:10 +00:00
Loïc Guilloux
93ba6d6776
Fix: compilation without precompiled headers ( #11770 )
2024-01-14 13:27:03 +01:00
Peter Nelson
e3bb6497f7
Codechange: Don't assume game options widget is a dropdown list.
2024-01-14 11:41:11 +00:00
Peter Nelson
8ca867ef63
Codechange: Replace game options' style-breaking if-condition with switch.
2024-01-14 11:41:11 +00:00
translators
341d022024
Update: Translations from eints
...
chinese (simplified): 141 changes by WenSimEHRP
russian: 3 changes by Ln-Wolf
danish: 6 changes by bscargo
latvian: 10 changes by lexuslatvia
dutch: 16 changes by Afoklala
french: 2 changes by ottdfevr
2024-01-13 18:38:17 +00:00
Jonathan G Rennison
b3f31a6523
Fix #11696 : Graphics set parameters missing from survey data ( #11764 )
2024-01-12 21:53:31 +00:00
Jonathan G Rennison
479490d7e8
Codechange: Remove unnecessary vector for writing GRF parameter JSON ( #11763 )
2024-01-12 21:38:31 +00:00
Loïc Guilloux
54b57fbfeb
Codechange: [Script] Use ScriptList::FillList() in more locations ( #11762 )
2024-01-12 21:19:08 +01:00
Tyler Trahan
60da6b992e
Fix #4415 : Land info build date is also renovation date ( #11759 )
...
Co-authored-by: Gadg8eer <64449092+Gadg8eer@users.noreply.github.com>
2024-01-12 14:27:33 -05:00
Loïc Guilloux
03df70ce8a
Fix #11752 : [Win32] Wrong multi-line text layout due to incorrect partial run handling ( #11761 )
2024-01-12 19:40:08 +01:00
Loïc Guilloux
28efa65e0c
Revert a2edf52: SQOpsLimiter does a more precise job ( #11754 )
2024-01-12 17:04:43 +01:00
Jonathan G Rennison
1101b04371
Fix: Build button text when train purchase window using "Engines" filter
2024-01-12 16:34:39 +01:00
Rubidium
32ab765792
Fix #11485 : new run on same line must not use last_space of previous run as cut-off point
...
Use the start of the next run instead as the location of the last space.
2024-01-12 16:31:29 +01:00
translators
94d31864b3
Update: Translations from eints
...
chinese (simplified): 16 changes by WenSimEHRP
arabic (egypt): 23 changes by AviationGamerX
korean: 1 change by telk5093
portuguese (brazilian): 10 changes by pasantoro
polish: 4 changes by pAter-exe
2024-01-11 18:39:13 +00:00
Patric Stout
d3ee045c2d
Codechange: refactor the Windows-only DllLoader in a cross-platform LibraryLoader ( #11751 )
2024-01-10 21:38:58 +00:00
Loïc Guilloux
f7bd70baec
Fix #11748 : Incorrect clamping of negative service interval values ( #11749 )
2024-01-10 16:23:36 +01:00
Jonathan G Rennison
86b046cd26
Fix: Incorrect assertion in GetTileIndexFromLocalCoordinate ( #11747 )
2024-01-10 00:20:34 +00:00
Peter Nelson
8f2266f0ed
Codechange: Use range-for when validating and finalising industries. ( #11744 )
2024-01-09 22:36:09 +00:00
Jonathan G Rennison
09eefd6e95
Cleanup: Remove unused constant YAPF_SHIP_PATH_CACHE_LENGTH
2024-01-09 20:58:51 +01:00
Jonathan G Rennison
c1b421c0c3
Fix: Clear one way state when removing road from road+tram tile
2024-01-09 20:57:53 +01:00
Peter Nelson
97e2bc612c
Codechange: Rename and move SpriteGroup-specific cargo types into a namespace.
...
These 'cargo types' have special defined uses and must not be used elsewhere. This makes it clearer that they are special.
2024-01-09 18:56:05 +00:00
Peter Nelson
400ae65ff2
Codechange: Redefine some cargo-related values in terms of CargoID instead of CargoType.
...
Values used as special filter types are now defined as offsets from NUM_CARGO instead of confusingly reusing CARGO_NO_REFIT/CARGO_AUTO_REFIT types.
2024-01-09 18:56:05 +00:00
Peter Nelson
952d111b94
Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
...
INVALID_CARGO is a CargoID and should be used for most purposes in game.
CT_INVALID is a CargoType used for defining default properties.
2024-01-09 18:56:05 +00:00
translators
4fd986bd07
Update: Translations from eints
...
english (au): 7 changes by krysclarke
english (us): 7 changes by 2TallTyler
chinese (simplified): 6 changes by WenSimEHRP
serbian: 39 changes by DoLoop216
russian: 3 changes by Ln-Wolf
finnish: 4 changes by hpiirai
portuguese: 10 changes by azulcosta
polish: 34 changes by pAter-exe
2024-01-09 18:38:30 +00:00
Loïc Guilloux
c86d918921
Add: [Script] Optional filter parameter to more ScriptXXXList constructors ( #11698 )
2024-01-09 09:39:13 +01:00
Kuhnovic
f1e999ec59
Feature: Region-based pathfinder for ships ( #10543 )
2024-01-08 20:29:05 +01:00
translators
9a7c4dda52
Update: Translations from eints
...
english (au): 3 changes by krysclarke
english (us): 3 changes by 2TallTyler
chinese (simplified): 5 changes by WenSimEHRP
korean: 3 changes by telk5093
russian: 3 changes by Ln-Wolf
finnish: 3 changes by hpiirai
french: 5 changes by Lishouuu
2024-01-08 18:40:07 +00:00
Tyler Trahan
56dd8497e0
Fix: Use consistent wording on waypoint button tooltip ( #11700 )
2024-01-07 21:11:25 +00:00
Kaspars Putniņš
cfc14a57e1
Add: Latvian Lats currency ( #11691 )
2024-01-07 16:03:38 -05:00
Jonathan G Rennison
4b48d3b5fe
Fix: String gender scan with SCC_INDUSTRY_NAME ( #11697 )
2024-01-07 15:48:47 -05:00
Tyler Trahan
948651d086
Fix: Use consistent wording for lorry stations ( #11699 )
2024-01-07 15:45:35 -05:00
translators
6bf7a86a04
Update: Translations from eints
...
english (us): 2 changes by 2TallTyler
korean: 2 changes by telk5093
danish: 2 changes by bscargo
2024-01-07 18:38:14 +00:00
Tyler Trahan
1e56bd1e5a
Change: Reorganize Settings menu items ( #11683 )
2024-01-07 08:44:50 -05:00
translators
0a8c0d62ee
Update: Translations from eints
...
chinese (simplified): 103 changes by WenSimEHRP
latvian: 2 changes by lexuslatvia
2024-01-06 18:39:19 +00:00
Rubidium
3a676a5af0
Codechange: replace static inline with static for non-class functions
2024-01-06 13:37:33 +01:00
Peter Nelson
06a5fa6239
Codechange: Use CompanyMask to pass Companies to PopupMainCompanyToolbMenu().
...
It's like the type was designed for it.
2024-01-05 22:26:07 +00:00
Peter Nelson
6828b6014a
Codechange: Use company group statistics to test for vehicles for drop down list state.
...
This avoids iterating full the vehicle pool to find out if a company has any vehicles of a particular type.
2024-01-05 22:26:07 +00:00
SamuXarick
847f3f660d
Fix #10511 : Delay 'go to nearest depot' orders ( #11548 )
...
Delay the nearest depot order search for a day if the vehicle can't find its destination, which happens when it has already attempted to do so and failed to find a valid destination.
2024-01-05 21:23:01 +00:00
Peter Nelson
7a5106042f
Codechange: Use CompanyMask and company group statistics for auto clean tests. ( #11693 )
...
This function does not need to know how many vehicles there are, only that there is at least one.
2024-01-05 20:58:24 +00:00
Peter Nelson
34e8c8e1c1
Codechange: Build station and depot vehicle lists from shared order lists. ( #11676 )
...
The brings some performance advantages:
* No need to iterate all vehicles and check for primary vehicle as only vehicles that can have orders are listed.
* Shared orders only need to be tested once instead of for each vehicle sharing them.
* Vehicle tests only need to be performed on the first shared vehicle instead of all.
2024-01-05 18:59:38 +00:00
Patric Stout
7788b68bbe
Fix: don't unneededly block on transmitting survey on exit ( #11687 )
2024-01-05 18:54:00 +00:00
Patric Stout
28e2576589
Fix: race-condition when quitting the game with libcurl ( #11688 )
...
There could be a callback in _new_http_callbacks that is not
processed yet. All callbacks in _http_callbacks were cancelled,
but not the ones in _new_http_callbacks
2024-01-05 18:48:21 +00:00
translators
8bc473766b
Update: Translations from eints
...
english (au): 2 changes by krysclarke
chinese (simplified): 6 changes by WenSimEHRP
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
dutch: 6 changes by Afoklala
portuguese: 5 changes by azulcosta
portuguese (brazilian): 2 changes by ericandradex
polish: 4 changes by pAter-exe
2024-01-05 18:38:36 +00:00
glx22
7bfc766f94
Fix: [Script] document return type of member GSIndustry::GetProductionLevel
2024-01-05 19:17:08 +01:00
glx22
707e8001be
Fix #11689 : properly close DOXYGEN_API block
2024-01-05 19:17:08 +01:00
Peter Nelson
623df6b94f
Codechange: Get count of road vehicles by summing company group statistics data in small UFO handler. ( #11690 )
...
This avoids needing to iterate the complete vehicle pool. Company group statistics are maintained elsewhere already.
The vehicle pool is still iterated later to find the nth random road vehicle.
2024-01-05 13:13:55 +00:00
Peter Nelson
91ea8e3fa6
Codechange: Use locals for company/deity mode during script loops. ( #11686 )
2024-01-05 08:32:43 +00:00
Peter Nelson
06050f7bb3
Fix: Pass townnameparts as parameter when testing townname based companyname. ( #11685 )
...
Length of returned string could vary and pass/fail the length check with a different
string than the final selection.
2024-01-04 23:10:54 +00:00
Peter Nelson
7482f71692
Change: Don't handle 'missing' string parameters as 0. ( #11673 )
...
If not enough parameters are supplied for a string, then a value of 0 was used, which could result in incorrect information being displayed.
Instead, throw an exception and include an error in the string.
2024-01-04 20:50:58 +00:00
translators
c44faf4eea
Update: Translations from eints
...
english (us): 2 changes by 2TallTyler
chinese (simplified): 39 changes by WenSimEHRP
polish: 29 changes by pAter-exe
2024-01-04 18:39:48 +00:00
Jonathan G Rennison
5db9266f4b
Change: Allow STRING/STRINGN to use all remaining parameters in game script mode
2024-01-04 17:45:33 +00:00
Jonathan G Rennison
e2a79f0f32
Codechange: No longer advance parent offset in StringParameters parent mode
...
Add method to manually advance offset
2024-01-04 17:45:33 +00:00
EmperorJake
6522351a1f
Feature: Setting to disable the loading speed penalty for trains longer than the station
2024-01-04 16:59:11 +01:00
Rubidium
e3f49ee7a0
Codechange: coding style fixes
2024-01-04 16:23:54 +01:00
Jonathan G Rennison
0075364c89
Fix: curl_global_cleanup called before libcurl HTTP thread exited
2024-01-04 13:41:24 +01:00
Jonathan G Rennison
51ef416b49
Fix: libcurl HTTP thread race at uninit preventing thread exit
2024-01-04 13:41:24 +01:00
George Abraham
4fcd94a1cb
Update: replace the cedilla characters with comma ones for Romanian ( #11665 )
...
This is specifically for s-cedilla and t-cedilla to their comma variants.
These variants, especially in smaller font sizes, look almost identical but
they are different. Currently the translation uses a mix of the cedilla and
comma variants, where the cedilla ones are often in the older strings.
Replace reinnoi with innoi, as it is the correct form.
2024-01-03 20:56:07 +01:00
translators
799455abf7
Update: Translations from eints
...
latvian: 2 changes by lexuslatvia
portuguese (brazilian): 1 change by pasantoro
2024-01-03 18:39:18 +00:00
Peter Nelson
3864902683
Codechange: Use vehicle viewport hash to find clicked vehicle. ( #11675 )
...
This avoids having to iterate all vehicles, which can be an performance improvement when there are many vehicles.
2024-01-03 18:36:34 +00:00
Patric Stout
aef49e9933
Fix: race-conditions in GUI updates when downloading HTTP files ( #11639 )
2024-01-02 22:05:25 +01:00
translators
344bdafb53
Update: Translations from eints
...
latvian: 8 changes by lexuslatvia
polish: 1 change by pAter-exe
2024-01-02 18:40:54 +00:00
Krys Clarke
1cdafcd7ac
Fix: Missing word in conditional order comparator ( #11632 )
2024-01-02 18:29:25 +00:00
Peter Nelson
ae3352582a
Fix: Autorenew failed message consumes arguments. ( #11669 )
2024-01-02 18:08:04 +00:00
Jonathan G Rennison
48b6b1844a
Change: Limit total script ops that can be consumed by a list valuate ( #11670 )
2024-01-02 19:02:12 +01:00
Jonathan G Rennison
502a52edd5
Fix: Spurious cancellations of HTTP content downloads ( #11668 )
2024-01-01 19:13:29 +00:00
translators
3e4dee6d0c
Update: Translations from eints
...
english (us): 11 changes by 2TallTyler
korean: 29 changes by telk5093
2024-01-01 18:38:47 +00:00
Jonathan G Rennison
88324a253e
Fix #11644 : Off by one error/buffer over-read in StrMakeValid ( #11645 )
...
* Fix #11644 : Off by one error in StrMakeValid UTF-8 decode overrun detection
* Fix #11644 : Off by one error in StrMakeValid buffer last character
* Fix: Unnecessary string duplication at StrMakeValid call sites
2024-01-01 13:26:31 -05:00
Loïc Guilloux
a672813bb0
Add: [Script] Optional filter parameter to ScriptVehicleList constructor ( #11663 )
2024-01-01 01:07:47 +01:00
Loïc Guilloux
f56a2d0f82
Fix: Missing invalidations on gui.ai_developer_tools change ( #11664 )
2024-01-01 00:43:10 +01:00
Jonathan G Rennison
3e2060f155
Fix #11337 : Station blocked/pylon/wire bits with CBID_STATION_TILE_LAYOUT ( #11656 )
2023-12-31 18:31:01 -05:00
translators
13348b7790
Update: Translations from eints
...
galician: 13 changes by Xocko12
catalan: 47 changes by J0anJosep
latvian: 14 changes by lexuslatvia
french: 11 changes by ottdfevr
portuguese: 52 changes by azulcosta
2023-12-31 18:38:20 +00:00
Peter Nelson
934545a674
Fix: Calculation of initial engine age was inaccurate. ( #11660 )
...
Engine age in months was calculated as the difference in days / 32, instead of the actually difference in months. This would result in engines being artificially younger if a game was started at a later date.
2023-12-31 15:47:32 +00:00
Peter Nelson
7124b4eef1
Codechange: Use std::unique_ptr for all NWidgets.
2023-12-31 15:33:56 +00:00
Peter Nelson
9a3934ae23
Codechange: Use vector/unique_ptr inside widget containers.
...
This replaces a C-style double-linked-list which required all widgets
to have next/prev pointers, and removes the need for manual pointer management.
2023-12-31 15:33:56 +00:00
Peter Nelson
628092f133
Codechange: Use GetParentWidget to find widget's NWidgetMatrix container.
2023-12-30 22:02:37 +00:00
Peter Nelson
c2c65d66ba
Codechange: Add GetParentWidget() to widgets.
...
This allows to get parent widgets in the nested tree from bottom-up.
2023-12-30 22:02:37 +00:00
Peter Nelson
8ff0bef862
Codechange: Make widget index const to prevent changes. ( #11658 )
...
This guards against future widget index manipulation.
2023-12-30 18:55:16 +00:00
translators
fd782ada05
Update: Translations from eints
...
russian: 11 changes by lexuslatvia
finnish: 12 changes by hpiirai
latvian: 217 changes by lexuslatvia
2023-12-30 18:38:27 +00:00
Peter Nelson
6215e9bf77
Fix #11655 : Crash due to NWidgetMatrix modifying widget->index. ( #11657 )
...
NWidgetMatrix modifies its child widget's index to indicate which element
is to be drawn, which now causes issues with code that does not know about
stuffing extra data into the index.
Instead, let NWidgetMatrix store the currently processing element, and
retrieve this information from the matrix widget while child widgets are
being drawn.
This means only widgets that are children of NWidgetMatrix need to know
anything about their extra data.
2023-12-30 18:24:26 +00:00
Charles Pigott
1e60734660
Fix: Compilation with DEBUG_DUMP_COMMANDS enabled ( #11607 )
2023-12-30 17:46:32 +00:00
Peter Nelson
f3b4d2a384
Fix #11649 : Ignore disabling a widget that does not exist. ( #11652 )
...
Orders window has different widget layouts depending on vehicle type
which don't all have the same widgets, and therefore it tries to disable
widgets that might not exist.
Restore the old behaviour of ignoring such requests, instead of crashing.
2023-12-30 13:29:31 +00:00
Peter Nelson
268e512fb8
Codechange: Set storage type of widget enums to WidgetID.
2023-12-30 00:23:57 +00:00
Peter Nelson
a0dfb76e34
Codechange: Replace mishmash of types for widget index with WidgetID.
...
Indices were stored as int, but often passed around as uint/uint8_t and casts.
Now they should all use WidgetID.
2023-12-30 00:23:57 +00:00
Peter Nelson
fd84f73323
Fix #11643 : Empty area at top of survey preview. ( #11647 )
...
Empty area at the top of some textfile windows due to calling
SetDisplayedPlane() after calling FinishInitNested(), and/or changing
the displayed plane and not calling ReInit() after.
This was previously hidden by CheckForMissingGlyphs() reinitialising
all windows anyway.
2023-12-30 00:19:27 +00:00
Peter Nelson
b86182ab84
Codechange: Use std::map to provide indexed widget access.
...
This removes the need to determine the biggest widget index and replaces C-style memory handling.
2023-12-29 18:45:43 +00:00
Peter Nelson
a12f426d69
Codechange: Rename nested array to widget lookup.
...
This changes from naming storage-type to naming functionality.
* `FillNestedArray` is renamed to `FillWidgetLookup`.
* `Window::nested_array` is renamed to `Window::widget_lookup`.
* `array` parameter renamed as well.
2023-12-29 18:45:43 +00:00
translators
a8e587632a
Update: Translations from eints
...
danish: 3 changes by bscargo
dutch: 10 changes by Afoklala
2023-12-29 18:38:59 +00:00
Peter Nelson
feb94d233d
Codechange: Remove deferred nested_array initialization path. ( #11640 )
...
Having two ways (`FillNestedArray` and `SetupSmallestSize`) to initialize
`Window::nested_array` introduces confusion.
Instead, make `FillNestedArray` the canonical way, always call it, and remove
init_array from `SetupSmallestSize`.
2023-12-29 14:27:04 +00:00
Patric Stout
11ba951250
Fix: race-condition when creating new HTTP requests from different threads ( #11638 )
2023-12-29 12:45:23 +01:00
Peter Nelson
5d2ed80c95
Fix: Changing group parent did not properly update partially-default liveries.
2023-12-28 23:16:19 +00:00
Peter Nelson
bfb4254226
Fix: Changing default livery did not propagate to group liveries.
...
#11614 attempted to address this but did not handle 2CC properly, and changes to the default livery were not handled.
2023-12-28 23:16:19 +00:00
Jonathan G Rennison
3b18877b87
Fix #11629 : AirportGetNearestTown for rotated airports ( #11631 )
...
Add rotation parameter to AirportGetNearestTown
Add wrapper for existing stations
Remove unnecessary iterator cloning
2023-12-28 21:43:05 +00:00
Peter Nelson
33ff64ef74
Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. ( #11637 )
2023-12-28 21:34:08 +00:00
Peter Nelson
bd3b28551e
Codechange: Replace reliability magic numbers with constants.
...
These are derived as a percentage of UINT16_MAX.
2023-12-28 21:26:24 +00:00
Peter Nelson
7b2c143df0
Fix: Prevent underflow if engine base life is less than 8 years.
2023-12-28 21:26:24 +00:00
translators
ead5ad119c
Update: Translations from eints
...
english (au): 11 changes by krysclarke
danish: 9 changes by bscargo
portuguese (brazilian): 10 changes by pasantoro
2023-12-28 18:38:31 +00:00
translators
ce6a65d7b5
Update: Translations from eints
...
english (au): 2 changes by krysclarke
chinese (simplified): 37 changes by WenSimEHRP
romanian: 28 changes by bnegrut
russian: 13 changes by Ln-Wolf
finnish: 36 changes by hpiirai
danish: 16 changes by bscargo
dutch: 17 changes by Afoklala
2023-12-27 18:38:01 +00:00
Jonathan G Rennison
2b914c7a2f
Fix: Memory leak in WindowDescTestsFixture
2023-12-26 23:48:59 +01:00
Rubidium
e0c670cbe8
Codechange: replace NULL with nullptr
2023-12-26 07:18:52 +01:00
Rubidium
2072e532f7
Codechange: replace NULL with nullptr
2023-12-26 07:18:52 +01:00
Peter Nelson
a2a7ecf88e
Fix 9ce1626b: Some blitters have `bp->remap` aliased to `remap` for performance. ( #11626 )
...
While this probably doesn't make a huge difference for the custom transparent remap code path, the alias is there so use it.
2023-12-25 20:59:37 +00:00
Peter Nelson
fdf6cbf848
Change: Scale sprites to requested highest resolution level. ( #11600 )
...
Sprites from graphics sets which only provide high resolution sprites are now scaled up from scaled down versions.
2023-12-25 20:08:13 +00:00
SamuXarick
947e77267a
Doc 0ca4b4e: Script debug window numbers are now ascending ( #11623 )
2023-12-25 18:42:29 +01:00
Loïc Guilloux
6c5a4aa2cb
Fix 2d3af14: Don't draw script log over panel borders ( #11621 )
2023-12-25 18:42:13 +01:00
Peter Nelson
9ce1626bb4
Change: Support custom transparency remaps with 32bpp blitters.
...
This closes a 15 year old TODO...
2023-12-25 11:22:52 +00:00
Peter Nelson
0bc22dd310
Add: 32bpp-to-8bpp palette index lookup.
...
Lookups are calculated on demand and caches in a 256KB in-memory table.
2023-12-25 11:22:52 +00:00
Peter Nelson
daec0e2ca4
Codechange: Split palette handling to separate file.
2023-12-25 11:22:52 +00:00
Peter Nelson
4ecc107d30
Codechange: Perform simpler comparison first when checking for palette updates.
...
This avoids unnecessarily comparing contents of an array.
2023-12-25 11:22:52 +00:00
Loïc Guilloux
af8b8c2cfc
Fix 4a2038e301: fully restore script break filter on reopen ( #11622 )
2023-12-24 00:08:18 +00:00
Peter Nelson
c0cdf3460e
Change: Rename Standard Livery to Default Livery.
2023-12-23 13:45:35 +00:00
Peter Nelson
3436b5f090
Change: Show a message in livery window if vehicle type has no groups.
2023-12-23 13:45:35 +00:00
Peter Nelson
513c7e7b53
Change: Add distinct tooltips for vehicle group colour schemes.
2023-12-23 13:45:35 +00:00
Peter Nelson
eda0dd24fe
Change: Remove hardcoded minimum sizes and allow resize.
...
This stops the window being needlessly large.
2023-12-23 13:45:35 +00:00
Peter Nelson
0949eddd55
Change: Move colour selection dropdowns to bottom of window.
...
This stops them looking similar to how filter controls are used elsewhere,
and matches action dropdowns on other windows.
2023-12-23 13:45:35 +00:00
Peter Nelson
5cb7a16edc
Fix #11618 : Don't try to display unavailable zoom levels in sprite aligner. ( #11619 )
2023-12-23 13:17:33 +00:00
Darragh
acfe367507
Fix #11442 : "default" colour in group colour window is not updated when changing master colour ( #11614 )
...
Updated SelectCompanyLiveryWindow.DrawWidget method to check if a group's livery.in_use 0 bit is set, rendering the company's default colour if it has not been.
2023-12-22 17:56:09 +01:00
Peter Nelson
fd0aa3dd19
Fix #11515 : Zoom level could wrap around when changing interface scale. ( #11615 )
...
This happened due to converting the new value to unsigned before clamping instead of after.
2023-12-22 15:23:42 +00:00
Peter Nelson
c1afbc9415
Fix: Update widget dimensions before updating viewport signs. ( #11611 )
...
Viewport signs used fullbevel WidgetDimensions before it was updated for the new interface scale.
2023-12-20 22:10:05 +00:00
Loïc Guilloux
2d3af14181
Add: Horizontal scroll for script debug log ( #11597 )
2023-12-20 22:50:03 +01:00
Peter Nelson
0ca4b4e146
Change: Allow opening multiple script debug windows by holding Ctrl.
2023-12-20 20:39:07 +00:00
Peter Nelson
4a2038e301
Codechange: Make script debug window filter state per-window.
2023-12-20 20:39:07 +00:00
Peter Nelson
b85ecf9ac2
Codechange: Replace pointer to Sprite array with reference to SpriteCollection. ( #11580 )
...
Add `SpriteLoader::SpriteCollection` type which is an array of `SpriteLoad::Sprite`.
This removes the ambiguity of what `SpriteLoader::Sprite *` is pointing to,
and cleans up mismatches using both dereference -> and array access [] for the
same object.
2023-12-20 20:38:21 +00:00
Peter Nelson
7466c3c39e
Fix: Draw unavailable mask over picker sprite instead of behind it.
...
This makes these disabled picker buttons consistent with other disabled buttons.
2023-12-20 09:29:28 +00:00
Peter Nelson
712a4bb40b
Fix: Prevent picker preview sprites from overflowing button bevel.
2023-12-20 09:29:28 +00:00
Peter Nelson
313ee13e5f
Codechange: Add Rect version of FillDrawPixelInfo().
...
This simplifies most callers as they longer have to split out a rect.
2023-12-20 09:29:28 +00:00
Finn Willard
3a42340db3
Add: Hotkey to focus industry directory filter box
...
Co-authored-by: Tyler Trahan <tyler@tylertrahan.com>
2023-12-19 11:23:37 -05:00
Finn Willard
7d3ae4a058
Add: Hotkey to focus town directory filter box
...
Co-authored-by: Tyler Trahan <tyler@tylertrahan.com>
2023-12-19 11:23:37 -05:00
Tyler Trahan
e8d2ebb016
Fix: Add missing includes to timers from script implementation files ( #11604 )
2023-12-19 14:09:46 +00:00
SamuXarick
fddcaef74a
Codechange: Use town zone constants instead of magic numbers
2023-12-18 22:12:43 +01:00
translators
9b7a5bc876
Update: Translations from eints
...
vietnamese: 1 change by KhoiCanDev
danish: 4 changes by bscargo
2023-12-18 18:39:11 +00:00
Peter Nelson
b19a6c3b81
Fix: Window width/height was doubly-scaled with automatic DPI switch. ( #11598 )
2023-12-18 13:05:06 +00:00
SamuXarick
c05ffb22bd
Fix #10452 : Don't let AyStar max_search_nodes unattended when initializing ( #11544 )
...
Add a constant with the default value of 10000 and have the pathfinding settings refer to it.
Add a preventative method to AyStar when it's initializing, to limit the number of max_search_nodes if left unattended.
2023-12-17 22:50:53 +01:00
translators
8ab3838387
Update: Translations from eints
...
vietnamese: 20 changes by KhoiCanDev
italian: 5 changes by Rivarossi
2023-12-17 18:37:38 +00:00
Peter Nelson
661e0cd82d
Fix: Make compact picker windows expand to fill if necessary. ( #11591 )
2023-12-16 23:08:42 +00:00
translators
651343d69e
Update: Translations from eints
...
english (au): 17 changes by krysclarke
english (us): 17 changes by 2TallTyler
italian: 30 changes by Rivarossi
russian: 17 changes by Ln-Wolf
french: 36 changes by ottdfevr
portuguese (brazilian): 30 changes by pasantoro
2023-12-16 18:36:51 +00:00
translators
0e6038f0e5
Update: Translations from eints
...
english (us): 19 changes by 2TallTyler
vietnamese: 14 changes by KhoiCanDev
turkish: 26 changes by BeratSJ
dutch: 19 changes by Afoklala
2023-12-15 18:38:09 +00:00
Tyler Trahan
8816c9dd26
Change: Improve and standardize wording of World Generation helptexts
2023-12-15 09:57:44 -05:00
Tyler Trahan
1343d7e25a
Change: Don't mention TerraGenesis in setting helptexts
...
We no longer show the land generator in the World Generation GUI, so this is less important to explain in tooltips.
2023-12-15 09:57:44 -05:00
Tyler Trahan
1e8aa9ce22
Add: Use more tooltips in World Generation GUI
2023-12-15 09:57:44 -05:00
Peter Nelson
302e8852c1
Fix: Crash if squirrel compatibility scripts cannot be parsed. ( #11589 )
2023-12-15 01:25:36 +00:00
Loïc Guilloux
7726f8f245
Fix: [Script] Properly store the previous AsyncMode state ( #11587 )
2023-12-14 21:29:44 +00:00
Peter Nelson
bbf3028f89
Fix #11585 : Crash when cleaning AI/GS with nested AsyncMode.
...
Do not throw sanity check when in_shutdown is true. This is also applied to
ExecMode and TestMode as they follow the same pattern.
2023-12-14 20:54:31 +00:00
Peter Nelson
47dd04d16c
Fix: Don't crash when saving a crashlog save with no main window open.
2023-12-14 20:54:31 +00:00
Peter Nelson
da2d21f5b0
Fix: Left-over printf-style format passed to fmt. ( #11584 )
2023-12-14 19:35:35 +00:00
translators
63c006a174
Update: Translations from eints
...
korean: 20 changes by telk5093
danish: 13 changes by bscargo
portuguese (brazilian): 18 changes by pasantoro
2023-12-14 18:38:27 +00:00