Added ability to delete original cloned units

Mostly useful to group units together
This commit is contained in:
Pax1601
2023-09-07 13:02:14 +02:00
parent e2f80c5788
commit 09bf361d44
6 changed files with 128 additions and 77 deletions

View File

@@ -199,8 +199,8 @@ export function followUnit(ID: number, targetID: number, offset: { "x": number,
POST(data, callback);
}
export function cloneUnits(units: {ID: number, location: LatLng}[], callback: CallableFunction = () => {}) {
var command = { "units": units };
export function cloneUnits(units: {ID: number, location: LatLng}[], deleteOriginal: boolean, callback: CallableFunction = () => {}) {
var command = { "units": units, "deleteOriginal": deleteOriginal };
var data = { "cloneUnits": command }
POST(data, callback);
}