mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Changed the function that it gets all the units with a specified range
This commit is contained in:
@@ -37,11 +37,13 @@ export class UnitDatabase {
|
|||||||
|
|
||||||
/* Gets a specific blueprint by range */
|
/* Gets a specific blueprint by range */
|
||||||
getByRange(range: string) {
|
getByRange(range: string) {
|
||||||
|
var unitswithrange = [];
|
||||||
for (let unit in this.blueprints) {
|
for (let unit in this.blueprints) {
|
||||||
if (this.blueprints[unit].range === range)
|
if (this.blueprints[unit].range === range) {
|
||||||
return this.blueprints[unit];
|
unitswithrange.push(this.blueprints[unit]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return unitswithrange;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get all blueprints by role */
|
/* Get all blueprints by role */
|
||||||
|
|||||||
Reference in New Issue
Block a user