fix 2
This commit is contained in:
@@ -286,7 +286,18 @@ window.openUnitModal = function() {
|
|||||||
let costStr = '';
|
let costStr = '';
|
||||||
let clickable = false;
|
let clickable = false;
|
||||||
|
|
||||||
if (data) {
|
const requiredGod = window.UNIT_GODS ? window.UNIT_GODS[key] : null;
|
||||||
|
const isWrongGod = requiredGod && town.god !== requiredGod;
|
||||||
|
const isNoGod = key === 'godsent' && !town.god;
|
||||||
|
|
||||||
|
if (isWrongGod) {
|
||||||
|
statusClass = 'locked'; statusLabel = '🔒 Άλλος Θεός'; cardClass = 'bld-locked';
|
||||||
|
const greekGods = { zeus: 'Δία', poseidon: 'Ποσειδώνα', hera: 'Ήρα', athena: 'Αθηνά', hades: 'Άδη', artemis: 'Άρτεμις', aphrodite: 'Αφροδίτη', ares: 'Άρη' };
|
||||||
|
costStr = `Απαιτεί: ${greekGods[requiredGod] || requiredGod}`;
|
||||||
|
} else if (isNoGod) {
|
||||||
|
statusClass = 'locked'; statusLabel = '🔒 Χωρίς Θεό'; cardClass = 'bld-locked';
|
||||||
|
costStr = `Απαιτείται Ναός`;
|
||||||
|
} else if (data) {
|
||||||
const missingKeys = data.missing_dependencies ? Object.keys(data.missing_dependencies) : [];
|
const missingKeys = data.missing_dependencies ? Object.keys(data.missing_dependencies) : [];
|
||||||
const isLocked = missingKeys.length > 0;
|
const isLocked = missingKeys.length > 0;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ window.BUILDING_NAMES_GR = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
window.UNIT_NAMES_GR = {
|
window.UNIT_NAMES_GR = {
|
||||||
sword: "Ξιφομάχος", slinger: "Σφενδονήτης", archer: "Τοξότης", hoplite: "Οπλίτης",
|
sword: "Ξιφομάχος", slinger: "Εκσφενδονιστής", archer: "Τοξότης", hoplite: "Οπλίτης",
|
||||||
rider: "Ιππέας", chariot: "Άρμα", catapult: "Καταπέλτης", godsent: "Θεόσταλτος",
|
rider: "Ιππέας", chariot: "Άρμα", catapult: "Καταπέλτης", godsent: "Θεόσταλτος",
|
||||||
big_transporter: "Μεταφορικό", small_transporter: "Γρήγ. Μεταφορικό", bireme: "Διήρης",
|
big_transporter: "Μεταφορικό", small_transporter: "Γρήγ. Μεταφορικό", bireme: "Διήρης",
|
||||||
attack_ship: "Πλοίο Φάρος", trireme: "Τριήρης", colonize_ship: "Αποικιακό",
|
attack_ship: "Πλοίο Φάρος", trireme: "Τριήρης", colonize_ship: "Αποικιακό",
|
||||||
@@ -33,6 +33,17 @@ window.UNIT_NAMES_GR = {
|
|||||||
hydra: "Ύδρα", sea_monster: "Τέρας Θάλασσας", militia: "Εθνοφρουρά"
|
hydra: "Ύδρα", sea_monster: "Τέρας Θάλασσας", militia: "Εθνοφρουρά"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.UNIT_GODS = {
|
||||||
|
minotaur: 'zeus', manticore: 'zeus',
|
||||||
|
zyklop: 'poseidon', hydra: 'poseidon',
|
||||||
|
harpy: 'hera', medusa: 'hera',
|
||||||
|
pegasus: 'athena', centaur: 'athena',
|
||||||
|
cerberus: 'hades', erinys: 'hades',
|
||||||
|
griffon: 'artemis', calydonian_boar: 'artemis',
|
||||||
|
siren: 'aphrodite', satyr: 'aphrodite',
|
||||||
|
spartoi: 'ares', ladon: 'ares'
|
||||||
|
};
|
||||||
|
|
||||||
window.RES_ICONS = {
|
window.RES_ICONS = {
|
||||||
wood: '<span class="res-icon res-wood" style="display:inline-block; margin-right:4px;"></span>',
|
wood: '<span class="res-icon res-wood" style="display:inline-block; margin-right:4px;"></span>',
|
||||||
stone: '<span class="res-icon res-stone" style="display:inline-block; margin-right:4px;"></span>',
|
stone: '<span class="res-icon res-stone" style="display:inline-block; margin-right:4px;"></span>',
|
||||||
|
|||||||
Reference in New Issue
Block a user