Änderung: Hinzufügung des Taxi-Minispiels und zugehöriger Funktionen

Änderungen:
- Integration des Taxi-Minispiels mit neuen Routen und Komponenten im Backend und Frontend.
- Erstellung von Modellen und Datenbank-Schemas für das Taxi-Spiel, einschließlich TaxiGameState, TaxiLevelStats und TaxiMap.
- Erweiterung der Navigationsstruktur und der Benutzeroberfläche, um das Taxi-Spiel und die zugehörigen Tools zu unterstützen.
- Aktualisierung der Übersetzungen für das Taxi-Minispiel in Deutsch und Englisch.

Diese Anpassungen erweitern die Funktionalität der Anwendung um ein neues Minispiel und verbessern die Benutzererfahrung durch neue Features und Inhalte.
This commit is contained in:
Torsten Schulz (local)
2025-09-15 17:59:42 +02:00
parent 4699488ce1
commit f230849a5c
72 changed files with 7698 additions and 133 deletions

View File

@@ -102,6 +102,10 @@ import Match3Level from './match3/level.js';
import Objective from './match3/objective.js';
import UserProgress from './match3/userProgress.js';
import UserLevelProgress from './match3/userLevelProgress.js';
import TaxiGameState from './taxi/taxiGameState.js';
import TaxiLevelStats from './taxi/taxiLevelStats.js';
import TaxiMapType from './taxi/taxiMapType.js';
import TaxiMap from './taxi/taxiMap.js';
export default function setupAssociations() {
// RoomType 1:n Room
@@ -786,4 +790,15 @@ export default function setupAssociations() {
UserLevelProgress.belongsTo(UserProgress, { foreignKey: 'userProgressId', as: 'userProgress' });
Match3Level.hasMany(UserLevelProgress, { foreignKey: 'levelId', as: 'userLevelProgress' });
UserLevelProgress.belongsTo(Match3Level, { foreignKey: 'levelId', as: 'level' });
// Taxi Game associations
TaxiGameState.belongsTo(User, { foreignKey: 'userId', as: 'user' });
User.hasOne(TaxiGameState, { foreignKey: 'userId', as: 'taxiGameState' });
TaxiLevelStats.belongsTo(User, { foreignKey: 'userId', as: 'user' });
User.hasMany(TaxiLevelStats, { foreignKey: 'userId', as: 'taxiLevelStats' });
// Taxi Map associations
TaxiMap.belongsTo(TaxiMapType, { foreignKey: 'mapTypeId', as: 'mapType' });
TaxiMapType.hasMany(TaxiMap, { foreignKey: 'mapTypeId', as: 'maps' });
}