diff --git a/module/rdd-dice.js b/module/rdd-dice.js index 03e74da4..464a73f5 100644 --- a/module/rdd-dice.js +++ b/module/rdd-dice.js @@ -3,7 +3,7 @@ import { SYSTEM_RDD } from "./constants.js"; import { Misc } from "./misc.js"; const signeDragon = 'systems/foundryvtt-reve-de-dragon/icons/heures/hdragon.webp'; -const imgSigneDragon = ``; +const imgSigneDragon = ``; const labelsDeDragon = ['1', '2', '3', '4', '5', '6', signeDragon, '0']; const bumpsDeDragon = [, , , , , , signeDragon, ]; @@ -12,8 +12,8 @@ export class De7 extends Die { /** @override */ static DENOMINATION = "7"; - static diceSoNiceData() { - return { type: "d7", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: SYSTEM_RDD } + static diceSoNiceData(system) { + return { type: "d7", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: system } } constructor(termData) { @@ -33,7 +33,7 @@ export class De7 extends Die { static getResultLabel(result) { switch (result) { - case '7': return imgSigneDragon + case 7: return imgSigneDragon } return result; } @@ -43,8 +43,8 @@ export class De7 extends Die { export class DeDraconique extends Die { static DENOMINATION = "r"; - static diceSoNiceData() { - return { type: "dr", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: SYSTEM_RDD } + static diceSoNiceData(system) { + return { type: "dr", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: system } } constructor(termData) { @@ -64,7 +64,7 @@ export class DeDraconique extends Die { static getResultLabel(result) { switch (result) { - case '7': return imgSigneDragon + case 7: return imgSigneDragon } return result; } @@ -77,9 +77,10 @@ export class RdDDice { } static diceSoNiceReady(dice3d) { - dice3d.addSystem({ id: SYSTEM_RDD, name: "RĂªve de Dragon" }); - dice3d.addDicePreset(De7.diceSoNiceData()); - dice3d.addDicePreset(DeDraconique.diceSoNiceData()); + for (const system of Object.keys(dice3d.DiceFactory.systems)) { + dice3d.addDicePreset(De7.diceSoNiceData(system)); + dice3d.addDicePreset(DeDraconique.diceSoNiceData(system)); + } } /* -------------------------------------------- */ diff --git a/styles/simple.css b/styles/simple.css index 3f9f5f67..84e3ca78 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -242,6 +242,9 @@ table {border: 1px solid #7a7971;} object-position: 50% 0; } +.dice-img { + border-width: 0; +} .button-img { vertical-align: baseline; width: 8%;