Files
core_ng/@sammo/game_logic/src/City.ts
T
2024-03-09 05:09:54 +00:00

22 lines
683 B
TypeScript

import type { ICityEntity } from "./Entity/CityEntity.js";
import { LazyEntityUpdater } from "./LazyEntityUpdater.js";
import type { IResourceController } from "./ResourceController.js";
import type { CityID } from "./defs.js";
export class City extends LazyEntityUpdater<ICityEntity>{
protected readonly _indirectNames: (keyof ICityEntity)[] = ["id", "nationID"];
protected readonly _entityType = "City";
protected readonly _raw: ICityEntity;
constructor(
raw: ICityEntity,
protected readonly resourceController: IResourceController
){
super();
this._raw = raw;
}
get id(): CityID {
return this._raw.id;
}
}