mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-08 23:16:12 +01:00
Fixed remainder
This commit is contained in:
parent
4d8ad45555
commit
0011ae0442
24 changed files with 282 additions and 55 deletions
|
|
@ -496,6 +496,22 @@ export function htmlToText(html) {
|
|||
return tempDivElement.textContent || tempDivElement.innerText || '';
|
||||
}
|
||||
|
||||
export async function getFeaturesHTMLData(features) {
|
||||
const result = [];
|
||||
for (const feature of features) {
|
||||
if (feature) {
|
||||
const base = feature.item ?? feature;
|
||||
const item = base.system ? base : await foundry.utils.fromUuid(base.uuid);
|
||||
const itemDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||
item.system.description
|
||||
);
|
||||
result.push({ label: item.name, description: itemDescription });
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a simple flavor-less formula with only +/- operators, returns a list of damage partial terms.
|
||||
* All subtracted terms become negative terms.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue