Using a leading debounce on send2chat button
This commit is contained in:
@@ -131,11 +131,11 @@
|
||||
"title": "GM ToolBox",
|
||||
"difficulty_hidden": "Change difficulty visibility",
|
||||
"difficulty": "Change difficulty (right click: add, left: subtract, middle: TN 2)",
|
||||
"sleep": "Comfortable rest for all characters (Remove Water x2 fatigue. Right click: controlled pc only. Left: All actors)",
|
||||
"sleep": "Comfortable rest for all characters (Remove Water x2 fatigue. Right click: assigned characters only. Left: All actors)",
|
||||
"sleep_info": "The characters had a good night's sleep.",
|
||||
"scene_end": "End of scene (Conflict and Fatigue half reset for all characters. Right click: controlled pc only. Left: All actors)",
|
||||
"scene_end": "End of scene (Conflict and Fatigue half reset for all characters. Right click: assigned characters only. Left: All actors)",
|
||||
"scene_end_info": "The tension of the scene finally drops.",
|
||||
"reset_void": "Start of the game: Reset the players' void points (Right click: controlled pc only. Left: All actors",
|
||||
"reset_void": "Start of the game: Reset the players' void points (Right click: assigned characters only. Left: All actors",
|
||||
"reset_void_info": "Void points have been attributed."
|
||||
},
|
||||
"gm_monitor": {
|
||||
|
||||
@@ -131,11 +131,11 @@
|
||||
"title": "GM ToolBox",
|
||||
"difficulty_hidden": "Cambiar la dificultad visible",
|
||||
"difficulty": "Cambiar dificultad (derecha: añadir, izquierda: sustraer, central: NO 2)",
|
||||
"sleep": "Descanso confortable para todos los personajes (Eliminar fatiga = Agua x2. Right click: controlled pc only. Left: All actors)",
|
||||
"sleep": "Descanso confortable para todos los personajes (Eliminar fatiga = Agua x2. Right click: assigned characters only. Left: All actors)",
|
||||
"sleep_info": "Los personajes han dormido bien.",
|
||||
"scene_end": "Final de la escena (El Conflicto y la Fatiga de los personajes se reduce hasta la mitad del máximo del valor. Right click: controlled pc only. Left: All actors)",
|
||||
"scene_end": "Final de la escena (El Conflicto y la Fatiga de los personajes se reduce hasta la mitad del máximo del valor. Right click: assigned characters only. Left: All actors)",
|
||||
"scene_end_info": "La tensión de la escena por fin disminuye.",
|
||||
"reset_void": "Start of the game: Reset the players' void points (Right click: controlled pc only. Left: All actors)",
|
||||
"reset_void": "Start of the game: Reset the players' void points (Right click: assigned characters only. Left: All actors)",
|
||||
"reset_void_info": "Void points have been attributed."
|
||||
},
|
||||
"gm_monitor": {
|
||||
|
||||
@@ -28,7 +28,13 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
label: game.i18n.localize("l5r5e.global.send_to_chat"),
|
||||
class: "send-to-chat",
|
||||
icon: "fas fa-comment-dots",
|
||||
onclick: async () => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
onclick: () =>
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"send2chat-" + this.object.id,
|
||||
() => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
2000,
|
||||
true
|
||||
)(),
|
||||
});
|
||||
|
||||
return buttons;
|
||||
|
||||
@@ -190,7 +190,7 @@ export class GmToolbox extends FormApplication {
|
||||
return;
|
||||
}
|
||||
|
||||
// Left clic: controlled pc only, others: all actors
|
||||
// Left clic: assigned characters only, others: all actors
|
||||
const isAll = event.which !== 1;
|
||||
const type = $(event.currentTarget).data("type");
|
||||
|
||||
|
||||
@@ -26,7 +26,13 @@ export class ItemSheetL5r5e extends ItemSheet {
|
||||
label: game.i18n.localize("l5r5e.global.send_to_chat"),
|
||||
class: "send-to-chat",
|
||||
icon: "fas fa-comment-dots",
|
||||
onclick: async () => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
onclick: () =>
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"send2chat-" + this.object.id,
|
||||
() => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
2000,
|
||||
true
|
||||
)(),
|
||||
});
|
||||
|
||||
return buttons;
|
||||
|
||||
@@ -26,7 +26,13 @@ export class BaseJournalSheetL5r5e extends JournalSheet {
|
||||
label: game.i18n.localize("l5r5e.global.send_to_chat"),
|
||||
class: "send-to-chat",
|
||||
icon: "fas fa-comment-dots",
|
||||
onclick: async () => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
onclick: () =>
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"send2chat-" + this.object.id,
|
||||
() => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
2000,
|
||||
true
|
||||
)(),
|
||||
});
|
||||
|
||||
return buttons;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.3.3/raw/l5r5e.zip?job=build",
|
||||
"version": "1.3.3",
|
||||
"minimumCoreVersion": "0.8.5",
|
||||
"compatibleCoreVersion": "0.8.8",
|
||||
"compatibleCoreVersion": "0.8.9",
|
||||
"manifestPlusVersion": "1.0.0",
|
||||
"socket": true,
|
||||
"author": "Team L5R",
|
||||
|
||||
Reference in New Issue
Block a user