Various fixes for v12

This commit is contained in:
LeRatierBretonnien 2024-06-07 11:12:00 +02:00
parent 8775df5285
commit a385b98126
7 changed files with 7 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -991,9 +991,7 @@ export class RdDActor extends RdDBaseActorSang {
/* -------------------------------------------- */ /* -------------------------------------------- */
buildTMRInnaccessible() { buildTMRInnaccessible() {
return this.items[TYPES.casetmr] return this.items.filter(it => it.type == TYPES.casetmr).filter(it => EffetsDraconiques.isInnaccessible(it)).map(it => it.system.coord)
.filter(it => EffetsDraconiques.isInnaccessible(it))
.map(it => it.system.coord)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -108,8 +108,8 @@ export class RdDItemSheet extends ItemSheet {
const competences = await SystemCompendiums.getCompetences('personnage'); const competences = await SystemCompendiums.getCompetences('personnage');
formData.categories = this.item.getCategories() formData.categories = this.item.getCategories()
if (this.item.type == 'tache' || this.item.type == 'livre' || this.item.type == 'meditation' || this.item.type == 'oeuvre') { if (this.item.type == 'tache' || this.item.type == 'livre' || this.item.type == 'meditation' || this.item.type == 'oeuvre') {
formData.caracList = foundry.utils.duplicate(game.system.model.Actor.personnage.carac) formData.caracList = foundry.utils.duplicate(game.model.Actor.personnage.carac)
formData.caracList["reve-actuel"] = foundry.utils.duplicate(game.system.model.Actor.personnage.reve.reve) formData.caracList["reve-actuel"] = foundry.utils.duplicate(game.model.Actor.personnage.reve.reve)
formData.competences = competences; formData.competences = competences;
} }
if (this.item.type == 'arme') { if (this.item.type == 'arme') {

View File

@ -567,7 +567,7 @@ export class Migrations {
if (currentVersion.startsWith("v")) { if (currentVersion.startsWith("v")) {
currentVersion = currentVersion.substring(1) currentVersion = currentVersion.substring(1)
} }
if (isNewerVersion(game.system.version, currentVersion)) { if (foundry.utils.isNewerVersion(game.system.version, currentVersion)) {
// if (true) { /* comment previous and uncomment here to test before upgrade */ // if (true) { /* comment previous and uncomment here to test before upgrade */
const migrations = Migrations.getMigrations().filter(m => isNewerVersion(m.version, currentVersion)); const migrations = Migrations.getMigrations().filter(m => isNewerVersion(m.version, currentVersion));
if (migrations.length > 0) { if (migrations.length > 0) {

View File

@ -17,7 +17,7 @@ export class AutoAdjustDarkness {
static async adjust(darkness) { static async adjust(darkness) {
if (AutoAdjustDarkness.isAuto()) { if (AutoAdjustDarkness.isAuto()) {
const scene = game.scenes.viewed; const scene = game.scenes.viewed;
if (scene?.globalLight && scene?.tokenVision) { if (scene?.environment?.globalLight?.enabled && scene?.tokenVision) {
await scene.update({ darkness }); await scene.update({ darkness });
} }
} }

View File

@ -2,7 +2,7 @@
{{#if effects}} {{#if effects}}
{{#each effects as |effect key|}} {{#each effects as |effect key|}}
<span class="active-effect" data-effect="{{effect.id}}"> <span class="active-effect" data-effect="{{effect.id}}">
<img class="button-effect-img {{#if @root.options.isGM}}delete-active-effect{{/if}}" src="{{effect.icon}}" data-tooltip="{{localize effect.name}}" width="24" height="24" /> <img class="button-effect-img {{#if @root.options.isGM}}delete-active-effect{{/if}}" src="{{effect.img}}" data-tooltip="{{localize effect.name}}" width="24" height="24" />
</span> </span>
{{/each}} {{/each}}
{{#if calc.surprise}}<span>{{calc.surprise}}!</span>{{/if}} {{#if calc.surprise}}<span>{{calc.surprise}}!</span>{{/if}}

View File

@ -7,7 +7,7 @@
{{else}} {{else}}
<input class="resource-content select-effect" type="checkbox" name="{{effect.id}}" {{#if effect.active}}checked{{/if}}/> <input class="resource-content select-effect" type="checkbox" name="{{effect.id}}" {{#if effect.active}}checked{{/if}}/>
{{/if}} {{/if}}
<img class="button-effect-img" height="16" width="16" src="{{effect.icon}}" data-tooltip="{{localize effect.name}}" /> <img class="button-effect-img" height="16" width="16" src="{{effect.img}}" data-tooltip="{{localize effect.name}}" />
<label>{{localize effect.name}}</label> <label>{{localize effect.name}}</label>
</li> </li>
{{/each}} {{/each}}