Fixed IADS creation, no longer clogs the server

This commit is contained in:
Pax1601
2023-12-05 15:43:48 +01:00
parent 9c2c7f45c6
commit 6afb6682ea
5 changed files with 23 additions and 23 deletions

View File

@@ -68,7 +68,8 @@ export class CoalitionAreaContextMenu extends ContextMenu {
const area = this.getCoalitionArea();
if (area)
getApp().getUnitsManager().createIADS(area, getCheckboxOptions(this.#iadsTypesDropdown), getCheckboxOptions(this.#iadsErasDropdown), getCheckboxOptions(this.#iadsRangesDropdown), this.#iadsDensitySlider.getValue(), this.#iadsDistributionSlider.getValue());
})
this.hide();
});
this.hide();
}
@@ -110,7 +111,7 @@ export class CoalitionAreaContextMenu extends ContextMenu {
this.getContainer()?.querySelectorAll('[data-coalition]').forEach((element: any) => {
element.setAttribute("data-coalition", this.getCoalitionArea()?.getCoalition())
});
this.#coalitionSwitch.setValue(this.getCoalitionArea()?.getCoalition() === "red");
this.#coalitionSwitch.setValue(this.getCoalitionArea()?.getCoalition() === "blue");
}
/** Get the CoalitionArea object the contextmenu is editing