feat: wire HuntingController/HuntingModule and enrich current-location with monster pool

Registers HuntingModule (POST /api/hunts) into the DI graph alongside its
new entities, and adds possibleMonsters (enabled LocationMonster pool,
weight-descending, empty when hunting is disabled) to
WorldService.getCurrentLocation. Also updates the pre-existing
DB-less app.e2e-spec.ts to override HuntingModule the same way the other
feature modules already are, since it now needs a real DataSource.
This commit is contained in:
Bastian Wagner
2026-08-19 12:53:09 +02:00
parent 568478dcd2
commit bb307da0ff
9 changed files with 341 additions and 59 deletions

View File

@@ -0,0 +1,13 @@
import { Controller, Post } from '@nestjs/common';
import { DEMO_CHARACTER_ID } from '../demo/demo-character.constants';
import { HuntResultDto, HuntingService } from './hunting.service';
@Controller('hunts')
export class HuntingController {
constructor(private readonly huntingService: HuntingService) {}
@Post()
startHunt(): Promise<HuntResultDto> {
return this.huntingService.startHunt(DEMO_CHARACTER_ID);
}
}