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

@@ -50,11 +50,11 @@ export class LocationPageComponent implements OnInit {
}
protected activatePoi(poi: LocationPointOfInterest): void {
this.dispatch(poi.type, poi.key);
this.dispatch(poi.type, poi.key, poi.npcKey);
}
protected activateAction(action: LocationPrimaryAction): void {
this.dispatch(action.type, action.poiKey ?? action.key);
this.dispatch(action.type, action.poiKey ?? action.key, action.npcKey);
}
protected runtimeArtwork(artworkPath: string): string | undefined {
@@ -75,7 +75,11 @@ export class LocationPageComponent implements OnInit {
* for the screen that owns them; every other type asks the server what
* happened. Unimplemented types are ignored rather than faked.
*/
private dispatch(type: LocationInteractionType, interactionKey: string): void {
private dispatch(
type: LocationInteractionType,
interactionKey: string,
npcKey?: string,
): void {
switch (type) {
case 'HUNT':
void this.router.navigate(['/hunt']);
@@ -87,8 +91,20 @@ export class LocationPageComponent implements OnInit {
case 'INVESTIGATE':
case 'SEARCH':
case 'NPC':
// A hotspot that names an NPC opens that person's screen; one that
// does not is scenery with a line of authored text behind it, and
// still goes through the interaction endpoint.
if (npcKey) {
void this.router.navigate(['/npc', npcKey]);
return;
}
void this.store.runInteraction(interactionKey);
return;
case 'SHOP':
if (npcKey) {
void this.router.navigate(['/npc', npcKey]);
}
return;
default:
return;
}