Changing move indicator logic

This commit is contained in:
thepaperpilot 2023-02-18 21:27:08 -06:00
parent 7736461992
commit 7d22471da6
2 changed files with 8 additions and 1 deletions

View file

@ -7,7 +7,12 @@
class="character"
:class="{ selected: isSelected, empty: character == null && selected == null }"
>
<span class="move-indicator" v-if="character == null && selected != null">
<span
class="move-indicator"
v-if="
selected != null && !isShop && (character?.type !== selected.type || isSelected)
"
>
<span class="material-icons">straight</span></span
>
<span
@ -59,6 +64,7 @@ import level3 from "../../public/Lvl 3.png";
defineProps<{
character?: Character | null;
isSelected?: boolean;
isShop?: boolean;
selected?: Character | null;
}>();
</script>

View file

@ -162,6 +162,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
<CharacterSlot
character={item == null ? undefined : item}
isSelected={selectedShopItem.value === i}
isShop={true}
onClick={(e: MouseEvent) => {
if (item == null) {
return;