Skip to content
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

Allow CPU to bridge over water when not wall hugging #2855

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eddebaby
Copy link
Contributor

@eddebaby eddebaby commented Dec 21, 2023

The CPU will actually bridge over water in master, but only when the "mark for digging" routine is in wallhug mode.

This PR should make the CPU be able to bridge over water in the same way as it bridges over lava if bridges are available.
If bridges aren't available the water will be treated as "passable".

image

We do not want to run find_from_task_list before queueing a bridge, because this is the imp's task list, and bridging is not an imp task so won't be listed.

When handling water slabs, we want to leave tool_dig_to_pos2_skip_slabs_which_dont_need_digging_f when we have bridges available, otherwise we want to treat the water as passable.

When handling lava slabs, we want to leave tool_dig_to_pos2_skip_slabs_which_dont_need_digging_f always, because we either want to bridge it, or it is impassable and should be wallhugged.

We do not want to run `find_from_task_list` before queueing a bridge, because this is the imp's task list, and bridging is not an imp task so won't be listed.

When handling water slabs, we want to leave `tool_dig_to_pos2_skip_slabs_which_dont_need_digging_f` when we have bridges available, otherwise we want to treat the water as passable.

When handling lava slabs, we want to leave `tool_dig_to_pos2_skip_slabs_which_dont_need_digging_f` always, because we either want to bridge it, or it is impassable and should be wallhugged.
@eddebaby
Copy link
Contributor Author

This is the situation in master:
image
This PR is one way of resolving the twisted up logic in master, but it is far from perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant