diff --git a/templates/dashboard.html b/templates/dashboard.html
index 3eaa147..527b26b 100644
--- a/templates/dashboard.html
+++ b/templates/dashboard.html
@@ -520,12 +520,10 @@ function renderBuildingDropdown() {
const r = town.resources;
const resMissing = (r.wood < d.wood || r.stone < d.stone || r.iron < d.iron || r.population < d.pop);
- if (d.buildable === false) {
- if (resMissing) {
- extraText = ' (Λείπουν πόροι/πληθ.)';
- } else {
- extraText = ' (Κλειδωμένο)';
- }
+ if (resMissing) {
+ extraText = ' (Λείπουν πόροι/πληθ.)';
+ } else if (!d.buildable) {
+ extraText = ' (Κλειδωμένο / Πλήρες)';
}
}
@@ -586,11 +584,11 @@ async function sendCommand() {
const resMissing = (r.wood < d.wood || r.stone < d.stone || r.iron < d.iron);
const popMissing = (r.population < d.pop);
- if (d.buildable === false) {
- if (popMissing) return alert(`Αδυναμία: Δεν επαρκεί ο πληθυσμός! (Απαιτεί ${d.pop})`);
- if (resMissing) return alert(`Αδυναμία: Δεν επαρκούν οι πόροι!\n\nΑπαιτεί:\nΞύλο: ${d.wood}\nΠέτρα: ${d.stone}\nΑσήμι: ${d.iron}`);
-
- return alert("Αδυναμία: Απαιτούνται άλλα κτίρια πρώτα (Το κτίριο είναι κλειδωμένο).");
+ if (resMissing) return alert(`Αδυναμία: Δεν επαρκούν οι πόροι!\n\nΑπαιτεί:\nΞύλο: ${d.wood}\nΠέτρα: ${d.stone}\nΑσήμι: ${d.iron}`);
+ if (popMissing) return alert(`Αδυναμία: Δεν επαρκεί ο πληθυσμός! (Απαιτεί ${d.pop})`);
+
+ if (!d.buildable) {
+ return alert("Αδυναμία: Το κτίριο είναι κλειδωμένο (απαιτούνται άλλα κτίρια) ή πλήρως αναβαθμισμένο.");
}
}