refactor: simplify DocDialog and move documentation to markdown body
Simplify the `DocDialog` component by removing hardcoded property tables and syntax blocks. Instead, rely on the raw markdown body provided in the `DocEntry` to render documentation content. This shifts the responsibility of formatting (syntax, props, etc.) from the component to the individual markdown files, allowing for more flexible and detailed documentation.
This commit is contained in:
@@ -1,28 +1,20 @@
|
||||
---
|
||||
tag: journal-roll
|
||||
icon: 🎲
|
||||
title: 掷骰与种子表命令
|
||||
description: 在 Journal 中掷骰或随机生成种子表内容。优先匹配种子表,否则作为骰子表达式处理。
|
||||
syntax: '/roll 骰子表达式 | 种子表键名'
|
||||
props:
|
||||
- name: 参数
|
||||
type: string
|
||||
desc: 骰子表达式(如 3d6、2d8kh1、d20+5)或已定义的种子表 slug
|
||||
title: 掷骰与火花表命令
|
||||
---
|
||||
|
||||
在 Journal 中掷骰或随机抽取火花表内容。优先匹配火花表,否则作为骰子表达式处理。
|
||||
|
||||
**语法:** `/roll 骰子表达式 | 火花表键名`
|
||||
|
||||
## 概述
|
||||
|
||||
`/roll` 命令用于掷骰或随机抽取种子表,并将结果同步到所有客户端。
|
||||
`/roll` 命令用于掷骰或随机抽取火花表,并将结果同步到所有客户端。
|
||||
|
||||
- 如果参数匹配已定义的**种子表** slug,则抽取并发布对应种子表的结果。
|
||||
- 如果参数匹配已定义的**火花表** slug,则抽取并发布对应火花表的结果。
|
||||
- 否则,作为**骰子表达式**求值并发布掷骰结果。
|
||||
|
||||
## 语法
|
||||
|
||||
```
|
||||
/roll 骰子表达式 | 种子表键名
|
||||
```
|
||||
|
||||
## 示例
|
||||
|
||||
### 掷骰
|
||||
@@ -35,7 +27,7 @@ props:
|
||||
/roll 4d6k3
|
||||
```
|
||||
|
||||
### 种子表
|
||||
### 火花表
|
||||
|
||||
```
|
||||
/roll npc
|
||||
@@ -53,12 +45,14 @@ props:
|
||||
| `1d20+5` | 1 个 20 面骰加 5 |
|
||||
| `4d6k3` | 4 个 6 面骰保留最高 3 个 |
|
||||
|
||||
## 种子表定义
|
||||
## 火花表定义
|
||||
|
||||
种子表在文档中通过 `:spark[CSV路径]` 指令或 spark 形状的 markdown 表格定义,CSV 文件的第一列表头为骰子公式(如 d6、d20),后续列为数据列。
|
||||
火花表在 markdown 文档中通过 `:spark[CSV路径]` 标记声明,系统扫描文档时自动发现。CSV 文件的第一列表头为骰子公式(如 `d6`、`d20`),后续列为数据列。
|
||||
|
||||
抽取时根据骰子公式投掷,查找对应行并将各列数据作为火花表结果发布。
|
||||
|
||||
## 权限
|
||||
|
||||
- **GM**:可使用
|
||||
- **玩家**:不可使用
|
||||
- **观察者**:不可使用
|
||||
- **观察者**:不可使用
|
||||
Reference in New Issue
Block a user