feat(falukant): Erweiterung der Falukant-Typen und Implementierung von Power-Up-Animationen
- Hinzufügen des neuen Typs PoliticalOfficeBenefitType zur Initialisierung von politischen Amtsvorteilen. - Implementierung der Methode initializePoliticalOfficeBenefitTypes zur Verwaltung dieser neuen Typen. - Anpassungen an der Match3Game-Komponente zur Unterstützung von Power-Up-Animationen, einschließlich Explosionseffekten, Raketenflügen und Regenbogenanimationen. - Verbesserung der Benutzeroberfläche durch neue Animationen und visuelle Effekte für spezielle Items im Spiel.
This commit is contained in:
@@ -14,6 +14,7 @@ import MusicType from "../../models/falukant/type/music.js";
|
|||||||
import BanquetteType from "../../models/falukant/type/banquette.js";
|
import BanquetteType from "../../models/falukant/type/banquette.js";
|
||||||
import LearnRecipient from "../../models/falukant/type/learn_recipient.js";
|
import LearnRecipient from "../../models/falukant/type/learn_recipient.js";
|
||||||
import PoliticalOfficeType from "../../models/falukant/type/political_office_type.js";
|
import PoliticalOfficeType from "../../models/falukant/type/political_office_type.js";
|
||||||
|
import PoliticalOfficeBenefitType from "../../models/falukant/type/political_office_benefit_type.js";
|
||||||
import PoliticalOfficePrerequisite from "../../models/falukant/predefine/political_office_prerequisite.js";
|
import PoliticalOfficePrerequisite from "../../models/falukant/predefine/political_office_prerequisite.js";
|
||||||
import UndergroundType from "../../models/falukant/type/underground.js";
|
import UndergroundType from "../../models/falukant/type/underground.js";
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ export const initializeFalukantTypes = async () => {
|
|||||||
await initializeFalukantMusicTypes();
|
await initializeFalukantMusicTypes();
|
||||||
await initializeFalukantBanquetteTypes();
|
await initializeFalukantBanquetteTypes();
|
||||||
await initializeLearnerTypes();
|
await initializeLearnerTypes();
|
||||||
|
await initializePoliticalOfficeBenefitTypes();
|
||||||
await initializePoliticalOfficeTypes();
|
await initializePoliticalOfficeTypes();
|
||||||
await initializePoliticalOfficePrerequisites();
|
await initializePoliticalOfficePrerequisites();
|
||||||
await initializeUndergroundTypes();
|
await initializeUndergroundTypes();
|
||||||
@@ -267,6 +269,17 @@ const learnerTypes = [
|
|||||||
{ tr: 'director', },
|
{ tr: 'director', },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const politicalOfficeBenefitTypes = [
|
||||||
|
{ tr: 'salary' },
|
||||||
|
{ tr: 'reputation' },
|
||||||
|
{ tr: 'influence' },
|
||||||
|
{ tr: 'access_level' },
|
||||||
|
{ tr: 'housing_allowance' },
|
||||||
|
{ tr: 'tax_exemption' },
|
||||||
|
{ tr: 'guard_protection' },
|
||||||
|
{ tr: 'court_immunity' },
|
||||||
|
];
|
||||||
|
|
||||||
const politicalOffices = [
|
const politicalOffices = [
|
||||||
{ tr: "assessor", seatsPerRegion: 10, regionType: "city", termLength: 5 },
|
{ tr: "assessor", seatsPerRegion: 10, regionType: "city", termLength: 5 },
|
||||||
{ tr: "councillor", seatsPerRegion: 7, regionType: "city", termLength: 7 },
|
{ tr: "councillor", seatsPerRegion: 7, regionType: "city", termLength: 7 },
|
||||||
@@ -847,7 +860,16 @@ export const initializeLearnerTypes = async () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
export const initializePoliticalOfficeBenefitTypes = async () => {
|
||||||
|
for (const benefitType of politicalOfficeBenefitTypes) {
|
||||||
|
await PoliticalOfficeBenefitType.findOrCreate({
|
||||||
|
where: { tr: benefitType.tr },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(`[Falukant] PoliticalOfficeBenefitTypes initialisiert: ${politicalOfficeBenefitTypes.length} Typen`);
|
||||||
|
};
|
||||||
|
|
||||||
export const initializePoliticalOfficeTypes = async () => {
|
export const initializePoliticalOfficeTypes = async () => {
|
||||||
for (const po of politicalOffices) {
|
for (const po of politicalOffices) {
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ const store = createStore({
|
|||||||
const daemonSocket = new WebSocket(import.meta.env.VITE_DAEMON_SOCKET);
|
const daemonSocket = new WebSocket(import.meta.env.VITE_DAEMON_SOCKET);
|
||||||
|
|
||||||
daemonSocket.onopen = () => {
|
daemonSocket.onopen = () => {
|
||||||
console.log('Daemon WebSocket connected');
|
|
||||||
const payload = JSON.stringify({
|
const payload = JSON.stringify({
|
||||||
event: 'setUserId',
|
event: 'setUserId',
|
||||||
data: { userId: state.user.id }
|
data: { userId: state.user.id }
|
||||||
|
|||||||
@@ -10,15 +10,10 @@ const apiClient = axios.create({
|
|||||||
|
|
||||||
apiClient.interceptors.request.use(config => {
|
apiClient.interceptors.request.use(config => {
|
||||||
const user = store.getters.user;
|
const user = store.getters.user;
|
||||||
console.log('🔑 Axios Interceptor - User:', user);
|
|
||||||
|
|
||||||
if (user && user.authCode) {
|
if (user && user.authCode) {
|
||||||
config.headers['userid'] = user.id;
|
config.headers['userid'] = user.id;
|
||||||
config.headers['authcode'] = user.authCode; // Kleinschreibung!
|
config.headers['authcode'] = user.authCode; // Kleinschreibung!
|
||||||
console.log('📡 Setze Headers:', {
|
|
||||||
userid: user.id,
|
|
||||||
authcode: user.authCode
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
console.log('⚠️ Keine User-Daten verfügbar');
|
console.log('⚠️ Keine User-Daten verfügbar');
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user