Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { resolveMessageTargetIcon } from '@sammo-ts/logic';
|
||||
import { randomUUID } from 'node:crypto';
|
||||
|
||||
import { createGamePostgresConnector, GamePrisma, type GamePrismaClient } from '@sammo-ts/infra';
|
||||
@@ -106,7 +107,7 @@ export const buildAuctionOutbidRefundMessage = (options: {
|
||||
nationId: options.bidder.nationId,
|
||||
nationName: options.nation?.name ?? '재야',
|
||||
color: options.nation?.color ?? '#000000',
|
||||
icon: options.bidder.picture ?? '',
|
||||
icon: resolveMessageTargetIcon(options.bidder),
|
||||
},
|
||||
text: `${options.auctionId}번 ${options.title ?? '경매'}에 상회입찰자가 나타났습니다.`,
|
||||
time: new Date(options.time.getTime()),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveMessageTargetIcon } from '@sammo-ts/logic';
|
||||
import { createGamePostgresConnector, GamePrisma } from '@sammo-ts/infra';
|
||||
import { ActionLogger, ItemLoader, LogFormat, isItemKey, type MessageDraft } from '@sammo-ts/logic';
|
||||
import { resolveLegacyCompatibleUniqueConfig } from '@sammo-ts/logic/rewards/legacyUniqueItemPool.js';
|
||||
@@ -124,7 +125,7 @@ export const buildAuctionBidderSystemMessage = (options: {
|
||||
nationId: options.bidder.nationId,
|
||||
nationName: options.nation?.name ?? '재야',
|
||||
color: options.nation?.color ?? '#000000',
|
||||
icon: options.bidder.picture ?? '',
|
||||
icon: resolveMessageTargetIcon(options.bidder),
|
||||
},
|
||||
text: options.text,
|
||||
time: new Date(options.time.getTime()),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveMessageTargetIcon } from '@sammo-ts/logic';
|
||||
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic';
|
||||
|
||||
import type { InMemoryTurnWorld } from './inMemoryWorld.js';
|
||||
@@ -127,7 +128,7 @@ export const createOpenNationBettingHandler = (options: {
|
||||
nationId: general.nationId,
|
||||
nationName: nation?.name ?? '재야',
|
||||
color: nation?.color ?? '#000000',
|
||||
icon: general.picture ?? '',
|
||||
icon: resolveMessageTargetIcon(general),
|
||||
},
|
||||
text,
|
||||
time: now,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveMessageTargetIcon } from '@sammo-ts/logic';
|
||||
import type {
|
||||
ActionContextBase,
|
||||
ActionContextBuilder,
|
||||
@@ -2121,7 +2122,7 @@ export const createReservedTurnHandler = async (options: {
|
||||
nationId: currentGeneral.nationId,
|
||||
nationName: currentNation?.name ?? '재야',
|
||||
color: currentNation?.color ?? '#000000',
|
||||
icon: currentGeneral.picture ?? '',
|
||||
icon: resolveMessageTargetIcon(currentGeneral),
|
||||
};
|
||||
messages.push({
|
||||
msgType: 'public',
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveMessageTargetIcon } from '@sammo-ts/logic';
|
||||
import { createHash } from 'node:crypto';
|
||||
|
||||
import { asNumber, asRecord, JosaUtil } from '@sammo-ts/common';
|
||||
@@ -156,7 +157,7 @@ export const createUnificationHandler = (options: {
|
||||
nationId: winner.id,
|
||||
nationName: winner.name,
|
||||
color: winner.color,
|
||||
icon: recipient.picture ?? '',
|
||||
icon: resolveMessageTargetIcon(recipient),
|
||||
},
|
||||
text: `이벤트 게임으로 이민족[${invader.difficulty}]을 소환`,
|
||||
time: context.turnTime,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveMessageTargetIcon } from '@sammo-ts/logic';
|
||||
import { areSeasonRecordsFinalized } from './seasonRecords.js';
|
||||
import { asRecord, HALL_OF_FAME_TYPES, resolveLegacyTextColor, type HallOfFameType } from '@sammo-ts/common';
|
||||
import {
|
||||
@@ -246,7 +247,7 @@ const cancelPendingUniqueAuctions = async (
|
||||
nationId: bidder.nationId,
|
||||
nationName: nation?.name ?? '재야',
|
||||
color: nation?.color ?? '#000000',
|
||||
icon: bidder.picture ?? '',
|
||||
icon: resolveMessageTargetIcon(bidder),
|
||||
},
|
||||
text: `${planned.auctionId}번 ${planned.title}가 취소되었습니다.`,
|
||||
time: input.completedAt,
|
||||
|
||||
@@ -105,6 +105,8 @@ describe('NPC 일반 내정 턴', () => {
|
||||
{
|
||||
id: 1,
|
||||
name: 'NPC_무장',
|
||||
picture: '롤시나리오/다이애나.png',
|
||||
imageServer: 0,
|
||||
nationId: 1,
|
||||
cityId: 1,
|
||||
troopId: 0,
|
||||
@@ -297,7 +299,12 @@ describe('NPC 일반 내정 턴', () => {
|
||||
expect.objectContaining({
|
||||
msgType: 'public',
|
||||
text: '기부는 저처럼 돈 많은 사람들이 많이 하면 됩니다',
|
||||
src: expect.objectContaining({ generalId: 1, generalName: 'NPC_무장', nationId: 1 }),
|
||||
src: expect.objectContaining({
|
||||
generalId: 1,
|
||||
generalName: 'NPC_무장',
|
||||
nationId: 1,
|
||||
icon: 'https://sam-image.hided.net/icons/롤시나리오/다이애나.png',
|
||||
}),
|
||||
time: logicalGameNow,
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user