Close #24313 - Add API for setting a car’s ‘isCrashed’ flag

Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
This commit is contained in:
MaxandGymnasiast authored and GitHub committed 2025-05-12 21:42:46 +00:00
1 parent 3529c0be3a
commit 5a95e5e27d
4 files changed
+10 -2

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
0.4.23 (in development)
------------------------------------------------------------------------
- Feature: [#24313] [Plugin] Add API for setting a ride vehicle’s sprite to a smoke plume.
- Improved: [#24368] Clicking the in-game update notication now leads to a more user-friendly download page.
- Change: [#24342] g2.dat is now split into g2.dat and fonts.dat.
- Change: [#24342] g2.dat is now split into g2.dat and fonts.dat.
- Change: [#24362] The Windows installer now prevents installing to the same folder as RollerCoaster Tycoon 2 or Classic.
- Fix: [#24346] Possible crash during line drawing in OpenGL mode.
- Fix: [#24353] ‘Show dirty visuals’ is off by one pixel and does not work correctly with higher framerates.
+5
View File
@@ -2922,6 +2922,11 @@ declare global {
*/
isReversed: boolean;
/**
* Whether to draw the car sprite as a smoke plume.
*/
isCrashed: boolean;
/**
* The colour of the car.
*/
+1 -1
View File
@@ -46,7 +46,7 @@ namespace OpenRCT2
namespace OpenRCT2::Scripting
{
static constexpr int32_t kPluginApiVersion = 107;
static constexpr int32_t kPluginApiVersion = 108;
// Versions marking breaking changes.
static constexpr int32_t kApiVersionPeepDeprecation = 33;
@@ -77,6 +77,8 @@ namespace OpenRCT2::Scripting
dukglue_register_property(
ctx, &ScVehicle::flag_get<VehicleFlags::CarIsReversed>, &ScVehicle::flag_set<VehicleFlags::CarIsReversed>,
"isReversed");
dukglue_register_property(
ctx, &ScVehicle::flag_get<VehicleFlags::Crashed>, &ScVehicle::flag_set<VehicleFlags::Crashed>, "isCrashed");
dukglue_register_property(ctx, &ScVehicle::colours_get, &ScVehicle::colours_set, "colours");
dukglue_register_property(ctx, &ScVehicle::trackLocation_get, nullptr, "trackLocation");
dukglue_register_property(ctx, &ScVehicle::trackProgress_get, nullptr, "trackProgress");