feat: complete Style 32 overhaul & Tiled integration fix
- Enforced 'Style 32 - Dark Chibi Vector' for all ground assets. - Fixed critical Prologue-to-Game crash (function renaming). - Implemented Tiled JSON/TMX auto-conversion. - Updated Asset Manager to visualize 1800+ assets. - Cleaned up project structure (new assets/grounds folder). - Auto-Ground logic added to GameScene.js.
This commit is contained in:
@@ -434,6 +434,43 @@ class LocalizationSystem {
|
||||
};
|
||||
return names[code] || code;
|
||||
}
|
||||
/**
|
||||
* INJECT EXTERNAL JSON DATA (loaded via Phaser)
|
||||
*/
|
||||
setExternalData(data) {
|
||||
try {
|
||||
// Merge intro texts into translations
|
||||
for (const lang in data) {
|
||||
if (!this.translations[lang]) {
|
||||
this.translations[lang] = {};
|
||||
}
|
||||
|
||||
// Add intro polaroid texts
|
||||
if (data[lang].intro_polaroids) {
|
||||
this.translations[lang].intro_polaroids = data[lang].intro_polaroids;
|
||||
}
|
||||
|
||||
// Add menu texts
|
||||
if (data[lang].menu) {
|
||||
Object.assign(this.translations[lang], data[lang].menu);
|
||||
}
|
||||
|
||||
// Add title/subtitle
|
||||
if (data[lang].game_title) {
|
||||
this.translations[lang].game_title = data[lang].game_title;
|
||||
}
|
||||
if (data[lang].subtitle) {
|
||||
this.translations[lang].subtitle = data[lang].subtitle;
|
||||
}
|
||||
}
|
||||
|
||||
console.log('✅ Localization data injected successfully');
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.warn('⚠️ Could not inject localization data:', error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Global instance
|
||||
|
||||
Reference in New Issue
Block a user