Skip to content

Commit

Permalink
Only disable scrolling text for players.
Browse files Browse the repository at this point in the history
  • Loading branch information
cs96and committed Nov 26, 2024
1 parent e09dabc commit 5b98eef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions module/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"cgmp.typing-one": "{user} is typing...",
"cgmp.typing-two": "{user1} and {user2} are typing...",
"cgmp.typing-many": "{user1}, {user2} and {others} other players are typing...",
"cgmp.hide-npc-damage-text-s": "Hide scrolling damage text on NPC tokens",
"cgmp.hide-npc-healing-text-s": "Hide scrolling healing text on NPC token",
"cgmp.hide-npc-damage-text-s": "Hide scrolling damage text on NPC tokens from players",
"cgmp.hide-npc-healing-text-s": "Hide scrolling healing text on NPC token from players",
"cgmp.disable-dynamic-token-ring-flash-s": "Disable flashing of Dynamic Token Rings"
}
2 changes: 1 addition & 1 deletion module/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class CautiousGamemastersPack {
const hideNpcDamage = CGMPSettings.getSetting(CGMP_OPTIONS.HIDE_NPC_DAMAGE_TEXT);
const hideNpcHealing = CGMPSettings.getSetting(CGMP_OPTIONS.HIDE_NPC_HEALING_TEXT);

if (game.modules.get('lib-wrapper')?.active && (hideNpcDamage || hideNpcHealing)) {
if (!game.user.isGM && game.modules.get('lib-wrapper')?.active && (hideNpcDamage || hideNpcHealing)) {
CautiousGamemastersPack._scrollingTextRegex = new RegExp(`^[${hideNpcDamage ? "-" : ""}${hideNpcHealing ? "+" : ""}]\\d+$`);

libWrapper.register('CautiousGamemastersPack', 'InterfaceCanvasGroup.prototype.createScrollingText',
Expand Down

0 comments on commit 5b98eef

Please sign in to comment.