Skip to content

Commit

Permalink
Remove needless ConditionManager.CONDITION_SOURCES static property (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam committed May 31, 2024
1 parent 3a8d6dc commit af58376
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/module/system/conditions/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export class ConditionManager {

static conditions: Map<ConditionSlug | ItemUUID, ConditionPF2e<null>> = new Map();

private static CONDITION_SOURCES?: ConditionSource[] = CONDITION_SOURCES;

/** Gets a list of condition slugs. */
static get conditionsSlugs(): string[] {
return [...this.conditions.keys()].filter((k) => !k.startsWith("Compendium."));
Expand All @@ -23,15 +21,14 @@ export class ConditionManager {
if (this.#initialized) return;

this.conditions = new Map(
this.CONDITION_SOURCES?.flatMap((source) => {
CONDITION_SOURCES.flatMap((source) => {
const condition: ConditionPF2e<null> = new ConditionPF2e(source, { pack: "pf2e.conditionitems" });
return [
[condition.slug, condition],
[condition.uuid, condition],
];
}) ?? [],
);
delete this.CONDITION_SOURCES;

if (game.i18n.lang !== "en") {
const localize = localizer("PF2E.condition");
Expand Down

0 comments on commit af58376

Please sign in to comment.