diff --git a/src/uipanel.mjs b/src/uipanel.mjs index 31ba53c..599b3da 100644 --- a/src/uipanel.mjs +++ b/src/uipanel.mjs @@ -169,12 +169,17 @@ export class UIPanel extends HandlebarsApplicationMixin(ApplicationV2) { if (UIPanel.#showDBTime || UIPanel.#showRadialClocks) { const dbtime = Helpers.factorDragonbaneTime(this.#time) dbtime.shiftName = Helpers.getDragonbaneShiftName(dbtime.shifts) - dbtime.textColor = context.textColor // it's the same color for now, but could be different + dbtime.textColor = context.textColor // it's the same color for now, but could be different if (UIPanel.#showDBTime) { // new approach: just pass in a data object and handle layout in the template - if (Helpers.showTimeOfDay) dbtime.days = null // hide days if they are already shown in time string - context.dbtime = dbtime + context.dbtime = foundry.utils.deepClone(dbtime) + // display as 1-based + context.dbtime.days += 1 + context.dbtime.shifts += 1 + context.dbtime.stretches += 1 + // make adjustments just to the copy, since the original is used for the graphical display + if (Helpers.showTimeOfDay) context.dbtime.days = null // hide days if they are already shown in time string } if (UIPanel.#showRadialClocks) context.clocks = this.#prepareClocks(dbtime)