Peter Nelson and Peter Nelson
4b93bd74ef
Codechange: make VarSpriteGroupScope a scoped enum
2026-06-28 16:21:01 +01:00
Peter Nelson and GitHub
9f49ea4177
Codechange: make EngineImageType a scoped enum ( #15755 )
2026-06-21 08:05:41 +00:00
Peter Nelson and GitHub
c9cf141813
Codechange: make Track a scoped enum and TrackBits an EnumBitSet ( #15684 )
...
Helper methods to convert Track to TrackBits are removed as they are no longer necessary.
2026-06-08 23:05:51 +01:00
Peter Nelson and Peter Nelson
356ca9c6d9
Codechange: use static_cast/to_underlying when converting Direction
2026-05-31 13:11:53 +01:00
Peter Nelson and Peter Nelson
568c7bb259
Codechange: make DirDiff a scoped enum
2026-05-28 17:10:31 +01:00
Peter Nelson and GitHub
507b50223c
Codechange: make WagonOverride a scoped enum ( #15625 )
2026-05-24 22:58:34 +01:00
Peter Nelson and GitHub
eb52e2448d
Fix 9494881e: NewGRF driving-backwards flag tested wrong part ( #15579 )
...
The DrivingBackwards flag is only ever set on the first vehicle of the consist, other vehicle parts in the consist may have indeterminate state.
2026-05-04 23:00:46 +01:00
Peter Nelson and Peter Nelson
77403627a8
Codechange: make VehicleType a scoped enum
2026-04-26 07:00:13 +01:00
Peter Nelson and Peter Nelson
c45aa3c9b6
Codechange: use EnumBitSet for CargoTypes
2026-04-21 17:13:31 +01:00
Peter Nelson and GitHub
2bf84ea78c
Codechange: make GrfSpecFeature a scoped enum ( #15487 )
2026-04-19 19:04:27 +01:00
Tyler Trahan
9494881e14
Add: [NewGRF] Variable for when a train is driving backwards
2026-04-13 21:52:22 -04:00
Cyprian Klimaszewski and rubidium42
3c8d7df657
Codechange: Make documentation comments for some enums and their members recognised by doxygen.
2026-02-21 15:05:13 +01:00
Rubidium and rubidium42
d067bfe577
Codechange: add missing parameter/return documentation to NewGRF code
2026-02-18 18:28:46 +01:00
Rubidium and rubidium42
73232058d9
Codechange: deduplicate code by dereferencing in callee instead of callers
2026-02-01 15:50:17 +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
9adc4bfc0f
Codechange: Make order load/unload flags value types. ( #14861 )
...
Order Load and Unload flags have complex logic to ensure that invalid combinations aren't used. In fact, apart from FullLoad and FullLoadAny, all mixed combinations are invalid.
Simplify logic by removing the use of bit values and treat each option as a value.
2025-12-06 18:30:31 +00: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
Michael Lutz
3ac1a2f1e4
Codechange: Store the rail type of rail engines as a RailTypes bitmask.
2025-09-14 17:11:26 +02:00
Rubidium and rubidium42
7c0f69a8fe
Codefix: typos in comments and strings
2025-08-31 10:30:37 +02:00
Peter Nelson and GitHub
1af721a6f0
Add: [Badges] Vehicle variable to query badges of current rail or road types. ( #14312 )
2025-08-11 19:08:48 +01:00
Peter Nelson and GitHub
a2addf0fe7
Fix: Clear rail vehicle flipped flag if reverse probability callback returns false. ( #14281 )
...
This now distinguishes between not-flipped and callback not implemented.
2025-05-20 23:03:55 +01:00
Peter Nelson and GitHub
ce83f583bc
Codechange: Use EnumBitSet for VehicleRailFlags. ( #14280 )
2025-05-19 18:56:45 +01:00
frosch and frosch
22fedca77e
Codechange: Integrate ResolverObject::ResetState() into DoResolve(), no need to call it manually.
2025-05-06 22:24:41 +02:00
frosch and frosch
6faa667644
Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback().
2025-05-06 22:24:41 +02:00
frosch and frosch
85be7a4d92
Codechange: Access temporary storage through ResolverObject during Resolve.
2025-05-06 22:24:41 +02:00
frosch and frosch
99d7a775ad
Codechange: Make GetRegister return a signed integer, matching the underlying TemporaryStorageArray.
2025-05-06 22:24:41 +02:00
frosch and GitHub
13349254ea
Fix #14216 , d030d17: RealSpriteGroups referencing CallbackResultSpriteGroups were always treated as callback-failure. ( #14218 )
2025-05-05 16:13:41 +02:00
frosch and frosch
d030d17bd6
Codechange: Do not use a mutable global to return calculated VarAction2 results.
2025-04-29 20:35:46 +02:00
frosch and frosch
e90b68d504
Codechange: Pass SpriteGroup as reference to ResolveReal.
2025-04-29 20:35:46 +02:00
frosch and frosch
8027e31f47
Codechange: Remove virtual functions SpriteGroup::GetResult and GetNumResults. They are only implemented in and called via ResultSpriteGroup.
2025-04-29 10:35:10 +02:00
frosch and frosch
010b944173
Codechange: Move SpriteGroup cast from callers into Resolve.
2025-04-29 10:35:10 +02:00
frosch and GitHub
30b1eb6e5f
Fix: [NewGRF] The result of Action123 evaluation affected rerandomisation in a weird corner case. ( #14139 )
...
Rerandomisation does not care about the Resolve result.
But we skipped it, in case of 'invalid SpriteGroup reference'.
2025-04-28 23:24:42 +02:00
frosch and frosch
b7e7f08f78
Codechange: Simplify usage of GRFFileProps by adding some common helper methods.
2025-04-28 13:44:46 +02:00
frosch and frosch
41a20e512d
Codechange: Use proper enum type to index sprite groups in VariableGRFFileProps.
2025-04-27 19:50:51 +02:00
frosch and GitHub
61a0a520f6
Codechange: Unify random trigger enums and turn them into enum classes. ( #14066 )
2025-04-21 20:03:34 +02:00
frosch and frosch
264abfafe6
Codechange: Rename storage of random triggers to include the term 'random'.
2025-04-21 19:06:13 +02:00
frosch and frosch
39220a5feb
Codechange: Unify naming of NewGRF random trigger functions.
2025-04-21 19:06:13 +02:00
frosch and GitHub
98445088b1
Codechange: Move VehicleEnteredDepotThisTick call to a more suitable position. ( #14065 )
2025-04-21 17:52:03 +02:00
frosch and frosch
8f335a84cf
Codechange: Turn GetCustom(Vehicle|Rotor)(Sprite|Icon) macros into functions.
2025-04-18 23:41:37 +02: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
Rubidium and rubidium42
a908c7bed0
Codechange: remove uses of MemCmpT (and MemMoveT)
2025-03-18 21:18:37 +01:00
enveeed and GitHub
b0cc56a8b5
Fix: NewGRF vehicles display loading sprites when not actually loading or unloading ( #13554 )
2025-03-15 16:58:47 -04: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
3fde611012
Codechange: Use EnumBitSet for AirportMovingDataFlags. ( #13754 )
2025-03-06 19:03:41 +00:00
Peter Nelson and GitHub
a8f56fe7b3
Add: Variable to test how many vehicles in a chain contain a specific badge. ( #13594 )
2025-02-25 20:55:11 +00:00
Peter Nelson and GitHub
9de913dd21
Codechange: Use helper to set grf_prop's grffile and grfid together. ( #13612 )
2025-02-18 22:33:13 +00:00
Peter Nelson and Peter Nelson
8f14894024
Add: NewGRF Badges.
2025-02-16 22:24: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
59df0ff496
Codechange: strongly type StationID
2025-02-16 18:25:51 +01:00