mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
Improve title sequence API
This commit is contained in:
32
distribution/openrct2.d.ts
vendored
32
distribution/openrct2.d.ts
vendored
@@ -2243,51 +2243,55 @@ declare global {
|
||||
'restart' |
|
||||
'end';
|
||||
|
||||
interface TitleSequenceCommandBase {
|
||||
type: TitleSequenceCommandType;
|
||||
}
|
||||
|
||||
interface LoadTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface LoadTitleSequenceCommand {
|
||||
type: 'load';
|
||||
index: number;
|
||||
}
|
||||
|
||||
interface LocationTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface LocationTitleSequenceCommand {
|
||||
type: 'location';
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
interface RotateTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface RotateTitleSequenceCommand {
|
||||
type: 'rotate';
|
||||
rotations: number;
|
||||
}
|
||||
|
||||
interface ZoomTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface ZoomTitleSequenceCommand {
|
||||
type: 'zoom';
|
||||
zoom: number;
|
||||
}
|
||||
|
||||
interface FollowTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface FollowTitleSequenceCommand {
|
||||
type: 'follow';
|
||||
id: number | null;
|
||||
}
|
||||
|
||||
interface SpeedTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface SpeedTitleSequenceCommand {
|
||||
type: 'speed';
|
||||
speed: number;
|
||||
}
|
||||
|
||||
interface WaitTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface WaitTitleSequenceCommand {
|
||||
type: 'wait';
|
||||
duration: number;
|
||||
}
|
||||
|
||||
interface LoadScenarioTitleSequenceCommand extends TitleSequenceCommandBase {
|
||||
interface LoadScenarioTitleSequenceCommand {
|
||||
type: 'loadsc';
|
||||
scenario: string;
|
||||
}
|
||||
|
||||
interface RestartTitleSequenceCommand {
|
||||
type: 'restart';
|
||||
}
|
||||
|
||||
interface EndTitleSequenceCommand {
|
||||
type: 'end';
|
||||
}
|
||||
|
||||
type TitleSequenceCommand =
|
||||
LoadTitleSequenceCommand |
|
||||
LocationTitleSequenceCommand |
|
||||
@@ -2296,7 +2300,9 @@ declare global {
|
||||
FollowTitleSequenceCommand |
|
||||
SpeedTitleSequenceCommand |
|
||||
WaitTitleSequenceCommand |
|
||||
LoadScenarioTitleSequenceCommand;
|
||||
LoadScenarioTitleSequenceCommand |
|
||||
RestartTitleSequenceCommand |
|
||||
EndTitleSequenceCommand;
|
||||
|
||||
interface TitleSequenceManager {
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace OpenRCT2::Scripting
|
||||
{ "speed", TitleScript::Speed },
|
||||
{ "wait", TitleScript::Wait },
|
||||
{ "loadsc", TitleScript::LoadSc },
|
||||
{ "restart", TitleScript::Restart },
|
||||
{ "end", TitleScript::End },
|
||||
});
|
||||
|
||||
template<> DukValue ToDuk(duk_context* ctx, const TitleScript& value)
|
||||
|
||||
Reference in New Issue
Block a user