Änderung: Bereinigung und Optimierung der Taxi-Map-Logik
Änderungen: - Entfernen der Methode `getMapByPosition` aus dem `TaxiMapController` und der zugehörigen Logik im `TaxiMapService`, um die Komplexität zu reduzieren. - Anpassung der Datenbankmodelle für `TaxiMap`, `TaxiLevelStats` und `TaxiMapType`, um die Tabellennamen zu vereinheitlichen. - Aktualisierung der Routen im `taxiMapRouter`, um die entfernte Funktionalität zu reflektieren. - Hinzufügung von neuen Importen in `index.js`, um die neuen Modelle zu integrieren. - Verbesserung der Benutzeroberfläche durch neue Erfolgsmeldungen in den Übersetzungsdateien für die Admin-Oberfläche. Diese Anpassungen tragen zur Vereinfachung der Codebasis und zur Verbesserung der Benutzererfahrung im Taxi-Minispiel bei.
This commit is contained in:
@@ -97,6 +97,8 @@ import Match3UserLevelProgress from './match3/userLevelProgress.js';
|
||||
|
||||
// — Taxi Minigame —
|
||||
import { TaxiGameState, TaxiLevelStats } from './taxi/index.js';
|
||||
import TaxiMap from './taxi/taxiMap.js';
|
||||
import TaxiMapType from './taxi/taxiMapType.js';
|
||||
|
||||
// — Politische Ämter (Politics) —
|
||||
import PoliticalOfficeType from './falukant/type/political_office_type.js';
|
||||
@@ -237,6 +239,8 @@ const models = {
|
||||
// Taxi Minigame
|
||||
TaxiGameState,
|
||||
TaxiLevelStats,
|
||||
TaxiMap,
|
||||
TaxiMapType,
|
||||
};
|
||||
|
||||
export default models;
|
||||
|
||||
@@ -52,7 +52,7 @@ const TaxiGameState = sequelize.define('TaxiGameState', {
|
||||
defaultValue: DataTypes.NOW
|
||||
}
|
||||
}, {
|
||||
tableName: 'taxi_game_states',
|
||||
tableName: 'taxi_game_state',
|
||||
schema: 'taxi',
|
||||
timestamps: true,
|
||||
indexes: [
|
||||
|
||||
@@ -56,7 +56,7 @@ const TaxiLevelStats = sequelize.define('TaxiLevelStats', {
|
||||
defaultValue: DataTypes.NOW
|
||||
}
|
||||
}, {
|
||||
tableName: 'taxi_level_stats',
|
||||
tableName: 'taxi_level_stat',
|
||||
schema: 'taxi',
|
||||
timestamps: true,
|
||||
indexes: [
|
||||
|
||||
@@ -43,16 +43,6 @@ const TaxiMap = sequelize.define('TaxiMap', {
|
||||
allowNull: false,
|
||||
comment: '2D array of map type IDs for each tile position'
|
||||
},
|
||||
positionX: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
comment: 'X position as continuous integer (1, 2, 3, ...)'
|
||||
},
|
||||
positionY: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
comment: 'Y position as continuous integer (1, 2, 3, ...)'
|
||||
},
|
||||
isActive: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
@@ -75,7 +65,7 @@ const TaxiMap = sequelize.define('TaxiMap', {
|
||||
defaultValue: DataTypes.NOW
|
||||
}
|
||||
}, {
|
||||
tableName: 'taxi_maps',
|
||||
tableName: 'taxi_map',
|
||||
schema: 'taxi',
|
||||
timestamps: true,
|
||||
indexes: [
|
||||
@@ -88,13 +78,6 @@ const TaxiMap = sequelize.define('TaxiMap', {
|
||||
{
|
||||
fields: ['is_default']
|
||||
},
|
||||
{
|
||||
fields: ['position_x', 'position_y']
|
||||
},
|
||||
{
|
||||
unique: true,
|
||||
fields: ['position_x', 'position_y']
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ const TaxiMapType = sequelize.define('TaxiMapType', {
|
||||
defaultValue: DataTypes.NOW
|
||||
}
|
||||
}, {
|
||||
tableName: 'taxi_map_types',
|
||||
tableName: 'taxi_map_type',
|
||||
schema: 'taxi',
|
||||
timestamps: true,
|
||||
indexes: [
|
||||
|
||||
Reference in New Issue
Block a user