Lavaeolous / PF1-StatBlock-Converter-Module

FoundryVTT Module to convert PF1 Statblocks into Foundry Actors (PC or NPC).
MIT License
14 stars 12 forks source link

Migrate DataModel #552

Closed Lavaeolous closed 1 year ago

Lavaeolous commented 1 year ago

See: https://foundryvtt.com/article/v10-data-model/

There no longer exists an inner Document#data object. Any code which references this data object will now generate console logged warnings and have their request redirected to the root level of the Document.

Old:
const name = actor.data.name;
const trueName = actor.data._source.name;
New:
const name = actor.name;
const trueName = actor._source.name;

No more data.data shenanigans

Old:
const systemData = actor.data.data;
New:
const systemData = actor.system;

sbcUtils.js: