mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[PR][Feature] Actor Sizes (#1433)
* Added support for adversary actor sizes * . * . * Finished token implementation * Fixed token-config * Updated SRD adversaries * . * Added size to Beastform tokenData * Fixed sizing for evolved beastforms * Beastform compendium update * .
This commit is contained in:
parent
7926c614e3
commit
8178fa5738
176 changed files with 1198 additions and 203 deletions
|
|
@ -65,20 +65,30 @@ export default class BeastformEffect extends BaseEffect {
|
|||
}
|
||||
};
|
||||
|
||||
const updateToken = token => ({
|
||||
...baseUpdate,
|
||||
'texture': {
|
||||
enabled: this.characterTokenData.usesDynamicToken,
|
||||
src: token.flags.daggerheart?.beastformTokenImg ?? this.characterTokenData.tokenImg
|
||||
},
|
||||
'ring': {
|
||||
subject: {
|
||||
texture:
|
||||
token.flags.daggerheart?.beastformSubjectTexture ?? this.characterTokenData.tokenRingImg
|
||||
}
|
||||
},
|
||||
'flags.daggerheart': { '-=beastformTokenImg': null, '-=beastformSubjectTexture': null }
|
||||
});
|
||||
const updateToken = token => {
|
||||
const { x, y } = game.system.api.documents.DhToken.getSnappedPositionInSquareGrid(
|
||||
token.object.scene.grid,
|
||||
{ x: token.x, y: token.y, elevation: token.elevation },
|
||||
baseUpdate.width,
|
||||
baseUpdate.height
|
||||
);
|
||||
return {
|
||||
...baseUpdate,
|
||||
x,
|
||||
y,
|
||||
'texture': {
|
||||
enabled: this.characterTokenData.usesDynamicToken,
|
||||
src: token.flags.daggerheart?.beastformTokenImg ?? this.characterTokenData.tokenImg
|
||||
},
|
||||
'ring': {
|
||||
subject: {
|
||||
texture:
|
||||
token.flags.daggerheart?.beastformSubjectTexture ?? this.characterTokenData.tokenRingImg
|
||||
}
|
||||
},
|
||||
'flags.daggerheart': { '-=beastformTokenImg': null, '-=beastformSubjectTexture': null }
|
||||
};
|
||||
};
|
||||
|
||||
await updateActorTokens(this.parent.parent, update, updateToken);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue