From b60ea0e9ea695e56bde08e08a1a1b78709063937 Mon Sep 17 00:00:00 2001 From: CoolcatFVTT <102434248+CoolcatFVTT@users.noreply.github.com> Date: Sun, 4 Sep 2022 10:30:04 +0200 Subject: [PATCH] Fixed two more v10 warnings. --- module.json | 4 ++-- sta-initiative.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module.json b/module.json index 010e043..eb5ef77 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "sta-initiative", "title": "Star Trek Adventures Initiative", "description": "CombatTracker improvements for Star Trek Adventures. Depends on the 'Lancer Initiative' module by Bolts, which does most of the work.", - "version": "0.2.0", + "version": "0.2.1", "authors": [ { "name": "CoolcatFVTT", "url": "https://github.com/CoolcatFVTT/" } ], @@ -45,5 +45,5 @@ "license": "LGPL 3.0", "url": "https://github.com/CoolcatFVTT/StarTrekAdventures-Initiative", "manifest": "https://raw.githubusercontent.com/CoolcatFVTT/StarTrekAdventures-Initiative/main/module.json", - "download": "https://github.com/CoolcatFVTT/StarTrekAdventures-Initiative/archive/refs/tags/v0.2.0.zip" + "download": "https://github.com/CoolcatFVTT/StarTrekAdventures-Initiative/archive/refs/tags/v0.2.1.zip" } diff --git a/sta-initiative.js b/sta-initiative.js index 9c147da..37548ec 100644 --- a/sta-initiative.js +++ b/sta-initiative.js @@ -3,12 +3,12 @@ class STAInitiative { static shouldHideChatMessage(cm) { - return cm?.data?.flags?.core?.initiativeRoll; + return cm?.flags?.core?.initiativeRoll; } static shouldCensorChatMessage(cm) { - const speaker = cm.data.speaker; + const speaker = cm.speaker; if (!speaker) return false; @@ -32,7 +32,7 @@ class STAInitiative { if (!token || game.user.isGM) return true; - const mode = token.data.displayName; + const mode = token.displayName; if (mode === CONST.TOKEN_DISPLAY_MODES.NONE) return false; else if (mode === CONST.TOKEN_DISPLAY_MODES.CONTROL ||