redesign of recruit troops

This commit is contained in:
2026-05-01 21:11:47 +03:00
parent d6c2252f5c
commit f4a0e18686
4 changed files with 116 additions and 79 deletions

View File

@@ -132,7 +132,7 @@ window.sendCommand = async function() {
payload = { building_id };
} else if (type === 'recruit') {
const unit_id = document.getElementById('unit-select').value;
const unit_id = window.selectedUnitId;
if (!unit_id) return alert('Παρακαλώ επιλέξτε Μονάδα προς εκπαίδευση.');
const amount = parseInt(document.getElementById('recruit-amount').value) || 1;