fix 1
This commit is contained in:
@@ -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 = ' (Κλειδωμένο)';
|
||||
}
|
||||
} 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}`);
|
||||
if (popMissing) return alert(`Αδυναμία: Δεν επαρκεί ο πληθυσμός! (Απαιτεί ${d.pop})`);
|
||||
|
||||
return alert("Αδυναμία: Απαιτούνται άλλα κτίρια πρώτα (Το κτίριο είναι κλειδωμένο).");
|
||||
if (!d.buildable) {
|
||||
return alert("Αδυναμία: Το κτίριο είναι κλειδωμένο (απαιτούνται άλλα κτίρια) ή πλήρως αναβαθμισμένο.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user