Jonathan G Rennison
b84a164590
Codechange: Avoid unnecessary re-reads/seeks in RandomAccessFile::ReadBlock
2024-11-23 21:48:22 +10:00
Peter Nelson
653e5e8b63
Codechange: Use std::visit for formatting script strings.
2024-11-23 10:55:41 +00:00
Peter Nelson
43da3e7693
Codechange: Use std::visit for ScriptDataVariant.
2024-11-23 10:55:41 +00:00
Peter Nelson
d875ac8947
Add: const operator->() for ScirptObjectRef.
2024-11-23 10:55:41 +00:00
translators
26ae50baf9
Update: Translations from eints
...
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
korean: 5 changes by telk5093
greek: 1 change by gh658804
dutch: 1 change by KevinHeijsteeg2
2024-11-23 04:47:22 +00:00
Peter Nelson
a4b4095232
Codechange: Shuffle Engine members around to reduce size. ( #13115 )
...
Reduces overall size of Engine from 752 to 720 bytes.
2024-11-22 23:58:13 +00:00
Peter Nelson
16038879e4
Codechange: Speed up industry generation using industry-type checks. ( #13094 )
...
Store a list of industries per industry type. This allows industry generation checks which only consider a specific industry type to check a reduced set of industries, leading to a potential performance increase.
This also removes the need to track industry type counts as well.
2024-11-22 23:17:24 +00:00
Peter Nelson
a951896364
Add: Add cargo transported to industry production graph.
2024-11-22 20:47:51 +00:00
Peter Nelson
22035a4f2a
Add: Ability to show and filter different datasets on the same graph.
2024-11-22 20:47:51 +00:00
Peter Nelson
598fdf04a4
Codechange: Use vector instead of fixed array for graph data.
2024-11-22 20:47:51 +00:00
felixprigge
67a0fccfad
Fix: [Timetable] Use days as precision in day mode for accurate timetable syncing ( #12683 )
...
Co-authored-by: flowprint <61750128+flowprint@users.noreply.github.com>
2024-11-21 22:27:07 +00:00
Peter Nelson
6d3adc6169
Codechange: Remove ZeroedMemoryAllocator from ScriptText. ( #13108 )
...
ScriptText is much simplified from its original design. Use member initialisation instead.
2024-11-20 22:16:14 +00:00
Peter Nelson
13da98dab8
Fix: Error message not set when unable load an old save. ( #13106 )
2024-11-20 18:24:07 +00:00
translators
1b6a6f1cd2
Update: Translations from eints
...
chinese (simplified): 4 changes by WenSimEHRP
danish: 19 changes by bscargo
2024-11-20 04:46:40 +00:00
Peter Nelson
b730f8783e
Fix d450d4743
: Division by zero when larger_towns is set to 0. ( #13104 )
...
Universe ended.
2024-11-20 00:09:02 +00:00
Peter Nelson
9b6b6d50c3
Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. ( #13102 )
...
This should no longer be necessary since we used std::strings.
2024-11-19 23:44:54 +00:00
SamuXarick
85e9f5745a
Codefix: Replace magic number in Kdtree ( #13098 )
2024-11-19 20:34:25 +00:00
Peter Nelson
6c09dcdd66
Codechange: Use reference for non-optional StationList parameter. ( #13092 )
2024-11-19 20:33:32 +00:00
Peter Nelson
640a270ed6
Codefix: Use correct type for IndustryType in several industry functions. ( #13096 )
2024-11-19 20:32:06 +00:00
Peter Nelson
fcac5479f1
Codechange: Use std::visit for SetupCargoForClimate. ( #13103 )
2024-11-19 20:30:16 +00:00
Peter Nelson
fc8685d618
Codechange: Use functor for Kdtree's XYFunc. ( #13074 )
...
Kdtree uses a function pointer and incorrectly calls it a functor. The function pointer needs to be passed on instantiaton.
Instead, use an actual functor. This simplifies instantiation.
2024-11-19 20:29:56 +00:00
Koen Bussemaker
369ea29e1e
Codechange: Remove redundant checks in FindClosestTrainDepot
2024-11-19 20:42:43 +01:00
Peter Nelson
f9b5f78b8a
Codechange: Use std::visit for GetActiveCargoLabel.
2024-11-19 18:27:19 +00:00
Peter Nelson
25c5a64d39
Codechange: Use std::visit instead of std::get_if for string parameters. ( #13100 )
...
It's tidier and ensures all cases are handled, and doesn't use pointers.
2024-11-19 18:17:41 +00:00
SamuXarick
60ae50e016
Codechange: Make kdtree member functions const for const-correctness ( #13099 )
2024-11-19 12:36:56 +00:00
Michael Lutz
d2496b6ec4
Add: [NewGRF] Callback for custom refit mask for engines/vehicles.
2024-11-18 22:10:38 +01:00
Michael Lutz
a3ee05737f
Add: [NewGRF] Vehicle prop that allows refittability based on cargo class intersection.
2024-11-18 22:10:38 +01:00
Peter Nelson
c39810ff6a
Codechange: Replace path cache queues with vectors.
...
Ship and RoadVehicle path caches use a std::deque, which is quite memory hungry, especially for RoadVehicle which has two.
std::deque was used to be able to push/pop from either end.
Change to use a single std::vector each, which is now push/popped from the back.
2024-11-18 08:59:41 +00:00
Peter Nelson
d4f8453c22
Codefix: Clear and reserve storage when loading vectors from savegames.
2024-11-18 08:59:41 +00:00
translators
b8f3d0dd68
Update: Translations from eints
...
norwegian (bokmal): 4 changes by eriksorngard
2024-11-18 04:49:46 +00:00
Peter Nelson
d903806e59
Codechange: Add VectorSaveLoadHandler to simplify handlers for vectors. ( #13093 )
...
This reduces the duplication needed for each saved complex vector.
2024-11-17 23:46:32 +00:00
translators
a6c526cfa0
Update: Translations from eints
...
bulgarian: 4 changes by Alexandar83
2024-11-17 04:46:16 +00:00
Peter Nelson
04b6dfae48
Cleanup: Remove now-unneeded includes from yapf. ( #13088 )
2024-11-16 23:23:06 +00:00
Peter Nelson
ec1dc434ac
Codechange: Shuffle CommandCost members to reduce size. ( #13087 )
...
Prefer member initialisation as well.
2024-11-16 21:49:49 +00:00
Jonathan G Rennison
71ea58c6de
Codechange: Remove unused CYapfDestinationTileT ( #13086 )
2024-11-16 16:12:18 +00:00
Peter Nelson
57ac1cbe0c
Fix: Don't allow right-click to close world generation progress window. ( #13084 )
2024-11-16 13:54:47 +00:00
translators
8c395ed67c
Update: Translations from eints
...
vietnamese: 4 changes by KhoiCanDev
2024-11-16 04:48:13 +00:00
Peter Nelson
14e2839087
Codechange: Let's use this new emplace_back() thing. ( #13081 )
2024-11-15 20:28:17 +00:00
Peter Nelson
98c8445519
Codechange: Limit house default cargo label lists to original slot counts. ( #13079 )
...
Same as for IndustrySpec and IndustryTileSpec.
2024-11-15 08:07:02 +00:00
translators
d6c2f9edf1
Update: Translations from eints
...
polish: 5 changes by pAter-exe
2024-11-15 04:48:47 +00:00
Peter Nelson
61aff3fa49
Codechange: Limit industry default cargo label lists to original slot counts. ( #13072 )
...
IndustrySpec and IndustryTileSpec cargo label lists are only used for original industries. Original industries can only have up to 2 inputs and 3 outputs. Therefore having space for 16 input/outputs slots is unnecessary
This saves 216 bytes per industry type, and 164 bytes per industry tile type.
2024-11-14 19:05:18 +00:00
translators
9742038b68
Update: Translations from eints
...
chinese (simplified): 2 changes by WenSimEHRP
2024-11-13 04:45:59 +00:00
Koen Bussemaker
6faf4fa70a
Codechange: Simplified YAPF ship region node
2024-11-12 23:17:56 +01:00
Koen Bussemaker
3e195df3c7
Codechange: Cleaned up and renamed NodeList
2024-11-12 21:06:17 +01:00
Peter Nelson
bbc1f7b3dc
Add: Show and toggle follow vehicle state in vehicle view window. ( #13076 )
...
* After double-clicking on a location button to follow a vehicle, show that state by drawing the location button in a lowered state.
* Allow cancelling the follow state by clicking on the location button again.
2024-11-12 17:36:24 +00:00
Jonathan G Rennison
78258f13bc
Doc: Fix documentation of water tile non-flooding bit in landscape.html ( #13071 )
2024-11-12 10:17:58 -05:00
translators
ce64d5f5d9
Update: Translations from eints
...
japanese: 56 changes by akaregi
2024-11-11 04:45:41 +00:00
translators
66198dea46
Update: Translations from eints
...
japanese: 50 changes by akaregi
german: 4 changes by SecretIdetity
french: 4 changes by ottdfevr
2024-11-10 04:45:21 +00:00
translators
5e4f8db7d6
Update: Translations from eints
...
latvian: 4 changes by lexuslatvia
2024-11-09 04:45:00 +00:00
Loïc Guilloux
e5edfbadcf
Codefix: Silence clang-cl warnings ( #13066 )
...
* Codefix ad5da0c
: clang-cl doesn't need /Zc:preprocessor
* Codefix: use -Wno-multichar with clang-cl
2024-11-08 14:42:12 +01:00