Working on Compatibility for FVTT v10
Fix for chat roll, break the inline but ok
This commit is contained in:
@@ -187,6 +187,12 @@ export class RollL5r5e extends Roll {
|
|||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
get total() {
|
get total() {
|
||||||
|
// Return null to trigger the L5R template.
|
||||||
|
// This beak inline roll, but as we need RnK to really resolve the roll, this is acceptable...
|
||||||
|
if (this.l5r5e.dicesTypes.l5r) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this._evaluated) {
|
if (!this._evaluated) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -199,15 +205,15 @@ export class RollL5r5e extends Roll {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add L5R summary
|
// Add L5R summary
|
||||||
if (this.l5r5e.dicesTypes.l5r) {
|
// if (this.l5r5e.dicesTypes.l5r) {
|
||||||
const summary = this.l5r5e.summary;
|
// const summary = this.l5r5e.summary;
|
||||||
total +=
|
// total +=
|
||||||
(this.l5r5e.dicesTypes.std ? " | " : "") +
|
// (this.l5r5e.dicesTypes.std ? " | " : "") +
|
||||||
["success", "explosive", "opportunity", "strife"]
|
// ["success", "explosive", "opportunity", "strife"]
|
||||||
.map((props) => (summary[props] > 0 ? `<i class="i_${props}"></i> ${summary[props]}` : null))
|
// .map((props) => (summary[props] > 0 ? `<i class="i_${props}"></i> ${summary[props]}` : null))
|
||||||
.filter((c) => !!c)
|
// .filter((c) => !!c)
|
||||||
.join(" | ");
|
// .join(" | ");
|
||||||
}
|
// }
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,11 +362,10 @@ export class RollL5r5e extends Roll {
|
|||||||
messageData.roll = this;
|
messageData.roll = this;
|
||||||
|
|
||||||
// Either create the message or just return the chat data
|
// Either create the message or just return the chat data
|
||||||
const message = await ChatMessage.implementation.create(messageData, {
|
return ChatMessage.implementation.create(messageData, {
|
||||||
rollMode: rMode,
|
rollMode: rMode,
|
||||||
temporary: !create,
|
temporary: !create,
|
||||||
});
|
});
|
||||||
return message;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
|
|||||||
@@ -21,16 +21,18 @@ export class ItemL5r5e extends Item {
|
|||||||
* @memberof ClientDocumentMixin#
|
* @memberof ClientDocumentMixin#
|
||||||
*/
|
*/
|
||||||
get uuid() {
|
get uuid() {
|
||||||
const uuid = [];
|
|
||||||
const parents = this.system.parent_id;
|
const parents = this.system.parent_id;
|
||||||
|
if (!parents?.item_id) {
|
||||||
|
return super.uuid;
|
||||||
|
}
|
||||||
|
|
||||||
if (parents?.item_id) {
|
// Embedded item
|
||||||
|
const uuid = [];
|
||||||
if (parents?.actor_id) {
|
if (parents?.actor_id) {
|
||||||
uuid.push(`Actor.${parents.actor_id}`);
|
uuid.push(`Actor.${parents.actor_id}`);
|
||||||
}
|
}
|
||||||
uuid.push(`Item.${parents.item_id}`);
|
uuid.push(`Item.${parents.item_id}`);
|
||||||
}
|
uuid.push(`Item.${this._id}`);
|
||||||
uuid.push(super.uuid);
|
|
||||||
|
|
||||||
return uuid.join(".");
|
return uuid.join(".");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user