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
|
||||
*/
|
||||
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) {
|
||||
return null;
|
||||
}
|
||||
@@ -199,15 +205,15 @@ export class RollL5r5e extends Roll {
|
||||
}
|
||||
|
||||
// Add L5R summary
|
||||
if (this.l5r5e.dicesTypes.l5r) {
|
||||
const summary = this.l5r5e.summary;
|
||||
total +=
|
||||
(this.l5r5e.dicesTypes.std ? " | " : "") +
|
||||
["success", "explosive", "opportunity", "strife"]
|
||||
.map((props) => (summary[props] > 0 ? `<i class="i_${props}"></i> ${summary[props]}` : null))
|
||||
.filter((c) => !!c)
|
||||
.join(" | ");
|
||||
}
|
||||
// if (this.l5r5e.dicesTypes.l5r) {
|
||||
// const summary = this.l5r5e.summary;
|
||||
// total +=
|
||||
// (this.l5r5e.dicesTypes.std ? " | " : "") +
|
||||
// ["success", "explosive", "opportunity", "strife"]
|
||||
// .map((props) => (summary[props] > 0 ? `<i class="i_${props}"></i> ${summary[props]}` : null))
|
||||
// .filter((c) => !!c)
|
||||
// .join(" | ");
|
||||
// }
|
||||
return total;
|
||||
}
|
||||
|
||||
@@ -356,11 +362,10 @@ export class RollL5r5e extends Roll {
|
||||
messageData.roll = this;
|
||||
|
||||
// Either create the message or just return the chat data
|
||||
const message = await ChatMessage.implementation.create(messageData, {
|
||||
return ChatMessage.implementation.create(messageData, {
|
||||
rollMode: rMode,
|
||||
temporary: !create,
|
||||
});
|
||||
return message;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
|
||||
@@ -21,16 +21,18 @@ export class ItemL5r5e extends Item {
|
||||
* @memberof ClientDocumentMixin#
|
||||
*/
|
||||
get uuid() {
|
||||
const uuid = [];
|
||||
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) {
|
||||
uuid.push(`Actor.${parents.actor_id}`);
|
||||
}
|
||||
uuid.push(`Item.${parents.item_id}`);
|
||||
}
|
||||
uuid.push(super.uuid);
|
||||
uuid.push(`Item.${this._id}`);
|
||||
|
||||
return uuid.join(".");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user