* 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.
In order to transition staff costumes to objects, we must further disentangle staff from regular peeps. This has many advantages, such as making custom entertainers or even handymen costumes. However, this means putting some restrictions on what costumes can be assigned to staff in the mean while.
We are aware of plug-ins allowing staff to be decorated like normal peeps, though, e.g. using @Manticore-007's Peep Editor. Splitting staff from peeps will mean breaking such functionality. We can do our very best to reverting 'invalid' staff to their normal outfits instead of them outright disappearing. However, in the mean time, we should disallow peep costumes from being assigned to staff to prevent further disappointment down the line.
Once we get to actually adding custom staff costumes, I plan to add a new plug-in API to get available costumes for a particular staff type. This would apply to entertainers, but also other staff types. This should make it easier for plug-in authors to tap into custom costumes in the future.