keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Allow CPU to bridge over water when not wall hugging

Open eddebaby opened this issue 2 years ago • 1 comments

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.

eddebaby avatar Dec 21 '23 14:12 eddebaby

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.

eddebaby avatar Dec 21 '23 14:12 eddebaby