Files
DeltaGreen/module/config/rich-text-fields.js
T
Aaron Lutomski 20a03864be Unify ProseMirror descriptions and fix item sheet layout.
Various ItemV2 fixes.

Weapon sheet reorg to smooth out style inconsistencies.
2026-05-29 21:07:33 -07:00

34 lines
929 B
JavaScript

/**
* Rich-text field specs for actor sheets (by actor type).
* @type {Record<string, { path: string, key: string }[]>}
*/
export const ACTOR_RICH_TEXT_BY_TYPE = {
agent: [{ path: "physical.description", key: "description" }],
npc: [{ path: "notes", key: "description" }],
unnatural: [{ path: "notes", key: "description" }],
vehicle: [{ path: "description", key: "description" }],
};
/**
* Rich-text field specs for all item types.
* @type {{ path: string, key: string, types?: string[] }[]}
*/
export const ITEM_RICH_TEXT_FIELDS = [
{ path: "description", key: "description" },
{
path: "handlerNotes",
key: "handlerNotes",
types: ["tome", "ritual"],
},
];
/**
* @param {string} itemType
* @returns {{ path: string, key: string }[]}
*/
export function getItemRichTextFields(itemType) {
return ITEM_RICH_TEXT_FIELDS.filter(
(spec) => !spec.types || spec.types.includes(itemType),
);
}