diff --git a/@sammo/game_logic/src/ResourceController.ts b/@sammo/game_logic/src/ResourceController.ts index 65cc243..67ccf68 100644 --- a/@sammo/game_logic/src/ResourceController.ts +++ b/@sammo/game_logic/src/ResourceController.ts @@ -44,18 +44,19 @@ export interface IResourceController{ getTroop(id: TroopID, nation: NationID): Troop | undefined; - _getAllChanges(): Map<`${ValidEntityType}_${number}`, LazyEntityUpdater>; + _getAllChanges(): Map<`${ValidEntityType}_${number}`, ['new'|'update'|'delete', LazyEntityUpdater]>; setDirty(entity: LazyEntityUpdater): void; + reserveDelete(entity: LazyEntityUpdater): void; + //TODO: create* 방식과 구현 방식 비교 + reserveNew(entity: LazyEntityUpdater): 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; saveAll(): Promise; }