refac: ResouceController 자원 관리 방식 변경

This commit is contained in:
2024-03-09 05:02:16 +00:00
parent 94becec429
commit e965ed9816
+6 -5
View File
@@ -44,18 +44,19 @@ export interface IResourceController{
getTroop(id: TroopID, nation: NationID): Troop | undefined;
_getAllChanges(): Map<`${ValidEntityType<any>}_${number}`, LazyEntityUpdater<any>>;
_getAllChanges(): Map<`${ValidEntityType<any>}_${number}`, ['new'|'update'|'delete', LazyEntityUpdater<any>]>;
setDirty(entity: LazyEntityUpdater<any>): void;
reserveDelete(entity: LazyEntityUpdater<any>): void;
//TODO: create* 방식과 구현 방식 비교
reserveNew(entity: LazyEntityUpdater<any>): void;
//TODO: reserveNew와 구현 방식 비교
createGeneral(raw: IGeneralEntity): General;
createNation(raw: INationEntity): Nation;
createTroop(raw: ITroopEntity): Troop;
reserveDeleteTroop(id: TroopID): void;
reserveDeleteGeneral(id: GeneralID): void;
reserveDeleteNation(id: NationID): void;
resetAndFill(): Promise<void>;
saveAll(): Promise<void>;
}