Jonathan G Rennison
f09dfc79bd
Add cargo type filters to company delivered cargo window
...
Adapted from Citymania
2023-06-06 18:19:19 +01:00
Rubidium
a47de4b2ab
Cleanup: remove DRAW_STRING_BUFFER constant
2023-06-06 18:08:11 +02:00
Rubidium
96fef9f643
Codechange: allocate enough memory to layout the strings
2023-06-06 18:08:11 +02:00
Rubidium
1fa432ca92
Codechange: replace C-style string building with C++-style building
2023-06-06 18:08:11 +02:00
Rubidium
ca1e34c121
Codechange: use std::string to build ScriptText's encoded text
2023-06-06 18:07:54 +02:00
Rubidium
e32f0aa20b
Cleanup: minimum string length for town name generator is not needed anymore
2023-06-05 23:26:12 +02:00
Rubidium
edb21620ea
Cleanup: remove unneeded checks on remaining buffer size
2023-06-05 23:26:12 +02:00
Rubidium
affceea0ae
Codechange: switch StringBuilder to use std::string as backend
2023-06-05 23:26:12 +02:00
Rubidium
ce8933d63e
Add: std::back_insert_iterator<std::string> Utf8Encode function
2023-06-05 23:26:12 +02:00
Rubidium
55dfca1936
Codechange: replace seprintf with C++ style formatting
2023-06-05 23:25:59 +02:00
Rubidium
fbd71a9d72
Codechange: replace C-style string processing with C++-style for the listing callbacks
2023-06-05 23:25:49 +02:00
Jonathan G Rennison
43c1b42a2c
Revert "Revert "Codechange: Explicitly move a few variables to avoid a copy constructor (fixes warning from clang)""
...
This reverts commit a99418cb69
.
2023-06-05 22:05:51 +01:00
Jonathan G Rennison
bc07331056
Remove src/3rdparty/optional
2023-06-05 21:26:41 +01:00
PeterN
ab83725d73
Add: NewGRF string code "9A 21" to display force from textstack. ( #10782 )
...
(cherry picked from commit 61516627ad
)
2023-06-05 21:07:55 +01:00
PeterN
98788e865f
Fix #10502 : Refit engine before attaching free wagons. ( #10926 )
...
Caused by incorrect order of operations when buying a train engine with refit and attaching free wagons.
(cherry picked from commit ee2d0745e9
)
2023-06-05 20:47:58 +01:00
Jonathan G Rennison
5c2f9dffe6
Fix compilation error in newgrf_profile console command on some platforms
2023-06-05 20:47:58 +01:00
Peter Nelson
b505805bfe
Fix: Don't rely on static initialization to set up sprite font caches.
...
The order of static initialization is undefined, so this can cause initalization
before relevant caches are initializations.
(cherry picked from commit f454ec8d63
)
2023-06-05 20:34:54 +01:00
Rubidium
dd94b087c4
Fix: multiplication result converted to larger type
...
Technically unlikely to happen, though uint16 * uint16 get promoted to int and
then stored as uint64; similarly uint * uint16 remains uint and gets stored as
uint64. In both cases the value can get truncated before the change to uint64.
(cherry picked from commit 4a6fdc8293
)
2023-06-05 20:31:41 +01:00
Jonathan G Rennison
d481d382cb
Fix missing include in company_base.h
2023-06-05 20:14:52 +01:00
Jonathan G Rennison
7cce9f934d
Fix strncasecmp related compilation errors on MSVC
2023-06-05 20:08:09 +01:00
Jonathan G Rennison
ffb4548f1b
Fix std::optional related compilation errors on some platforms
2023-06-05 20:04:13 +01:00
Jonathan G Rennison
3d382fe531
Debug: Fix compilation error when using RANDOM_DEBUG
2023-06-05 20:02:34 +01:00
Jonathan G Rennison
b84d1bcee4
Cheats window: Fix inflation factor arrow buttons
...
See: #533 , #534
2023-06-05 19:51:35 +01:00
translators
433ec6b5bd
Update: Translations from eints
...
korean: 2 changes by telk5093
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
turkish: 2 changes by EndChapter
french: 2 changes by glx22
portuguese: 2 changes by azulcosta
2023-06-05 18:42:37 +00:00
Jonathan G Rennison
61e9c3084f
Add picker tool to main toolbar help menu
...
See: #498
Supports:
* Rail types
* Road/tram types
* Objects
* Rail stations/waypoints
* Road stops/waypoints
Add unset hotkey
2023-06-05 19:37:33 +01:00
PeterN
64d6ad50f9
Codechange: Split GetItem with GetOrCreateItem. ( #10952 )
...
`IniGroup::GetItem()` returns nullptr if the item does not exist, but does not if the create parameter is set to true. Resolve CodeQL warnings with `GetOrCreateItem()` which returns a reference to the item instead.
2023-06-05 18:29:52 +00:00
Jonathan G Rennison
665a4ca55b
Add Window method to change window class
...
Use in BuildRoadStationWindow
2023-06-05 19:20:46 +01:00
Jonathan G Rennison
6215e326fd
Add constants for toolbar help menu items
2023-06-05 19:20:46 +01:00
Patric Stout
3b1407d240
Feature: allow to do a hostile takeover of an AI company (in singleplayer) ( #10914 )
...
With the removal of the share-system, you could no longer make an
AI disappear in a single player game. At least, not without going
into the console.
2023-06-05 19:32:22 +02:00
PeterN
f814c86389
Codechange: Reorganise hotkey initialisation. ( #10951 )
...
Hotkeys are now initialized inline, and use std::vector instead of
separate static C-arrays and std::string instead of char *. The list end
marker is no longer required.
2023-06-05 18:12:30 +01:00
rubidium42
921f5afc4d
Codechange: Apply suggestions from code review
2023-06-05 17:07:39 +02:00
Rubidium
2dd2b698d2
Codechange: convert C-style GetTownName API to std::string returning API
2023-06-05 17:07:39 +02:00
Rubidium
14915526ad
Cleanup: remove stre-style GetString
2023-06-05 11:23:31 +02:00
Patric Stout
772729cc7d
Fix: when syncing width of GUI items, take padding into account ( #10915 )
2023-06-05 10:27:04 +02:00
Rubidium
15c75e6f45
Codechange: use std::array and std::string for high scores
2023-06-04 23:49:43 +02:00
Rubidium
c158089eff
Codechange: use C++ style methods to combine a Utf8Encoded character and a formatted string
2023-06-04 23:32:02 +02:00
PeterN
6ae6b65edb
Cleanup: Remove doubled statements. ( #10944 )
2023-06-04 21:54:44 +01:00
Jonathan G Rennison
0e94dca563
Fix GetLinkGraphJobDesc for null saveload conv settings
2023-06-04 21:38:08 +01:00
Rubidium
a4bf45729a
Change: move string validation (and assignment) to textbuf
2023-06-04 21:43:07 +02:00
Rubidium
4e39a58c59
Codechange: let town name generation use StringBuilder
2023-06-04 21:42:59 +02:00
translators
6a5ab4a9fb
Update: Translations from eints
...
french: 3 changes by glx22
2023-06-04 18:57:10 +00:00
Rubidium
820fe8c621
Codechange: use std::string and concatenation when combining multiple formatted strings
2023-06-04 20:47:41 +02:00
Patric Stout
07add7a96e
Fix: [Win32] position window in center of workspace of primary display ( #10942 )
2023-06-04 18:38:16 +00:00
Jonathan G Rennison
ec9766e691
Fix ai_developer_tools not being read before scanning for scripts
...
See: #528
2023-06-04 19:33:54 +01:00
PeterN
83a318edcf
Fix dec7ff6b0c
: Dropdowns would close if their tooltip appeared. ( #10939 )
...
Solution is to not focus any tooltips, so that the dropdown doesn't lose focus. Tooltips don't accept any input so this does not change their behaviour.
2023-06-04 18:15:24 +00:00
Jonathan G Rennison
f9c9f53882
Fix town 0 not being included in public roads network
...
See: #530
2023-06-04 19:01:19 +01:00
rubidium42
bfcb027cb9
Fix 2dffa7d
: fmt::format_to copies the iterator, so some text does not remain during formatting ( #10940 )
2023-06-04 19:55:47 +02:00
Rubidium
6a519f5d89
Cleanup: strecat has no uses anymore
2023-06-04 19:45:42 +02:00
Bernard Teo
2c667b1773
Doc: Fix spelling error in ScriptTileList::RemoveRectangle ( #10937 )
2023-06-04 17:45:18 +00:00
Patric Stout
caa0474d30
Fix: crash with tooltip on low resolution screens ( #10933 )
2023-06-04 16:28:58 +00:00