From 4efd8cdd0be784bdf32357fc7af527e258602392 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 19 Jan 2021 22:51:09 +0100 Subject: [PATCH] Fix set status-effects seulement pour le GM --- module/status-effects.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/status-effects.js b/module/status-effects.js index b8e6f572..3e509e47 100644 --- a/module/status-effects.js +++ b/module/status-effects.js @@ -30,9 +30,8 @@ export class StatusEffects { restricted: true }); CONFIG.RDD.allEffects = rddStatusEffects.concat(CONFIG.statusEffects); - + StatusEffects._setUseStatusEffects(StatusEffects._getUseStatusEffects()); - console.log('statusEffects', CONFIG.statusEffects); } @@ -65,7 +64,9 @@ export class StatusEffects { } static _setUseStatusEffects(useStatusEffects) { - game.settings.set("foundryvtt-reve-de-dragon", "use-status-effects", StatusEffects._toSetting(useStatusEffects)); + if (game.user.isGM) { + game.settings.set("foundryvtt-reve-de-dragon", "use-status-effects", StatusEffects._toSetting(useStatusEffects)); + } for (let effect of CONFIG.RDD.allEffects) { effect.active = effect.rdd || useStatusEffects.has(effect.id);