From 00a1767b1d4e5ff6c17082ce70f9f45c6c2eef49 Mon Sep 17 00:00:00 2001 From: Harry-Hopkinson Date: Mon, 19 Aug 2024 15:58:01 +0000 Subject: [PATCH] Version 1.0.3 - Fix Gitpod script --- .gitpod.yml | 2 +- package.json | 2 +- src/index.ts | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index fc338d2..8a916c0 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,2 +1,2 @@ tasks: - - init: yarn && yarn build + - init: cd lib && sh FetchOpenRCT2Api.sh && cd .. && yarn && yarn build diff --git a/package.json b/package.json index fe8c507..ae81946 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "close-all-windows-openrct2", - "version": "1.0.2", + "version": "1.0.3", "description": "Closes all open windows in OpenRCT2", "scripts": { "build": "tsc", diff --git a/src/index.ts b/src/index.ts index 0312db9..91b466a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,9 @@ var CloseAllWindows = function () { if (ui.windows !== undefined) { for (var i = 0; i < ui.windows; i++) { - if (!ui.getWindow(i).isSticky) window.close(); + var window = ui.getWindow(i); + + if (!window.isSticky) window.close(); } } }; @@ -14,7 +16,7 @@ var main = function () { registerPlugin({ name: "Close all Windows", - version: "1.0.2", + version: "1.0.3", authors: ["Harry Hopkinson"], type: "local", main: main,