diff --git a/src/js/game/hud/hud.js b/src/js/game/hud/hud.js index 714b697a..8e76029e 100644 --- a/src/js/game/hud/hud.js +++ b/src/js/game/hud/hud.js @@ -112,6 +112,11 @@ export class GameHUD { /* typehints:end */ }; + for (const partKey in shapezAPI.ingame.hudParts) { + if (!shapezAPI.ingame.hudParts.hasOwnProperty(partKey)) continue; + this.parts[partKey] = shapezAPI.ingame.hudParts[partKey]; + } + for (let i = 0; i < shapezAPI.ingame.layers.length; i++) { const layer = shapezAPI.ingame.layers[i]; if (shapezAPI.toolbars[layer]) diff --git a/src/js/modloader/mod.js b/src/js/modloader/mod.js index cd6f5b9d..ba86b8a6 100644 --- a/src/js/modloader/mod.js +++ b/src/js/modloader/mod.js @@ -869,6 +869,7 @@ export class ShapezAPI { this.ingame = { buildings: {}, components: {}, + hudParts: {}, //Must be array because of update order systems: [], items: {},