Added basic simulated firefight state

This commit is contained in:
Pax1601
2023-09-15 09:36:27 +02:00
parent 9acd358080
commit 8977ba9b6d
20 changed files with 461 additions and 44 deletions

View File

@@ -605,6 +605,18 @@ export class UnitsManager {
this.#showActionMessage(selectedUnits, `unit bombing point`);
}
/** Instruct the selected units to simulate a fire fight at specific coordinates
*
* @param latlng Location to fire at
*/
selectedUnitsSimulateFireFight(latlng: LatLng) {
var selectedUnits = this.getSelectedUnits({ excludeHumans: true, onlyOnePerGroup: true });
for (let idx in selectedUnits) {
selectedUnits[idx].simulateFireFight(latlng);
}
this.#showActionMessage(selectedUnits, `unit simulating fire fight`);
}
/*********************** Control operations on selected units ************************/
/** See getUnitsCategories for more info
*