koishi-plugin-noah 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/drawer/sdvx/index.d.ts +1 -1
- package/lib/games/sdvx/adapters/asphyxia.d.ts +18 -0
- package/lib/games/sdvx/adapters/index.d.ts +6 -0
- package/lib/games/sdvx/adapters/mao.d.ts +19 -0
- package/lib/games/sdvx/adapters/official.d.ts +14 -0
- package/lib/games/sdvx/command.d.ts +1 -1
- package/lib/games/sdvx/commands/calculate.d.ts +1 -1
- package/lib/games/sdvx/commands/chart.d.ts +1 -1
- package/lib/games/sdvx/commands/info.d.ts +1 -1
- package/lib/games/sdvx/commands/radar.d.ts +1 -1
- package/lib/games/sdvx/commands/recent.d.ts +1 -1
- package/lib/games/sdvx/commands/sync.d.ts +1 -1
- package/lib/games/sdvx/commands/vf.d.ts +1 -1
- package/lib/games/sdvx/config.d.ts +1 -2
- package/lib/games/sdvx/services/music-service.d.ts +1 -1
- package/lib/games/sdvx/types/config.d.ts +10 -0
- package/lib/games/sdvx/types/index.d.ts +16 -0
- package/lib/index.cjs +1294 -1360
- package/lib/servers/Asphyxia/index.d.ts +0 -4
- package/lib/servers/Asphyxia/utils/xml.d.ts +2 -0
- package/lib/servers/Mao/index.d.ts +0 -4
- package/lib/servers/Official/index.d.ts +0 -4
- package/lib/servers/index.d.ts +4 -17
- package/lib/types/config.d.ts +2 -12
- package/lib/types/index.d.ts +0 -67
- package/package.json +1 -1
- package/lib/servers/Asphyxia/services/sdvx-service.d.ts +0 -26
- package/lib/servers/Mao/services/sdvx-service.d.ts +0 -39
- package/lib/servers/Official/services/sdvx-service.d.ts +0 -25
- package/lib/servers/utils/grade.d.ts +0 -8
- package/lib/servers/utils/xml.d.ts +0 -13
- /package/lib/{servers → games/sdvx}/utils/difficulty.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from 'koishi';
|
|
2
2
|
import { SDVXScore } from '../../games/sdvx/types';
|
|
3
|
-
import { SDVXConfig } from '../../types/config';
|
|
3
|
+
import { SDVXConfig } from '../../games/sdvx/types/config';
|
|
4
4
|
import { BaseDrawer } from '../BaseDrawer';
|
|
5
5
|
/**
|
|
6
6
|
* SDVX绘图类,提供SDVX游戏相关图像生成功能
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Context, Logger } from 'koishi';
|
|
2
|
+
import { GameService } from '../../../types';
|
|
3
|
+
import { SDVXScore } from '../types';
|
|
4
|
+
import { SDVXConfig } from '../types/config';
|
|
5
|
+
export declare class AsphyxiaSDVXService implements GameService {
|
|
6
|
+
private static instance;
|
|
7
|
+
logger: Logger;
|
|
8
|
+
private config;
|
|
9
|
+
private cachedModel;
|
|
10
|
+
private constructor();
|
|
11
|
+
static getInstance(logger: Logger, config: SDVXConfig): AsphyxiaSDVXService;
|
|
12
|
+
private getModel;
|
|
13
|
+
getRefid(ctx: Context, url: string, model: string, cardId: string): Promise<string>;
|
|
14
|
+
getUserName(ctx: Context, url: string, cardId: string): Promise<string>;
|
|
15
|
+
getAllScore(ctx: Context, url: string, cardId: string, config: SDVXConfig): Promise<SDVXScore[]>;
|
|
16
|
+
private getClearType;
|
|
17
|
+
private getDifficultyString;
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Logger } from 'koishi';
|
|
2
|
+
import { SDVXConfig } from '../types/config';
|
|
3
|
+
export declare function registerSDVXAdapters(logger: Logger, config: SDVXConfig): void;
|
|
4
|
+
export { AsphyxiaSDVXService } from './asphyxia';
|
|
5
|
+
export { MaoSDVXService } from './mao';
|
|
6
|
+
export { OfficialSDVXService } from './official';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Context, Logger } from 'koishi';
|
|
2
|
+
import { SDVXService as ISDVXService, SDVXScore } from '../types';
|
|
3
|
+
import { SDVXConfig } from '../types/config';
|
|
4
|
+
export declare class MaoSDVXService implements ISDVXService {
|
|
5
|
+
private static instance;
|
|
6
|
+
logger: Logger;
|
|
7
|
+
private constructor();
|
|
8
|
+
static getInstance(logger: Logger): MaoSDVXService;
|
|
9
|
+
private getDifficultyString;
|
|
10
|
+
private getClearType;
|
|
11
|
+
getUserName(ctx: Context, url: string, cardId: string): Promise<string>;
|
|
12
|
+
verifyPin(ctx: Context, url: string, cardId: string, pin: string): Promise<boolean>;
|
|
13
|
+
private clearTypeToNum;
|
|
14
|
+
private diffNameToMusicType;
|
|
15
|
+
uploadScore(ctx: Context, url: string, cardId: string, scores: SDVXScore[]): Promise<boolean>;
|
|
16
|
+
getAllScore(ctx: Context, url: string, cardId: string, config: SDVXConfig): Promise<SDVXScore[]>;
|
|
17
|
+
getScore(ctx: Context, url: string, cardId: string, musicId: number, config: SDVXConfig): Promise<SDVXScore>;
|
|
18
|
+
getRecentScores(ctx: Context, url: string, cardId: string, config: SDVXConfig, count?: number): Promise<SDVXScore[]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Context, Logger } from 'koishi';
|
|
2
|
+
import { SDVXService as ISDVXService, SDVXScore } from '../types';
|
|
3
|
+
import { SDVXConfig } from '../types/config';
|
|
4
|
+
export declare class OfficialSDVXService implements ISDVXService {
|
|
5
|
+
private static instance;
|
|
6
|
+
logger: Logger;
|
|
7
|
+
private constructor();
|
|
8
|
+
static getInstance(logger: Logger): OfficialSDVXService;
|
|
9
|
+
private mapClearType;
|
|
10
|
+
getUserName(ctx: Context, url: string, player_id: string): Promise<string>;
|
|
11
|
+
getAllScore(ctx: Context, url: string, player_id: string, config: SDVXConfig): Promise<SDVXScore[]>;
|
|
12
|
+
getScore(ctx: Context, url: string, player_id: string, musicId: number, config: SDVXConfig): Promise<SDVXScore>;
|
|
13
|
+
getRecentScores(ctx: Context, url: string, player_id: string, config: SDVXConfig, count?: number): Promise<SDVXScore[]>;
|
|
14
|
+
}
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
import { Context } from 'koishi';
|
|
2
|
+
import { GameService } from '../../../types';
|
|
3
|
+
import { SDVXConfig } from './config';
|
|
4
|
+
export { SDVXConfig };
|
|
5
|
+
/**
|
|
6
|
+
* Sound Voltex (SDVX) 游戏服务接口
|
|
7
|
+
* 扩展基础游戏服务接口,添加 SDVX 特定的功能
|
|
8
|
+
*/
|
|
9
|
+
export interface SDVXService extends GameService {
|
|
10
|
+
getAllScore(ctx: Context, url: string, cardId: string, config: SDVXConfig): Promise<SDVXScore[]>;
|
|
11
|
+
getScore(ctx: Context, url: string, cardId: string, musicId: number, config: SDVXConfig): Promise<SDVXScore>;
|
|
12
|
+
getRecentScores(ctx: Context, url: string, cardId: string, config?: SDVXConfig, count?: number): Promise<SDVXScore[]>;
|
|
13
|
+
getUserName(ctx: Context, url: string, cardId: string): Promise<string>;
|
|
14
|
+
verifyPin?(ctx: Context, url: string, cardId: string, pin: string): Promise<boolean>;
|
|
15
|
+
uploadScore?(ctx: Context, url: string, cardId: string, scores: SDVXScore[]): Promise<boolean>;
|
|
16
|
+
}
|
|
1
17
|
/**
|
|
2
18
|
* SDVX 用户档案接口
|
|
3
19
|
*/
|