forked from public/foundryvtt-reve-de-dragon
		
	Convertir tous les jets de dés dans le tchat
This commit is contained in:
		| @@ -1,6 +1,7 @@ | |||||||
| import { Misc } from "./misc.js"; | import { Misc } from "./misc.js"; | ||||||
| import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js"; | import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js"; | ||||||
| import { RdDTimestamp } from "./time/rdd-timestamp.js"; | import { RdDTimestamp } from "./time/rdd-timestamp.js"; | ||||||
|  | import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js"; | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -198,6 +199,7 @@ export class ChatUtility { | |||||||
|   static async onCreateChatMessage(chatMessage, options, id) { |   static async onCreateChatMessage(chatMessage, options, id) { | ||||||
|     if (chatMessage.isAuthor) { |     if (chatMessage.isAuthor) { | ||||||
|       await chatMessage.setFlag(SYSTEM_RDD, 'rdd-timestamp', game.system.rdd.calendrier.getTimestamp()); |       await chatMessage.setFlag(SYSTEM_RDD, 'rdd-timestamp', game.system.rdd.calendrier.getTimestamp()); | ||||||
|  |       await chatMessage.update({ content: await RdDTextEditor.enrichHTML(chatMessage.content, undefined, {showLink:false}) }) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -102,10 +102,9 @@ export class RdDRollTables { | |||||||
|  |  | ||||||
|   /* -------------------------------------------- */ |   /* -------------------------------------------- */ | ||||||
|   static async getMaladresse(options = { toChat: false, arme: false }) { |   static async getMaladresse(options = { toChat: false, arme: false }) { | ||||||
|     const maladresse = await RdDRollTables.drawTextFromRollTable( |     return await RdDRollTables.drawTextFromRollTable( | ||||||
|       options.arme ? "Maladresse armé" : "Maladresses non armé", |       options.arme ? "Maladresse armé" : "Maladresses non armé", | ||||||
|       options); |       options) | ||||||
|     return await RdDTextEditor.enrichHTML(maladresse, undefined, {showLink:false}) |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user