빙의 군주의 외교권자 임명 권한을 복구

This commit is contained in:
2026-09-23 04:35:44 +00:00
parent 99a831b251
commit 7e9cde3592
5 changed files with 38 additions and 4 deletions
@@ -288,6 +288,12 @@ export const seedScenarioToDatabase = async (options: ScenarioSeedOptions): Prom
},
});
seed.cities = applyInitialChangeCityEvents(seed.cities, seed.initialEvents);
const seededRulerIds = new Map<number, number>();
for (const general of [...seed.generals].sort((left, right) => left.id - right.id)) {
if (general.officerLevel === 12 && !seededRulerIds.has(general.nationId)) {
seededRulerIds.set(general.nationId, general.id);
}
}
const connector = createGamePostgresConnector({ url: options.databaseUrl });
const generalGold = options.defaultGeneralGold ?? DEFAULT_GENERAL_GOLD;
@@ -556,6 +562,7 @@ export const seedScenarioToDatabase = async (options: ScenarioSeedOptions): Prom
name: nation.name,
color: nation.color,
capitalCityId: nation.capitalCityId ?? null,
chiefGeneralId: seededRulerIds.get(nation.id) ?? null,
gold: nation.gold,
rice: nation.rice,
tech: nation.tech,
@@ -2144,7 +2144,7 @@ async function handleChangePermission(
};
}
const nation = world.getNationById(general.nationId);
if (!nation || general.officerLevel !== 12 || nation.chiefGeneralId !== general.id) {
if (!nation || general.officerLevel !== 12) {
return { type: 'changePermission', ok: false, generalId: command.generalId, reason: '군주가 아닙니다.' };
}