mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Merge branch 'main' into feature/683-damage-dialog-options
This commit is contained in:
commit
a1110c15bc
7 changed files with 88 additions and 54 deletions
|
|
@ -494,9 +494,7 @@ export const diceSetNumbers = {
|
|||
flat: 'Flat'
|
||||
};
|
||||
|
||||
export const getDiceSoNicePresets = async (hopeFaces, fearFaces, advantageFaces = 'd6', disadvantageFaces = 'd6') => {
|
||||
const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
|
||||
const getPreset = async (type, faces) => {
|
||||
export const getDiceSoNicePreset = async (type, faces) => {
|
||||
const system = game.dice3d.DiceFactory.systems.get(type.system).dice.get(faces);
|
||||
if (!system) {
|
||||
ui.notifications.error(
|
||||
|
|
@ -523,11 +521,14 @@ export const getDiceSoNicePresets = async (hopeFaces, fearFaces, advantageFaces
|
|||
};
|
||||
};
|
||||
|
||||
export const getDiceSoNicePresets = async (hopeFaces, fearFaces, advantageFaces = 'd6', disadvantageFaces = 'd6') => {
|
||||
const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
|
||||
|
||||
return {
|
||||
hope: await getPreset(diceSoNice.hope, hopeFaces),
|
||||
fear: await getPreset(diceSoNice.fear, fearFaces),
|
||||
advantage: await getPreset(diceSoNice.advantage, advantageFaces),
|
||||
disadvantage: await getPreset(diceSoNice.disadvantage, disadvantageFaces)
|
||||
hope: await getDiceSoNicePreset(diceSoNice.hope, hopeFaces),
|
||||
fear: await getDiceSoNicePreset(diceSoNice.fear, fearFaces),
|
||||
advantage: await getDiceSoNicePreset(diceSoNice.advantage, advantageFaces),
|
||||
disadvantage: await getDiceSoNicePreset(diceSoNice.disadvantage, disadvantageFaces)
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue