Peter Nelson
dc50ff807c
Change: Remove incorrect minimal size.
2023-05-09 23:03:14 +02:00
Peter Nelson
b54d7f15ac
Change: Reduce size of waypoint matrix to 3 x 2.
2023-05-09 23:03:14 +02:00
Peter Nelson
0513a6ccb0
Change: Use separate names for default stations/roadstops.
2023-05-09 23:03:14 +02:00
Peter Nelson
93d49fa8b3
Fix: Make scrollwheel work on panel behind waypoint matrix.
2023-05-09 23:03:14 +02:00
Peter Nelson
bf9caa425b
Change: Units-system can convert from N to kN, don't preconvert.
...
This allows force to passed as is and avoid premature rounding.
The AI function "GetMaxTractiveEffort" still needs to return kN to avoid breaking the API.
2023-05-09 23:02:51 +02:00
Peter Nelson
e2f583a34f
Change: Standardise unit conversions and allow decimal places.
...
Previously the decimal_places member was mostly ignored except for
specific conversions. {DECIMAL} with 0 is the same as {COMMA} so there
is no downside to allowing any conversion to have decimals.
2023-05-09 23:02:51 +02:00
Peter Nelson
3c2f87ce1f
Change: Perform unit convert with a double-precision constant.
...
Unit conversion is only performed for display purposes, this does not
affect lock-step mechanics.
This replaces the old multiply and shift algorithm which relies on
choosing a multipler and shift combination that gets close. Some of these
multiply/shift combinations were quite inaccurate. We can just
use (close-to) real-world numbers instead.
2023-05-09 23:02:51 +02:00
PeterN
644e310506
Fix: Incorrect y-position of monospace glyphs. ( #10794 )
2023-05-09 23:02:06 +02:00
Patric Stout
febe394806
Codechange: replace C-style strings with C++-style strings in textfile ( #10772 )
2023-05-09 19:35:50 +00:00
translators
90529ea48b
Update: Translations from eints
...
catalan: 30 changes by J0anJosep
french: 25 changes by glx22
polish: 5 changes by pAter-exe
2023-05-09 18:44:36 +00:00
PeterN
6998fbf71d
Fix: WWT_TEXT with SetTextStyle did not work. ( #10797 )
...
FontSize was passed to incorrect parameter of DrawString function.
2023-05-09 17:23:37 +00:00
Peter Nelson
d68c4bbd2f
Change: Use iterator when drawing industry cargo window.
2023-05-09 17:39:12 +01:00
Peter Nelson
cccf4953f7
Fix: Incorrect padding on industry cargo window.
2023-05-09 17:39:12 +01:00
PeterN
882f06bf14
Fix: Support more than 256 stations/waypoints/roadstops per class. ( #10793 )
...
It was already possible to define more than 256 per class, but not possible
to use them as the index used in GUI and passed through commands was limited
to a byte.
2023-05-08 18:09:33 +00:00
Patric Stout
a05ae2497f
Codechange: simplify how GetCharPosition() works
2023-05-08 19:21:42 +02:00
Patric Stout
60399e17bd
Codechange: C++-ify the Layouter and related functions
...
They all now access a std::string_view, instead of a "const char *"
or std::string (in some cases).
Additionally, GetCharAtPosition and friends now return an index
instead of a "const char *", as it makes for a more clear interface.
2023-05-08 19:21:42 +02:00
Tyler Trahan
61d1b330d1
Change: Add padding to build vehicle text filter ( #10792 )
2023-05-08 17:21:29 +00:00
Patric Stout
aed36a609c
Fix: [ICU] crash when trying to break a non-breaking run ( #10791 )
...
Clusters from harfbuzz are indexed from the start of the buffer,
not from the start of the run analyzed. This confuses other parts
of the code that do assume they are from the start of the run.
2023-05-08 16:09:47 +00:00
PeterN
bc6a4b1d08
Fix: Set up default station/waypoint classes properly. ( #10789 )
2023-05-08 16:42:01 +01:00
J0anJosep
c4e6d80ecf
Cleanup: Remove unnecessary hangar check.
2023-05-08 17:30:21 +02:00
Rubidium
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
Rubidium
192ed55462
Change: disable precompiled headers on Linux (GCC - Dedicated) target to ensure those still build
2023-05-08 16:49:23 +02:00
Rubidium
2955ff33d7
Change: use precompiled headers for stdafx.h and 3rdparty/fmt/format.h
2023-05-08 16:49:23 +02:00
Peter Nelson
878c5d8d85
Codechange: Use SetPosition() to clamp after changing count/capacity.
2023-05-07 20:25:44 +01:00
Peter Nelson
6202eae9d5
Codechange: Rely on Scrollbar::SetPosition to clamp.
...
Manually clamping scrollbar bounds before calling `SetPosition()` is doubling up work that the function already does.
2023-05-07 20:25:44 +01:00
Peter Nelson
d2034d9c38
Codechange: Scrollbar methods now accept size_t.
...
This clears up a lot of casts from size_t to int.
2023-05-07 20:25:44 +01:00
translators
923d1b0846
Update: Translations from eints
...
vietnamese: 5 changes by KhoiCanDev
2023-05-07 18:39:28 +00:00
kiwitreekor
3375f25b70
Fix: Var68 for station and roadstop was broken ( #10784 )
2023-05-07 19:04:34 +01:00
Tyler Trahan
98d809c33b
Codechange: Don't use macros for DAYS_TILL and friends ( #10746 )
2023-05-07 05:25:24 -04:00
PeterN
8bf62dac81
Codechange: Clean up build industry window. ( #10779 )
...
* Remove left-over code that treated an invalid list selection as 'fund
many', which is actually implemented as a separate button.
* Manual list management replaced with std::vector.
* Enabled state is only needed for the current selection.
* Selected index is not required only selected type.
2023-05-07 08:19:09 +01:00
PeterN
a836edd5a7
Codechange: Scrollbar::UpdatePosition() will tell if the position changed. ( #10777 )
...
So we don't need to check this manually.
2023-05-06 19:45:32 +00:00
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
2023-05-06 21:26:13 +02:00
Rubidium
19ec4e8beb
Codechange: replace ClampToI32/U16 with ClampTo<int32_t/uint16_t>
2023-05-06 21:26:13 +02:00
Rubidium
969a3dc0f3
Codechange: introduce generic ClampTo function to clamp to the range of a type
2023-05-06 21:26:13 +02:00
Rubidium
e33b2afd87
Codechange: pass (uint) money as Money for CmdGiveMoney
2023-05-06 21:26:13 +02:00
Rubidium
4a5a9f57c4
Fix: conversion to smaller type warnings
2023-05-06 21:26:13 +02:00
translators
97b77f0251
Update: Translations from eints
...
english (au): 5 changes by krysclarke
english (us): 5 changes by 2TallTyler
korean: 5 changes by telk5093
italian: 5 changes by Rivarossi
russian: 5 changes by Ln-Wolf
finnish: 5 changes by hpiirai
turkish: 5 changes by densxd
portuguese: 5 changes by azulcosta
2023-05-06 18:39:19 +00:00
Michael Lutz
b14c5aff1f
Fix: [Win32] Text line breaking did not properly handle punctuation characters. ( #10775 )
2023-05-06 16:15:40 +00:00
Tyler Trahan
0fc21b5686
Fix: Engine age is in months, not days ( #10773 )
2023-05-06 11:54:38 -04:00
Loïc Guilloux
31d1a323ef
Fix #10771 , 3901ef9
: GRFConfig.filename is now a std::string ( #10774 )
2023-05-06 14:58:47 +00:00
PeterN
b67cf7f94a
Change: Replace ScriptLog data array with std::deque. ( #10770 )
...
Due to cyclic header dependency this requires moving the data types used
by ScriptLog out of the ScriptLog class.
2023-05-06 14:54:58 +00:00
translators
5dd54e2708
Update: Translations from eints
...
japanese: 10 changes by fmang
vietnamese: 14 changes by KhoiCanDev
dutch: 14 changes by Afoklala
polish: 1 change by pAter-exe
2023-05-05 18:42:16 +00:00
PeterN
bda754ec83
Fix: Make all settingsgen 'warnings' fatal. ( #10766 )
...
Compilation should stop If settingsgen fails to complete properly.
2023-05-05 09:22:03 +01:00
Patric Stout
a7d3c79d79
Fix c6c3d0e6
: restore string-based settings in network-private settings ( #10765 )
...
By accident the SDTC_SSTR got replaced with SDTC_VAR, which breaks
many of the settings in this file.
2023-05-05 07:08:57 +00:00
Rubidium
877349c13d
Codechange: use std::string for text file name resolution
2023-05-05 08:54:29 +02:00
Peter Nelson
0b72297d57
Feature: Increase number of stations/roadstops per NewGRF.
2023-05-05 07:08:40 +01:00
Peter Nelson
bc7dfd7b46
Add: Station property 1C/1D to set name/classname.
...
These are an alternative to the original "generic" C4xx/C5xx method,
which can only assign strings to IDs up to 256.
2023-05-05 07:08:40 +01:00
Peter Nelson
d6f35a9fd6
Change: Add placeholders for unimplemented NewGRF station properties.
2023-05-05 07:08:40 +01:00
Peter Nelson
7a86615007
Feature: Remove limit of objects per NewGRF.
2023-05-05 07:08:40 +01:00
Peter Nelson
912eb68981
Change: Extend entity override manager and station spec lists to support 16 bit IDs.
2023-05-05 07:08:40 +01:00