refac: 값 정리

This commit is contained in:
2024-03-09 05:58:17 +00:00
parent 3ba5793755
commit 66c8261438
7 changed files with 104 additions and 9 deletions
+6
View File
@@ -7,6 +7,7 @@ import { must } from "@sammo/util";
import { Nation } from "./Nation.js";
import { Troop } from "./Troop.js";
import { LazyEntityUpdater } from "./LazyEntityUpdater.js";
import type { IAction, IActionKey } from "./IAction.js";
export class General extends LazyEntityUpdater<IGeneralEntity> {
protected readonly _indirectNames: (keyof IGeneralEntity)[] = ["id", "nationID", "troopID", "nationID"];
@@ -17,6 +18,8 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
protected _troop: WeakRef<Troop> | undefined;
protected _nation: WeakRef<Nation>;
protected readonly iActionHandlers: Map<IActionKey, IAction>;
constructor(
raw: IGeneralEntity,
protected readonly resourceController: IResourceController
@@ -29,6 +32,9 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
if(raw.troopID){
this._troop = new WeakRef(must(resourceController.troop(raw.troopID, raw.nationID)));
}
//TODO: iAction 처리해야함
this.iActionHandlers = new Map();
}
public get id(): GeneralID {