From 6fd9d4a7e6413c4eb0a37c132fbc5c9b646d7235 Mon Sep 17 00:00:00 2001 From: Marc Robledo Date: Thu, 2 Mar 2023 20:10:38 +0100 Subject: [PATCH] fixed SSBU editor --- smash-bros-ultimate/_cache_service_worker.js | 2 +- smash-bros-ultimate/smash-bros-ultimate.js | 23 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/smash-bros-ultimate/_cache_service_worker.js b/smash-bros-ultimate/_cache_service_worker.js index 7f066cf..b776766 100644 --- a/smash-bros-ultimate/_cache_service_worker.js +++ b/smash-bros-ultimate/_cache_service_worker.js @@ -30,7 +30,7 @@ caches.keys().then(function(cacheNames){ }); var PRECACHE_ID='smash-bros-ultimate-editor'; -var PRECACHE_VERSION='v1b'; +var PRECACHE_VERSION='v1c'; var PRECACHE_URLS=[ '/savegame-editors/smash-bros-ultimate/','/savegame-editors/smash-bros-ultimate/index.html', '/savegame-editors/smash-bros-ultimate/favicon.png', diff --git a/smash-bros-ultimate/smash-bros-ultimate.js b/smash-bros-ultimate/smash-bros-ultimate.js index 7486de5..e5e5513 100644 --- a/smash-bros-ultimate/smash-bros-ultimate.js +++ b/smash-bros-ultimate/smash-bros-ultimate.js @@ -1,6 +1,6 @@ /* - Super Smash Bros. Ultimate for HTML5 Save Editor v2019 - by Marc Robledo 2019 + Super Smash Bros. Ultimate for HTML5 Save Editor v2019-2023 + by Marc Robledo 2019-2023 @@ -90,6 +90,25 @@ SavegameEditor={ /* save function */ save:function(){ + tempFile.writeU8(this.Offsets.ITEMS_SHUFFLE_ALL, getValue('items-shuffle-all')); + tempFile.writeU8(this.Offsets.ITEMS_ALL_PRIMARIES, getValue('items-all-primaries')); + tempFile.writeU8(this.Offsets.ITEMS_ALL_SUPPORTS, getValue('items-all-supports')); + tempFile.writeU8(this.Offsets.ITEMS_FILLER, getValue('items-filler')); + tempFile.writeU8(this.Offsets.ITEMS_REMATCH, getValue('items-rematch')); + tempFile.writeU8(this.Offsets.ITEMS_50_DAMAGE, getValue('items-50-damage')); + tempFile.writeU8(this.Offsets.ITEMS_SLOW_FS_CHARGING, getValue('items-slow-fs-charging')); + tempFile.writeU8(this.Offsets.ITEMS_WEAKEN_MINIONS, getValue('items-weaken-minions')); + tempFile.writeU8(this.Offsets.ITEMS_HEALTH_DRAIN, getValue('items-health-drain')); + tempFile.writeU8(this.Offsets.ITEMS_DISABLE_ITEMS, getValue('items-disable-items')); + tempFile.writeU8(this.Offsets.ITEMS_SHIELD_SPACER, getValue('items-shield-spacer')); + tempFile.writeU8(this.Offsets.ITEMS_SLUGGISH_SHIELD, getValue('items-sluggish-shield')); + + tempFile.writeU16(this.Offsets.SNACK_S, getValue('snacks-s')); + tempFile.writeU16(this.Offsets.SNACK_M, getValue('snacks-m')); + tempFile.writeU16(this.Offsets.SNACK_L, getValue('snacks-l')); + tempFile.writeU32(this.Offsets.SPIRIT_POINTS, getValue('sp')); + tempFile.writeU8(this.Offsets.TICKETS, getValue('tickets')); + tempFile.writeU32(this.Offsets.GOLD, getValue('gold')); tempFile.writeU8(this.Offsets.HAMMERS, getValue('hammers')); } } \ No newline at end of file