feat(mods): add battle.onFilterMissions hook and per-template bundled seeding
This commit is contained in:
1 parent
8636d0b71d
commit
5983e3f3e2
6 files changed
+127
-20
No files matched your search
@@ -54,8 +54,10 @@ export {
|
||||
export { mergeLocalizationCsv } from './csv-patch.ts';
|
||||
export { mergeTuningLayer, type TuningListOp } from './tuning-merge.ts';
|
||||
export type {
|
||||
BattleFilterMissionsContext,
|
||||
BattleLiveFactContext,
|
||||
BattleMatchmakeContext,
|
||||
BattleMissionCandidate,
|
||||
BattleSettlementContext,
|
||||
ModCharHandler,
|
||||
ModCharRequest,
|
||||
|
||||
@@ -73,6 +73,25 @@ export interface BattleMatchmakeContext {
|
||||
readonly request: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface BattleMissionCandidate {
|
||||
readonly name: string;
|
||||
readonly path: string;
|
||||
readonly level?: string;
|
||||
readonly type?: string;
|
||||
readonly locName?: string;
|
||||
readonly postfix?: string;
|
||||
}
|
||||
|
||||
export interface BattleFilterMissionsContext {
|
||||
readonly userId: string;
|
||||
readonly modeId: number;
|
||||
readonly modeName: string;
|
||||
readonly economicName: string;
|
||||
readonly minMrank: number;
|
||||
readonly maxMrank: number;
|
||||
readonly missions: readonly BattleMissionCandidate[];
|
||||
}
|
||||
|
||||
export interface BattleLiveFactContext {
|
||||
readonly userId: string;
|
||||
readonly roomId: string;
|
||||
@@ -146,6 +165,8 @@ export interface ServerModHooksApi {
|
||||
};
|
||||
readonly battle: {
|
||||
onBeforeMatchmake(handler: (ctx: BattleMatchmakeContext) => void): void;
|
||||
/** Filter or reorder candidate missions before matchmaking picks one; return the desired subset. */
|
||||
onFilterMissions(handler: (ctx: BattleFilterMissionsContext) => readonly BattleMissionCandidate[] | void): void;
|
||||
onLiveFact(handler: (ctx: BattleLiveFactContext) => void): void;
|
||||
onAfterSettle(handler: (ctx: BattleSettlementContext) => void): void;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user