Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
L0laapk3 committed May 31, 2020
2 parents c0c97e1 + fef3da2 commit 174501d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "L0laapk3_FactorioMaps",
"version": "4.0.0",
"version": "4.0.1",
"title": "FactorioMaps",
"author": "L0laapk3",
"contact": "https://github.com/L0laapk3/",
Expand Down
3 changes: 2 additions & 1 deletion updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
"Fixed scale of map label image sizes",
"Day and night snapshots are now completely identical instead of 1 tick apart",
"Added option to set the default snapshot when the page loads"
]
],
"4.0.1": "!Bugfix with default snapshot index"
}
2 changes: 1 addition & 1 deletion web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ if (countAvailableSaves > 0 || mapInfo.links && mapInfo.links.save) {

const defaultSurface = mapInfo.defaultSurface || "nauvis";
let nightOpacity = 0;
const defaultMapPath = mapInfo.options.defaultTimestamp;
const defaultMapPath = (mapInfo.options.defaultTimestamp < 0 ? mapInfo.maps.length : 0) + mapInfo.options.defaultTimestamp;
console.assert(0 <= defaultMapPath && defaultMapPath < mapInfo.maps.length, "Default map path is out of bounds.");
const someSurfaces = mapInfo.maps[defaultMapPath].surfaces;
let currentSurface = defaultSurface in someSurfaces ? defaultSurface : Object.keys(someSurfaces).sort()[0]
Expand Down

0 comments on commit 174501d

Please sign in to comment.