Compare commits

...

3 Commits

Author SHA1 Message Date
773b3756a6 Fix odorat-gout 2022-10-28 08:46:46 +02:00
d57cdc2af4 Merge pull request 'Fix: rollCarac pour odorat-goût' (#569) from VincentVk/foundryvtt-reve-de-dragon:v1.5 into v1.5
Reviewed-on: #569
2022-10-28 08:45:31 +02:00
Vincent Vandemeulebrouck
f2d1879135 Fix: rollCarac pour odorat-goût
Recherche d'abord par clé (name)
2022-10-27 22:37:55 +02:00
2 changed files with 7 additions and 3 deletions

View File

@ -3164,7 +3164,11 @@ export class RdDActor extends Actor {
case 'chance-actuelle': case 'chance actuelle':
return carac.chance;
}
let entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[1].label, description: 'caractéristique' });
const caracList = Object.entries(carac);
let entry = Misc.findFirstLike(name, caracList, { mapper: it => it[0], description: 'caractéristique' });
if (!entry || entry.length ==0) {
entry = Misc.findFirstLike(name, caracList, { mapper: it => it[1].label, description: 'caractéristique' });
}
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
}

View File

@ -29,7 +29,7 @@
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
"license": "LICENSE.txt",
"flags": {},
"version": "1.5.89",
"version": "1.5.90",
"minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "9",
"scripts": [],
@ -500,7 +500,7 @@
"dependencies": [],
"socket": true,
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v1.5/system.json",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.89.zip",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.90.zip",
"protected": false,
"gridDistance": 1,
"gridUnits": "m",