From 8c0a0c4410d15a4153ffc35f5dcb8c5bd1c1d787 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 11 Apr 2023 07:52:18 -0500 Subject: [PATCH] Made board nodes support booleans for visibility --- src/features/boards/BoardNode.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/boards/BoardNode.vue b/src/features/boards/BoardNode.vue index a153afd..931c6ee 100644 --- a/src/features/boards/BoardNode.vue +++ b/src/features/boards/BoardNode.vue @@ -170,7 +170,7 @@ import themes from "data/themes"; import type { BoardNode, GenericBoardNodeAction, GenericNodeType } from "features/boards/board"; import { ProgressDisplay, getNodeProperty, Shape } from "features/boards/board"; -import { Visibility } from "features/feature"; +import { isVisible } from "features/feature"; import settings from "game/settings"; import { computed, ref, toRefs, unref, watch } from "vue"; @@ -210,8 +210,8 @@ watch(isDraggable, value => { const actions = computed(() => { const node = unref(props.node); - return getNodeProperty(props.nodeType.value.actions, node)?.filter( - action => getNodeProperty(action.visibility, node) !== Visibility.None + return getNodeProperty(props.nodeType.value.actions, node)?.filter(action => + isVisible(getNodeProperty(action.visibility, node)) ); });