Complete Asset Audit JAN 12 2026 - 3477 images cataloged, new asset gallery with all images, DNEVNIK and GAME_BIBLE updated
This commit is contained in:
@@ -798,7 +798,8 @@ class GameScene extends Phaser.Scene {
|
||||
// this.waterRipples = new WaterRipplesSystem(this);
|
||||
|
||||
// 💡 LIGHTING & SHADOW SYSTEM
|
||||
console.log('💡 Initializing Lighting & Shadow System...');
|
||||
console.log('💡 Initializing Lighting & Shadow System... (DISABLED FOR DEBUG)');
|
||||
/*
|
||||
this.lightingSystem = new LightingSystem(this);
|
||||
|
||||
// Create player shadow
|
||||
@@ -806,6 +807,7 @@ class GameScene extends Phaser.Scene {
|
||||
this.lightingSystem.createShadow(this.player, 12, 30, 15);
|
||||
this.lightingSystem.createPlayerTorch(this.player); // Auto-torch at night
|
||||
}
|
||||
*/
|
||||
|
||||
// 🌬️ WEATHER ENHANCEMENTS SYSTEM
|
||||
console.log('🌬️ Initializing Weather Enhancements System...');
|
||||
@@ -965,8 +967,8 @@ class GameScene extends Phaser.Scene {
|
||||
this.visualEnhancements = new VisualEnhancementSystem(this);
|
||||
|
||||
// Initialize Fog of War System
|
||||
console.log('🌫️ Initializing Fog of War System...');
|
||||
this.fogOfWar = new FogOfWarSystem(this);
|
||||
console.log('🌫️ Initializing Fog of War System... (DISABLED FOR DEBUG)');
|
||||
// this.fogOfWar = new FogOfWarSystem(this);
|
||||
|
||||
// Initialize UI Graphics System
|
||||
console.log('🎨 Initializing UI Graphics System...');
|
||||
|
||||
@@ -258,15 +258,22 @@ class DialogueSystem {
|
||||
|
||||
this.dialogueText.setText('');
|
||||
|
||||
const timer = this.scene.time.addEvent({
|
||||
// Store reference to timer so we can clear it if needed
|
||||
this.typewriterTimer = this.scene.time.addEvent({
|
||||
delay: 30,
|
||||
callback: () => {
|
||||
// SAFETY CHECK: Ensure text object still exists
|
||||
if (!this.dialogueText || !this.dialogueText.active) {
|
||||
if (this.typewriterTimer) this.typewriterTimer.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (charIndex < text.length) {
|
||||
displayText += text[charIndex];
|
||||
this.dialogueText.setText(displayText);
|
||||
charIndex++;
|
||||
} else {
|
||||
timer.remove();
|
||||
if (this.typewriterTimer) this.typewriterTimer.remove();
|
||||
}
|
||||
},
|
||||
loop: true
|
||||
@@ -474,6 +481,12 @@ class DialogueSystem {
|
||||
endDialogue() {
|
||||
console.log('💬 Dialogue ended');
|
||||
|
||||
// Stop typewriter effect if running
|
||||
if (this.typewriterTimer) {
|
||||
this.typewriterTimer.remove();
|
||||
this.typewriterTimer = null;
|
||||
}
|
||||
|
||||
// Clean up UI
|
||||
if (this.dialogueContainer) {
|
||||
this.dialogueContainer.destroy();
|
||||
|
||||
@@ -135,21 +135,38 @@ class Flat2DTerrainSystem {
|
||||
if (tileset) {
|
||||
tilesets.push(tileset);
|
||||
console.log(` ✅ Tileset mapped: "${tilesetData.name}" -> Key: "${textureKey}"`);
|
||||
} else {
|
||||
console.warn(` ⚠️ Phaser returned null for tileset: "${tilesetData.name}"`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(` ❌ Failed to add tileset: ${tilesetData.name}`, e);
|
||||
}
|
||||
} else {
|
||||
console.warn(` ⚠️ Texture not found for tileset: "${tilesetData.name}". Tried keys: "tileset_${tilesetData.name}", "${tilesetData.name}"`);
|
||||
console.warn(` ⚠️ Texture not found for tileset: "${tilesetData.name}". Tried keys: "${textureKey}"`);
|
||||
// Fallback: try to load it now? Or use a placeholder?
|
||||
// If we don't add the tileset, GIDs might be confused if this tileset is used.
|
||||
// Try adding with 'tileset_Terrain_Grass' as emergency fallback just to see geometry
|
||||
/*
|
||||
const fallbackTileset = map.addTilesetImage(tilesetData.name, 'tileset_Terrain_Grass');
|
||||
if (fallbackTileset) tilesets.push(fallbackTileset);
|
||||
*/
|
||||
}
|
||||
});
|
||||
|
||||
// DEBUG: Check GIDs
|
||||
if (tilesets.length > 0) {
|
||||
console.log(' 🔍 Loaded Tilesets:', tilesets.map(t => ({ name: t.name, firstgid: t.firstgid })));
|
||||
}
|
||||
|
||||
// Create layers
|
||||
console.log(` Found ${map.layers.length} layers in map.`);
|
||||
map.layers.forEach((layerData, index) => {
|
||||
console.log(` Processing Layer ${index}: Name="${layerData.name}", Type="${layerData.type}", Visible=${layerData.visible}`);
|
||||
|
||||
if (layerData.visible && layerData.type === 'tilelayer') {
|
||||
// Phaser 3.50+ puts tile layers in map.layers. They might not have 'type' property set explicitly to 'tilelayer'.
|
||||
// If it's in map.layers, it IS a tile layer.
|
||||
if (layerData.visible) {
|
||||
// if (layerData.visible && (layerData.type === 'tilelayer' || layerData.type === undefined)) {
|
||||
const layer = map.createLayer(layerData.name, tilesets, 0, 0);
|
||||
if (layer) {
|
||||
console.log(` ✅ Layer created: ${layerData.name}`);
|
||||
|
||||
Reference in New Issue
Block a user