1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

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:
Max
2025-05-12 23:42:46 +02:00
committed by GitHub
parent 3529c0be3a
commit 5a95e5e27d
4 changed files with 10 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
0.4.23 (in development)
------------------------------------------------------------------------
- Feature: [#24313] [Plugin] Add API for setting a ride vehicles 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: [#24362] The Windows installer now prevents installing to the same folder as RollerCoaster Tycoon 2 or Classic.

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.
*/

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;

View File

@@ -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");