Files
Dimension-47/server/src/modules/battle/battle.module.ts
Alexander Zielonka 10370f0e90
Some checks failed
Deploy Dimension47 / deploy (push) Failing after 23s
feat: Add battle screen with real-time sync (Phase 1 MVP)
- Add battle module with sessions, maps, tokens, and combatants
- Implement WebSocket gateway for real-time battle updates
- Add map upload with configurable grid system
- Create battle canvas with token rendering and drag support
- Support PC tokens from characters and NPC tokens from templates
- Add initiative tracking and round management
- GM-only controls for token manipulation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:59:03 +01:00

52 lines
1.3 KiB
TypeScript

import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { MulterModule } from '@nestjs/platform-express';
import { memoryStorage } from 'multer';
// Controllers
import { BattleController } from './battle.controller';
import { BattleMapsController } from './battle-maps.controller';
import { CombatantsController } from './combatants.controller';
// Services
import { BattleService } from './battle.service';
import { BattleMapsService } from './battle-maps.service';
import { CombatantsService } from './combatants.service';
// Gateway
import { BattleGateway } from './battle.gateway';
@Module({
imports: [
JwtModule.registerAsync({
imports: [ConfigModule],
useFactory: async (configService: ConfigService) => ({
secret: configService.get<string>('JWT_SECRET'),
}),
inject: [ConfigService],
}),
MulterModule.register({
storage: memoryStorage(),
}),
],
controllers: [
BattleController,
BattleMapsController,
CombatantsController,
],
providers: [
BattleService,
BattleMapsService,
CombatantsService,
BattleGateway,
],
exports: [
BattleService,
BattleMapsService,
CombatantsService,
BattleGateway,
],
})
export class BattleModule {}