feat(journal): allow players to emit roll messages

This commit is contained in:
hypercross 2026-07-09 09:06:25 +08:00
parent ae3045f96b
commit 4faff9a391
1 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
/** /**
* Built-in message type: roll * Built-in message type: roll
* *
* Emitters: gm * Emitters: gm, player
* Command: /roll formula * Command: /roll formula
* The GM's browser rolls the formula and publishes the resolved result. * The sender's browser rolls the formula and publishes the resolved result.
*/ */
import { z } from "zod"; import { z } from "zod";
@ -44,7 +44,7 @@ export function resolveRollPayload(raw: {
registerMessageType<RollPayload>({ registerMessageType<RollPayload>({
type: "roll", type: "roll",
label: "掷骰", label: "掷骰",
emitters: ["gm"], emitters: ["gm", "player"],
schema, schema,
defaultPayload: () => ({ defaultPayload: () => ({
notation: "1d20", notation: "1d20",