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

Fixed "Zone construction build wooden wall builds window instead. #32965" (rebased) #33673

Merged

Conversation

ipcyborg
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Zone construction build wooden wall builds window instead. #32965"

Purpose of change

Fixes #32965
Rebased from #33083

Describe the solution

Added recursive functions to handle complex constructions:

get_final_construction detects what was really selected from the construction menu.
Not just <First construction that contains "Build Wood Wall">,
but <The final construction is Wood Wall (t_wall, not t_wall_half)>.

find_base_construction looks up the construction "tree" for the first building that we can actually construct here, and which will lead to our goal (may be indirectly).

Now it is possible to have a zone "Build Wood Wall" over some chipped/broken wooden walls or empty windows. The result will be "wooden wall where possible".

EDIT:
Now blueprint construction is a continuous process. Once started it can be interrupted at any time (for ex., using 5) and then continued.
Partial (unfinished) construction in the blueprint zone will be continued.
Note, that there is no extra check that this specific construction will lead to the goal in blueprint. It is just assumed. I think it is safe enough, no?

Describe alternatives you've considered

Need some dependency structure in constructions (like a tree). For now just use logic like <"*_half" is not the final construction>.

Additional context

None

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones labels Aug 30, 2019
@ZhilkinSerg ZhilkinSerg merged commit 9845ec8 into CleverRaven:master Aug 30, 2019
@ipcyborg ipcyborg deleted the fix-32965-construction-zones-v2 branch August 30, 2019 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zone construction build wooden wall builds window instead.
2 participants