mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Further ui improvements, fix simple belts with wires
This commit is contained in:
@@ -1190,6 +1190,11 @@ export class BeltPath extends BasicSerializableObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.root.currentLayer !== "regular") {
|
||||
// Not in regular layer
|
||||
return true;
|
||||
}
|
||||
|
||||
const mousePos = this.root.app.mousePosition;
|
||||
if (!mousePos) {
|
||||
// Mouse not registered
|
||||
|
||||
@@ -501,7 +501,7 @@ export class BeltSystem extends GameSystemWithFilter {
|
||||
// POTATO Mode: Only show items when belt is hovered
|
||||
let hoveredBeltPath = null;
|
||||
const mousePos = this.root.app.mousePosition;
|
||||
if (mousePos) {
|
||||
if (mousePos && this.root.currentLayer === "regular") {
|
||||
const tile = this.root.camera.screenToWorld(mousePos).toTileSpace();
|
||||
const contents = this.root.map.getLayerContentXY(tile.x, tile.y, "regular");
|
||||
if (contents && contents.components.Belt) {
|
||||
|
||||
Reference in New Issue
Block a user