The maze check in ScTileElement::seatRotation_set was inverted, so the
setter refused every track element except maze ones, the only ride type
seat rotation does not apply to. Use the same check as the getter.
* feat: add PathNavigator
* separate PathConnection from PathNavigator
* add PathNavigationOptions for PathNavigator
* make PathNavigationOptions positive instead of double-negative
* [skip ci] fix typo
* [skip ci] revert formatting
* align branch with develop after merge
* Address PR feedback
* Adapt PathNavigator to lowerCamelCase renames in develop
Upstream renamed TileElementType members and PathElement/BannerElement
accessors to lowerCamelCase (#26608, #26626 and follow-ups).
* Name PathNavigator/PathConnection Register and New
Use the same names as every other scripting engine class for these two
functions, so they don't read as doing something different.
* Add context.saveGame() binding in plugin API.
* Add option to save games to a specific path via the plugin API.
* Alter documentation for SaveGameOptions.
* Bump kPluginApiVersion to 116.
* Use IsFilenameValid to disallow saving files with invalid characters
* Add changelog entry
* add workflow and package.json for publishing plugin TypeScript types
* move scripting-related files to scripting folder
* add support for trusted publishers
* fix path to scripting readme
* rename scripting README.md back to scripting.md
* support tagged/dev releases
* add workflow for development versions
* Update package.json website
* change dependencies in publish-plugin-types
* add timestamp to dev plugin versions
* note ScriptEngine.h grep dependency from CI
* use gh-describe to track release version for dev plugin types
Previously JS entities would create prototypes on each allocation in
`Sc*::New`. This change creates a single global protype for each entity
class which then gets copied upon entity allocation in JS realm.
Running test with "Live Ride Measurements" plugin on a park shared for
performance testing I get following results:
| | OpenRCT2::Scripting::HookEngine::Call | OpenRCT2::Scripting::ScMap::getAllEntities |
|-----------------|---------------------------------------|--------------------------------------------|
| duktape | 68ms | 10ms |
| quickjs current | 318ms | 126ms |
| quickjs + fix | 22ms | 942µs |
Previously each call to `getAllEntities` would result in 1382 calls to
`JS_SetPropertyFunctionList`, each costing 90.5µs.
Park used: https://files.catbox.moe/z6j2g4.park
Added the following binds for completeness:
- ignoreRidePrice
- makeAllDestructible
- forcedParkRating*
`allowSpecialColourSchemes` was missing from the type definition file so I added that as well.
\*forcedParkRating required a little more logic than the boolean cheats and I added some safeguards to prevent setting invalid values
* Scripting: Redraw vehicle when setting track location
* Scripting: introduce car.moveToTrack
A new function to move cars to tracks easier. Also redraws the car.
* Revert car.trackLocation to CoordsXYZD
reverts 30a555d3c2
car.moveToTrack() achieves the same thing in a saner API.
* Final fixes for vehicle.moveToTrack
added back tracklocation.Get with track type
added EntityTweener call at the end of travelBy/moveToTrack
* moveToTrack: final bassie review fixes.
* moveToTrack: use tile coords
* moveToTrack: api increment
---------
Co-authored-by: Guy Sviry <guy@axissecurity.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
* Put all of TitleSequenceManager into the same namespace
* Move RideConstructionState into the OpenRCT2 namespace
* Adopt existing namespaces into OpenRCT2 namespace
This adds `using namespace OpenRCT2` to compilation units where appropriate,
as a means to get the codebase to compile until these units have been placed
in a namespace of their own.