Aide tchat dans un dialogue
This commit is contained in:
parent
c7ba56b90b
commit
8e565e3ca6
@ -166,11 +166,25 @@ export class RdDCommands {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
help(msg, table = undefined) {
|
||||
async help(msg) {
|
||||
this.help(msg, undefined);
|
||||
}
|
||||
async help(msg, table) {
|
||||
let list = []
|
||||
this._buildSubTableHelp(list, table || this.commandsTable);
|
||||
const messageAide = list.reduce((a, b) => a + '</li><li class="list-item">' + b);
|
||||
RdDCommands._chatAnswer(msg, `Commandes disponibles<ul class="alterne-list"><li class="list-item">${messageAide}</li></ul>`);
|
||||
|
||||
let html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/settings/dialog-aide-commands.html", { commands: list });
|
||||
let d = new Dialog(
|
||||
{
|
||||
title: "Commandes disponibles dans le tchat",
|
||||
content: html,
|
||||
buttons: {},
|
||||
},
|
||||
{
|
||||
width: 600, height: 500,
|
||||
});
|
||||
|
||||
d.render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
20
templates/settings/dialog-aide-commands.html
Normal file
20
templates/settings/dialog-aide-commands.html
Normal file
@ -0,0 +1,20 @@
|
||||
<h3>Dés spéciaux</h3>
|
||||
<ul class="alterne-list">
|
||||
<li class="list-item">
|
||||
<strong>/roll 1d7</strong>: lance un dé de rencontre
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<strong>/roll 1dr</strong>: lance un dé draconique (de 0à 7, relance et additionne en cas de 7)
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<strong>/roll 1dh</strong>: lance le dé des heures (de 1 à 12)
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Commandes disponibles</h3>
|
||||
<ul class="alterne-list">
|
||||
{{#each commands as |command key|}}
|
||||
<li class="list-item">
|
||||
{{{command}}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
Loading…
Reference in New Issue
Block a user