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

Extend "can building be built" requirements logic with build queue contents #299

Closed
2 tasks done
lanedirt opened this issue Aug 21, 2024 · 1 comment
Closed
2 tasks done
Labels
enhancement New feature or request

Comments

@lanedirt
Copy link
Owner

lanedirt commented Aug 21, 2024

Currenly when trying to build a building the requirements are checked. If the requirements are not fulfilled you cannot add a building to the build queue. However when building multiple buildings via the queue the contents of the queue should be included in this check.

Example: shipyard building requires robotics factory level 2. If you have a new planet and add robotics factory level 1 and level 2 to the queue, then after those are built the shipyard should also be able to be built. But right now when level 2 is in the queue the shipyard is not eligible yet to be built. According to the official game it should be possible to add shipyard to the build queue if level 2 of robotics factory is in the queue.

This also applies to other buildings and also to research.

Todo:

  • Extend "requirements met" check for buildings and research: look in the existing build queue and include the to-be-built/upgraded levels in the check.
  • Make sure to also add proper checks when a build queue item starts in case previous queue items have been canceled. E.g. it should not be possible to add robotics factory level 1 and 2 to the queue, then add shipyard build order, cancel the robotics factory and still end up with a shipyard. Add double checks: cancellation of item should recalculate the queue and remove any where requirements are no longer met. Additionally add check for when a build queue actually starts processing if requirements are (still) met.
@lanedirt lanedirt added the enhancement New feature or request label Aug 21, 2024
@lanedirt
Copy link
Owner Author

lanedirt commented Nov 3, 2024

Fixed by #421.

@lanedirt lanedirt closed this as completed Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant