Closed farling42 closed 4 months ago
game.model.Actor
- includes base
in the Simple World Building.
game.system.documentTypes.Actor
- does not include base
in the Simple World Building system.
So we should game.system.documentTypes
instead of game.template
on Foundry V11, game.system.documentTypes.Actor
is an array:
on Foundry V12, game.system.documentTypes.Actor
is an object:
game.model.actor
Foundry V11:
Foundry V12:
Actor.createDialog
gets a list of the character types:
V11:
const documentName = this.metadata.name; // Actor
const types = game.documentTypes[documentName].filter(t => t !== CONST.BASE_DOCUMENT_TYPE);
V12:
const documentName = this.metadata.name;
const types = game.documentTypes[documentName].filter(t => t !== CONST.BASE_DOCUMENT_TYPE);
Implemented in 0.52.3
Use of
game.template.Item.types
andgame.template.Item.types
is deprecated in Foundry V12.The warning in the console is: