1
0
Fork 0
Commit Graph

30774 Commits (77af1c89c822e905b017e461b15f416dbd4bfbcc)
 

Author SHA1 Message Date
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
translators 80f628063a Update: Translations from eints
tamil: 7 changes by merni-ns
2024-11-08 04:45:16 +00:00
Thomas Winwood b1bba967a1
Add: Improving town-owned bridges increases company rating (#13036) 2024-11-07 08:14:04 -05:00
Jonathan G Rennison 7b3525954c
Fix: x-axis direction of industry production graph (#13062) 2024-11-07 08:13:21 -05:00
translators c9bd21d579 Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
2024-11-07 04:45:57 +00:00
Peter Nelson d54341318e
Fix: VF_LOADING_FINISHED and VF_STOP_LOADING flags tested on wrong vehicle part. (#13063)
These flags are only set on the front part of a vehicle as they apply to the whole consist.
2024-11-07 00:25:05 +00:00
Charles Pigott 884b93c4c0
Add: Set application name for SDL2 (#13061) 2024-11-06 19:51:03 +00:00
Peter Nelson 465df3bab1 Change: Don't try to flood buoys or dock tiles.
This reduces the active flooding water tiles a little more.
2024-11-06 19:44:14 +00:00
Peter Nelson 8f9836793f Change: Store water tile flooding state in the map.
This allows water tiles which cannot flood any further to not even try to flood.

On a large map with lots of water tiles this can noticeably reduce game loop processing time.

Mostly ported from JGRPP.
2024-11-06 19:44:14 +00:00
Tyler Trahan 4cd46e54aa
Fix #12940: Use specific error when overbuilding station on signals (#12943) 2024-11-06 14:13:04 -05:00
Tyler Trahan c3bb512bd9
Remove: Hidden setting for adjacent stations (#12862) 2024-11-06 14:11:07 -05:00
Joan Josep 5d7a7b2955
Codechange: Simplify IsCompanyBuildableVehicleType. (#12868) 2024-11-06 19:09:09 +00:00
Peter Nelson 3b6d3080f2 Add: Apply rail/road type conversion when NewGRFs are updated mid-game.
This will update the rail/road type of tiles on the map, taking account of tram state, if types are moved around.
2024-11-06 19:04:44 +00:00
Peter Nelson 8bb6572943 Add: Implement missing road type label conversion.
This was implemented for rail types but missed for road types.

This lets road type labels to be reordered, allowing for upgrades of NewGRF.
2024-11-06 19:04:44 +00:00
Peter Nelson 157d028915 Codechange: Simplify testing for railtype map conversion.
Build the list of railtype conversions at the same time as testing if conversion is needed.

This avoids having two similar loops which need to compare the same things.
2024-11-06 19:04:44 +00:00
Jonathan G Rennison 36c735ebfa
Codefix: Nullptr dereference in industry var 0xB4 when no cargoes accepted (#13060) 2024-11-06 18:53:48 +00:00
Jonathan G Rennison 59c399c795
Codefix: Documentation comment in IndustryDirectoryWindow (#13059) 2024-11-06 18:52:30 +00:00
translators 29df467d27 Update: Translations from eints
swedish: 4 changes by joeax910
2024-11-06 04:47:50 +00:00