Gestion equipement sur fiche de type 'token'
This commit is contained in:
parent
a1f73c0aa8
commit
625e67a300
@ -122,7 +122,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
data.data.potions = this._checkNull(data.itemsByType['potions']);
|
data.data.potions = this._checkNull(data.itemsByType['potions']);
|
||||||
data.data.ingredients = this._checkNull(data.itemsByType['ingredient']);
|
data.data.ingredients = this._checkNull(data.itemsByType['ingredient']);
|
||||||
data.data.munitions = this._checkNull(data.itemsByType['munition']);
|
data.data.munitions = this._checkNull(data.itemsByType['munition']);
|
||||||
data.data.herbes = this._checkNull(data.itemsByType['herbes']);
|
data.data.herbes = this._checkNull(data.itemsByType['herbe']);
|
||||||
data.data.sorts = this._checkNull(data.itemsByType['sort']);
|
data.data.sorts = this._checkNull(data.itemsByType['sort']);
|
||||||
data.data.queues = this._checkNull(data.itemsByType['queue']);
|
data.data.queues = this._checkNull(data.itemsByType['queue']);
|
||||||
data.data.souffles = this._checkNull(data.itemsByType['souffle']);
|
data.data.souffles = this._checkNull(data.itemsByType['souffle']);
|
||||||
@ -158,7 +158,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
async displayDialogEncaisser( ) {
|
async displayDialogEncaisser( ) {
|
||||||
let data = { bonusmalusTable: CONFIG.RDD.bonusmalus };
|
let data = { bonusmalusTable: CONFIG.RDD.bonusmalus };
|
||||||
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-encaisser.html', data );
|
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-encaisser.html', data );
|
||||||
new RdDEncaisser(html, this.actor ).render(true);enleverDeConteneur
|
new RdDEncaisser(html, this.actor ).render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -343,10 +343,12 @@ export class RdDActor extends Actor {
|
|||||||
let conteneur = this.items.find( conteneur => conteneurId == conteneur._id); // recup conteneur
|
let conteneur = this.items.find( conteneur => conteneurId == conteneur._id); // recup conteneur
|
||||||
if ( conteneur ) { // Si présent
|
if ( conteneur ) { // Si présent
|
||||||
//console.log("Suppression du conteneur1", conteneurId, itemId, conteneur.data.data.contenu);
|
//console.log("Suppression du conteneur1", conteneurId, itemId, conteneur.data.data.contenu);
|
||||||
let newContenu = conteneur.data.data.contenu.filter( function(value, index, arr) { return value != itemId } );
|
let contenu = conteneur.data.data.contenu;
|
||||||
|
contenu.splice(contenu.indexOf('itemId'), 1);
|
||||||
|
//let newContenu = conteneur.data.data.contenu.filter( function(value, index, arr) { return value != itemId } );
|
||||||
//console.log("Suppression du conteneur2", conteneurId, itemId, newContenu);
|
//console.log("Suppression du conteneur2", conteneurId, itemId, newContenu);
|
||||||
let update = {_id: conteneurId, "data.contenu": newContenu };
|
//let update = {_id: conteneurId, "data.contenu": newContenu };
|
||||||
await this.updateEmbeddedEntity("OwnedItem", update);
|
await this.updateEmbeddedEntity("OwnedItem", conteneur.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "foundryvtt-reve-de-dragon",
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||||
"version": "0.9.38",
|
"version": "0.9.39",
|
||||||
"minimumCoreVersion": "0.7.5",
|
"minimumCoreVersion": "0.7.5",
|
||||||
"compatibleCoreVersion": "0.7.6",
|
"compatibleCoreVersion": "0.7.6",
|
||||||
"templateVersion": 44,
|
"templateVersion": 44,
|
||||||
|
Loading…
Reference in New Issue
Block a user