Add v12 support
This commit is contained in:
@@ -12,7 +12,7 @@ export class WastelandActorSheet extends ActorSheet {
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return mergeObject(super.defaultOptions, {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["fvtt-wasteland", "sheet", "actor"],
|
||||
template: "systems/fvtt-wasteland/templates/actor-sheet.html",
|
||||
width: 640,
|
||||
@@ -25,7 +25,7 @@ export class WastelandActorSheet extends ActorSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = duplicate(this.object)
|
||||
const objectData = foundry.utils.duplicate(this.object)
|
||||
let actorData = objectData
|
||||
|
||||
let formData = {
|
||||
@@ -40,31 +40,32 @@ export class WastelandActorSheet extends ActorSheet {
|
||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
||||
limited: this.object.limited,
|
||||
skills: this.actor.getSkills(),
|
||||
armes: duplicate(this.actor.getWeapons()),
|
||||
protections: duplicate(this.actor.getArmors()),
|
||||
pouvoirs:duplicate(this.actor.getPouvoirs()),
|
||||
dons: duplicate(this.actor.getDons()),
|
||||
hubrises: duplicate(this.actor.getHubris()),
|
||||
tours:duplicate(this.actor.getTours()),
|
||||
artifex: duplicate(this.actor.getArtifex()),
|
||||
charmes:duplicate(this.actor.getCharmes()),
|
||||
peuple: duplicate(this.actor.getPeuple() || {}),
|
||||
origine: duplicate(this.actor.getOrigine() || {}),
|
||||
heritage: duplicate(this.actor.getHeritage() || {}),
|
||||
metier: duplicate(this.actor.getMetier() || {}),
|
||||
armes: foundry.utils.duplicate(this.actor.getWeapons()),
|
||||
protections: foundry.utils.duplicate(this.actor.getArmors()),
|
||||
pouvoirs:foundry.utils.duplicate(this.actor.getPouvoirs()),
|
||||
dons: foundry.utils.duplicate(this.actor.getDons()),
|
||||
hubrises: foundry.utils.duplicate(this.actor.getHubris()),
|
||||
tours:foundry.utils.duplicate(this.actor.getTours()),
|
||||
artifex: foundry.utils.duplicate(this.actor.getArtifex()),
|
||||
charmes:foundry.utils.duplicate(this.actor.getCharmes()),
|
||||
peuple: foundry.utils.duplicate(this.actor.getPeuple() || {}),
|
||||
origine: foundry.utils.duplicate(this.actor.getOrigine() || {}),
|
||||
heritage: foundry.utils.duplicate(this.actor.getHeritage() || {}),
|
||||
metier: foundry.utils.duplicate(this.actor.getMetier() || {}),
|
||||
combat: this.actor.getCombatValues(),
|
||||
config: duplicate(game.system.wasteland.config),
|
||||
capacites: duplicate(this.actor.getCapacites()),
|
||||
equipements: duplicate(this.actor.getEquipments()),
|
||||
monnaies: duplicate(this.actor.getMonnaies()),
|
||||
mutations: duplicate(this.actor.getMutations()),
|
||||
config: foundry.utils.duplicate(game.system.wasteland.config),
|
||||
capacites: foundry.utils.duplicate(this.actor.getCapacites()),
|
||||
equipements: foundry.utils.duplicate(this.actor.getEquipments()),
|
||||
monnaies: foundry.utils.duplicate(this.actor.getMonnaies()),
|
||||
mutations: foundry.utils.duplicate(this.actor.getMutations()),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
comportement: await TextEditor.enrichHTML(this.object.system.biodata.comportement, {async: true}),
|
||||
habitat: await TextEditor.enrichHTML(this.object.system.biodata.habitat, {async: true}),
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
isGM: game.user.isGM
|
||||
isGM: game.user.isGM,
|
||||
config: game.system.wasteland.config
|
||||
}
|
||||
this.formData = formData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user