feat: integrate invitation access, world NPCs, and deployment

This commit is contained in:
2026-09-08 22:22:38 +08:00
parent 2a3125075f
commit 513a3eba31
75 changed files with 9566 additions and 1070 deletions

View File

@@ -269,8 +269,8 @@ export class CafeCompanionService implements OnModuleInit, OnModuleDestroy {
}
const assignedOccupant = this.getAssignedOccupant(dto.service_point_id);
if (assignedOccupant && assignedOccupant.occupant_type === 'hired_player') {
throw new BadRequestException('该陪伴位已经有玩家在打工');
if (assignedOccupant) {
throw new BadRequestException('该陪伴位已被占用,请选择其他空位');
}
const agentId = ['cafe_companion_agent', userKey, dto.service_point_id].join(':');
@@ -296,6 +296,12 @@ export class CafeCompanionService implements OnModuleInit, OnModuleDestroy {
await this.validateEmploymentAgent(agent);
// Agent validation calls an external service, so the point may have been
// taken while this request was waiting for the response.
if (this.getAssignedOccupant(dto.service_point_id)) {
throw new BadRequestException('该陪伴位已被占用,请选择其他空位');
}
const occupant: CafeCompanionOccupant = {
id: occupantId,
service_point_id: dto.service_point_id,