mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fix PC actorLink (#92)
This commit is contained in:
parent
d34272a301
commit
58e912d641
1 changed files with 9 additions and 6 deletions
|
|
@ -5,12 +5,15 @@ import { GMUpdateEvent, socketEvent } from '../helpers/socket.mjs';
|
||||||
import { setDiceSoNiceForDualityRoll } from '../helpers/utils.mjs';
|
import { setDiceSoNiceForDualityRoll } from '../helpers/utils.mjs';
|
||||||
|
|
||||||
export default class DhpActor extends Actor {
|
export default class DhpActor extends Actor {
|
||||||
_preCreate(data, changes, user) {
|
async _preCreate(data, options, user) {
|
||||||
if (data.type === 'pc') {
|
if ( (await super._preCreate(data, options, user)) === false ) return false;
|
||||||
data.prototypeToken = { actorLink: true, disposition: 1, sight: { enabled: true } };
|
|
||||||
}
|
// Configure prototype token settings
|
||||||
|
const prototypeToken = {};
|
||||||
super._preCreate(data, changes, user);
|
if ( this.type === "pc" ) Object.assign(prototypeToken, {
|
||||||
|
sight: { enabled: true }, actorLink: true, disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY
|
||||||
|
});
|
||||||
|
this.updateSource({ prototypeToken });
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareData() {
|
prepareData() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue