Skip to content

Commit

Permalink
fix: Fixes updateCreatureByName
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed May 13, 2023
1 parent f9a536e commit 4d36f25
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 190 deletions.
8 changes: 2 additions & 6 deletions src/builder/view/encounter/Encounter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@
for (const enc of Object.values(plugin.data.encounters)) {
menu.addItem((item) => {
item.setTitle(enc.name).onClick(() => {
console.log(enc);
$name = enc.name;
encounter.empty();
players.empty();
Expand All @@ -215,15 +214,12 @@
} else {
encounter.add(
CreatureCreator.fromJSON(
creature, plugin
creature,
plugin
) as any as SRDMonster
);
}
}
console.log(
"🚀 ~ file: Encounter.svelte:198 ~ encounter:",
$encounter
);
});
});
}
Expand Down
56 changes: 0 additions & 56 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,62 +599,6 @@ export default class InitiativeTracker extends Plugin {
await this.saveSettings();
}

console.log(
"🚀 ~ file: main.ts:597 ~ this.data.version?.[0] < 10:",
this.data.version
);
if (this.data.version?.[0] < 10 && false) {
if (
!this.canUseStatBlocks ||
!this.statblocks.settings.disableSRD
) {
new Notice(
createFragment((e) => {
e.createEl("h4", { text: "Initiative Tracker Notice" });
e.createSpan({
text: "The 5e SRD has been removed from the plugin."
});
e.createEl("br");
const p = e.createEl("p");

if (this.canUseStatBlocks) {
if (!this.statblocks.settings.disableSRD) {
p.createSpan({
text: "It will still be available thanks to the "
});
p.createEl("a", {
text: "Fantasy Statblocks",
href: "obsidian://show-plugin?id=obsidian-5e-statblocks"
});
p.createSpan({
text: " plugin."
});
}
} else {
p.createSpan({
text: "Please install and use the "
});
p.createEl("a", {
text: "Fantasy Statblocks",
href: "obsidian://show-plugin?id=obsidian-5e-statblocks"
});
p.createSpan({
text: " to re-integrate the SRD, if desired."
});
}
const docs = e.createEl("p");
docs.createSpan({ text: "See more at " });
docs.createEl("a", {
text: "https://plugins.javalent.com",
href: "https://plugins.javalent.com"
});
docs.createSpan({ text: "." });
}),
0
);
}
}

this.data.version = this.manifest.version
.split(".")
.map((n) => Number(n));
Expand Down
1 change: 0 additions & 1 deletion src/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,6 @@ class NewPlayerModal extends Modal {
this.player.note = modal.file.basename;
this.player.path = modal.file.path;
this.player.name = modal.file.basename;
console.log("🚀 ~ file: settings.ts:1169 ~ this.player:", this.player);

if (!metaData || !metaData.frontmatter) return;
const { ac, hp, modifier, level, name } =
Expand Down
Loading

0 comments on commit 4d36f25

Please sign in to comment.