MineColonies

MineColonies

56M Downloads

Let citizens avoid water.

Raycoms opened this issue ยท 3 comments

commented

Improve PathJobMoveToLocation and PathJobMoveAwayFromLocation to recognize when they're in water and then allow swimming, else avoid pathing into water.

Create a new pathJob for idling:

  • DomputeHeuristic() -> return 0 if not a swimming node, otherwise return a largish value (like 1000)
  • isAtDestination should never return true if it is a water node
  • isAtDestination -> check if distance greater than desired minimum, do random roll, if success then return true.

Use the setAllowedSwimming and isAllowedSwimming inside the AbstractPathJob.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

commented

No

commented

@Raycoms are we already doing this?

commented

I think we're doing that with @cltnschlosser latest pr now as well.