This commit is contained in:
TheGiddyLimit
2024-01-10 17:30:40 +00:00
parent e3bf75f42a
commit 5ffd4acdb4
26 changed files with 473 additions and 322 deletions

View File

@@ -1035,7 +1035,7 @@ globalThis.Renderer = function () {
const hidden = new Set(entry.hidden || []);
const toRender = [{type: "entries", name: entry.name, entries: entry.headerEntries ? MiscUtil.copyFast(entry.headerEntries) : []}];
if (entry.constant || entry.will || entry.recharge || entry.charges || entry.rest || entry.daily || entry.weekly || entry.yearly || entry.ritual) {
if (entry.constant || entry.will || entry.recharge || entry.charges || entry.rest || entry.daily || entry.weekly || entry.monthly || entry.yearly || entry.ritual) {
const tempList = {type: "list", style: "list-hang-notitle", items: [], data: {isSpellList: true}};
if (entry.constant && !hidden.has("constant")) tempList.items.push({type: "itemSpell", name: `Constant:`, entry: this._renderSpellcasting_getRenderableList(entry.constant).join(", ")});
if (entry.will && !hidden.has("will")) tempList.items.push({type: "itemSpell", name: `At will:`, entry: this._renderSpellcasting_getRenderableList(entry.will).join(", ")});
@@ -1045,6 +1045,7 @@ globalThis.Renderer = function () {
this._renderSpellcasting_getEntries_procPerDuration({entry, tempList, hidden, prop: "rest", durationText: "/rest"});
this._renderSpellcasting_getEntries_procPerDuration({entry, tempList, hidden, prop: "daily", durationText: "/day"});
this._renderSpellcasting_getEntries_procPerDuration({entry, tempList, hidden, prop: "weekly", durationText: "/week"});
this._renderSpellcasting_getEntries_procPerDuration({entry, tempList, hidden, prop: "monthly", durationText: "/month"});
this._renderSpellcasting_getEntries_procPerDuration({entry, tempList, hidden, prop: "yearly", durationText: "/year"});
if (entry.ritual && !hidden.has("ritual")) tempList.items.push({type: "itemSpell", name: `Rituals:`, entry: this._renderSpellcasting_getRenderableList(entry.ritual).join(", ")});
@@ -1465,8 +1466,7 @@ globalThis.Renderer = function () {
};
this._renderHomebrew = function (entry, textStack, meta, options) {
this._renderPrefix(entry, textStack, meta, options);
textStack[0] += `<div class="homebrew-section"><div class="homebrew-float"><span class="homebrew-notice"></span>`;
textStack[0] += `<div class="rd-homebrew__b"><div class="rd-homebrew__wrp-notice"><span class="rd-homebrew__disp-notice"></span>`;
if (entry.oldEntries) {
const hoverMeta = Renderer.hover.getInlineHover({type: "entries", name: "Homebrew", entries: entry.oldEntries});
@@ -1478,7 +1478,7 @@ globalThis.Renderer = function () {
} else {
markerText = "(See removed content)";
}
textStack[0] += `<span class="homebrew-old-content" href="#${window.location.hash}" ${hoverMeta.html}>${markerText}</span>`;
textStack[0] += `<span class="rd-homebrew__disp-old-content" href="#${window.location.hash}" ${hoverMeta.html}>${markerText}</span>`;
}
textStack[0] += `</div>`;
@@ -1493,7 +1493,6 @@ globalThis.Renderer = function () {
}
textStack[0] += `</div>`;
this._renderSuffix(entry, textStack, meta, options);
};
this._renderCode = function (entry, textStack, meta, options) {
@@ -1849,7 +1848,7 @@ globalThis.Renderer = function () {
name: "Homebrew Modifications",
entries: tooltipEntries,
});
textStack[0] += `<span class="homebrew-inline" ${hoverMeta.html}>`;
textStack[0] += `<span class="rd-homebrew__disp-inline" ${hoverMeta.html}>`;
this._recursiveRender(newText || "[...]", textStack, meta);
textStack[0] += `</span>`;