mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Bugfix] Fix light theme to roll messages (#1066)
* fix light theme to roll messages * fix light theme issues * finally fix issues --------- Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
661808b5f1
commit
2a0d748b5e
11 changed files with 523 additions and 423 deletions
|
|
@ -11,19 +11,19 @@ export default class DhMeasuredTemplate extends foundry.canvas.placeables.Measur
|
|||
if (splitRulerText.length > 0) {
|
||||
const rulerValue = Number(splitRulerText[0]);
|
||||
const result = DhMeasuredTemplate.getRangeLabels(rulerValue, rangeMeasurementSettings);
|
||||
this.ruler.text = result.distance + (result.units ? (' ' + result.units) : '');
|
||||
this.ruler.text = result.distance + (result.units ? ' ' + result.units : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static getRangeLabels(distanceValue, settings) {
|
||||
let result = { distance: distanceValue, units: '' }
|
||||
let result = { distance: distanceValue, units: '' };
|
||||
const rangeMeasurementOverride = canvas.scene.flags.daggerheart?.rangeMeasurementOverride;
|
||||
|
||||
if (rangeMeasurementOverride === true) {
|
||||
result.distance = distanceValue;
|
||||
result.units = canvas.scene?.grid?.units;
|
||||
return result
|
||||
return result;
|
||||
}
|
||||
if (distanceValue <= settings.melee) {
|
||||
result.distance = game.i18n.localize('DAGGERHEART.CONFIG.Range.melee.name');
|
||||
|
|
|
|||
|
|
@ -23,14 +23,22 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
|
|||
multiplier: new fields.StringField({
|
||||
choices: CONFIG.DH.GENERAL.multiplierTypes,
|
||||
initial: 'prof',
|
||||
label: "DAGGERHEART.ACTIONS.Config.damage.multiplier"
|
||||
label: 'DAGGERHEART.ACTIONS.Config.damage.multiplier'
|
||||
}),
|
||||
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: "DAGGERHEART.ACTIONS.Config.damage.flatMultiplier" }),
|
||||
dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: "DAGGERHEART.GENERAL.Dice.single" }),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, label: "DAGGERHEART.GENERAL.bonus" }),
|
||||
flatMultiplier: new fields.NumberField({
|
||||
nullable: true,
|
||||
initial: 1,
|
||||
label: 'DAGGERHEART.ACTIONS.Config.damage.flatMultiplier'
|
||||
}),
|
||||
dice: new fields.StringField({
|
||||
choices: CONFIG.DH.GENERAL.diceTypes,
|
||||
initial: 'd6',
|
||||
label: 'DAGGERHEART.GENERAL.Dice.single'
|
||||
}),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'DAGGERHEART.GENERAL.bonus' }),
|
||||
custom: new fields.SchemaField({
|
||||
enabled: new fields.BooleanField({ label: "DAGGERHEART.ACTIONS.Config.general.customFormula" }),
|
||||
formula: new FormulaField({ label: "DAGGERHEART.ACTIONS.Config.general.formula", initial: '' })
|
||||
enabled: new fields.BooleanField({ label: 'DAGGERHEART.ACTIONS.Config.general.customFormula' }),
|
||||
formula: new FormulaField({ label: 'DAGGERHEART.ACTIONS.Config.general.formula', initial: '' })
|
||||
})
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ export default class DHWeapon extends AttachableItem {
|
|||
];
|
||||
|
||||
for (const { value, type } of attack.damage.parts) {
|
||||
const parts = value.custom.enabled ? [game.i18n.localize("DAGGERHEART.GENERAL.custom")] : [value.dice];
|
||||
const parts = value.custom.enabled ? [game.i18n.localize('DAGGERHEART.GENERAL.custom')] : [value.dice];
|
||||
if (!value.custom.enabled && value.bonus) parts.push(value.bonus.signedString());
|
||||
|
||||
if (type.size > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue