59 Commits

Author SHA1 Message Date
Cyprian Klimaszewski 8e89414d9e Codechange: Add regression tests for terraforming and its costs (#15820) 2026-07-07 16:19:14 -04:00
Rubidium a9a2965131 Codechange: introduce regression script for GS compat scripts 2026-05-20 20:36:03 +02:00
Rubidium 4e58f4dffa Codechange: introduce regression script for GS 2026-05-20 20:36:03 +02:00
Rubidium 2cebcc50f4 Codechange: explicitly pass the script folder for regression scripts 2026-05-20 20:36:03 +02:00
Loïc Guilloux fb8d4e880e Change: [Script] Reformat callstack output (#15171) 2026-01-27 22:30:04 +01:00
SamuXarick 6a06a76b5d Add: Several more regression tests for ScriptList (#14772)
* Add 3ebedec: [Script] Test implicit conversion from bool to integer in lists

* Codefix 333249c: Don't print the inverse of IsEnd in regression

It is more natural to print the value as is.

* Add: [Script] Several more ScriptList regression tests

* Add: [Script] ScriptList regression tests for KeepBelowValue, KeepAboveValue, KeepValue
2026-01-10 18:02:20 +01:00
glx22 392f743bcd Change: [Script] ScriptList::Valuate is now suspendable 2025-12-11 23:30:27 +01:00
Michael Lutz 170c29b376 Codechange: We are heading to 16 (#14882) 2025-12-07 23:16:08 +01:00
Jonathan G Rennison 73b260ce05 Codefix: Leading newlines in Squirrel error/callstack prints (#14851) 2025-12-03 08:19:49 +00:00
Jonathan G Rennison 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
Peter Nelson 9f7f314f81 Codechange: [Script] Add regression test for company president gender. 2025-10-19 17:32:48 +01:00
Peter Nelson 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 Nelson 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
Loïc Guilloux d0b56022d8 Fix #14362, 4b677e8256: Class with non static methods may have a default constructor (#14363) 2025-06-14 23:39:22 +02:00
glx22 938acbe6ef Add: [Script] Cloning ScriptList 2025-06-05 22:37:33 +02:00
Loïc Guilloux 2cd3c8db86 Codechange: [Script] Don't report multiple errors on valuator/filter failure (#14303) 2025-05-30 14:38:41 +02:00
Loïc Guilloux 1b0fd0e6fd Fix b2c57123: [Script] Conversion from ScriptEvent to ScriptEventCompanyTown subclasses (#14274) 2025-05-18 15:40:47 +02:00
Loïc Guilloux c16d5f3a8d Change: [Script] ScriptVehicleList_Station accepts an optional VehicleType parameter (#14260) 2025-05-13 16:41:23 +02:00
Loïc Guilloux 41b113840a Fix: [Script] Access to enum/consts defined outside of main.nut (#14176) 2025-05-01 18:16:32 +02:00
Rubidium b1ab1b9f06 Change: [Script] rename BridgeID to BridgeType in the script API 2025-01-22 22:23:38 +01:00
Rubidium 29129e12fd Add: [Script] Event for when a company's president name changes 2025-01-14 11:35:35 +01:00
Björn Wärmedal 9ab936f76b Add: [Script] ScriptEventCompanyRename (#12878) 2025-01-14 09:24:28 +00:00
Peter Nelson 9008d793ab Change: Use per-company group numbers. (#12297)
This is used by the default group name, replacing the use of group index.
2024-05-07 19:01:28 +00:00
Koen Bussemaker bef11941c6 Change: Allow rail and road depot overbuilding in current orientation in order to connect to rail or road 2024-04-23 13:11:31 +02:00
Rubidium a4d4301a0c Codechange: We are heading to 15 2024-02-18 21:48:54 +01:00
SamuXarick 8584d1b5bb Add: [Script] GetAirportNumHelipads (#12085)
Adds a function for Scripts to get the number of helipads of an airport type.
2024-02-14 21:38:32 +01:00
Loïc Guilloux b84b68e959 Codechange: Rework regression output filtering (#12049) 2024-02-10 14:16:24 +01:00
Loïc Guilloux b0f3417025 Add: [Script] ScriptTileList_StationCoverage (#12015) 2024-02-06 20:22:18 +01:00
Patric Stout 46b1114c67 Change: forcefully enable prefixing logs with date (#11930)
Additionally, add the log-level to the log message.
2024-01-30 22:02:16 +00:00
Loïc Guilloux 28efa65e0c Revert a2edf52: SQOpsLimiter does a more precise job (#11754) 2024-01-12 17:04:43 +01:00
Loïc Guilloux a672813bb0 Add: [Script] Optional filter parameter to ScriptVehicleList constructor (#11663) 2024-01-01 01:07:47 +01:00
Loïc Guilloux e86eb25447 Change: [CMake] Use explicit list for regression (#11541) 2023-12-05 15:37:53 +01:00
Tyler Trahan f49ffaaaea Fix e4fd99a, Fix #11270: Vehicle max age is not subject to leap years (#11372) 2023-10-15 22:34:03 +00:00
Tyler Trahan e4fd99a33a Codechange: Use DateAtStartOfYear() instead of multiplying by DAYS_IN_LEAP_YEAR (#11174) 2023-08-11 08:18:59 -04:00
Kuhnovic 6169e7f4bc Feature: Orientation of rail and road depots can be changed (#9642) 2023-07-01 08:11:31 -04:00
Patric Stout ed83c4b0da Change: replace per-AI "start_date" with a global "competitors_interval" (#10653)
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.

While at it, also ported this part over to the new timer system.
2023-04-16 20:14:22 +02:00
dP b0542c8c49 Codechange: Don't store tree counter in the map array (#10018) 2023-02-26 16:39:44 -05:00
Loïc Guilloux 6b99b6672e Fix: [Script] ScriptBase::Rand() return value was between -MIN(int32) and MAX(int32) (#10443)
Also ensure the parameters for ScriptBase::RandRange() and ScriptBase::Chance() are in [0-MAX(uint32)] range
2023-02-10 19:55:59 +01:00
Rubidium c5ff61c5f2 Add: script specific Randomizer instances 2023-01-14 22:00:11 +01:00
Michael Lutz 150f05dc15 Change: Heading for 14 now. (#10302) 2023-01-01 22:52:23 +01:00
Loïc Guilloux c179c10048 Fix #10263, ccefa76: [scripts] restore tile validation for commands (#10269) 2022-12-21 02:37:59 +01:00
Michael Lutz ab9d77ebbe Add: [Script] Regression for ScriptAccounting. 2022-12-04 11:27:24 +01:00
SamuXarick be7db78767 Add: ScriptCargo::GetWeight regression tests 2022-10-16 18:28:28 +02:00
glx22 ed1457dca3 Fix 55170ae: [Script] Building two-way signals could end up one-way 2022-05-27 19:57:50 +02:00
Tyler Trahan e9cb9c1135 Fix #9579: Object and HQ construction is Construction cost, not Property Maintenance (#9673) 2021-11-08 08:12:15 +00:00
Patric Stout 394c749b6b Change: Heading for 13 now (#9573) 2021-09-25 13:48:03 +02:00
SamuXarick 37de878129 Feature: [AI/GS] Missing water related functions and objects (#8390) 2021-09-14 22:06:55 +02:00
Patric Stout eca73a810c Change: rebrand 1.12.0 to 12.0
One question that keeps popping up: "when do we release 2.0?".
NewGRF will force that at least 1.16 will be 2.0, but to not wait
for this, let's drop the "1." and be for ever done with that
conversation.

We are following in the footstep of giants here.
2021-08-15 12:28:51 +02:00
Loïc Guilloux 376f2509ad Fix: Don't consider regression AIs when starting a random AI (#9164) 2021-05-01 16:19:14 +02:00
Patric Stout 9bfa7198fd Change: Heading for 1.12 now (#8862) 2021-03-14 20:47:31 +01:00