important bugfix

fix save not including pixelTicks
This commit is contained in:
An Orbit 2024-02-13 12:36:42 -05:00 committed by GitHub
parent 650bfcdaae
commit aee4b2444c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,7 @@ try {
width: width, width: width,
height: height, height: height,
pixelSize: pixelSize, pixelSize: pixelSize,
pixelTicks: pixelTicks,
settings: settings, settings: settings,
version: 1, version: 1,
enabledMods: localStorage.enabledMods, enabledMods: localStorage.enabledMods,
@ -322,6 +323,7 @@ try {
width = json.width; width = json.width;
height = json.height; height = json.height;
pixelSize = json.pixelSize; pixelSize = json.pixelSize;
pixelTicks = (json.pixelTicks ?? 0);
//currentPixels = json.currentPixels; //currentPixels = json.currentPixels;
for(i = 0; i < json.pixelMap.length; i++) { for(i = 0; i < json.pixelMap.length; i++) {
json.pixelMap[i] = json.pixelMap[i].map(x => zeroToNull(x)); json.pixelMap[i] = json.pixelMap[i].map(x => zeroToNull(x));