mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Readded command mode options
This commit is contained in:
@@ -19,6 +19,7 @@ export class Airbase extends CustomMarker {
|
||||
#properties: string[] = [];
|
||||
#parkings: string[] = [];
|
||||
#img: HTMLImageElement;
|
||||
#selected: boolean = false;
|
||||
|
||||
constructor(options: AirbaseOptions) {
|
||||
super(options.position, { riseOnHover: true });
|
||||
@@ -26,8 +27,14 @@ export class Airbase extends CustomMarker {
|
||||
this.#name = options.name;
|
||||
this.#img = document.createElement("img");
|
||||
|
||||
AirbaseSelectedEvent.on((airbase) => {
|
||||
this.#selected = airbase == this;
|
||||
if (this.getElement()?.querySelector(".airbase-icon"))
|
||||
(this.getElement()?.querySelector(".airbase-icon") as HTMLElement).dataset.selected = `${this.#selected}`;
|
||||
})
|
||||
|
||||
this.addEventListener("click", (ev) => {
|
||||
if (getApp().getState() === OlympusState.IDLE) {
|
||||
if (getApp().getState() === OlympusState.IDLE || getApp().getState() === OlympusState.AIRBASE) {
|
||||
getApp().setState(OlympusState.AIRBASE)
|
||||
AirbaseSelectedEvent.dispatch(this)
|
||||
}
|
||||
|
||||
@@ -223,7 +223,8 @@ export class MissionManager {
|
||||
commandModeOptions.spawnPoints.red !== this.getCommandModeOptions().spawnPoints.red ||
|
||||
commandModeOptions.spawnPoints.blue !== this.getCommandModeOptions().spawnPoints.blue ||
|
||||
commandModeOptions.restrictSpawns !== this.getCommandModeOptions().restrictSpawns ||
|
||||
commandModeOptions.restrictToCoalition !== this.getCommandModeOptions().restrictToCoalition;
|
||||
commandModeOptions.restrictToCoalition !== this.getCommandModeOptions().restrictToCoalition ||
|
||||
commandModeOptions.setupTime !== this.getCommandModeOptions().setupTime;
|
||||
|
||||
this.#commandModeOptions = commandModeOptions;
|
||||
this.setSpentSpawnPoints(0);
|
||||
|
||||
Reference in New Issue
Block a user