From 376eb3639e18698886f6b8431ae274c0d25c47ad Mon Sep 17 00:00:00 2001 From: Vect-G Date: Fri, 13 Dec 2024 22:20:48 +0800 Subject: [PATCH] add Initial Map --- docs/api/asyncapi.yaml | 55 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/docs/api/asyncapi.yaml b/docs/api/asyncapi.yaml index 2d2354b..587c1e3 100644 --- a/docs/api/asyncapi.yaml +++ b/docs/api/asyncapi.yaml @@ -32,6 +32,8 @@ channels: $ref: '#/components/messages/BattleUpdate' # 战斗信息更新 BuffSelect: $ref: '#/components/messages/BuffSelect' # 加成选择 + Map: + $ref: '#/components/messages/InitialMap' # 地图信息 operations: @@ -172,10 +174,19 @@ components: position: $ref: '#/components/schemas/Position' additionalProperties: false - mapSize: # 新增的地图大小属性 - type: integer - example: 100 - + mapSize: + type: object + additionalProperties: false + properties: + width: + type: integer + example: 100 + height: + type: integer + example: 100 + required: + - width + - height AvailableBuffs: title: "AvailableBuffs" @@ -256,6 +267,42 @@ components: buff: $ref: '#/components/schemas/BuffName' + InitialMap: + title: "InitialMap" + summary: "初始地图信息" + payload: + type: object + additionalProperties: false + required: + - messageType + - mapSize + - walls + properties: + messageType: + type: string + const: INITIAL_MAP + mapSize: + type: object + additionalProperties: false + properties: + width: + type: integer + example: 100 + height: + type: integer + example: 100 + required: + - width + - height + walls: + type: array + description: "初始墙体列表" + items: + $ref: '#/components/schemas/Wall' + + + + Error: title: "Error" summary: "错误信息"