Temp commit for hotfix

This commit is contained in:
dpassoni
2023-03-14 15:51:23 +01:00
parent d3dc041c91
commit fa9945a3cc
7 changed files with 84 additions and 38 deletions

View File

@@ -128,6 +128,8 @@ export class UnitsManager {
}
getSelectedUnitsType () {
if (this.getSelectedUnits().length == 0)
return undefined;
return this.getSelectedUnits().map((unit: Unit) => {
return unit.constructor.name
})?.reduce((a: any, b: any) => {
@@ -136,6 +138,8 @@ export class UnitsManager {
};
getSelectedUnitsTargetSpeed () {
if (this.getSelectedUnits().length == 0)
return undefined;
return this.getSelectedUnits().map((unit: Unit) => {
return unit.getTaskData().targetSpeed
})?.reduce((a: any, b: any) => {
@@ -144,6 +148,8 @@ export class UnitsManager {
};
getSelectedUnitsTargetAltitude () {
if (this.getSelectedUnits().length == 0)
return undefined;
return this.getSelectedUnits().map((unit: Unit) => {
return unit.getTaskData().targetAltitude
})?.reduce((a: any, b: any) => {
@@ -151,6 +157,16 @@ export class UnitsManager {
});
};
getSelectedUnitsCoalition () {
if (this.getSelectedUnits().length == 0)
return undefined;
return this.getSelectedUnits().map((unit: Unit) => {
return unit.getMissionData().coalition
})?.reduce((a: any, b: any) => {
return a == b? a: undefined
});
};
selectedUnitsAddDestination(latlng: L.LatLng) {
var selectedUnits = this.getSelectedUnits();
for (let idx in selectedUnits) {