From 1ae9e531ce9770c0f6a57dbb6fec5f642cd7064e Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 18 Mar 2018 01:55:12 +0000 Subject: [PATCH] Update plugin definition file --- distribution/openrct2.d.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/distribution/openrct2.d.ts b/distribution/openrct2.d.ts index 57ed804cce..540d01e2de 100644 --- a/distribution/openrct2.d.ts +++ b/distribution/openrct2.d.ts @@ -9,7 +9,14 @@ // OpenRCT2 Scripting API definition file +// To enable IntelliSense for your scripts in Visual Studio or Visual Studio Code, +// add the following line to the top of your script and change the path appropriately. +// +// /// +// + export interface Console { + clear(): void; log(message?: any, ...optionalParams: any[]): void; } @@ -83,12 +90,15 @@ export interface WindowDesc { export interface Ui { openWindow(desc: WindowDesc): Window; - closeWindow(window: Window); + closeWindow(window: Window): void; closeWindows(classification: string, id?: number): void; closeAllWindows(): void; } -declare var context: Context; -declare var map: Map; -declare var park: Park; -declare var ui: Ui; +declare global { + var console: Console; + var context: Context; + var map: Map; + var park: Park; + var ui: Ui; +}