1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-13 02:01:51 +00:00

Merge branch 'modloader' of github.com:tobspr/shapez.io into modloader

This commit is contained in:
tobspr 2022-01-20 22:18:30 +01:00
commit 511d0556e1
3 changed files with 5 additions and 4 deletions

View File

@ -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) {

View File

@ -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.

View File

@ -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) {