新增插件指引网页
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
from typing import Optional, Sequence
|
||||
|
||||
from PWF.Convention.Runtime.Architecture import Architecture
|
||||
|
||||
from Plugins.WPSAPI import GuideEntry
|
||||
from Plugins.WPSBackpackSystem import WPSBackpackSystem
|
||||
from Plugins.WPSConfigSystem import WPSConfigAPI
|
||||
|
||||
@@ -13,6 +14,58 @@ from .garden_plugin_base import WPSGardenBase
|
||||
|
||||
|
||||
class WPSGardenView(WPSGardenBase):
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "查看菜园概览与果实售出"
|
||||
|
||||
def collect_command_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="菜园 概览",
|
||||
identifier="菜园",
|
||||
description="显示当前所有地块状态与剩余果实。",
|
||||
metadata={"别名": "garden"},
|
||||
icon="🗺️",
|
||||
details=[
|
||||
{
|
||||
"type": "list",
|
||||
"items": [
|
||||
"列出地块序号、作物名称、成熟时间与被偷情况。",
|
||||
"空地块会提示剩余可用数量。",
|
||||
],
|
||||
}
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="菜园 售出",
|
||||
identifier="菜园 售出 <果实> <数量>",
|
||||
description="售出成熟果实并换取积分。",
|
||||
metadata={"别名": "garden sell"},
|
||||
icon="💰",
|
||||
details=[
|
||||
{
|
||||
"type": "steps",
|
||||
"items": [
|
||||
"检查背包持有的果实数量。",
|
||||
"输入欲出售的果实 ID/名称与数量。",
|
||||
"系统按配置的售价乘以数量发放积分,同时扣除背包库存。",
|
||||
],
|
||||
}
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
{
|
||||
"title": "概览视图",
|
||||
"description": "默认输出地块编号、成熟状态、剩余果实与被偷记录。",
|
||||
},
|
||||
{
|
||||
"title": "果实售出",
|
||||
"description": "`菜园 售出 <果实> <数量>`,自动结算积分并扣除背包库存。",
|
||||
},
|
||||
)
|
||||
|
||||
def wake_up(self) -> None:
|
||||
super().wake_up()
|
||||
self.register_plugin("garden")
|
||||
|
||||
Reference in New Issue
Block a user