From a1a118ec77a1be4000b5cb755bcf745e62686e73 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Fri, 4 Feb 2022 06:25:26 -0800 Subject: [PATCH] Vulnerability line --- manifest.json | 2 +- package.json | 2 +- statblockrenderer.ts | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index cdb578f..ce55af0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "13th-age-statblocks", "name": "13th Age Statblocks", - "version": "0.1.3", + "version": "0.1.4", "minAppVersion": "0.12.0", "description": "Render 13th Age statblocks in Obsidian.", "author": "Ben Straub", diff --git a/package.json b/package.json index 19c5031..2986576 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-sample-plugin", - "version": "0.1.3", + "version": "0.1.4", "description": "This is a sample plugin for Obsidian (https://obsidian.md)", "main": "main.js", "scripts": { diff --git a/statblockrenderer.ts b/statblockrenderer.ts index 0ccb474..ca0f87f 100644 --- a/statblockrenderer.ts +++ b/statblockrenderer.ts @@ -26,6 +26,12 @@ export class StatblockRenderer extends MarkdownRenderChild { if (params.initiative !== undefined) { this.statblockEl.createDiv({ text: `Initiative: ${bonus(params.initiative)}`, + cls: params.vuln ? "nomargin" : undefined, + }); + } + if (params.vuln !== undefined) { + this.statblockEl.createDiv({ + text: `Vulnerability: ${params.vuln}`, }); }