added custom entry to import

pull/13/head
Jendrik 2025-09-25 23:31:38 +02:00
parent fc83a83de9
commit e94219b26b
1 changed files with 12 additions and 0 deletions

View File

@ -12,3 +12,15 @@ Hooks.once("init", () => {
console.log("DSA 4.1 is ready for development!") console.log("DSA 4.1 is ready for development!")
}) })
Hooks.on("getActorDirectoryEntryContext", (menuItems) => {
menuItems.push({
name: "Import from XML",
icon: '<i class="fas fa-file"></i>',
callback: (li) => {
const actorId = li.data("document-id")
const actor = game.actors.get(actorId)
actor.import()
}
})
})