This commit is contained in:
Bastian Wagner
2026-08-22 16:41:47 +02:00
parent dfa62fd152
commit 081c9f83f9
137 changed files with 11594 additions and 1302 deletions

View File

@@ -46,6 +46,13 @@ export interface LocationPointOfInterestContent {
enabled: boolean;
resultTitle?: string;
resultText?: string;
/**
* Names a real NPC (NPC spec §24), which turns this hotspot into a doorway
* to that person's screen instead of an authored one-shot text reveal. A
* hotspot may carry result text or an `npcKey`, never both -- the wounded
* scout on the Burned Road stays a piece of scenery, Borin does not.
*/
npcKey?: string;
}
/**
@@ -61,6 +68,7 @@ export interface LocationPrimaryActionContent {
iconKey: string;
enabled: boolean;
poiKey?: string;
npcKey?: string;
}
export interface LocationRewardPreviewContent {
@@ -78,6 +86,7 @@ export interface LocalLocationPointOfInterestDto {
xPercent: number;
yPercent: number;
enabled: boolean;
npcKey?: string;
}
export interface LocalLocationPrimaryActionDto {
@@ -88,6 +97,7 @@ export interface LocalLocationPrimaryActionDto {
iconKey: string;
enabled: boolean;
poiKey?: string;
npcKey?: string;
}
export interface EncounterPreviewDto {
@@ -122,5 +132,6 @@ export function toPointOfInterestDto(
xPercent: poi.xPercent,
yPercent: poi.yPercent,
enabled: poi.enabled,
...(poi.npcKey === undefined ? {} : { npcKey: poi.npcKey }),
};
}

View File

@@ -130,8 +130,7 @@ function currentLocation(): LocationDefinition {
id: SOUTH_GATE_ID,
key: 'south-gate',
name: 'Graufurt South Gate',
description:
'The South Gate is the safe starting point heading south.',
description: 'The South Gate is the safe starting point heading south.',
regionKey: 'ashen-fields',
minRecommendedLevel: 1,
maxRecommendedLevel: 1,
@@ -245,8 +244,7 @@ describe('WorldService', () => {
id: SOUTH_GATE_ID,
key: 'south-gate',
name: 'Graufurt South Gate',
description:
'The South Gate is the safe starting point heading south.',
description: 'The South Gate is the safe starting point heading south.',
regionKey: 'ashen-fields',
minRecommendedLevel: 1,
maxRecommendedLevel: 1,
@@ -324,10 +322,7 @@ describe('WorldService', () => {
const result = await service.getCurrentLocation(CHARACTER_ID);
expect(result.possibleMonsters).toEqual([
'Ash Rat',
'Road Bandit',
]);
expect(result.possibleMonsters).toEqual(['Ash Rat', 'Road Bandit']);
expect(findLocationMonsters).toHaveBeenCalledWith({
where: { locationId: BURNED_ROAD_ID, enabled: true },
relations: { monster: true },