Added some TODO comments

And very minor refactoring
This commit is contained in:
Pax1601 2023-11-22 15:12:28 +01:00
parent 87957df1fb
commit 1b17e17290
2 changed files with 8 additions and 4 deletions

View File

@ -339,12 +339,14 @@ export class ServerManager {
this.PUT(data, callback);
}
// TODO: Remove coalition
scenicAAA(ID: number, coalition: string, callback: CallableFunction = () => {}) {
var command = { "ID": ID, "coalition": coalition }
var data = { "scenicAAA": command }
this.PUT(data, callback);
}
// TODO: Remove coalition
missOnPurpose(ID: number, coalition: string, callback: CallableFunction = () => {}) {
var command = { "ID": ID, "coalition": coalition }
var data = { "missOnPurpose": command }

View File

@ -417,7 +417,7 @@ export abstract class Unit extends CustomMarker {
else {
this.#clearContacts();
this.#clearPath();
this.#clearTarget();
this.#clearTargetPosition();
}
/* When the group leader is selected, if grouping is active, all the other group members are also selected */
@ -774,7 +774,7 @@ export abstract class Unit extends CustomMarker {
return this.getDatabaseEntry()?.canAAA === true;
}
indirectFire() {
isIndirectFire() {
return this.getDatabaseEntry()?.indirectFire === true;
}
@ -931,6 +931,7 @@ export abstract class Unit extends CustomMarker {
});
}
// TODO: Remove coalition
scenicAAA() {
var coalition = "neutral";
if (this.getCoalition() === "red")
@ -940,6 +941,7 @@ export abstract class Unit extends CustomMarker {
getApp().getServerManager().scenicAAA(this.ID, coalition);
}
// TODO: Remove coalition
missOnPurpose() {
var coalition = "neutral";
if (this.getCoalition() === "red")
@ -1413,7 +1415,7 @@ export abstract class Unit extends CustomMarker {
}
}
else
this.#clearTarget();
this.#clearTargetPosition();
}
#drawTargetPosition(targetPosition: LatLng) {
@ -1425,7 +1427,7 @@ export abstract class Unit extends CustomMarker {
this.#targetPositionPolyline.setLatLngs([new LatLng(this.#position.lat, this.#position.lng), new LatLng(targetPosition.lat, targetPosition.lng)])
}
#clearTarget() {
#clearTargetPosition() {
if (getApp().getMap().hasLayer(this.#targetPositionMarker))
this.#targetPositionMarker.removeFrom(getApp().getMap());