mirror of
https://github.com/RussellChamp/tpw-roller.git
synced 2026-10-28 00:22:36 +00:00
add dice sounds to all rollers
This commit is contained in:
1 parent
fe1074e863
commit
d9a976c5f1
12 files changed
+66
-21
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { format as formatDate } from "date-fns";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { Button, Icon } from "sveltestrap";
|
||||
import {
|
||||
rollAbility,
|
||||
@@ -25,6 +26,8 @@
|
||||
|
||||
import DieIcon from "./DieIcon.svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
let rollResults: { type: string; roll: number; value: string; timestamp: string }[] = [];
|
||||
|
||||
function roll(item: { type: string; description: string; roll: number }) {
|
||||
@@ -32,6 +35,7 @@
|
||||
{ type: item.type, roll: item.roll, value: item.description, timestamp: formatDate(new Date(), "P kk:mm:ss") },
|
||||
...rollResults,
|
||||
];
|
||||
dispatch("roll");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user