Cyprian Klimaszewski and rubidium42
97f3e5b70f
Codechange: Make TileType enum an enum class.
2026-01-24 08:34:05 +01:00
Cyprian Klimaszewski and rubidium42
322ce224b4
Codechange: Make Price an enum class.
2026-01-14 22:07:02 +01:00
Rito12 and rubidium42
dc663d7b0a
Feature: Allow to build buoys at (0x0).
2026-01-05 21:26:47 +01:00
Rubidium and rubidium42
2fcd4e189a
Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...'
2026-01-03 16:04:32 +01:00
Cyprian Klimaszewski and GitHub
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson and GitHub
046b0c6267
Codechange: Use enum class and EnumBitSet for various order flags. ( #14783 )
2025-12-06 12:29:11 +00:00
Peter Nelson and GitHub
98275ee5d3
Codechange: Use enum class for water-related enums. ( #14804 )
2025-11-19 20:35:11 +00:00
Peter Nelson and Peter Nelson
2851c70a59
Codechange: Use enum class for RailGroundType.
2025-11-17 20:46:05 +00:00
Peter Nelson and GitHub
5ed8f1203b
Codechange: Cleanup unnecessary includes of spritecache.h ( #14678 )
2025-09-28 17:09:57 +00:00
Kuhnovic and GitHub
aa6fb0e9e5
Codechange: Simplified logic of ship leaving a depot. ( #14661 )
2025-09-26 13:35:11 +02:00
Peter Nelson and GitHub
42c9f84d74
Fix 3ac1a2f1e4: Game crash due to invalid vehicle type information. ( #14628 )
...
Use std::variant instead of union for vehicle info.
RailVehicleInfo is now non-POD so using in a union causes undefined behaviour.
2025-09-24 22:44:41 +01:00
Peter Nelson and GitHub
921d83c324
Codechange: Unify structures with sprite sub-tile bounds and simplify bounding boxes. ( #14424 )
...
Lots of different structs contain variations on sub-tile bounds with different naming. Unify into a single struct that can be inherited and passed directly to AddSortableSpriteToDraw.
At the same time, offsets now work more logically: sub-tile bounds now specify the bounding box, and an offset can be applied to the sprite.
2025-07-22 00:02:00 +01:00
Kuhnovic and GitHub
34c0b09764
Codechange: Removed T prefix from water region related types. ( #14290 )
2025-05-24 18:12:16 +02:00
frosch and frosch
06c399b79e
Codechange: Replace HasVehicleOnPos and callbacks with HasVehicleOnTile and lambda-predicates.
2025-04-22 22:12:59 +02:00
frosch and GitHub
2a62eea005
Codefix: Comment style. ( #14064 )
2025-04-21 17:25:09 +02:00
Peter Nelson and GitHub
fc45bb5a2b
Codechange: Replace bitstuffed VehicleEnterTileStatus. ( #14027 )
...
VehicleEnterTileStatus was an bitset-style enum, but bitstuffed with a StationID. However the StationID part was only used by trains, and only in two locations.
Instead, return just the enum bitset. The two places which require the StationID just call GetStationIndex() directly.
2025-04-20 21:10:02 +01:00
frosch and GitHub
b862d4937f
Codechange: Turn custom vehicle spritenums into enum, and use them consistently. ( #14022 )
2025-04-18 15:19:28 +02:00
Peter Nelson and GitHub
936d78fefc
Codefix: Avoid uppercase characters in variable names. ( #13985 )
2025-04-10 07:19:27 +01:00
Peter Nelson and GitHub
8b39b23d2b
Codechange: Use EnumBitSet for VehicleFlags. ( #13793 )
2025-03-13 08:38:54 +00:00
Peter Nelson and GitHub
91d22f7617
Codechange: Use EnumBitSet for VehStates. ( #13755 )
...
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Peter Nelson and GitHub
6e10584b91
Codechange: Use EncodedStrings for News messages. ( #13654 )
2025-02-23 20:24:02 +00:00
SamuXarick and GitHub
718a45b845
Fix 11a8b71: Set direction and rotation of ships upon building ( #13625 )
2025-02-22 23:33:25 +00:00
Rubidium and rubidium42
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium and rubidium42
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Peter Nelson and Peter Nelson
75387b9e2b
Codechange: Use EnumBitSet for StationFacility.
2025-02-13 18:03:13 +00:00
Jonathan G Rennison and rubidium42
d06b371254
Cleanup: Fix various spelling errors
2025-02-12 22:44:51 +01:00
Peter Nelson and Peter Nelson
ca75a8ce19
Codechange: Use enum class for NewsType.
2025-02-07 19:36:52 +00:00
Rubidium and rubidium42
e937c4dcfd
Codechange: change DestinationID into class with conversion helpers
...
A DestinationID is either a DepotID or StationID, where the aircraft hangar
being conceptually a depot is actually a StationID. When making those types
stronger, a lot of casts would need to be added, but this shows the intent
much better.
2025-02-06 21:03:24 +01:00
Peter Nelson and Peter Nelson
f8b1e3033f
Codechange: Use EnumBitSet for EngineFlags.
2025-01-31 18:55:31 +00:00
Rubidium and rubidium42
e894a5880c
Codechange: rename CargoID to CargoType and amend related variables/comments
2025-01-26 18:07:10 +01:00
Rubidium and rubidium42
fd5f6caed4
Codechange: use explicit TileIndex constructor for tile 0
2025-01-01 08:26:54 +01:00
Peter Nelson and 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
Jonathan G Rennison and rubidium42
e1b9a3e2e7
Fix: Excessively fast ships on aqueducts fail to move at correct speed
2024-08-07 20:59:44 +02:00
merni-ns and Kuhnovic
55a7c59d13
Remove: NPF and pathfinder change settings
2024-05-10 10:38:44 +02:00
Patric Stout and GitHub
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
SamuXarick and Kuhnovic
d7c5e9e8ab
Codechange: Where the ship comes from is already known
...
This simplifies the handling of variables.
`ChooseShipTrack` is called upon entering `tile`, and looking further back to the caller, it can be deduced that `v->tile` matches `src_tile`. With that said, `enterdir` can also be removed, as it's not used anywhere else.
`CreateRandomPath` and `GetRandomFollowUpTrackdir` is being fed `src_tile` as it's 2nd parameter. This could be eliminated, as `v` is also being passed to it. Just use `v->tile` in those functions.
2024-03-16 17:02:19 +01:00
Rubidium and rubidium42
27eadc13ec
Codechange: rename TILE_ADD(XY) to TileAdd(XY)
2024-03-10 15:50:24 +01:00
Tyler Trahan and GitHub
32b0fb9f6e
Fix #12010 : Use economy timer for vehicle stats minimum age, not calendar ( #12142 )
2024-03-09 09:38:52 -05:00
Peter Nelson and GitHub
b2ca6e1ac8
Codefix: Remove no-longer used ship special-case. ( #12192 )
...
This special-case has not been triggered since multi-tile docks were introduced.
2024-03-03 09:31:04 +00:00
SamuXarick and GitHub
b22fb43cea
Fix #10490 : Allow ships to exit depots if another is not moving at the exit point ( #12161 )
2024-02-23 08:08:16 -05:00
Peter Nelson and GitHub
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
Tyler Trahan and GitHub
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot ( #11945 )
2024-02-03 08:04:24 -05:00
Koen Bussemaker and rubidium42
5a55c4a934
Feature: [NewGRF] Allow higher max speeds for ships
2024-01-28 14:54:51 +01:00
Kuhnovic and GitHub
8a4a99b7e8
Fix #5713 : FindClosestShipDepot only considers depots that are actually reachable ( #11768 )
2024-01-27 15:06:14 +01:00
Tyler Trahan and GitHub
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
frosch and frosch
baf7cc858b
Codechange: Rename ship docking tile related functions.
2023-09-19 22:49:59 +02:00
frosch and frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
2023-09-10 08:40:25 -04:00
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
2023-09-10 08:40:25 -04:00
9a602ff304
Fix #10334 : Store separate newgrf-safe version of date_of_last_service. ( #11124 )
...
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.
Co-authored-by: Peter Nelson <peter1138@openttd.org >
2023-08-06 12:57:10 -04:00