Merge branch 'master-fix' into 'master'
Empêcher doublons sur tête/souffle #175 See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!206
BIN
icons/creatures/aligate_t.webp
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
icons/creatures/araflate_t.webp
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
icons/creatures/bandersnatch_t.webp
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
icons/creatures/bramart_t.webp
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
icons/creatures/brolute_t.webp
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
icons/creatures/chamule_t.webp
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
icons/creatures/cheval_t.webp
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
icons/creatures/chiard_t.webp
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
icons/creatures/chien_t.webp
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
icons/creatures/chrasme_t.webp
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
icons/creatures/cornicochon_t.webp
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
icons/creatures/dong_t.webp
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
icons/creatures/drakkule_t.webp
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
icons/creatures/felorn_t.webp
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
icons/creatures/harpie_t.webp
Normal file
After Width: | Height: | Size: 27 KiB |
@ -3144,7 +3144,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
async onCreateOwnedDraconique(item, options, id) {
|
||||
|
||||
if (Misc.isElectedUser()) {
|
||||
let draconique = Draconique.all().find(it => it.match(item));
|
||||
if (draconique) {
|
||||
draconique.onActorCreateOwned(this, item)
|
||||
@ -3152,21 +3152,24 @@ export class RdDActor extends Actor {
|
||||
this.notifyGestionTeteSouffleQueue(item, draconique.manualMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
async onDeleteOwnedDraconique(item, options, id) {
|
||||
|
||||
if (Misc.isElectedUser()) {
|
||||
let draconique = Draconique.all().find(it => it.match(item));
|
||||
if (draconique) {
|
||||
draconique.onActorDeleteOwned(this, item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async onDeleteOwnedCaseTmr(item, options, id) {
|
||||
if (Misc.isElectedUser()) {
|
||||
let draconique = Draconique.all().find(it => it.isCase(item));
|
||||
if (draconique) {
|
||||
draconique.onActorDeleteCaseTmr(this, item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
notifyGestionTeteSouffleQueue(item, manualMessage = true) {
|
||||
ChatMessage.create({
|
||||
|
@ -115,4 +115,8 @@ export class Misc {
|
||||
static templateData(it) {
|
||||
return Misc.data(it)?.data ?? {}
|
||||
}
|
||||
|
||||
static isElectedUser() {
|
||||
return game.user.id == Misc.connectedGMOrUser();
|
||||
}
|
||||
}
|