Fixed getHostile.
This commit is contained in:
parent
f64a54c61b
commit
3af090fb0b
@ -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),
|
||||
|
||||
Reference in New Issue
Block a user