Fixed getHostile.

This commit is contained in:
MaksSlyzar 2026-04-04 19:05:03 +03:00
parent f64a54c61b
commit 3af090fb0b

View File

@ -45,7 +45,6 @@ class GameDataManager {
if (!key) return "";
const langData = this.translations[this.currentLang];
if (!langData) return key;
if (langData[key]) return langData[key];
if (key.includes(".")) {
@ -106,13 +105,12 @@ class GameDataManager {
}
getHostile(id) {
const cleanId = this._cleanId(id);
const hostile = this.hostiles.get(cleanId);
const hostile = this.hostiles.get(id);
if (!hostile) {
return {
id: cleanId,
displayName: `Unknown Entity (${cleanId})`,
id: id,
displayName: `Unknown Entity (${id})`,
level: 1,
stats: { hp: 100 },
};
@ -136,7 +134,6 @@ class GameDataManager {
meta: { rarity: "common" },
};
}
return {
...item,
displayName: this.t(item.displayName),