dodatki
This commit is contained in:
@@ -88,9 +88,20 @@ class NPC {
|
||||
if (this.scene.textures.exists(this.type)) {
|
||||
texKey = this.type;
|
||||
} else {
|
||||
console.warn(`Texture for ${this.type} not found, generating fallback.`);
|
||||
// Fallback generation triggers for known types if missing?
|
||||
// We already generated them in TextureGenerator.generateAll()
|
||||
console.warn(`Texture for ${this.type} not found, generating procedural...`);
|
||||
// Generate procedural texture as fallback
|
||||
if (this.type === 'cow' || this.type === 'cow_mutant') {
|
||||
TextureGenerator.createCowSprite(this.scene, this.type, this.type.includes('mutant'));
|
||||
} else if (this.type === 'chicken') {
|
||||
TextureGenerator.createChickenSprite(this.scene, this.type, false);
|
||||
} else if (this.type === 'troll') {
|
||||
TextureGenerator.createTrollSprite(this.scene, this.type);
|
||||
} else if (this.type === 'elf') {
|
||||
TextureGenerator.createElfSprite(this.scene, this.type);
|
||||
} else if (this.type === 'villager') {
|
||||
TextureGenerator.createVillagerSprite(this.scene, this.type);
|
||||
}
|
||||
texKey = this.type; // Use type directly after generation
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user