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

Optimize search for possible expansion locations #77572

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

Conversation

sparr
Copy link
Member

@sparr sparr commented Nov 3, 2024

Summary

None

Purpose of change

When choosing a possible expansion location, the list of locations is searched through twice for two different criteria.

Describe the solution

Iterate once, until each criterion is met independently.
Also update a called recipe search to be able to bail out early if a result is found.

Describe alternatives you've considered

Testing

I've been playing with this for a while.

Additional context

This is the third in a series of PRs breaking apart #77397

@sparr sparr force-pushed the optimize_possible_expansions branch from 64edef7 to d9dadea Compare November 3, 2024 23:18
@github-actions github-actions bot added Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [C++] Changes (can be) made in C++. Previously named `Code` Player Faction Base / Camp All about the player faction base/camp/site json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 3, 2024
@sparr sparr force-pushed the optimize_possible_expansions branch from d9dadea to 4c42f89 Compare November 4, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling json-styled JSON lint passed, label assigned by github actions Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant