fix: 감찰부 도시 관직명 누락
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import type { GameConstStore } from "@/GameConstStore";
|
||||
|
||||
interface WithCityID {
|
||||
city: number;
|
||||
}
|
||||
|
||||
export function formatCityName(target: number | WithCityID, gameConst: GameConstStore): string {
|
||||
const cityID = typeof target === "number" ? target : target.city;
|
||||
const city = gameConst.cityConst[cityID];
|
||||
if (city === undefined) {
|
||||
throw `City ${cityID} not found`;
|
||||
}
|
||||
return city.name;
|
||||
}
|
||||
Reference in New Issue
Block a user