ReservedTurn

This commit is contained in:
2024-03-11 14:28:13 +00:00
parent 2266cad0f8
commit e6f6798f34
7 changed files with 26 additions and 33 deletions
@@ -0,0 +1,6 @@
import type { GeneralID, ReservedTurn } from "@/defs.js";
export interface IGeneralReservedTurn {
generalID: GeneralID;
turn: ReservedTurn[];
}
-10
View File
@@ -1,10 +0,0 @@
import type { GeneralID } from "@/defs.js";
export interface IGeneralTurn {
generalID: GeneralID;
turn: {
action: string;
arg?: Record<string, unknown>;
brief: string;
}[];
}
@@ -0,0 +1,10 @@
import type { ReservedTurn, StaffLevel } from "@/defs.js";
export interface INationReservedTurn {
_id: string;
nationID: string;
officerLevel: StaffLevel,
turn: ReservedTurn[];
}
-14
View File
@@ -1,14 +0,0 @@
import type { StaffLevel } from "@/defs.js";
export interface INationTurn {
_id: string;
nationID: string;
officerLevel: StaffLevel,
turn: {
action: string;
arg?: Record<string, unknown>;
brief: string;
}[];
}
@@ -1,4 +0,0 @@
export interface IReservedTurn {
action: string;
arg: Record<string, unknown>;
}
+3 -4
View File
@@ -1,7 +1,7 @@
import type { General } from "./General.js";
import type { City } from "./City.js";
import type { Nation } from "./Nation.js";
import type { CityID, GeneralID, NationID, TroopID } from "./defs.js";
import type { CityID, GeneralID, NationID, ReservedTurn, TroopID } from "./defs.js";
import type { GameEnv } from "./GameEnv.js";
import type { IGeneralEntity } from "./Entity/GeneralEntity.js";
import type { Troop } from "./Troop.js";
@@ -10,7 +10,6 @@ import type { LazyEntityUpdater } from "./LazyEntityUpdater.js";
import type { ICityEntity } from "./Entity/CityEntity.js";
import type { INationEntity } from "./Entity/NationEntity.js";
import type { EntityType, ValidEntityType } from "./Entity/index.js";
import type { IReservedTurn } from "./Entity/ReservedTurn.js";
export interface IResourceController {
@@ -61,8 +60,8 @@ export interface IResourceController {
//---- DB 접근 ---
//예턴은 호출마다 DB에서 조회
getReservedTurn(general: General): Promise<IReservedTurn>;
nationReservedTurn(general: General): Promise<IReservedTurn | undefined>;
getReservedTurn(general: General): Promise<ReservedTurn>;
nationReservedTurn(general: General): Promise<ReservedTurn | undefined>;
resetAndFill(): Promise<void>;
saveAll(): Promise<void>;
+7 -1
View File
@@ -221,4 +221,10 @@ export interface WarSkillNameBase {
회피불가: unknown;
회피: unknown;
}
export type WarSkillName = keyof WarSkillNameBase;
export type WarSkillName = keyof WarSkillNameBase;
export interface ReservedTurn {
action: string;
arg: Record<string, unknown>;
brief: string;
}