From ed2dab5d03607176c62997eef51867d76811b014 Mon Sep 17 00:00:00 2001 From: mcglincy Date: Sun, 26 Dec 2021 19:06:45 -0600 Subject: [PATCH] Go back to single save-to-background file name per scene. --- src/dungeon.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/dungeon.js b/src/dungeon.js index e4b7a1b..cb6368c 100644 --- a/src/dungeon.js +++ b/src/dungeon.js @@ -94,10 +94,6 @@ export class Dungeon extends PlaceableObject { // uncomment for jpg+compression //const filename = `${canvas.scene.name}-dungeon.jpg`; //const base64 = await canvas.app.renderer.extract.base64(this, "image/jpeg", 0.5); - // const randString = - // Math.random().toString(36).substring(2, 6) + - // Math.random().toString(36).substring(2, 6); - // const filename = `${canvas.scene.name}-dungeon-${randString}.png`; const filename = `${canvas.scene.name}-dungeon.png`; const base64 = await canvas.app.renderer.extract.base64(tempContainer); const res = await fetch(base64); @@ -107,7 +103,6 @@ export class Dungeon extends PlaceableObject { await FilePicker.upload("data", folder, file, {}); const path = folder ? folder + "/" + filename : filename; // make sure we don't keep using a cached copy - // TODO: we only need to do this is we're keeping a fixed filename TextureLoader.loader.cache.delete(path); if (canvas.scene.data.img === path) { // cheat to force a scene update when we're re-saving to the same filename