diff --git a/ecnpc/container.schema.json b/ecnpc/container.schema.json index 934ca18..6d4290a 100644 --- a/ecnpc/container.schema.json +++ b/ecnpc/container.schema.json @@ -1,51 +1,54 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/container.schema.json", - "type": "object", - "properties": { - "reference": { - "type": "string" - }, - "dialogue": { - "type": "object" - }, - "hook": { - "type": "object" - }, - "skin": { - "type": "array", - "items": { - "type": "object", - "properties": { - "skinId": { - "type": "string" - }, - "skinData": { - "type": "string", - "format": "uri" - }, - "skinPack": { - "type": "string", - "format": "uri" - }, - "geometryName": { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/container.schema.json", + "title": "ECNPCContainer schema", + "type": "object", + "properties": { + "reference": { "type": "string" - }, - "geometryData": { - "type": "string", - "format": "uri" - } }, - "required": ["skinId"], - "additionalProperties": false - } + "dialogue": { + "type": "object" + }, + "hook": { + "type": "object" + }, + "skin": { + "type": "array", + "items": { + "type": "object", + "properties": { + "skinId": { + "type": "string" + }, + "skinData": { + "type": "string", + "format": "uri" + }, + "skinPack": { + "type": "string", + "format": "uri" + }, + "geometryName": { + "type": "string" + }, + "geometryData": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "skinId" + ], + "additionalProperties": false + } + }, + "npc": { + "type": "array", + "items": { + "$ref": "prefab.schema.json" + } + } }, - "npc": { - "type": "array", - "items": { - "$ref": "prefab.schema.json" - } - } - }, - "additionalProperties": true + "additionalProperties": true } diff --git a/ecnpc/dialogue.handler.schema.json b/ecnpc/dialogue.handler.schema.json index ee535b8..8197b1e 100644 --- a/ecnpc/dialogue.handler.schema.json +++ b/ecnpc/dialogue.handler.schema.json @@ -1,75 +1,88 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/dialogue.handler.schema.json", - "type": "object", - "description": "对话的handler配置", - "properties": { - "type": { - "type": "string", - "description": "handler类型", - "enum": ["dialogue", "action", "random"] - } - }, - "required": ["type"], - "oneOf": [ - { - "$ref": "dialogue.schema.json" - }, - { - "type": "object", - "description": "PlayerAction回调", - "properties": { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/dialogue.handler.schema.json", + "title": "ECNPC dialogue handler schema", + "type": "object", + "description": "对话的handler配置", + "properties": { "type": { - "const": "action", - "description": "PlayerAction回调" - }, - "callback": { - "oneOf": [ - { - "type": "object", - "$ref": "../playeraction/playeraction.schema.json" - }, - { - "type": "array", - "items": { - "$ref": "../playeraction/playeraction.schema.json" - } - } - ] + "type": "string", + "description": "handler类型", + "enum": [ + "dialogue", + "action", + "random" + ] } - }, - "required": [ - "type", - "callback" - ] }, - { - "type": "object", - "properties": { - "type": { - "const": "random", - "description": "随机进行处理" + "required": [ + "type" + ], + "oneOf": [ + { + "$ref": "dialogue.schema.json" + }, + { + "type": "object", + "description": "PlayerAction回调", + "properties": { + "type": { + "const": "action", + "description": "PlayerAction回调" + }, + "callback": { + "oneOf": [ + { + "type": "object", + "$ref": "../playeraction/playeraction.schema.json" + }, + { + "type": "array", + "items": { + "$ref": "../playeraction/playeraction.schema.json" + } + } + ] + } + }, + "required": [ + "type", + "callback" + ] }, - "handler": { - "type": "array", - "description": "随机处理器配置", - "items": { + { "type": "object", "properties": { - "weight": { - "type": "number", - "description": "随机权重" - }, - "handler": { - "$ref": "#" - } + "type": { + "const": "random", + "description": "随机进行处理" + }, + "handler": { + "type": "array", + "description": "随机处理器配置", + "items": { + "type": "object", + "properties": { + "weight": { + "type": "number", + "description": "随机权重" + }, + "handler": { + "$ref": "#" + } + }, + "required": [ + "weight", + "handler" + ] + } + } }, - "required": ["weight", "handler"] - } + "required": [ + "type", + "handler" + ], + "description": "随机进行处理" } - }, - "required": ["type", "handler"], - "description": "随机进行处理" - } - ] + ] } \ No newline at end of file diff --git a/ecnpc/dialogue.schema.json b/ecnpc/dialogue.schema.json index 4799150..32f8d3b 100644 --- a/ecnpc/dialogue.schema.json +++ b/ecnpc/dialogue.schema.json @@ -1,86 +1,87 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/dialogue.schema.json", - "type": "object", - "properties": { - "type": { - "const": "dialogue", - "description": "钩子类型,此处应为 'dialogue'" - }, - "key": { - "type": "string", - "description": "可以直接复用在外层注册的dialogue" - }, - "condition": { - "type": "string", - "description": "触发对话的条件判断" - }, - "dialogue": { - "type": "string", - "description": "对话内容" - }, - "button": { - "type": "array", - "description": "按钮配置", - "items": { - "type": "object", - "properties": { - "buttonName": { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/dialogue.schema.json", + "title": "ECNPC dialogue schema", + "type": "object", + "properties": { + "type": { + "const": "dialogue", + "description": "钩子类型,此处应为 'dialogue'" + }, + "key": { "type": "string", - "description": "按钮名称" - }, - "condition": { + "description": "可以直接复用在外层注册的dialogue" + }, + "condition": { + "type": "string", + "description": "触发对话的条件判断" + }, + "dialogue": { "type": "string", - "description": "按钮显示的条件" - }, - "forceCloseOnClick": { - "type": "boolean", - "description": "点击按钮后是否关闭对话弹窗" - }, - "handler": { - "oneOf": [ - { + "description": "对话内容" + }, + "button": { + "type": "array", + "description": "按钮配置", + "items": { "type": "object", - "$ref": "dialogue.handler.schema.json" - }, - { - "type": "array", - "items": { - "type": "object", - "$ref": "dialogue.handler.schema.json" - } - } - ] - } + "properties": { + "buttonName": { + "type": "string", + "description": "按钮名称" + }, + "condition": { + "type": "string", + "description": "按钮显示的条件" + }, + "forceCloseOnClick": { + "type": "boolean", + "description": "点击按钮后是否关闭对话弹窗" + }, + "handler": { + "oneOf": [ + { + "type": "object", + "$ref": "dialogue.handler.schema.json" + }, + { + "type": "array", + "items": { + "type": "object", + "$ref": "dialogue.handler.schema.json" + } + } + ] + } + }, + "required": [ + "buttonName" + ], + "description": "按钮配置项" + } }, - "required": [ - "buttonName" - ], - "description": "按钮配置项" - } - }, - "animation": { - "type": "string", - "description": "开始对话时,NPC播放的动画" - }, - "sound": { - "type": "string", - "description": "开始对话时,播放的音效" - }, - "portraitScale": { - "type": "number", - "description": "对话弹窗左侧的NPC模型的放大倍率" + "animation": { + "type": "string", + "description": "开始对话时,NPC播放的动画" + }, + "sound": { + "type": "string", + "description": "开始对话时,播放的音效" + }, + "portraitScale": { + "type": "number", + "description": "对话弹窗左侧的NPC模型的放大倍率" + }, + "profileOffset": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3, + "maxItems": 3, + "description": "对话弹窗左侧的NPC模型的位置平移" + } }, - "profileOffset": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 3, - "maxItems": 3, - "description": "对话弹窗左侧的NPC模型的位置平移" - } - }, - "additionalProperties": false, - "description": "dialogue的详细配置" + "additionalProperties": false, + "description": "dialogue的详细配置" } \ No newline at end of file diff --git a/ecnpc/hook.schema.json b/ecnpc/hook.schema.json index 0984c85..5c0e697 100644 --- a/ecnpc/hook.schema.json +++ b/ecnpc/hook.schema.json @@ -1,456 +1,494 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/hook.schema.json", - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "enum": [ - "lookat", - "animation.hey", - "baby", - "scoretag-online" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "lookat", - "description": "NPC主动看向玩家的行为。\n可以配置一个可选的距离参数,以限制触发距离。" - }, - "distance": { - "type": "number", - "default": 10 - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "touch", - "description": "当玩家接触NPC时触发的行为。\n它可以配置一系列的回调操作(PlayerAction)" - }, - "condition": { - "type": "string", - "description": "触发条件判断" - }, - "callback": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "../playeraction/playeraction.schema.json" - } - }, - { - "$ref": "../playeraction/playeraction.schema.json" - } - ] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": { - "anyOf": [ - "touch.exchange", - "exchange" - ] - }, - "description": "玩家点击NPC时,触发exchange" - }, - "condition": { - "type": "string", - "description": "触发条件判断" - }, - "exchange": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "animation", - "description": "控制NPC随机播放实体动画" - }, - "animation": { - "oneOf": [ - { - "anyOf": [ - { - "type": "string", - "description": "animation字段可以是一个string", - "enum": [ - "animation.easecation.hey", - "animation.easecation.cheer", - "animation.easecation.cheer1", - "animation.easecation.cheer2", - "animation.easecation.sitting", - "animation.easecation.look_around" - ] - }, - { - "type": "string", - "description": "animation字段可以是一个string" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/hook.schema.json", + "title": "ECNPC hook schema", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "enum": [ + "lookat", + "animation.hey", + "baby", + "scoretag-online" ] - }, - { - "type": "array", - "description": "animation字段还可以时一个List,表示从这几个动画中随机播放", - "items": { - "anyOf": [ - { - "type": "string", - "description": "animation字段可以是一个string", - "enum": [ - "animation.easecation.hey", - "animation.easecation.cheer", - "animation.easecation.cheer1", - "animation.easecation.cheer2", - "animation.easecation.sitting", - "animation.easecation.look_around" - ] - }, - { - "type": "string", - "description": "animation字段可以是一个string" + }, + { + "type": "object", + "properties": { + "type": { + "const": "lookat", + "description": "NPC主动看向玩家的行为。\n可以配置一个可选的距离参数,以限制触发距离。" + }, + "distance": { + "type": "number", + "default": 10 } - ] - } - } - ] - }, - "duration": { - "oneOf": [ - { - "type": "number", - "description": "间隔时间(毫秒)" - }, - { + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { "type": "object", - "description": "间隔时间范围(毫秒)", "properties": { - "min": { - "type": "number" - }, - "max": { - "type": "number" - } - } - } - ] - } - }, - "required": ["type", "animation"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "sound", - "description": "控制NPC随机播放声音。\n可以包括声音名称和间隔时间。" - }, - "sound": { - "type": "array", - "items": { - "type": "string" - } - }, - "duration": { - "oneOf": [ - { - "type": "number", - "description": "间隔时间(毫秒)" - }, - { + "type": { + "const": "touch", + "description": "当玩家接触NPC时触发的行为。\n它可以配置一系列的回调操作(PlayerAction)" + }, + "condition": { + "type": "string", + "description": "触发条件判断" + }, + "callback": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "../playeraction/playeraction.schema.json" + } + }, + { + "$ref": "../playeraction/playeraction.schema.json" + } + ] + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { "type": "object", - "description": "间隔时间范围(毫秒)", "properties": { - "min": { - "type": "number" - }, - "max": { - "type": "number" - } - } - } - ] - } - }, - "required": ["type", "sound"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "particle", - "description": "NPC处周期性生成粒子" - }, - "particle": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "molang": { - "type": "object" - }, - "duration": { - "oneOf": [ - { - "type": "number", - "description": "间隔时间(毫秒)" - }, - { + "type": { + "const": { + "anyOf": [ + "touch.exchange", + "exchange" + ] + }, + "description": "玩家点击NPC时,触发exchange" + }, + "condition": { + "type": "string", + "description": "触发条件判断" + }, + "exchange": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { "type": "object", - "description": "间隔时间范围(毫秒)", "properties": { - "min": { - "type": "number" - }, - "max": { - "type": "number" - } - } - } - ] - } - }, - "required": ["type", "particle"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "touch.sound", - "description": "玩家点击NPC时播放声音,一般用于NPC“啊哈”的叫声。" - }, - "sound": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["type", "sound"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "touch.particle", - "description": "玩家点击NPC时产生粒子效果的配置。" - }, - "particle": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } - }, - "required": ["type", "particle"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "touch.particle.mobspawn", - "description": "一个预置的点击NPC时生成mobspawn粒子的hook" - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "$ref": "dialogue.schema.json" - }, - { - "type": "object", - "properties": { - "type": { - "const": "game", - "description": "用于游戏相关的NPC行为配置。" - }, - "name": { - "type": "string" - }, - "disableNameTag": { - "type": "boolean" - }, - "gameCenterType": { - "type": "string" - }, - "stageTypes": { - "type": "array", - "items": { - "type": "string" - } - }, - "lobbyTypes": { - "type": "array", - "items": { - "type": "string" - } - }, - "joinLobby": { - "type": "string" - }, - "joinStage": { - "type": "string" - }, - "openGameCenter": { - "type": "string" - }, - "teleport": { - "type": "string" - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "game-list-text", - "description": "显示详细游戏列表的浮空字(hook做的只是设置NameTag)。\n用于包含一堆子游戏的NPC,玩家接近时会显示对应GameCenter二级分类中的所有子游戏的名称。" - }, - "gameCenterType": { - "type": "string" - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "game-billboard", - "description": "NPC头顶在线人数相关的人数刷新hook。\n需要搭配billboard使用。" - }, - "gameCenterType": { - "type": "string" - }, - "stageTypes": { - "type": "array", - "items": { - "type": "string" - } - }, - "lobbyTypes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "const": "move", - "description": "控制NPC移动行为的配置。\n为了节省性能,这个hook并没有使用寻路机制,也没有计算碰撞箱,而是简单地在给定的坐标之间进行差值移动。\n注意,因为不计算碰撞箱,所以当需要上坡时,需要进行锯齿状选点,不然会沿着斜线往上飞" - }, - "speed": { - "type": "number", - "default": 0.1 - }, - "loop": { - "type": "boolean", - "default": false - }, - "maxRotationSpeed": { - "type": "number" - }, - "insertReverse": { - "type": "boolean", - "default": false - }, - "points": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" + "type": { + "const": "animation", + "description": "控制NPC随机播放实体动画" + }, + "animation": { + "oneOf": [ + { + "anyOf": [ + { + "type": "string", + "description": "animation字段可以是一个string", + "enum": [ + "animation.easecation.hey", + "animation.easecation.cheer", + "animation.easecation.cheer1", + "animation.easecation.cheer2", + "animation.easecation.sitting", + "animation.easecation.look_around" + ] + }, + { + "type": "string", + "description": "animation字段可以是一个string" + } + ] + }, + { + "type": "array", + "description": "animation字段还可以时一个List,表示从这几个动画中随机播放", + "items": { + "anyOf": [ + { + "type": "string", + "description": "animation字段可以是一个string", + "enum": [ + "animation.easecation.hey", + "animation.easecation.cheer", + "animation.easecation.cheer1", + "animation.easecation.cheer2", + "animation.easecation.sitting", + "animation.easecation.look_around" + ] + }, + { + "type": "string", + "description": "animation字段可以是一个string" + } + ] + } + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "number", + "description": "间隔时间(毫秒)" + }, + { + "type": "object", + "description": "间隔时间范围(毫秒)", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + } + ] + } }, - { - "type": "object", - "properties": { - "to": { - "type": "string" + "required": [ + "type", + "animation" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "sound", + "description": "控制NPC随机播放声音。\n可以包括声音名称和间隔时间。" + }, + "sound": { + "type": "array", + "items": { + "type": "string" + } }, "duration": { - "type": "number" + "oneOf": [ + { + "type": "number", + "description": "间隔时间(毫秒)" + }, + { + "type": "object", + "description": "间隔时间范围(毫秒)", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + } + ] } - }, - "required": ["to"] }, - { - "type": "object", - "properties": { - "from": { - "type": "string" + "required": [ + "type", + "sound" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "particle", + "description": "NPC处周期性生成粒子" + }, + "particle": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "to": { - "type": "string" + "molang": { + "type": "object" }, "duration": { - "type": "number" + "oneOf": [ + { + "type": "number", + "description": "间隔时间(毫秒)" + }, + { + "type": "object", + "description": "间隔时间范围(毫秒)", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + } + ] + } + }, + "required": [ + "type", + "particle" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "touch.sound", + "description": "玩家点击NPC时播放声音,一般用于NPC“啊哈”的叫声。" + }, + "sound": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "sound" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "touch.particle", + "description": "玩家点击NPC时产生粒子效果的配置。" + }, + "particle": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "type", + "particle" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "touch.particle.mobspawn", + "description": "一个预置的点击NPC时生成mobspawn粒子的hook" + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { + "$ref": "dialogue.schema.json" + }, + { + "type": "object", + "properties": { + "type": { + "const": "game", + "description": "用于游戏相关的NPC行为配置。" + }, + "name": { + "type": "string" + }, + "disableNameTag": { + "type": "boolean" + }, + "gameCenterType": { + "type": "string" + }, + "stageTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "lobbyTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "joinLobby": { + "type": "string" + }, + "joinStage": { + "type": "string" + }, + "openGameCenter": { + "type": "string" + }, + "teleport": { + "type": "string" } - }, - "required": ["from", "to"] - } - ] + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "game-list-text", + "description": "显示详细游戏列表的浮空字(hook做的只是设置NameTag)。\n用于包含一堆子游戏的NPC,玩家接近时会显示对应GameCenter二级分类中的所有子游戏的名称。" + }, + "gameCenterType": { + "type": "string" + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "game-billboard", + "description": "NPC头顶在线人数相关的人数刷新hook。\n需要搭配billboard使用。" + }, + "gameCenterType": { + "type": "string" + }, + "stageTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "lobbyTypes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "move", + "description": "控制NPC移动行为的配置。\n为了节省性能,这个hook并没有使用寻路机制,也没有计算碰撞箱,而是简单地在给定的坐标之间进行差值移动。\n注意,因为不计算碰撞箱,所以当需要上坡时,需要进行锯齿状选点,不然会沿着斜线往上飞" + }, + "speed": { + "type": "number", + "default": 0.1 + }, + "loop": { + "type": "boolean", + "default": false + }, + "maxRotationSpeed": { + "type": "number" + }, + "insertReverse": { + "type": "boolean", + "default": false + }, + "points": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "to": { + "type": "string" + }, + "duration": { + "type": "number" + } + }, + "required": [ + "to" + ] + }, + { + "type": "object", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "duration": { + "type": "number" + } + }, + "required": [ + "from", + "to" + ] + } + ] + } + } + }, + "required": [ + "type", + "points" + ], + "additionalProperties": false } - } - }, - "required": ["type", "points"], - "additionalProperties": false - } - ] - } + ] + } } \ No newline at end of file diff --git a/ecnpc/prefab.schema.json b/ecnpc/prefab.schema.json index f42b673..6b2a468 100644 --- a/ecnpc/prefab.schema.json +++ b/ecnpc/prefab.schema.json @@ -1,178 +1,182 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/prefab.schema.json", - "type": "object", - "properties": { - "npcTag": { - "type": "string" - }, - "pos": { - "type": "string", - "description": "NPC坐标,格式:x:y:z:yaw:pitch(yaw和pitch可选)", - "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)(:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?))?$", - "errorMessage": { - "pattern": "格式不正确,正确的格式是:x:y:z:yaw:pitch(yaw和pitch可选)" - } - }, - "posOffset": { - "type": "string", - "description": "NPC坐标偏移,格式:x:y:z", - "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)$", - "errorMessage": { - "pattern": "格式不正确,正确的格式是:x:y:z" - } - }, - "posOverride": { - "type": "string", - "description": "覆盖NPC的位置坐标,格式为X:Y:Z:Yaw:Pitch,使用 ~ 表示保留原始数值", - "pattern": "^(~|-?\\d+(\\.\\d+)?):(~|-?\\d+(\\.\\d+)?):(~|-?\\d+(\\.\\d+)?)(:(~|-?\\d+(\\.\\d+)?):(~|-?\\d+(\\.\\d+)?))?$", - "errorMessage": { - "pattern": "格式不正确,正确的格式是:x:y:z:yaw:pitch(yaw和pitch可选)" - } - }, - "skin": { - "description": "指定NPC的皮肤(只有在type为human时生效)", - "anyOf": [ - { - "type": "string", - "enum": [ - "py", - "py-sb", - "py-christmas", - "py-zhj", - "py-sg", - "py-football", - "py-ny", - "hzmn", - "bedrock.alex", - "bedrock.ari", - "bedrock.efe", - "bedrock.kai", - "bedrock.makena", - "bedrock.noor", - "bedrock.steve", - "bedrock.sunny", - "bedrock.zuri", - "sbpy", - "christmas", - "snowdrift", - "boybook", - "boatnpc", - "callboard", - "punk", - "coppie", - "joseph", - "ai-robot", - "ec-girl" - ] - }, - { - "type": "string" - } - ] - }, - "animation": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "human", - "creature", - "pet", - "text", - "billboard", - "npc", - "empty", - "gift_box", - "small_py", - "walder_doll" - ] - }, - "id": { - "type": "string", - "description": "当type为creature时,定义自定义实体的类型(格式:namespace:entity_identifier)", - "pattern": "^[a-z0-9_]+:[a-z0-9_]+$", - "errorMessage": { - "pattern": "格式不正确,正确的格式是:namespace:entity_identifier" - } - }, - "skinId": { - "type": "integer" - }, - "scale": { - "type": "number" - }, - "width": { - "type": "number", - "description": "定义NPC的碰撞箱宽度(影响玩家点击NPC的有效区域)" - }, - "height": { - "type": "number", - "description": "定义NPC的碰撞箱高度(影响玩家点击NPC的有效区域)" - }, - "name": { - "type": "string", - "description": "NPC名称(头顶名字)" - }, - "nameTagVisible": { - "type": "boolean", - "description": "是否始终显示头顶名字" - }, - "scoreTag": { - "type": "string" - }, - "variant": { - "type": "integer" - }, - "markVariant": { - "type": "integer" - }, - "dancing": { - "type": "boolean" - }, - "sitting": { - "type": "boolean" - }, - "sneaking": { - "type": "boolean" - }, - "light": { - "type": "integer" - }, - "dialogue": { - "type": "object", - "additionalProperties": { - "$ref": "dialogue.schema.json" - } - }, - "canSeeRegion": { - "type": "string", - "description": "定义玩家所处什么区域时能看到NPC,格式为 X1:Y1:Z1:X2:Y2:Z2", - "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?):-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)$", - "errorMessage": { - "pattern": "格式不正确,正确的格式是:X1:Y1:Z1:X2:Y2:Z2" - } - }, - "extraCanSee": { - "type": ["string", "array"], - "description": "定义NPC能被玩家看到的条件,内容为 @ECCondtion 表达式" - }, - "viewDistance": { - "type": "number", - "description": "定义NPC可被玩家看到的距离(防止渲染给玩家过多的实体导致客户端性能问题)" - }, - "ornaments": { - "type": "array", - "description": "定义NPC的装饰物(4D装扮)列表。(注:只支持human类型的NPC)", - "items": { - "type": "string" - } - }, - "hook": { - "description": "定义NPC的行为钩子的列表", - "$ref": "hook.schema.json" - }, - "additionalProperties": true - } + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://easecation.github.io/ECConfigSchema/ecnpc/prefab.schema.json", + "title": "ECNPC prefab schema", + "type": "object", + "properties": { + "npcTag": { + "type": "string" + }, + "pos": { + "type": "string", + "description": "NPC坐标,格式:x:y:z:yaw:pitch(yaw和pitch可选)", + "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)(:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?))?$", + "errorMessage": { + "pattern": "格式不正确,正确的格式是:x:y:z:yaw:pitch(yaw和pitch可选)" + } + }, + "posOffset": { + "type": "string", + "description": "NPC坐标偏移,格式:x:y:z", + "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)$", + "errorMessage": { + "pattern": "格式不正确,正确的格式是:x:y:z" + } + }, + "posOverride": { + "type": "string", + "description": "覆盖NPC的位置坐标,格式为X:Y:Z:Yaw:Pitch,使用 ~ 表示保留原始数值", + "pattern": "^(~|-?\\d+(\\.\\d+)?):(~|-?\\d+(\\.\\d+)?):(~|-?\\d+(\\.\\d+)?)(:(~|-?\\d+(\\.\\d+)?):(~|-?\\d+(\\.\\d+)?))?$", + "errorMessage": { + "pattern": "格式不正确,正确的格式是:x:y:z:yaw:pitch(yaw和pitch可选)" + } + }, + "skin": { + "description": "指定NPC的皮肤(只有在type为human时生效)", + "anyOf": [ + { + "type": "string", + "enum": [ + "py", + "py-sb", + "py-christmas", + "py-zhj", + "py-sg", + "py-football", + "py-ny", + "hzmn", + "bedrock.alex", + "bedrock.ari", + "bedrock.efe", + "bedrock.kai", + "bedrock.makena", + "bedrock.noor", + "bedrock.steve", + "bedrock.sunny", + "bedrock.zuri", + "sbpy", + "christmas", + "snowdrift", + "boybook", + "boatnpc", + "callboard", + "punk", + "coppie", + "joseph", + "ai-robot", + "ec-girl" + ] + }, + { + "type": "string" + } + ] + }, + "animation": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "human", + "creature", + "pet", + "text", + "billboard", + "npc", + "empty", + "gift_box", + "small_py", + "walder_doll" + ] + }, + "id": { + "type": "string", + "description": "当type为creature时,定义自定义实体的类型(格式:namespace:entity_identifier)", + "pattern": "^[a-z0-9_]+:[a-z0-9_]+$", + "errorMessage": { + "pattern": "格式不正确,正确的格式是:namespace:entity_identifier" + } + }, + "skinId": { + "type": "integer" + }, + "scale": { + "type": "number" + }, + "width": { + "type": "number", + "description": "定义NPC的碰撞箱宽度(影响玩家点击NPC的有效区域)" + }, + "height": { + "type": "number", + "description": "定义NPC的碰撞箱高度(影响玩家点击NPC的有效区域)" + }, + "name": { + "type": "string", + "description": "NPC名称(头顶名字)" + }, + "nameTagVisible": { + "type": "boolean", + "description": "是否始终显示头顶名字" + }, + "scoreTag": { + "type": "string" + }, + "variant": { + "type": "integer" + }, + "markVariant": { + "type": "integer" + }, + "dancing": { + "type": "boolean" + }, + "sitting": { + "type": "boolean" + }, + "sneaking": { + "type": "boolean" + }, + "light": { + "type": "integer" + }, + "dialogue": { + "type": "object", + "additionalProperties": { + "$ref": "dialogue.schema.json" + } + }, + "canSeeRegion": { + "type": "string", + "description": "定义玩家所处什么区域时能看到NPC,格式为 X1:Y1:Z1:X2:Y2:Z2", + "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?):-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)$", + "errorMessage": { + "pattern": "格式不正确,正确的格式是:X1:Y1:Z1:X2:Y2:Z2" + } + }, + "extraCanSee": { + "type": [ + "string", + "array" + ], + "description": "定义NPC能被玩家看到的条件,内容为 @ECCondtion 表达式" + }, + "viewDistance": { + "type": "number", + "description": "定义NPC可被玩家看到的距离(防止渲染给玩家过多的实体导致客户端性能问题)" + }, + "ornaments": { + "type": "array", + "description": "定义NPC的装饰物(4D装扮)列表。(注:只支持human类型的NPC)", + "items": { + "type": "string" + } + }, + "hook": { + "description": "定义NPC的行为钩子的列表", + "$ref": "hook.schema.json" + }, + "additionalProperties": true + } } \ No newline at end of file diff --git a/playeraction/playeraction.schema.json b/playeraction/playeraction.schema.json index 0efad33..8d2aaf9 100644 --- a/playeraction/playeraction.schema.json +++ b/playeraction/playeraction.schema.json @@ -1,533 +1,551 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://easecation.github.io/ECConfigSchema/playeraction/playeraction.schema.json", - "type": "object", - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "const": "custom", - "description": "自定义行为,在Java逻辑中注册和实现" + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://easecation.github.io/ECConfigSchema/playeraction/playeraction.schema.json", + "title": "Player action schema", + "type": "object", + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "const": "custom", + "description": "自定义行为,在Java逻辑中注册和实现" + }, + "id": { + "type": "string" + }, + "args": { + "type": "object" + } + }, + "required": [ + "type", + "id" + ] }, - "id": { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "const": "message" + }, + "text": { + "type": "string" + } + }, + "required": [ + "type", + "text" + ] }, - "args": { - "type": "object" - } - }, - "required": [ - "type", - "id" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "message" + { + "type": "object", + "properties": { + "type": { + "const": "title", + "description": "显示 Title" + }, + "title": { + "type": "string" + }, + "sub": { + "type": "string" + } + }, + "required": [ + "type", + "title" + ] }, - "text": { - "type": "string" - } - }, - "required": [ - "type", - "text" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "title", - "description": "显示 Title" + { + "type": "object", + "properties": { + "type": { + "const": "form", + "description": "弹出原版FormUI" + }, + "title": { + "type": "string" + }, + "text": { + "type": "string" + }, + "buttons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "image": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "text", + "actions" + ] + } + } + }, + "required": [ + "type", + "title", + "text" + ] }, - "title": { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "const": "form.lottery", + "description": "" + } + }, + "required": [ + "type" + ] }, - "sub": { - "type": "string" - } - }, - "required": [ - "type", - "title" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form", - "description": "弹出原版FormUI" + { + "type": "object", + "properties": { + "type": { + "const": "form.addition-ticket", + "description": "" + } + }, + "required": [ + "type" + ] }, - "title": { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "const": "form.preview", + "description": "" + } + }, + "required": [ + "type" + ] }, - "text": { - "type": "string" + { + "type": "object", + "properties": { + "type": { + "const": "form.preview.ornament", + "description": "" + } + }, + "required": [ + "type" + ] }, - "buttons": { - "type": "array", - "items": { + { "type": "object", "properties": { - "text": { - "type": "string" - }, - "image": { - "type": "string" - }, - "actions": { - "type": "array", - "items": { - "type": "object" + "type": { + "const": "form.cdkey", + "description": "" } - } }, "required": [ - "text", - "actions" + "type" ] - } - } - }, - "required": [ - "type", - "title", - "text" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.lottery", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.addition-ticket", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.preview", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.preview.ornament", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.cdkey", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.player-service", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.mail", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "form.sign-in", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "merchandise.set", - "description": "设置商品" }, - "merchandise": { - "type": "string", - "pattern": "^[a-zA-Z0-9-_]+\\.[a-zA-Z0-9-_.]+:\\d+$", - "errorMessage": { - "pattern": "商品ID的格式应为 'xxx.yyy:n',其中 'xxx' 为 category,'yyy' 为 iditem(可包含 '.'),'n' 为数字" - } - } - }, - "required": ["type", "merchandise"] - }, - { - "type": "object", - "properties": { - "type": { - "const": "merchandise.add", - "description": "添加商品" + { + "type": "object", + "properties": { + "type": { + "const": "form.player-service", + "description": "" + } + }, + "required": [ + "type" + ] }, - "merchandise": { - "type": "string", - "pattern": "^[a-zA-Z0-9-_]+\\.[a-zA-Z0-9-_.]+:\\d+$", - "errorMessage": { - "pattern": "商品ID的格式应为 'xxx.yyy:n',其中 'xxx' 为 category,'yyy' 为 iditem(可包含 '.'),'n' 为数字" - } - } - }, - "required": ["type", "merchandise"] - }, - { - "type": "object", - "properties": { - "type": { - "const": "merchandise.use", - "description": "使用商品" + { + "type": "object", + "properties": { + "type": { + "const": "form.mail", + "description": "" + } + }, + "required": [ + "type" + ] }, - "merchandise": { - "type": "string", - "pattern": "^[a-zA-Z0-9-_]+\\.[a-zA-Z0-9-_.]+:\\d+$", - "errorMessage": { - "pattern": "商品ID的格式应为 'xxx.yyy:n',其中 'xxx' 为 category,'yyy' 为 iditem(可包含 '.'),'n' 为数字" - } - } - }, - "required": ["type", "merchandise"] - }, - { - "type": "object", - "properties": { - "type": { - "const": "gift", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "record", - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "exchange", - "description": "执行exchange" + { + "type": "object", + "properties": { + "type": { + "const": "form.sign-in", + "description": "" + } + }, + "required": [ + "type" + ] }, - "id": { - "type": "string", - "description": "兑换的ID" + { + "type": "object", + "properties": { + "type": { + "const": "merchandise.set", + "description": "设置商品" + }, + "merchandise": { + "type": "string", + "pattern": "^[a-zA-Z0-9-_]+\\.[a-zA-Z0-9-_.]+:\\d+$", + "errorMessage": { + "pattern": "商品ID的格式应为 'xxx.yyy:n',其中 'xxx' 为 category,'yyy' 为 iditem(可包含 '.'),'n' 为数字" + } + } + }, + "required": [ + "type", + "merchandise" + ] }, - "args": { - "type": "object", - "description": "额外参数" + { + "type": "object", + "properties": { + "type": { + "const": "merchandise.add", + "description": "添加商品" + }, + "merchandise": { + "type": "string", + "pattern": "^[a-zA-Z0-9-_]+\\.[a-zA-Z0-9-_.]+:\\d+$", + "errorMessage": { + "pattern": "商品ID的格式应为 'xxx.yyy:n',其中 'xxx' 为 category,'yyy' 为 iditem(可包含 '.'),'n' 为数字" + } + } + }, + "required": [ + "type", + "merchandise" + ] }, - "gainModUI": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "兑换界面的标题" + { + "type": "object", + "properties": { + "type": { + "const": "merchandise.use", + "description": "使用商品" + }, + "merchandise": { + "type": "string", + "pattern": "^[a-zA-Z0-9-_]+\\.[a-zA-Z0-9-_.]+:\\d+$", + "errorMessage": { + "pattern": "商品ID的格式应为 'xxx.yyy:n',其中 'xxx' 为 category,'yyy' 为 iditem(可包含 '.'),'n' 为数字" + } } - } - } - ] - } - }, - "required": ["type"] - }, - { - "type": "object", - "properties": { - "type": { - "enum": ["firework", "fireworks"], - "description": "" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "sound", - "description": "发出音效" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "kick", - "description": "踢出玩家" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "mission", - "description": "任务" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "tree.add", - "description": "植树活动" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "tree.milestone", - "description": "植树活动" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "tree.main", - "description": "植树活动" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "enum": ["teleport", "tp"], - "description": "传送玩家" + }, + "required": [ + "type", + "merchandise" + ] }, - "pos": { - "type": "string", - "description": "目标坐标", - "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)(:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?))?$" - } - }, - "required": [ - "type", - "pos" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "workshop", - "description": "打开个性工坊的UI" + { + "type": "object", + "properties": { + "type": { + "const": "gift", + "description": "" + } + }, + "required": [ + "type" + ] }, - "tabId": { - "type": "string", - "description": "打开的TabID" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "workshop.group", - "description": "个性工坊的某分类页面" + { + "type": "object", + "properties": { + "type": { + "const": "record", + "description": "" + } + }, + "required": [ + "type" + ] }, - "group": { - "type": "string", - "description": "分类ID" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "netease.shop", - "description": "打开网易商城" + { + "type": "object", + "properties": { + "type": { + "const": "exchange", + "description": "执行exchange" + }, + "id": { + "type": "string", + "description": "兑换的ID" + }, + "args": { + "type": "object", + "description": "额外参数" + }, + "gainModUI": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "兑换界面的标题" + } + } + } + ] + } + }, + "required": [ + "type" + ] }, - "category": { - "type": "string", - "description": "商品分类" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "activity", - "description": "打开活动系统UI的对应活动" + { + "type": "object", + "properties": { + "type": { + "enum": [ + "firework", + "fireworks" + ], + "description": "" + } + }, + "required": [ + "type" + ] }, - "id": { - "type": "string", - "description": "活动ID" + { + "type": "object", + "properties": { + "type": { + "const": "sound", + "description": "发出音效" + } + }, + "required": [ + "type" + ] }, - "index": { - "type": "integer", - "description": "索引" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "navigate", - "description": "可视化路径引导到某一坐标" + { + "type": "object", + "properties": { + "type": { + "const": "kick", + "description": "踢出玩家" + } + }, + "required": [ + "type" + ] }, - "stop": { - "type": "boolean", - "description": "是否停止玩家已有路径引导", - "default": true + { + "type": "object", + "properties": { + "type": { + "const": "mission", + "description": "任务" + } + }, + "required": [ + "type" + ] }, - "target": { - "type": "string", - "description": "目标坐标", - "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)(:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?))?$" + { + "type": "object", + "properties": { + "type": { + "const": "tree.add", + "description": "植树活动" + } + }, + "required": [ + "type" + ] }, - "sfx": { - "type": "string", - "description": "贴图", - "default": "sfx/frame/navi_red" - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "type": { - "const": "modui.gain", - "description": "显示ModUI的获取奖品的界面" + { + "type": "object", + "properties": { + "type": { + "const": "tree.milestone", + "description": "植树活动" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "tree.main", + "description": "植树活动" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "enum": [ + "teleport", + "tp" + ], + "description": "传送玩家" + }, + "pos": { + "type": "string", + "description": "目标坐标", + "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)(:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?))?$" + } + }, + "required": [ + "type", + "pos" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "workshop", + "description": "打开个性工坊的UI" + }, + "tabId": { + "type": "string", + "description": "打开的TabID" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "workshop.group", + "description": "个性工坊的某分类页面" + }, + "group": { + "type": "string", + "description": "分类ID" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "netease.shop", + "description": "打开网易商城" + }, + "category": { + "type": "string", + "description": "商品分类" + } + }, + "required": [ + "type" + ] }, - "content": { - "type": "object", - "description": "内容(Exchange)" + { + "type": "object", + "properties": { + "type": { + "const": "activity", + "description": "打开活动系统UI的对应活动" + }, + "id": { + "type": "string", + "description": "活动ID" + }, + "index": { + "type": "integer", + "description": "索引" + } + }, + "required": [ + "type" + ] }, - "closeCallback": { - "type": "object", - "description": "关闭后的回调", - "$ref": "#" + { + "type": "object", + "properties": { + "type": { + "const": "navigate", + "description": "可视化路径引导到某一坐标" + }, + "stop": { + "type": "boolean", + "description": "是否停止玩家已有路径引导", + "default": true + }, + "target": { + "type": "string", + "description": "目标坐标", + "pattern": "^-?\\d+(\\.\\d+)?:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?)(:(-?\\d+(\\.\\d+)?):(-?\\d+(\\.\\d+)?))?$" + }, + "sfx": { + "type": "string", + "description": "贴图", + "default": "sfx/frame/navi_red" + } + }, + "required": [ + "type" + ] }, - "title": { - "type": "string", - "description": "顶部显示标题", - "default": "你获得了" + { + "type": "object", + "properties": { + "type": { + "const": "modui.gain", + "description": "显示ModUI的获取奖品的界面" + }, + "content": { + "type": "object", + "description": "内容(Exchange)" + }, + "closeCallback": { + "type": "object", + "description": "关闭后的回调", + "$ref": "#" + }, + "title": { + "type": "string", + "description": "顶部显示标题", + "default": "你获得了" + } + }, + "required": [ + "type", + "content" + ] } - }, - "required": [ - "type", - "content" - ] - } - ] + ] } \ No newline at end of file