Skip to content

Commit

Permalink
Merge pull request #111 from Cussa/master
Browse files Browse the repository at this point in the history
πŸ› Allow NPCs to have some statuses
  • Loading branch information
DrOgres authored Feb 3, 2024
2 parents 4cec984 + 7c2f111 commit aa5be80
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions script/util/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ export class VaesenTokenHUD extends TokenHUD {
var actor = this.object.document.actor;

if (actor.type === "player") {
return super._getStatusEffectChoices();;
return super._getStatusEffectChoices();
}

if (actor.type === "npc") {
return [];
let statuses = super._getStatusEffectChoices();
for (const key of Object.keys(statuses)) {
if (key.startsWith("systems/vaesen/asset/status/"))
delete statuses[key];
}
return statuses;
}

if (actor.type === "vaesen") {
Expand Down

0 comments on commit aa5be80

Please sign in to comment.