From fdfccefb67461fdf0033d45a129d6cb0361e7b0e Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 26 Aug 2021 22:24:56 -0500 Subject: [PATCH] Removed social resource and added make bed action plus some stuff I forgot to add in the last commit --- src/components/board/Board.vue | 2 +- src/components/board/BoardNode.vue | 27 +++++++++++++++----- src/data/layers/Main.vue | 9 ++++++- src/data/layers/main.ts | 40 ++++++++++++++++++++---------- src/data/mod.ts | 5 ++-- src/typings/player.d.ts | 2 +- 6 files changed, 61 insertions(+), 24 deletions(-) diff --git a/src/components/board/Board.vue b/src/components/board/Board.vue index 5d60a07..445f014 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -16,7 +16,7 @@ - + diff --git a/src/components/board/BoardNode.vue b/src/components/board/BoardNode.vue index ac2d12e..ea726a7 100644 --- a/src/components/board/BoardNode.vue +++ b/src/components/board/BoardNode.vue @@ -229,7 +229,22 @@ export default defineComponent({ return this.board.selectedAction; }, actions(): BoardNodeAction[] | null | undefined { - return getNodeTypeProperty(this.nodeType, this.node, "actions"); + const actions = getNodeTypeProperty(this.nodeType, this.node, "actions") as + | BoardNodeAction[] + | null + | undefined; + if (actions) { + return actions.filter(action => { + if (action.enabled == null) { + return true; + } + if (typeof action.enabled === "function") { + return action.enabled(); + } + return action.enabled; + }); + } + return null; }, draggable(): boolean { return getNodeTypeProperty(this.nodeType, this.node, "draggable"); @@ -363,17 +378,17 @@ export default defineComponent({ transform: rotate(-90deg); } -.action:hover circle, -.action.selected circle { +.action:not(.boardnode):hover circle, +.action:not(.boardnode).selected circle { r: 25; } -.action:hover text, -.action.selected text { +.action:not(.boardnode):hover text, +.action:not(.boardnode).selected text { font-size: 187.5%; /* 150% * 1.25 */ } -.action text { +.action:not(.boardnode) text { text-anchor: middle; dominant-baseline: central; } diff --git a/src/data/layers/Main.vue b/src/data/layers/Main.vue index c27b588..045bf48 100644 --- a/src/data/layers/Main.vue +++ b/src/data/layers/Main.vue @@ -1,6 +1,7 @@
Game Paused
Dev Speed: {{ formattedDevSpeed }}x
+
Day {{ day }}