From e94219b26b7e06a5d7b0bb22270b01409ab7817c Mon Sep 17 00:00:00 2001 From: Jendrik Date: Thu, 25 Sep 2025 23:31:38 +0200 Subject: [PATCH] added custom entry to import --- src/main.mjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.mjs b/src/main.mjs index 6cdd43a4..4a79ba9e 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -11,4 +11,16 @@ Hooks.once("init", () => { }; console.log("DSA 4.1 is ready for development!") +}) + +Hooks.on("getActorDirectoryEntryContext", (menuItems) => { + menuItems.push({ + name: "Import from XML", + icon: '', + callback: (li) => { + const actorId = li.data("document-id") + const actor = game.actors.get(actorId) + actor.import() + } + }) }) \ No newline at end of file