From 1fed8ba4f7d110e9d6228d13520724ca61d2e0a8 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Fri, 15 Sep 2023 17:55:16 +0900 Subject: [PATCH] hotswap: instructions if no faves; no placeholders --- public/scripts/RossAscends-mods.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index a9ee7ebd1..c01b05745 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -336,16 +336,24 @@ export async function favsToHotswap() { count++; } - // there are 6 slots in total, - if (count < maxCount) { //if any are left over + // don't fill leftover spaces with avatar placeholders + // just evenly space the selected avatars instead + /* + if (count < maxCount) { //if any space is left over let leftOverSlots = maxCount - count; for (let i = 1; i <= leftOverSlots; i++) { newContainer.append(template.clone()); } } + */ await Promise.allSettled(promises); - container.replaceWith(newContainer); + //helpful instruction message if no characters are favorited + if (count === 0) { container.html(` Favorite characters to add them to HotSwaps`) } + //otherwise replace with fav'd characters + if (count > 0) { + container.replaceWith(newContainer); + } } //changes input bar and send button display depending on connection status