diff --git a/resources/js/main.js b/resources/js/main.js index fbe468b..3beac63 100644 --- a/resources/js/main.js +++ b/resources/js/main.js @@ -705,14 +705,6 @@ function getTileText (tile) { else text = `${text} (${tile.Type})`; } - else if (tile.WallType || tile.WallType === 0) { - if(tile.WallType < settings.Walls.length) { - text = `${settings.Walls[tile.WallType].Name} (${tile.WallType})`; - } - else { - text = `Unknown Wall (${tile.WallType})`; - } - } else if (tile.IsLiquidPresent) { text = "Water"; @@ -723,6 +715,14 @@ function getTileText (tile) { text = "Honey"; } } + else if (tile.WallType || tile.WallType === 0) { + if(tile.WallType < settings.Walls.length) { + text = `${settings.Walls[tile.WallType].Name} (${tile.WallType})`; + } + else { + text = `Unknown Wall (${tile.WallType})`; + } + } if(tile.IsRedWirePresent) text += " (Red Wire)"; @@ -863,10 +863,6 @@ function getTileColor(y, tile, world) { return tileColors[tile.Type][0]; } - if (tile.IsWallPresent) { - return wallColors[tile.WallType][0]; - } - if (tile.IsLiquidPresent) { if(tile.IsLiquidLava) return liquidColors[1]; @@ -876,6 +872,11 @@ function getTileColor(y, tile, world) { return liquidColors[0]; } + if (tile.IsWallPresent) { + return wallColors[tile.WallType][0]; + } + + if(y < world.worldSurfaceY) return { "r": 132, "g": 170, "b": 248 };