Audit every remaining sheet and dialog; add the Culland Hall scene

Opened all of it this time, rather than driving the system through its API.

Two more defects of the same family as the NPC sheet, and in the same place —
the types added last:

  - Talent and Art had no TYPES.Item.* label, so their sheets printed the raw
    key "TYPES.Item.talent" under the name.
  - Neither had a branch in item-sheet.hbs or an isTalent/isPower flag, so the
    Detail tab rendered EMPTY over a document holding category, rule, uses per
    case, Coherence cost, push cost and origin. Eleven of thirteen types were
    handled, which is exactly the shape an eye skips.

Both now have a header statline and a full Detail section, and a guard walks
template.json: every declared type must have a label, a flag set in ringbrp.mjs,
and an {{#if isX}} section in the sheet.

One hardening fix: loseCoherence applies the cost and THEN announces it, so
anything that throws in between leaves the actor quietly poorer with no message.
localize() throws on a non-string, which an unrecognised reason key is.

Everything else came back clean, and it is worth recording what was checked so
the next audit knows what "checked" meant: 13 item types opened, all render; the
expedition sheet (4 tabs); all 7 chat cards driven through their real entry
points — roll, coherence, reaction via Combat.rollAll, hit location, weapon
damage, major wound, and contact through a case file that actually has a group;
all 3 dialogs opened by clicking the controls a player clicks. No errors, no raw
localisation keys anywhere.

Also: Culland Hall as a playable Scene. Drawn as SVG rather than generated,
because a room count, a door position and a label are all load-bearing here and
a generator cannot be trusted with any of them — three label-collision passes in
the browser before it was clean, which is the documented cost of doing it this
way. 2800x2000 at 100px to the square so the Foundry grid lands on the grid
drawn into the image; 5ft squares; no walls, because half-done walls are worse
than none and a GM who wants vision can add them in ten minutes.

Verified in Foundry: the scene imports, activates, and draws.

Version 1.0.2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
slaguru666
2026-08-12 19:02:18 +01:00
co-authored by Claude Opus 5
parent 02ec47a351
commit 51bd8e618a
28 changed files with 331 additions and 23 deletions
+9 -1
View File
@@ -1524,7 +1524,10 @@ export async function loseCoherence(actor, reasonKey, { amount = null, note = ""
speaker: ChatMessage.getSpeaker({ actor }),
content: await rbRenderTemplate("systems/ringbrp/templates/chat-coherence.hbs", {
actorName: actor.name, before, after, cost,
reason: game.i18n.localize(spec?.label ?? reasonKey), note,
// The cost is already applied by this point, so anything that throws here loses
// the announcement and leaves the actor quietly poorer. localize() throws on a
// non-string, which an unrecognised reason will be.
reason: game.i18n.localize(String(spec?.label ?? reasonKey ?? "")), note,
band: bAfter, crossed: bBefore.id !== bAfter.id,
pips: Array.from({ length: Number(actor.system.coherence?.max ?? 10) }, (_, i) => i < after)
})
@@ -5514,6 +5517,11 @@ class RingBRPItemSheet extends ItemSheet {
ctx.isMaterial = this.item.type === "material";
ctx.isVehicle = this.item.type === "vehicle";
ctx.isAuthority = this.item.type === "authority";
// Talents and Arts were added after this list and never joined it, so their sheets
// rendered an empty Detail tab over real data — category, rule, uses and cost all
// sat in the document with nothing on screen reading them.
ctx.isTalent = this.item.type === "talent";
ctx.isPower = this.item.type === "power";
ctx.descriptionHTML = await rbEnrich(ctx.sys.description ?? "");
if (ctx.isGear) {