Commit Graph

875 Commits

Author SHA1 Message Date
Peter Nelson
325f7f9767
Codechange: Use EnumBitSet for GoodsEntry status. (#13899) 2025-03-26 21:22:33 +00:00
Björn Wärmedal
d009bfc47b
Codechange: Add vehicle owner to crash event (#13878)
Co-authored-by: Björn Wärmedal <bjorn.warmedal@lumera.com>
2025-03-25 22:53:44 +01:00
Peter Nelson
732109e444 Codechange: Use EnumBitSet for RoadTypes. 2025-03-25 20:15:48 +00:00
Peter Nelson
79ef4e98fe
Codechange: Use std::swap() instead of Swap() (#13883) 2025-03-24 23:47:34 +00:00
frosch
488cda728d Codechange: Use std::string and std::string_view instead of C strings. 2025-03-24 23:10:13 +01:00
Peter Nelson
b96b26ef15
Codechange: Rename short CargoType parameters cargo. (#13848)
Rename CargoType variables and parameters using short or meaningless names.
2025-03-24 18:18:21 +00:00
Loïc Guilloux
bdea29c414
Fix #13875: [Script] be less strict about empty constructor format for doxygen (#13882) 2025-03-24 13:38:10 +01:00
Peter Nelson
a4f9977d18
Codechange: Don't reimplement DistanceManhattan. (#13850) 2025-03-21 17:06:39 +00:00
Peter Nelson
2909a14374 Codechange: Include table/strings.h in files that use StringIDs.
Be consistent with how and where the file is incldued.
2025-03-21 12:53:40 +00:00
Peter Nelson
4ffbf97770 Codechange: Move RawText::GetEncodedText() out of header.
This allows it to use StringID without polluting includes.
2025-03-21 12:53:40 +00:00
Rubidium
f214c81e97 Codechange: simplify some complicated logic 2025-03-16 15:12:02 +01:00
Rubidium
d6a1a0b058 Codechange: simplify logic and prevent invalid bit 2025-03-16 14:14:21 +01:00
Rubidium
ccca7fc2b4 Codechange: remove unused INVALID_TRACK_BIT 2025-03-15 22:03:17 +01:00
Rubidium
6d0ba270d2 Codefix: do not use an invalid iterator 2025-03-15 21:43:56 +01:00
SamuXarick
f6b0f7848b
Add: [Script] Newer Cargo Classes (#13779) 2025-03-15 16:51:56 +01:00
Rubidium
18e1440947 Codefix: move or pass by reference instead of copy 2025-03-13 21:16:16 +01:00
Rubidium
754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Loïc Guilloux
c6cd1a4bca
Fix #13740: [Script] Handle implicit orders for jump orders (#13753) 2025-03-10 15:12:26 +01:00
Rubidium
5721030bd2 Codefix: use Pool::Get if you know it's valid, especially if you don't check GetIfValid for nullptr 2025-03-10 12:46:29 +01:00
Peter Nelson
91d22f7617
Codechange: Use EnumBitSet for VehStates. (#13755)
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Rubidium
8a243f7391 Fix: [Script] Getting expiry date could cause out of bounds access 2025-03-08 16:14:18 +01:00
Peter Nelson
b55af05626 Codechange: Pass encoded script strings as EncodedString.
This removes the ambiguity of having std::strings that may or may not be encoded.
2025-03-04 21:40:39 +00:00
glx22
a6f558ce2a Add: [Script] Saving/loading ScriptList 2025-03-02 13:41:12 +01:00
glx22
d6a261439b Add: [Script] Framework for loading/saving selected ScriptObject 2025-03-02 13:41:12 +01:00
Loïc Guilloux
e769c0392e
Cleanup: [Script] Remove some dead code (#13660) 2025-02-26 21:37:07 +01:00
Peter Nelson
3cf9b15959 Codechange: Handle SnowTile state separately from ClearGround.
This removes the need for ClearGround to pretend that CLEAR_SNOW exists.
2025-02-25 08:22:46 +00:00
Rubidium
02f040b22a Codechange: remove unused alloc_func.hpp includes 2025-02-24 20:00:19 +01:00
glx22
a577229e95 Revert d7bd67cda3: [Scripts] "_typeof" metamethod negatively affects old scripts 2025-02-19 19:21:50 +01:00
glx22
d7bd67cda3 Add: [Scripts] "_typeof" metamethod 2025-02-18 21:19:15 +01:00
Peter Nelson
154896ce55
Codechange: Use GetString() with local parameters in script functions. (#13585) 2025-02-16 21:27:25 +00:00
Rubidium
fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium
59df0ff496 Codechange: strongly type StationID 2025-02-16 18:25:51 +01:00
Rubidium
70c9f3963c Codechange: strongly type VehicleID 2025-02-16 14:50:15 +01:00
Rubidium
7e04651220 Codechange: strongly type EngineID 2025-02-16 14:50:15 +01:00
Rubidium
380e7b48ce Codechange: use std::variant instead of a custom version for news references 2025-02-16 14:50:15 +01:00
Rubidium
2cb59b1856 Codechange: make VehicleID an enum 2025-02-16 14:50:15 +01:00
Rubidium
c25c3e8710 Codechange: make IndustryID an enum 2025-02-16 14:50:15 +01:00
Rubidium
ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Rubidium
5401ab1f7b Codechange: use ReferenceThroughBaseContainer for containers that are index by CompanyID 2025-02-16 14:02:18 +01:00
Rubidium
1ffc950e22 Codechange: use prefix operator++ for CompanyID iterations 2025-02-16 14:02:18 +01:00
Peter Nelson
443d7ece29
Codefix 75387b9e2b: Prefer using EnumBitSet.base() instead of shifting StationFacility. (#13575) 2025-02-16 11:52:40 +00:00
Peter Nelson
04708736d9
Codechange: Use EnumBitSet for CommandFlags. (#13560) 2025-02-15 09:36:20 +00:00
Peter Nelson
6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. (#13553) 2025-02-14 08:30:04 +00:00
Rubidium
c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Peter Nelson
f309b90a1d Codechange: Use EnumBitSet for Airport blocks. 2025-02-13 22:02:02 +00:00
Peter Nelson
75387b9e2b Codechange: Use EnumBitSet for StationFacility. 2025-02-13 18:03:13 +00:00
Peter Nelson
7975145080
Codechange: Use EnumBitSet for TownActions. (#13542) 2025-02-13 18:02:39 +00:00
Jonathan G Rennison
d06b371254 Cleanup: Fix various spelling errors 2025-02-12 22:44:51 +01:00
Loïc Guilloux
7fbfaa1b54
Fix #13520: [Script] doxygen ignored 'constexpr' constants (#13523) 2025-02-10 23:05:31 +01:00
Peter Nelson
687829fa14
Codechange: Use std::unique_ptr for ScriptList::sorter. (#13517)
Avoids manual pointer management.
2025-02-10 19:20:52 +00:00