diff --git a/src/encounter/index.ts b/src/encounter/index.ts index bedc4a8b..f215e7f5 100644 --- a/src/encounter/index.ts +++ b/src/encounter/index.ts @@ -291,7 +291,7 @@ export class EncounterParser { } if (!name || typeof name != "string") return {}; - let existing = this.plugin.bestiary.find((c) => c.name == name); + let existing = this.plugin.getCreatureFromBestiary(name); let creature = existing ? Creature.from(existing) : new Creature({ name }); diff --git a/src/tracker/ui/Controls.svelte b/src/tracker/ui/Controls.svelte index 77fdd7ad..86f4aec7 100644 --- a/src/tracker/ui/Controls.svelte +++ b/src/tracker/ui/Controls.svelte @@ -7,7 +7,6 @@ EXPAND, FORWARD, GROUP, - MAP, NEW, PLAY, REDO, diff --git a/src/utils/index.ts b/src/utils/index.ts index 9bfca115..f7bba0cc 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -29,7 +29,7 @@ export function crToString(cr: string | number): string { const decimalPart = cr % 1; const wholePart = Math.floor(cr); if (decimalPart == 0) return wholePart.toString(); - let str = (wholePart == 0) ? "" : wholePart.toString(); + let str = wholePart == 0 ? "" : wholePart.toString(); if (decimalPart in DECIMAL_TO_VULGAR_FRACTION) { str += DECIMAL_TO_VULGAR_FRACTION[decimalPart]; } else { @@ -45,5 +45,5 @@ export function getFromCreatureOrBestiary( ): T { const fromBase = getter(creature); if (fromBase) return fromBase; - return getter(plugin.bestiary.find(c => c.name == creature.name)); -} \ No newline at end of file + return getter(plugin.getCreatureFromBestiary(creature.name)); +}