Stop on Path Blocked (#10758)

* The change

* The change properly this time
This commit is contained in:
itanasi 2023-12-17 12:03:14 -08:00 committed by GitHub
parent 51e444df6d
commit af4dea60e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -540,8 +540,12 @@ class MapUnit : IsPartOfGameInfoSerialization {
return
}
val gotTo = movement.headTowards(destinationTile)
if (gotTo == currentTile) // We didn't move at all
if (gotTo == currentTile) { // We didn't move at all
// pathway blocked? Are we still at the same spot as start of turn?
if(movementMemories.last().position == currentTile.position)
action = null
return
}
if (gotTo.position == destinationTile.position) action = null
if (currentMovement > 0) doAction()
return