mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-02 22:49:06 +00:00
enable eslint rule curly: multi-line
https://eslint.org/docs/latest/rules/curly#multi-line
This commit is contained in:
@@ -124,25 +124,29 @@ export class WarshipExecution implements Execution {
|
||||
if (
|
||||
unitA.type() === UnitType.TransportShip &&
|
||||
unitB.type() !== UnitType.TransportShip
|
||||
)
|
||||
) {
|
||||
return -1;
|
||||
}
|
||||
if (
|
||||
unitA.type() !== UnitType.TransportShip &&
|
||||
unitB.type() === UnitType.TransportShip
|
||||
)
|
||||
) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Then prioritize Warships.
|
||||
if (
|
||||
unitA.type() === UnitType.Warship &&
|
||||
unitB.type() !== UnitType.Warship
|
||||
)
|
||||
) {
|
||||
return -1;
|
||||
}
|
||||
if (
|
||||
unitA.type() !== UnitType.Warship &&
|
||||
unitB.type() === UnitType.Warship
|
||||
)
|
||||
) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// If both are the same type, sort by distance (lower `distSquared` means closer)
|
||||
return distA - distB;
|
||||
|
||||
Reference in New Issue
Block a user