Prevent specific data fields from being modifiable via AEs
This commit is contained in:
parent
d92d6b9d3c
commit
d433e6a51d
2 changed files with 10 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { invalidActiveEffectTargets } from "../../config.mjs";
|
||||
|
||||
export class DotDungeonActiveEffect extends ActiveEffect {
|
||||
|
||||
// Invert the logic of the disabled property so it's easier to modify via
|
||||
|
|
@ -6,6 +8,8 @@ export class DotDungeonActiveEffect extends ActiveEffect {
|
|||
set enabled(newValue) { this.disabled = !newValue };
|
||||
|
||||
apply(object, change) {
|
||||
if (invalidActiveEffectTargets.has(change.key)) return;
|
||||
|
||||
change.value = change.value.replace(
|
||||
/@(?<key>[\w\.]+)/gi,
|
||||
(...args) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue