Skip to content

Commit

Permalink
Tokenizer for actor portraits
Browse files Browse the repository at this point in the history
  • Loading branch information
ben committed Jun 17, 2024
1 parent bebcc20 commit 82b4cda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Add the beginnings of an "Oceanic" color theme ([#997](https://github.com/ben/foundry-ironsworn/pull/997))
- Add a new `ds` dice term for the cursed die ([#1000](https://github.com/ben/foundry-ironsworn/pull/1000))
- Add a scene button to roll Cinder and Wraith ([#1001](https://github.com/ben/foundry-ironsworn/pull/1001))
- Trigger Tokenizer for actors if it's installed

## 1.23.2

Expand Down
9 changes: 8 additions & 1 deletion src/module/vue/components/document-img.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
:style="style"
:height="size"
:width="size"
@click="click" />
@click="click"
/>
</template>

<script setup lang="ts">
Expand All @@ -27,6 +28,12 @@ const style = computed(() => ({
const $actor = inject($ActorKey, undefined)
const $item = inject($ItemKey, undefined)
function click() {
// Trigger tokenizer if this is an actor portrait
const tokenizer = game.modules.get('vtta-tokenizer') as any
if (tokenizer && !$item && $actor) {
return tokenizer.api.tokenizeDoc($actor)
}
const current = props.document.img
const fp = new FilePicker({
type: 'image',
Expand Down

0 comments on commit 82b4cda

Please sign in to comment.