fix: 3 bugs suite revue — race condition ensureDeck, label MJ/Opposant, rename isMJ

- tarot-deck-manager: supprime appel auto loadDeckState() du constructeur
- ensureDeck: appelle explicitement dm.loadDeckState() après création
- openManager: devient async, appelle loadDeckState() sur nouvelle instance
- chat-tension.hbs: utilise isSousTension pour afficher MJ ou Opposant
- fvtt-hamalron.mjs: renomme isMJ → isOpponentWinning (clarifie intention)
- lang/fr.json: ajoute clé opposant
- .gitea/workflows/release.yaml: workflow release Gitea
This commit is contained in:
2026-07-12 18:47:36 +02:00
parent aa40cc2c9c
commit b34df3e432
5 changed files with 56 additions and 6 deletions
+2 -2
View File
@@ -5,7 +5,6 @@ export default class HamalronTarotDeckManager extends HandlebarsApplicationMixin
super(options)
this.deck = []
this.discard = []
this.loadDeckState().catch(e => console.warn("Deck init error:", e))
}
/** @override */
@@ -719,7 +718,7 @@ export default class HamalronTarotDeckManager extends HandlebarsApplicationMixin
* Open the Tarot Deck Manager application
* @returns {HamalronTarotDeckManager}
*/
static openManager() {
static async openManager() {
if (!game.user.isGM) {
ui.notifications.warn("HAMALRON.TarotDeck.GMOnly", { localize: true })
return
@@ -728,6 +727,7 @@ export default class HamalronTarotDeckManager extends HandlebarsApplicationMixin
// Singleton pattern - reuse existing instance or create new one
if (!HamalronTarotDeckManager._instance) {
HamalronTarotDeckManager._instance = new HamalronTarotDeckManager()
await HamalronTarotDeckManager._instance.loadDeckState()
}
HamalronTarotDeckManager._instance.render(true, { focus: true })