refac: 경로 변경
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { ICityEntity } from "./CityEntity.js";
|
||||
import type { ICityEntity } from "./Entity/CityEntity.js";
|
||||
import { LazyEntityUpdater } from "./LazyEntityUpdater.js";
|
||||
import type { IResourceController } from "./ResourceController.js";
|
||||
import type { CityID } from "./defs.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { CityID, CityName, NationID } from "./defs.js";
|
||||
import type { CityID, CityName, NationID } from "../defs.js";
|
||||
|
||||
export interface ICityEntity{
|
||||
id: CityID;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DiplomaticPermission, GeneralID, GeneralName, ItemID, ItemKeyType, NationID, NpcType, OfficerLevel, OwnerID, OwnerName, PersonalityType, SpecialityDomesticType, SpecialityWarType, TroopID } from "./defs.js";
|
||||
import type { DiplomaticPermission, GeneralID, GeneralName, ItemID, ItemKeyType, NationID, NpcType, OfficerLevel, OwnerID, OwnerName, PersonalityType, SpecialityDomesticType, SpecialityWarType, TroopID } from "../defs.js";
|
||||
|
||||
export interface IGeneralEntity {
|
||||
id: GeneralID;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { CityID, NationID, NationName, NationType } from "./defs.js";
|
||||
import type { CityID, NationID, NationName, NationType } from "../defs.js";
|
||||
|
||||
export interface INationEntity{
|
||||
id: NationID;
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { NationID, TroopID } from "./defs.js";
|
||||
import type { NationID, TroopID } from "../defs.js";
|
||||
|
||||
export interface ITroopEntity {
|
||||
id: TroopID;
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { ValuesOf } from '@sammo/util';
|
||||
import type { ICityEntity } from './CityEntity.js';
|
||||
import type { IGeneralEntity } from './GeneralEntity.js';
|
||||
import type { INationEntity } from './NationEntity.js';
|
||||
import type { ITroopEntity } from './TroopEntity.js';
|
||||
|
||||
export type { IGeneralEntity } from './GeneralEntity.js';
|
||||
export type { ICityEntity } from './CityEntity.js';
|
||||
export type { ITroopEntity } from './TroopEntity.js';
|
||||
export type { INationEntity } from './NationEntity.js';
|
||||
|
||||
|
||||
export type ValidEntityList = {
|
||||
'General': IGeneralEntity;
|
||||
'City': ICityEntity;
|
||||
'Nation': INationEntity;
|
||||
'Troop': ITroopEntity;
|
||||
};
|
||||
|
||||
export type ValidEntity = ValuesOf<ValidEntityList>;
|
||||
export type ValidEntityType<Entity> = Entity extends ValidEntityList[infer T extends keyof ValidEntityList] ? T : never;
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InvalidArgument } from "@sammo/util";
|
||||
import { City } from "./City.js";
|
||||
import type { IGeneralEntity } from "./GeneralEntity.js";
|
||||
import type { IGeneralEntity } from "./Entity/GeneralEntity.js";
|
||||
import type { IResourceController } from "./ResourceController.js";
|
||||
import { DiplomaticPermission, type CityID, type GeneralID, type GeneralName, type NationID, OfficerLevel, type TroopID } from "./defs.js";
|
||||
import { must } from "@sammo/util";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { IResourceController, ValidEntity, ValidEntityType } from "./ResourceController.js";
|
||||
import type { ValidEntity, ValidEntityType } from "./Entity/index.js";
|
||||
import type { IResourceController } from "./ResourceController.js";
|
||||
|
||||
export abstract class LazyEntityUpdater<Entity extends ValidEntity>{
|
||||
protected abstract readonly _indirectNames: ReadonlyArray<keyof Entity>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { LazyEntityUpdater } from "./LazyEntityUpdater.js";
|
||||
import type { INationEntity } from "./NationEntity.js";
|
||||
import type { INationEntity } from "./Entity/NationEntity.js";
|
||||
import type { IResourceController } from "./ResourceController.js";
|
||||
import type { NationID, NationName } from "./defs.js";
|
||||
|
||||
|
||||
@@ -3,23 +3,14 @@ import type { City } from "./City.js";
|
||||
import type { Nation } from "./Nation.js";
|
||||
import type { CityID, GeneralID, NationID, TroopID } from "./defs.js";
|
||||
import type { GameEnv } from "./GameEnv.js";
|
||||
import type { IGeneralEntity } from "./GeneralEntity.js";
|
||||
import type { IGeneralEntity } from "./Entity/GeneralEntity.js";
|
||||
import type { Troop } from "./Troop.js";
|
||||
import type { ITroopEntity } from "./TroopEntity.js";
|
||||
import type { ITroopEntity } from "./Entity/TroopEntity.js";
|
||||
import type { LazyEntityUpdater } from "./LazyEntityUpdater.js";
|
||||
import type { ICityEntity } from "./CityEntity.js";
|
||||
import type { INationEntity } from "./NationEntity.js";
|
||||
import type { ICityEntity } from "./Entity/CityEntity.js";
|
||||
import type { INationEntity } from "./Entity/NationEntity.js";
|
||||
import type { ValuesOf } from "@sammo/util";
|
||||
|
||||
export type ValidEntityList = {
|
||||
'General': IGeneralEntity;
|
||||
'City': ICityEntity;
|
||||
'Nation': INationEntity;
|
||||
'Troop': ITroopEntity;
|
||||
};
|
||||
|
||||
export type ValidEntity = ValuesOf<ValidEntityList>;
|
||||
export type ValidEntityType<Entity> = Entity extends ValidEntityList[infer T extends keyof ValidEntityList] ? T : never;
|
||||
import type { ValidEntityType } from "./Entity/index.js";
|
||||
|
||||
export interface IResourceController{
|
||||
addCity(city: City): boolean;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { must } from "@sammo/util";
|
||||
import type { General } from "./General.js";
|
||||
import type { IResourceController } from "./ResourceController.js";
|
||||
import type { ITroopEntity } from "./TroopEntity.js";
|
||||
import type { ITroopEntity } from "./Entity/TroopEntity.js";
|
||||
import type { GeneralID } from "./defs.js";
|
||||
import { LazyEntityUpdater } from "./LazyEntityUpdater.js";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user