feat(game-ui): 세력일람에 총 병사를 표시
This commit is contained in:
@@ -96,6 +96,7 @@ export const getNationDirectory = authedProcedure.query(async ({ ctx }) => {
|
||||
npcState: true,
|
||||
nationId: true,
|
||||
cityId: true,
|
||||
crew: true,
|
||||
dedication: true,
|
||||
officerLevel: true,
|
||||
meta: true,
|
||||
@@ -182,6 +183,7 @@ export const getNationDirectory = authedProcedure.query(async ({ ctx }) => {
|
||||
capitalCityId: nation.capitalCityId ?? 0,
|
||||
rulerCityName: ruler ? (cityNameById.get(ruler.cityId) ?? null) : null,
|
||||
generalCount: readMetaNumber(nation.meta, 'gennum', nationGenerals.length),
|
||||
totalCrew: nationGenerals.reduce((sum, general) => sum + general.crew, 0),
|
||||
cityCount: nationCities.length,
|
||||
officers,
|
||||
ambassadorNames: secretPermissions
|
||||
|
||||
@@ -112,6 +112,7 @@ const directoryGeneral = (overrides: Record<string, unknown> = {}) => ({
|
||||
leadership: 70,
|
||||
strength: 60,
|
||||
intel: 50,
|
||||
crew: 100,
|
||||
experience: 1_000,
|
||||
meta: { killturn: 3 },
|
||||
penalty: {},
|
||||
@@ -303,6 +304,7 @@ describe('legacy global nation/general directories', () => {
|
||||
expect(result[1]).toMatchObject({
|
||||
id: 1,
|
||||
generalCount: 4,
|
||||
totalCrew: 400,
|
||||
cityCount: 1,
|
||||
ambassadorNames: ['군주', '외교관'],
|
||||
auditorCount: 1,
|
||||
@@ -312,7 +314,7 @@ describe('legacy global nation/general directories', () => {
|
||||
officerLevel: 12,
|
||||
general: { id: 10, name: '군주' },
|
||||
});
|
||||
expect(result[2]).toMatchObject({ name: '재 야', generalCount: 1, cityCount: 1 });
|
||||
expect(result[2]).toMatchObject({ name: '재 야', generalCount: 1, totalCrew: 100, cityCount: 1 });
|
||||
});
|
||||
|
||||
it('projects a level-zero nation location from its ruler city even when that city belongs to another nation', async () => {
|
||||
|
||||
Reference in New Issue
Block a user