Skip to content

Commit 174501d

Browse files
committed
Merge branch 'dev'
2 parents c0c97e1 + fef3da2 commit 174501d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

info.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "L0laapk3_FactorioMaps",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"title": "FactorioMaps",
55
"author": "L0laapk3",
66
"contact": "https://github.com/L0laapk3/",

updates.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@
6060
"Fixed scale of map label image sizes",
6161
"Day and night snapshots are now completely identical instead of 1 tick apart",
6262
"Added option to set the default snapshot when the page loads"
63-
]
63+
],
64+
"4.0.1": "!Bugfix with default snapshot index"
6465
}

web/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ if (countAvailableSaves > 0 || mapInfo.links && mapInfo.links.save) {
420420

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

0 commit comments

Comments
 (0)