新增插件指引网页

This commit is contained in:
2025-11-12 22:58:36 +08:00
parent 4a3beb2153
commit 7332141a92
34 changed files with 2373 additions and 8984 deletions

View File

@@ -32,6 +32,35 @@ _FORTUNE_STAGE_TABLE: List[Tuple[float, str]] = [
class WPSFortuneSystem(WPSAPI):
"""基于整点哈希的运势系统,可供其他模块复用"""
def get_guide_subtitle(self) -> str:
return "提供整点运势值及阶段信息的公共组件"
def collect_command_entries(self) -> Sequence[GuideEntry]:
return (
{
"title": "fortune",
"identifier": "fortune",
"description": "查询当前整点的运势值与阶段文本。",
"metadata": {"别名": "运势"},
},
)
def collect_guide_entries(self) -> Sequence[GuideEntry]:
return (
{
"title": "运势算法",
"description": "基于用户ID与整点时间的 SHA-256 哈希映射为 [-0.9999, 0.9999] 区间。",
},
{
"title": "阶段划分",
"description": "通过 `_FORTUNE_STAGE_TABLE` 匹配阶段标签,供冒险等系统引用。",
},
{
"title": "复用接口",
"description": "`get_fortune_value / get_fortune_info` 可被其他插件同步或异步调用。",
},
)
@override
def dependencies(self) -> List[Type]:
return [WPSAPI]