mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Fixed so that TransformActions don't make a new actor when transforming into another world actor
This commit is contained in:
parent
552c62adc1
commit
4282933dcf
1 changed files with 3 additions and 1 deletions
|
|
@ -89,8 +89,10 @@ export default class DHSummonField extends fields.SchemaField {
|
|||
|
||||
/* Check for any available instances of the actor present in the world, or create a world actor based on compendium */
|
||||
static async getWorldActor(baseActor) {
|
||||
if (!baseActor.inCompendium) return baseActor;
|
||||
|
||||
const dataType = game.system.api.data.actors[`Dh${baseActor.type.capitalize()}`];
|
||||
if (baseActor.inCompendium && dataType && baseActor.img === dataType.DEFAULT_ICON) {
|
||||
if (dataType && baseActor.img === dataType.DEFAULT_ICON) {
|
||||
const worldActorCopy = game.actors.find(x => x.name === baseActor.name);
|
||||
if (worldActorCopy) return worldActorCopy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue