diff --git a/CHANGELOG.md b/CHANGELOG.md index 5adefd4..8356b3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d ## [Unreleased] +## [0.8.3](https://github.com/averrin/director/compare/0.8.2...0.8.3) +Fixed: + * Broken by v10 show/hide in the Selection tab + * Toggle token magic doesn't work if targets are selected by Tagger + * Size in the Selection tab isn't rounded + * Tag color selection doesn't work in the mutual tag input + * "Create action" from the selection tab made it with "undefined" type + + ## [0.8.2](https://github.com/averrin/director/compare/0.8.1...0.8.2) Added: * More compact collapsed mode * Actions and Hooks can be global + * "Run Macro" action Fixed: * Tagger component acts weird sometimes if there are more than one instance on page diff --git a/src/modules/API.js b/src/modules/API.js index db4937e..8916b2e 100644 --- a/src/modules/API.js +++ b/src/modules/API.js @@ -42,6 +42,15 @@ const API = { return seq; }, + listActions: () => { + let acts; + actions.update(a => { + acts = a; + return a; + }); + return acts; + }, + findSequence: (name) => { let seq; sequences.update(seqs => { diff --git a/src/modules/Integrations.js b/src/modules/Integrations.js index 17306be..1fd3530 100644 --- a/src/modules/Integrations.js +++ b/src/modules/Integrations.js @@ -79,6 +79,9 @@ function initTokenMagicIntegration() { group: 'Token Magic', execute: (object, action, event) => { if (!object) return; + if (!object.document) { + object = object.object; + } object.getFlag = object.document.getFlag.bind(object.document); if (TokenMagic.hasFilterType(object, action.args[0])) { TokenMagic.deleteFilters(object, action.args[0]); diff --git a/src/modules/Specs.js b/src/modules/Specs.js index 4fb54b9..dcdf8e0 100644 --- a/src/modules/Specs.js +++ b/src/modules/Specs.js @@ -727,7 +727,7 @@ export const argSpecs = [ { id: "float", var_types: ["float", "int", "expression"], default: 0 }, { id: "macro", var_types: ["macro", "string", "expression"] }, { id: "string", var_types: ["string", "expression"] }, - { id: "color", var_types: ["string", "color", "expression"] }, + { id: "color", var_types: ["string", "color", "expression"], default: "#ffffff" }, { id: "code", var_types: ["code", "string", "expression"] }, { id: "expression", var_types: ["expression"] }, { diff --git a/src/view/MainUI.svelte b/src/view/MainUI.svelte index ba2d464..bc163b8 100644 --- a/src/view/MainUI.svelte +++ b/src/view/MainUI.svelte @@ -24,6 +24,7 @@ import { getContext, onDestroy, setContext } from "svelte"; import Action from "../modules/Actions"; + import { actionTypes } from "../modules/Specs"; const { application } = getContext("external"); const position = application.position; position.scale = game.settings.get(moduleId, SETTINGS.UI_SCALE); @@ -50,7 +51,7 @@ function createAction(_, tags) { actions.update((actions) => { - actions = [Action.fromPlain({ id: uuidv4(), value: tags, type: "" }), ...actions]; + actions = [Action.fromPlain({ id: uuidv4(), value: tags, type: actionTypes[0] }), ...actions]; return actions; }); mode = "actions"; diff --git a/src/view/components/ActionsTab.svelte b/src/view/components/ActionsTab.svelte index f20e87c..b0ed9eb 100644 --- a/src/view/components/ActionsTab.svelte +++ b/src/view/components/ActionsTab.svelte @@ -113,7 +113,14 @@