From 7a1dedd2c8474d137baab070d7b42774ca7ed2bd Mon Sep 17 00:00:00 2001 From: "Thomas (DJ1TJOO)" <44841260+DJ1TJOO@users.noreply.github.com> Date: Thu, 20 Jan 2022 17:56:09 +0100 Subject: [PATCH 1/3] Added link to create-shapezio-mod npm page (#1339) Added link to create-shapezio-mod npm page: https://www.npmjs.com/package/create-shapezio-mod --- mod_examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_examples/README.md b/mod_examples/README.md index 1545a46b..c918a9ed 100644 --- a/mod_examples/README.md +++ b/mod_examples/README.md @@ -5,7 +5,7 @@ Currently there are two options to develop mods for shapez.io: 1. Writing single file mods, which doesn't require any additional tools and can be loaded directly in the game -2. Using the `create-shapezio-mod` package. This package is still in development but allows you to pack multiple files and images into a single mod file, so you don't have to base64 encode your images etc. +2. Using the [create-shapezio-mod](https://www.npmjs.com/package/create-shapezio-mod) package. This package is still in development but allows you to pack multiple files and images into a single mod file, so you don't have to base64 encode your images etc. Since the `create-shapezio-mod` package is still in development, the current recommended way is to write single file mods, which I'll explain now. From 839d2037371c0a9927f612d0f42cacc97c53e68d Mon Sep 17 00:00:00 2001 From: Emerald Block <69981203+EmeraldBlock@users.noreply.github.com> Date: Thu, 20 Jan 2022 10:56:26 -0600 Subject: [PATCH 2/3] allow command line switch to load more than one mod (#1342) --- electron/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electron/index.js b/electron/index.js index 18943589..f1de906f 100644 --- a/electron/index.js +++ b/electron/index.js @@ -361,7 +361,8 @@ ipcMain.handle("get-mods", async () => { if (externalMod) { console.log("Adding external mod source:", externalMod); - modFiles.push(externalMod); + const externalModPaths = externalMod.split(","); + modFiles = modFiles.concat(externalModPaths); } if (modFiles.length > 0 && !isDev) { From 0718f6cf802bb5397bc7c43606740ef2558c8f69 Mon Sep 17 00:00:00 2001 From: "Thomas (DJ1TJOO)" <44841260+DJ1TJOO@users.noreply.github.com> Date: Thu, 20 Jan 2022 17:57:04 +0100 Subject: [PATCH 3/3] Fixed class handle type (#1345) * Fixed class handle type * Fixed import game state --- src/js/mods/mod_interface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/mods/mod_interface.js b/src/js/mods/mod_interface.js index 949e4301..e3b9e59b 100644 --- a/src/js/mods/mod_interface.js +++ b/src/js/mods/mod_interface.js @@ -369,7 +369,7 @@ export class ModInterface { /** * Registers a new state class, should be a GameState derived class - * @param {typeof GameState} stateClass + * @param {typeof import("../core/game_state").GameState} stateClass */ registerGameState(stateClass) { this.modLoader.app.stateMgr.register(stateClass); @@ -470,7 +470,7 @@ export class ModInterface { /** * - * @param {typeof Object} classHandle + * @param {Class} classHandle * @param {({ $super, $old }) => any} extender */ extendClass(classHandle, extender) {