58 lines
2.4 KiB
JavaScript
58 lines
2.4 KiB
JavaScript
// ================================================================
|
|
// Global State & Constants
|
|
// ================================================================
|
|
window.towns = [];
|
|
window.selectedTownId = null;
|
|
window.clientOnline = false; // tracks Tampermonkey script heartbeat
|
|
window.wasClientOnline = null; // previous known state (null = unknown)
|
|
window.POLL_INTERVAL = 4000;
|
|
|
|
window.BUILDING_NAMES_GR = {
|
|
main: "Σύγκλητος",
|
|
storage: "Αποθήκη",
|
|
farm: "Φάρμα",
|
|
academy: "Ακαδημία",
|
|
temple: "Ναός",
|
|
barracks: "Στρατώνας",
|
|
docks: "Λιμάνι",
|
|
market: "Παζάρι",
|
|
hide: "Σπηλιά",
|
|
lumber: "Εργοστάσιο Ξυλοκόπων",
|
|
stoner: "Λατομείο",
|
|
ironer: "Ορυχείο Ασημιού",
|
|
wall: "Τείχος"
|
|
};
|
|
|
|
window.UNIT_NAMES_GR = {
|
|
sword: "Ξιφομάχος", slinger: "Εκσφενδονιστής", archer: "Τοξότης", hoplite: "Οπλίτης",
|
|
rider: "Ιππέας", chariot: "Άρμα", catapult: "Καταπέλτης", godsent: "Θεόσταλτος",
|
|
big_transporter: "Μεταφορικό", small_transporter: "Γρήγ. Μεταφορικό", bireme: "Διήρης",
|
|
attack_ship: "Πλοίο Φάρος", trireme: "Τριήρης", colonize_ship: "Αποικιακό",
|
|
medusa: "Μέδουσα", zyklop: "Κύκλωπας", harpy: "Άρπυια", pegasus: "Πήγασος",
|
|
minotaur: "Μινώταυρος", manticore: "Μαντιχώρας", cerberus: "Κέρβερος",
|
|
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 = {
|
|
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>',
|
|
iron: '<span class="res-icon res-iron" style="display:inline-block; margin-right:4px;"></span>',
|
|
pop: '<span class="res-icon res-pop" style="display:inline-block; margin-right:4px;"></span>'
|
|
};
|
|
|
|
window.fmt = function(n) {
|
|
if (n >= 1000) return (n / 1000).toFixed(1) + 'k';
|
|
return n;
|
|
};
|