Commit Graph
1159 Commits
Author SHA1 Message Date
froschandGitHub 2cdf2bedfa Codechange: Add a std::string overload for StrMakeValidInPlace() and a moving std::string&& overload for StrMakeValid(). (#13962) 2025-04-07 18:22:47 +02:00
Loïc GuillouxandGitHub b25daba561 Fix: [Script] Reset instance when changing running scripts in scenario editor (#13906) 2025-04-03 21:14:45 +02:00
froschandGitHub 86bb30acbe Codefix dccc6185: Incorrect encoding of empty parameters in ScriptText. (#13951) 2025-04-03 13:57:30 +02:00
Loïc GuillouxandGitHub 827b03a32c Fix: [Script] Prevent cloning of API instances (#13947) 2025-04-02 12:30:57 +02:00
Loïc GuillouxandGitHub 6bf405eb18 Codechange: Remove Game::GetGameInstance() (duplicate of Game::GetInstance()) (#13901) 2025-03-26 22:41:41 +00:00
Peter NelsonandGitHub 325f7f9767 Codechange: Use EnumBitSet for GoodsEntry status. (#13899) 2025-03-26 21:22:33 +00:00
Peter NelsonandPeter Nelson 422ff9dbd8 Codechange: Use std::unique_ptr for ai/game config. 2025-03-26 10:54:11 +00:00
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 NelsonandPeter Nelson 732109e444 Codechange: Use EnumBitSet for RoadTypes. 2025-03-25 20:15:48 +00:00
froschandGitHub 25005cff16 Codefix: std::string_view::data() is not necessarily null terminated. (#13891) 2025-03-25 20:32:19 +01:00
Peter NelsonandGitHub 79ef4e98fe Codechange: Use std::swap() instead of Swap() (#13883) 2025-03-24 23:47:34 +00:00
froschandfrosch 488cda728d Codechange: Use std::string and std::string_view instead of C strings. 2025-03-24 23:10:13 +01:00
Peter NelsonandGitHub 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 GuillouxandGitHub bdea29c414 Fix #13875: [Script] be less strict about empty constructor format for doxygen (#13882) 2025-03-24 13:38:10 +01:00
Peter NelsonandGitHub a4f9977d18 Codechange: Don't reimplement DistanceManhattan. (#13850) 2025-03-21 17:06:39 +00:00
Peter NelsonandPeter Nelson 6297b49a00 Codechange: Remove table/strings include from header files.
This was accidentally providing coverage to basically all source files...
2025-03-21 12:53:40 +00:00
Peter NelsonandPeter 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 NelsonandPeter 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
Rubidiumandrubidium42 f214c81e97 Codechange: simplify some complicated logic 2025-03-16 15:12:02 +01:00
Rubidiumandrubidium42 d6a1a0b058 Codechange: simplify logic and prevent invalid bit 2025-03-16 14:14:21 +01:00
Rubidiumandrubidium42 ccca7fc2b4 Codechange: remove unused INVALID_TRACK_BIT 2025-03-15 22:03:17 +01:00
Rubidiumandrubidium42 6d0ba270d2 Codefix: do not use an invalid iterator 2025-03-15 21:43:56 +01:00
SamuXarickandGitHub f6b0f7848b Add: [Script] Newer Cargo Classes (#13779) 2025-03-15 16:51:56 +01:00
Rubidiumandrubidium42 18e1440947 Codefix: move or pass by reference instead of copy 2025-03-13 21:16:16 +01:00
Rubidiumandrubidium42 754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Peter NelsonandGitHub 3eb89f04b5 Codechange: Use EnumBitSet for QueryStringFlags. (#13792) 2025-03-10 18:59:35 +00:00
Loïc GuillouxandGitHub c6cd1a4bca Fix #13740: [Script] Handle implicit orders for jump orders (#13753) 2025-03-10 15:12:26 +01:00
Rubidiumandrubidium42 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
Rubidiumandrubidium42 afe66c7df4 Codefix: std::move string leaves the old one in an undefined state 2025-03-09 22:19:54 +01:00
Rubidiumandrubidium42 2000cea235 Codechange: initialise instance members 2025-03-09 20:41:03 +01:00
Rubidiumandrubidium42 a23dda7ffe Codechange: use const auto & instead of making a copy 2025-03-08 21:33:17 +01:00
Peter NelsonandGitHub 91d22f7617 Codechange: Use EnumBitSet for VehStates. (#13755)
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Rubidiumandrubidium42 8a243f7391 Fix: [Script] Getting expiry date could cause out of bounds access 2025-03-08 16:14:18 +01:00
Peter NelsonandPeter 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
Peter NelsonandPeter Nelson 7a9a3ef94a Codechange: Move to GetWidgetString for script windows. 2025-03-03 21:23:13 +00:00
Rubidiumandrubidium42 3790f29156 Codechange: use std::allocator over malloc/free for Squirrel memory management 2025-03-03 16:42:17 +01:00
Rubidiumandrubidium42 7f674b09a4 Codefix: std::optional<const std::string> is weird; why is modifying the string copy not allowed? 2025-03-02 20:16:25 +01:00
glx22andLoïc Guilloux a6f558ce2a Add: [Script] Saving/loading ScriptList 2025-03-02 13:41:12 +01:00
glx22andLoïc Guilloux d6a261439b Add: [Script] Framework for loading/saving selected ScriptObject 2025-03-02 13:41:12 +01:00
Rubidiumandrubidium42 15dcf56dad Codechange: remove ZeroedMemoryAllocator 2025-02-28 20:12:44 +01:00
Peter NelsonandGitHub 94783fe2ed Codechange: Use EnumBitSet for ScriptConfigFlags. (#13669) 2025-02-28 18:57:40 +00:00
Peter NelsonandGitHub ddb502d097 Codechange: Use parameterised GetString() for script-related windows. (#13671) 2025-02-27 23:53:04 +00:00
Peter NelsonandGitHub e2c1b9f03e Codechange: Use only raw strings in drop down lists. (#13667)
Strings with parameters are now pre-formatted, avoiding global parameters.

Helper functions still allow StringID.
2025-02-27 21:11:16 +00:00
Rubidiumandrubidium42 b376e2655a Codechange: explicitly initialise member variables of Windows 2025-02-27 20:06:06 +01:00
SamuXarickandGitHub af32ce3710 Cleanup: Remove unused member in ScriptDebugWindow (#13664) 2025-02-27 14:17:31 +01:00
Loïc GuillouxandGitHub e769c0392e Cleanup: [Script] Remove some dead code (#13660) 2025-02-26 21:37:07 +01:00
Loïc GuillouxandGitHub ae72e15951 Codefix b2c5712: [Script] Squirrel::GetRealInstance doesn't work with negative index (#13658) 2025-02-25 13:13:31 +01:00
Peter NelsonandPeter 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
Loïc GuillouxandGitHub c06f5cff09 Codefix b2c5712: [Script] Properly check sq_instanceof return value (#13657) 2025-02-24 21:09:04 +00:00
Rubidiumandrubidium42 02f040b22a Codechange: remove unused alloc_func.hpp includes 2025-02-24 20:00:19 +01:00