File tree 3 files changed +4
-3
lines changed
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " L0laapk3_FactorioMaps" ,
3
- "version" : " 4.0.0 " ,
3
+ "version" : " 4.0.1 " ,
4
4
"title" : " FactorioMaps" ,
5
5
"author" : " L0laapk3" ,
6
6
"contact" : " https://github.com/L0laapk3/" ,
Original file line number Diff line number Diff line change 60
60
" Fixed scale of map label image sizes" ,
61
61
" Day and night snapshots are now completely identical instead of 1 tick apart" ,
62
62
" Added option to set the default snapshot when the page loads"
63
- ]
63
+ ],
64
+ "4.0.1" : " !Bugfix with default snapshot index"
64
65
}
Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ if (countAvailableSaves > 0 || mapInfo.links && mapInfo.links.save) {
420
420
421
421
const defaultSurface = mapInfo . defaultSurface || "nauvis" ;
422
422
let nightOpacity = 0 ;
423
- const defaultMapPath = mapInfo . options . defaultTimestamp ;
423
+ const defaultMapPath = ( mapInfo . options . defaultTimestamp < 0 ? mapInfo . maps . length : 0 ) + mapInfo . options . defaultTimestamp ;
424
424
console . assert ( 0 <= defaultMapPath && defaultMapPath < mapInfo . maps . length , "Default map path is out of bounds." ) ;
425
425
const someSurfaces = mapInfo . maps [ defaultMapPath ] . surfaces ;
426
426
let currentSurface = defaultSurface in someSurfaces ? defaultSurface : Object . keys ( someSurfaces ) . sort ( ) [ 0 ]
You can’t perform that action at this time.
0 commit comments