12.0.33 - la vieillesse d'Astrobazzarh #736
@ -1,4 +1,8 @@
|
||||
# 12.0
|
||||
## 12.0.33 - la vieillesse d'Astrobazzarh
|
||||
- retour de l'expérience pour les joueurs
|
||||
- suppression du message "Pas de caractéristique" sur les jets d'odorat-goût
|
||||
|
||||
## 12.0.32 - les rêveries d'Astrobazzarh
|
||||
- Ajout des Items Race pour gérer les ajustements liés aux races
|
||||
|
||||
|
@ -1596,7 +1596,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async appliquerAjoutExperience(rollData, hideChatMessage = 'show') {
|
||||
if (!Misc.isFirstConnectedGM()) {
|
||||
if (!Misc.hasConnectedGM()) {
|
||||
return
|
||||
}
|
||||
hideChatMessage = hideChatMessage == 'hide' || (Misc.isRollModeHiddenToPlayer() && !game.user.isGM)
|
||||
|
@ -21,7 +21,7 @@ export class RdDBaseActor extends Actor {
|
||||
|
||||
static $findCaracByName(carac, name) {
|
||||
const caracList = Object.entries(carac);
|
||||
let entry = Misc.findFirstLike(name, caracList, { mapper: it => it[0], description: 'caractéristique' });
|
||||
let entry = Misc.findFirstLike(name, caracList, { mapper: it => it[0], description: 'caractéristique', onMessage: m => { } });
|
||||
if (!entry || entry.length == 0) {
|
||||
entry = Misc.findFirstLike(name, caracList, { mapper: it => it[1].label, description: 'caractéristique' });
|
||||
}
|
||||
|
@ -1,5 +1,12 @@
|
||||
import { Grammar } from "./grammar.js";
|
||||
|
||||
const DEFAULT_FIND_OPTIONS = {
|
||||
mapper: it => it.name,
|
||||
preFilter: it => true,
|
||||
description: 'valeur',
|
||||
onMessage: m => ui.notifications.info(m)
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is intended as a placeholder for utility methods unrelated
|
||||
* to actual classes of the game system or of FoundryVTT
|
||||
@ -209,6 +216,10 @@ export class Misc {
|
||||
static isFirstConnectedGM() {
|
||||
return game.user == Misc.firstConnectedGM();
|
||||
}
|
||||
|
||||
static hasConnectedGM() {
|
||||
return Misc.firstConnectedGM();
|
||||
}
|
||||
|
||||
static firstConnectedGMId() {
|
||||
return Misc.firstConnectedGM()?.id;
|
||||
@ -226,13 +237,7 @@ export class Misc {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static findFirstLike(value, elements, options = {}) {
|
||||
options = foundry.utils.mergeObject({
|
||||
mapper: it => it.name,
|
||||
preFilter: it => true,
|
||||
description: 'valeur',
|
||||
onMessage: m => ui.notifications.info(m)
|
||||
}, options, { overwrite: true, inplace: false });
|
||||
|
||||
options = foundry.utils.mergeObject(DEFAULT_FIND_OPTIONS, options, { overwrite: true, inplace: false });
|
||||
const subset = this.findAllLike(value, elements, options);
|
||||
if (subset.length == 0) {
|
||||
console.log(`Aucune ${options.description} pour ${value}`);
|
||||
@ -251,13 +256,7 @@ export class Misc {
|
||||
}
|
||||
|
||||
static findAllLike(value, elements, options = {}) {
|
||||
options = foundry.utils.mergeObject({
|
||||
mapper: it => it.name,
|
||||
preFilter: it => true,
|
||||
description: 'valeur',
|
||||
onMessage: m => ui.notifications.info(m)
|
||||
}, options);
|
||||
|
||||
options = foundry.utils.mergeObject(DEFAULT_FIND_OPTIONS, options, { overwrite: true, inplace: false });
|
||||
if (!value) {
|
||||
options.onMessage(`Pas de ${options.description} correspondant à une valeur vide`);
|
||||
return [];
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"id": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"version": "12.0.32",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.32/rddsystem.zip",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.32/system.json",
|
||||
"version": "12.0.33",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.33/rddsystem.zip",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.33/system.json",
|
||||
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
||||
"compatibility": {
|
||||
"minimum": "11",
|
||||
|
Loading…
x
Reference in New Issue
Block a user