Added a distinction on clicking on the dice icon on Chat tab
This commit is contained in:
@@ -138,7 +138,8 @@
|
||||
"void_point_tooltip": "Void point",
|
||||
"skill_assistance_label": "Assistance",
|
||||
"roll_label": "Roll",
|
||||
"bt_add_macro": "Add a macro"
|
||||
"bt_add_macro": "Add a macro",
|
||||
"gm_request_dp_to_players": "Roll request sent to players"
|
||||
},
|
||||
"roll_n_keep": {
|
||||
"title": "Roll & Keep",
|
||||
|
||||
@@ -138,7 +138,8 @@
|
||||
"void_point_tooltip": "Punto de vacío",
|
||||
"skill_assistance_label": "Asistencia",
|
||||
"roll_label": "Tirar",
|
||||
"bt_add_macro": "Añadir una macro"
|
||||
"bt_add_macro": "Añadir una macro",
|
||||
"gm_request_dp_to_players": "Roll request sent to players"
|
||||
},
|
||||
"roll_n_keep": {
|
||||
"title": "Tirar y guardar",
|
||||
|
||||
@@ -138,7 +138,8 @@
|
||||
"void_point_tooltip": "Point de Vide",
|
||||
"skill_assistance_label": "Assistance",
|
||||
"roll_label": "Lancer",
|
||||
"bt_add_macro": "Ajouter une macro"
|
||||
"bt_add_macro": "Ajouter une macro",
|
||||
"gm_request_dp_to_players": "Demande de jet envoyée aux joueurs"
|
||||
},
|
||||
"roll_n_keep": {
|
||||
"title": "Roll & Keep",
|
||||
|
||||
@@ -138,7 +138,8 @@
|
||||
"void_point_tooltip": "Punto Vuoto",
|
||||
"skill_assistance_label": "Aiuto",
|
||||
"roll_label": "Tira",
|
||||
"bt_add_macro": "Aggiungi una macro"
|
||||
"bt_add_macro": "Aggiungi una macro",
|
||||
"gm_request_dp_to_players": "Roll request sent to players"
|
||||
},
|
||||
"roll_n_keep": {
|
||||
"title": "Tira e Tieni",
|
||||
|
||||
@@ -55,8 +55,38 @@ export default class HooksL5r5e {
|
||||
static renderSidebarTab(app, html, data) {
|
||||
switch (app.tabName) {
|
||||
case "chat":
|
||||
// Add button on dice icon
|
||||
html.find(".chat-control-icon").click(async () => new game.l5r5e.DicePickerDialog().render());
|
||||
// Add DP on dice icon
|
||||
html.find(`.chat-control-icon`).on("mousedown", async (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
switch (event.which) {
|
||||
case 1:
|
||||
// Left clic - Local DP
|
||||
new game.l5r5e.DicePickerDialog().render();
|
||||
break;
|
||||
case 3:
|
||||
// Right clic - Players DP
|
||||
if (game.user.isGM) {
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"gm-request-dp",
|
||||
() => {
|
||||
game.l5r5e.sockets.openDicePicker({
|
||||
users: game.users.players.filter((u) => u.active && u.hasPlayerOwner),
|
||||
dpOptions: {
|
||||
skillsList: "artisan,martial,scholar,social,trade",
|
||||
},
|
||||
});
|
||||
ui.notifications.info(
|
||||
game.i18n.localize("l5r5e.dice.dicepicker.gm_request_dp_to_players")
|
||||
);
|
||||
},
|
||||
3000,
|
||||
true
|
||||
)();
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// Add title on button dice icon
|
||||
html.find(".chat-control-icon")[0].title = game.i18n.localize("l5r5e.dice.dicepicker.title");
|
||||
|
||||
Reference in New Issue
Block a user