-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several navigation fix #10406
Several navigation fix #10406
Conversation
Validated the facing of stairs while computing jumping cost. Modified some path-finding cost to be closer to its real time cost. Added path-finding cost for opening a door.
Simplified the stair validation logic
Don't make intruders prefer a path with fewer doors! That was such a good trap in the raid stream LOL! |
You have to see path finding cost as "the path of least resistance", if there's no other option than doors, they'll use the doors anyway. |
Ah, fair point! =D |
@@ -917,15 +920,32 @@ protected double computeCost( | |||
|
|||
if (!isDiving) | |||
{ | |||
if (dY != 0 && !(ladder && parent.isLadder()) && !(Math.abs(dY) == 1 && below.is(BlockTags.STAIRS))) | |||
boolean correctlyOnStairs = false; | |||
if(Math.abs(dY) == 1 && below.getBlock() instanceof StairBlock && below.getValue(StairBlock.HALF) == Half.BOTTOM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reformat your code to ensure it's up to the defined code style (in this case, space between if
and (
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reformat your code to ensure it's up to the defined code style (in this case, space between
if
and(
Done.
While testing, citizens can open a door instantly. But they always take many seconds to open a door while playing, and they only need to walk two extra blocks to get around. I've really had enough. 😭 Just set the open door cost of intruders to 0 to trap them. 👿 |
…atomicRing/minecolonies into HexatomicRing-Navigation-Fix
Testing
Review please