Skip to content

Commit

Permalink
Update game, comments, test new cache deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
FormularSumo committed Sep 7, 2024
1 parent 394d12d commit a211c14
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Binary file modified game.data
Binary file not shown.
2 changes: 1 addition & 1 deletion game.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,6 @@ Module.expectedDataFileDownloads++;
}

}
loadPackage({"package_uuid":"52a10900-44a2-4198-ab30-fdbcea5889f1","remote_package_size":72818281,"files":[{"filename":"/game.love","crunched":0,"start":0,"end":72818281,"audio":false}]});
loadPackage({"package_uuid":"4d8fb9bf-fc06-4b38-b4cc-d16bd19d0f18","remote_package_size":72818279,"files":[{"filename":"/game.love","crunched":0,"start":0,"end":72818279,"audio":false}]});

})();
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
} else if (Module.remainingDependencies === 0) {
document.getElementById('loadingCanvas').style.display = 'none';
document.getElementById('canvas').style.visibility = 'visible';
const cache = caches.open(CACHE_NAME);
cache.delete('game.data')
}
},
totalDependencies: 0,
Expand Down Expand Up @@ -172,8 +174,7 @@
navigator.serviceWorker.register('/Star-Wars-Galaxy-Collection-Web/sw.js', { scope: '/Star-Wars-Galaxy-Collection-Web/' });

navigator.serviceWorker.addEventListener('controllerchange', () => {
// This will be triggered when the service worker is replaced with a new one.
// We do not just reload the page right away, we want to make sure we are fully activated using the checkUpdate function.
// This will be triggered when the service worker is replaced with a new one -- to ensure that game data is redownloaded if needed
console.log({ state: "updated" });
location.reload()
});
Expand Down
2 changes: 1 addition & 1 deletion sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const CACHE_NAME = `0.12.0.24`; // stable.pre-release.minor.web
const CACHE_NAME = `0.12.0.25`; // stable.pre-release.minor.web

// Use the install event to pre-cache all initial resources.
self.addEventListener('install', event => {
Expand Down

0 comments on commit a211c14

Please sign in to comment.