Commit Graph
1277 Commits
Author SHA1 Message Date
Loïc GuillouxandGitHub ca1c0007b6 Codechange: [Script] Replace map of sets with set of pairs for per value storage (#14930) 2025-12-18 22:34:47 +01:00
Loïc GuillouxandGitHub 9a47f53db0 Codechange: [Script] Reduce code duplication in ScriptList filtering (#14931) 2025-12-17 15:35:53 +01:00
Rito12andrubidium42 859b56a066 Doc: Correct file descriptions to match coding style and doxygen. 2025-12-15 17:31:00 +01:00
glx22andLoïc Guilloux 392f743bcd Change: [Script] ScriptList::Valuate is now suspendable 2025-12-11 23:30:27 +01:00
glx22andLoïc Guilloux 81b4075095 Add: [Script] Framework to make selected native calls suspendable 2025-12-11 23:30:27 +01:00
KuhnovicandGitHub 8e35553208 Feature: Configurable sign text colors in scenario editor. (#14743) 2025-12-08 17:52:19 +01:00
Michael LutzandGitHub 170c29b376 Codechange: We are heading to 16 (#14882) 2025-12-07 23:16:08 +01:00
Charles PigottandGitHub 0bf3de7658 Fix #14863: [Script] Improve documentation for GetAPIVersion (#14877) 2025-12-07 16:55:41 +00:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandGitHub 4b7a3241bf Codechange: Remove unnecessary 'core' includes. (#14867) 2025-12-07 08:36:58 +00:00
Peter NelsonandGitHub 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 NelsonandGitHub 046b0c6267 Codechange: Use enum class and EnumBitSet for various order flags. (#14783) 2025-12-06 12:29:11 +00:00
Jonathan G RennisonandGitHub 712ca5e3ec Codechange: [Script] Use std::optional for script list next iteration item (#14753)
Avoids false positive updates in Remove when iterating the final item
and leftover values being returned when IsEnd is true
2025-11-29 17:36:41 +00:00
TheDude-ghandrubidium42 75aee10e1e Add: [Script] ScriptTile::IsHouseTile 2025-11-26 20:44:50 +01:00
Peter NelsonandGitHub 98275ee5d3 Codechange: Use enum class for water-related enums. (#14804) 2025-11-19 20:35:11 +00:00
Peter NelsonandPeter Nelson c3451b5d97 Codechange: Replace color with colour. 2025-11-18 00:02:48 +00:00
Peter NelsonandPeter Nelson 2cd5a241c5 Codechange: Use enum class for RoadTileType. 2025-11-17 20:46:05 +00:00
Peter NelsonandGitHub 66b6d71e32 Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
2025-11-01 22:33:00 +00:00
Peter NelsonandGitHub 34bbae05db Codechange: Use enum/EnumBitSet for livery in use flags. (#14746)
Replaces magic numbers.
2025-11-01 14:25:24 +00:00
SamuXarickandGitHub 20fd2b5014 Codefix: Add missing 'this->' in ScriptList (#14747) 2025-10-31 11:38:49 +00:00
SamuXarickandGitHub 3f19240bbe Doc 313c6c4: [Script] GetAllRailTypes and GetRailType are from ScriptEngine (#14745) 2025-10-30 13:36:43 -04:00
SamuXarickandGitHub 3ebedecb4a Add: [Script] Auto-convert ObjectType bool to integer when setting values for items in lists via [] (#14308) 2025-10-29 21:18:00 +01:00
SamuXarickandGitHub e4b0e84a7c Doc 80666a0: Fix typo in game script changelog (#14714) 2025-10-24 21:19:47 +02:00
Peter NelsonandGitHub a617d009cc Codechange: Dereference with x-> instead of (*x). (#14700) 2025-10-05 15:47:33 +01:00
Peter NelsonandGitHub c9fbc41636 Codechange: Script list iterator tidying. (#14698)
* Use `iter->` instead of `(*iter).`
* Use prefix instead of postfix operators
* Use `auto` instead of explicit iterator type.
* Use `std::next()` instead of assignment then increment.
* Use range-for where possible.
2025-10-05 07:57:09 +01:00
Peter NelsonandGitHub 68e37b7b50 Change: [Script] Decouple RAILTYPE_INVALID from internal presentation. (#14630)
RAILTYPE_INVALID is now -1, which matches ROADTYPE_INVALID.
2025-09-19 22:02:08 +01:00
Peter NelsonandGitHub 5f20a97b36 Fix 313c6c45aa: [Script] Return rail types as list instead of bitmask. (#14617)
This is more idiomatic for scripts, and avoids exposing internal representation.
2025-09-15 13:59:04 +01:00
Michael Lutz 313c6c45aa Add: [Script] Function to get all rail types of an rail engine. 2025-09-14 17:11:26 +02:00
Michael Lutz 3ac1a2f1e4 Codechange: Store the rail type of rail engines as a RailTypes bitmask. 2025-09-14 17:11:26 +02:00
Peter NelsonandGitHub 80541a7682 Fix c02ef3e456: [AI] Incorrect infrastructure cost for road/tram tiles. (#14596)
Infrastructure total count should be split between road and tram pieces.
2025-09-07 14:11:05 +01:00
Loïc GuillouxandGitHub 4b9afbe35b Codefix: [Script] Mention ScriptError::ERR_STATION_TOO_SPREAD_OUT in API doc (#14562) 2025-08-31 15:18:51 +00:00
Loïc GuillouxandGitHub 80666a0d51 Add: [Script] ScriptError::ERR_BRIDGE_TOO_LOW (#14560) 2025-08-31 14:04:02 +00:00
Rubidiumandrubidium42 7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Loïc GuillouxandGitHub 995f30bff0 Codefix bd1a3fe0: Incorrect handling of squirrel stack (#14538) 2025-08-26 16:00:01 +02:00
Peter NelsonandGitHub bd57aee3a9 Add: Town cargo history graphs. (#14461) 2025-08-02 23:19:43 +01:00
Peter NelsonandGitHub 7bb4940ebd Codechange: Use unique_ptr for all pointers in script instance. (#14339)
Removes manual memory management with new/delete.
2025-07-19 09:29:30 +01:00
Loïc GuillouxandGitHub 1b01a0636c Fix #14362, 4b677e8256: Don't crash old scripts doing silly instantiation (#14394) 2025-07-17 13:30:33 +02:00
Peter NelsonandPeter Nelson 9ce2aca949 Codechange: Get/pass ScriptStorage by reference instead of pointer. 2025-07-14 19:19:29 +01:00
Peter NelsonandPeter Nelson 55098a2f2e Codechange: Get/pass engine by reference instead of pointer. 2025-07-14 19:19:29 +01:00
Peter NelsonandPeter Nelson 7ff0c67f77 Codechange: Get/pass script controller by reference instead of pointer. 2025-07-14 19:19:29 +01:00
Peter NelsonandGitHub a6143eea21 Codechange: Include more relevant headers for script_storage. (#14437) 2025-07-14 07:49:50 +01:00
Peter NelsonandPeter Nelson 1d38cbafcb Codechange: Use unique_ptr for ScriptInfo instances.
Replaces raw pointers, slightly.
2025-07-14 00:10:14 +01:00
Peter NelsonandPeter Nelson 992d58d799 Codechange: Pass ScriptInfo by reference to IsSameScript. 2025-07-14 00:10:14 +01:00
Peter NelsonandPeter Nelson 8f34b7a821 Codechange: Keep Squirrel engine in unique_ptr. 2025-07-14 00:10:14 +01:00
Peter NelsonandGitHub a46a3a97f3 Change: New company face definition system and UI. (#14319)
Bits used by company faces are now defined by a variable system instead of being hardcoded, allowing future expansion.

The four face types covering gender and skin colour are now separate face styles with their own definitions.
2025-06-24 07:59:49 +01:00
Peter NelsonandGitHub 5766ba51d7 Codefix: Clean up incorrect indentation for multi-line comments. (#14383) 2025-06-20 19:01:44 +01:00
Peter NelsonandGitHub e4cf6ca0ba Fix: Mis-sized widgets due to missing widget fill. (#14370)
In most places where we calculate and set widget resize step we neglect
to set widget fill step to match. Initial widget sizing uses fill step
instead of resize step, which means the initial size may not be a
multiple of the resize step as intended. In particular this will cause
WWT_MATRIX to be misrendered.

Whether or not this matters depends on the widget type being resized and
the window layout, however for consistency always set fill step to the
same as resize step when calculating.
2025-06-17 17:40:11 +01:00
glx22andLoïc Guilloux 8e3acbfa84 Codechange: Deduplicate DefSQClass::DefSQ[Static]Method() 2025-06-14 12:41:39 +02:00
glx22andLoïc Guilloux 90e21bc713 Codechange: Remove useless SQConstruct parameters 2025-06-14 12:41:39 +02:00
glx22andLoïc Guilloux ccffbb4142 Codechange: Remove manual param count for constructors too 2025-06-14 12:41:39 +02:00