Skip to content

Commit 087dc7c

Browse files
feat: bullet time
update bullet time. Either location or name is required.
1 parent 53d2aa3 commit 087dc7c

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/components/editor/action/EditorActionAdd.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,12 @@ export const EditorActionAdd = ({
153153
{(type === 'Deploy' ||
154154
type === 'Skill' ||
155155
type === 'Retreat' ||
156-
type === 'SkillUsage') && (
156+
type === 'SkillUsage' ||
157+
type === 'BulletTime') && (
157158
<div className="flex">
158159
<FormField2<
159-
CopilotDocV1.ActionDeploy | CopilotDocV1.ActionSkillOrRetreat
160+
| CopilotDocV1.ActionDeploy
161+
| CopilotDocV1.ActionSkillOrRetreatOrBulletTime
160162
>
161163
label="干员或干员组名"
162164
description="选择干员、使用干员名、或使用干员组名引用"
@@ -165,7 +167,7 @@ export const EditorActionAdd = ({
165167
(
166168
errors as FieldErrors<
167169
| CopilotDocV1.ActionDeploy
168-
| CopilotDocV1.ActionSkillOrRetreat
170+
| CopilotDocV1.ActionSkillOrRetreatOrBulletTime
169171
>
170172
).name
171173
}
@@ -194,7 +196,10 @@ export const EditorActionAdd = ({
194196
</div>
195197
)}
196198

197-
{(type === 'Deploy' || type === 'Skill' || type === 'Retreat') && (
199+
{(type === 'Deploy' ||
200+
type === 'Skill' ||
201+
type === 'Retreat' ||
202+
type === 'BulletTime') && (
198203
<div className="flex">
199204
<EditorActionOperatorLocation
200205
shouldUnregister

src/models/copilot.schema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ export namespace CopilotDocV1 {
4343
type: Type.Deploy
4444
}
4545

46-
export type ActionSkillOrRetreat = ActionBase &
46+
export type ActionSkillOrRetreatOrBulletTime = ActionBase &
4747
(
4848
| {
4949
// location: any[]
5050
// should be
5151
location: [number, number]
5252
name?: string
53-
type: Type.Skill | Type.Retreat
53+
type: Type.Skill | Type.Retreat | Type.BulletTime
5454
}
5555
| {
5656
// location?: any[]
5757
// should be
5858
location?: [number, number]
5959
name: string
60-
type: Type.Skill | Type.Retreat
60+
type: Type.Skill | Type.Retreat | Type.BulletTime
6161
}
6262
)
6363

@@ -77,7 +77,7 @@ export namespace CopilotDocV1 {
7777

7878
export type Action =
7979
| ActionDeploy
80-
| ActionSkillOrRetreat
80+
| ActionSkillOrRetreatOrBulletTime
8181
| ActionSkillUsage
8282
| ActionUtil
8383
| ActionMoveCamera

0 commit comments

Comments
 (0)