mirror of
https://github.com/Assasinnys/ED-AStar-Galaxy-Router
synced 2025-04-13 23:07:19 +03:00
fix: fun equals for StarPoint
This commit is contained in:
parent
fc57689456
commit
cc88f3413a
@ -41,8 +41,17 @@ class StarPoint(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?) =
|
override fun equals(other: Any?): Boolean {
|
||||||
if (other != null && other is StarPoint) this.systemId64 == other.systemId64 else false
|
return if (other != null && other is StarPoint) {
|
||||||
|
if (this.systemId64 == other.systemId64) {
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
super.equals(other)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
super.equals(other)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun calculateCostH(finishCoords: Coordinates) =
|
private fun calculateCostH(finishCoords: Coordinates) =
|
||||||
calcDistance(coords.x, finishCoords.x, coords.y, finishCoords.y, coords.z, finishCoords.z).toInt()
|
calcDistance(coords.x, finishCoords.x, coords.y, finishCoords.y, coords.z, finishCoords.z).toInt()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user