Änderung: Hinzufügung der Haus-Logik zur Taxi-Map

Änderungen:
- Integration des neuen Modells TaxiMapTileHouse zur Verwaltung von Häusern auf der Karte.
- Anpassung der TaxiMap- und TaxiMapService-Logik zur Unterstützung der Hausplatzierung und -verwaltung.
- Erweiterung der Benutzeroberfläche in TaxiToolsView.vue zur Erfassung und Anzeige von Hausinformationen.
- Implementierung von Methoden zur Speicherung und Aktualisierung von Hausdaten in der Datenbank.

Diese Anpassungen verbessern die Funktionalität und Benutzererfahrung im Taxi-Minispiel, indem sie eine detaillierte Verwaltung von Häusern auf der Karte ermöglichen.
This commit is contained in:
Torsten Schulz (local)
2025-09-18 14:27:14 +02:00
parent ab8e12cbcd
commit 7207274ab5
8 changed files with 290 additions and 13 deletions

View File

@@ -5,5 +5,6 @@ import TaxiMap from './taxiMap.js';
import TaxiMapTile from './taxiMapTile.js';
import TaxiStreetName from './taxiStreetName.js';
import TaxiMapTileStreet from './taxiMapTileStreet.js';
import TaxiMapTileHouse from './taxiMapTileHouse.js';
export { TaxiGameState, TaxiLevelStats, TaxiMapType, TaxiMap, TaxiMapTile, TaxiStreetName, TaxiMapTileStreet };
export { TaxiGameState, TaxiLevelStats, TaxiMapType, TaxiMap, TaxiMapTile, TaxiStreetName, TaxiMapTileStreet, TaxiMapTileHouse };

View File

@@ -0,0 +1,56 @@
import { DataTypes } from 'sequelize';
import { sequelize } from '../../utils/sequelize.js';
const TaxiMapTileHouse = sequelize.define('TaxiMapTileHouse', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
mapId: {
type: DataTypes.INTEGER,
allowNull: false,
},
x: {
type: DataTypes.INTEGER,
allowNull: false,
comment: 'X-coordinate of the tile within the map'
},
y: {
type: DataTypes.INTEGER,
allowNull: false,
comment: 'Y-coordinate of the tile within the map'
},
corner: {
type: DataTypes.ENUM('lo', 'ro', 'lu', 'ru'),
allowNull: false,
comment: 'Corner position: lo, ro, lu, ru'
},
rotation: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 0,
comment: 'Rotation in degrees: 0, 90, 180, 270'
}
}, {
tableName: 'taxi_map_tile_house',
schema: 'taxi',
timestamps: true,
underscored: true,
indexes: [
{
unique: true,
fields: ['map_id', 'x', 'y', 'corner']
},
{
fields: ['map_id']
},
{
fields: ['x', 'y']
}
]
});
export default TaxiMapTileHouse;