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

Remove RCL check from .build() #77

Merged
merged 2 commits into from Aug 28, 2018
Merged

Remove RCL check from .build() #77

merged 2 commits into from Aug 28, 2018

Conversation

@WolfWings
Copy link
Contributor

@WolfWings WolfWings commented Feb 14, 2018

As there is a check made when the ConstructionSite is first places, and further checks to avoid excess completed Structures from being used in the case of RCL drops, preventing all ConstructionSites of a given type from being completed (not built, just completed) if the RCL drops for some reason appears redundant.

So, let's remove the checkControllerAvailability-related check that can return ERR_RCL_NOT_ENOUGH entirely. This doesn't speed anything up or provide any advantages to construction as the placeConstructionSite call and individual buildings which scale with RCL both use checkControllerAvailability, but this patch does remove a hard-to-understand error condition.

This resolves issue #59, where the following sequence of events can occur currently:

  • Be at RCL 2
  • Have 4 finished StructureExtension's
  • Bump up to RCL 3
  • Place 2 more ConstructionSite(StructureExtension)'s
  • Drop to RCL 2
  • Be unable to complete construction on any StructureExtension
WolfWings added 2 commits Feb 14, 2018
As there is a check made when the ConstructionSite is first places, and further checks to avoid excess completed Structures from being used in the case of RCL drops, preventing all ConstructionSites of a given type from being completed (not built, just completed) if the RCL drops for some reason appears redundant.

So, let's remove the checkControllerAvailability-related check that can return ERR_RCL_NOT_ENOUGH entirely.
As there is a check made when the ConstructionSite is first places, and further checks to avoid excess completed Structures from being used in the case of RCL drops, preventing all ConstructionSites of a given type from being completed (not built, just completed) if the RCL drops for some reason appears redundant.

So, let's remove the checkControllerAvailability-related check that can return ERR_RCL_NOT_ENOUGH entirely.
@artch artch changed the base branch from master to ptr Aug 28, 2018
@artch artch merged commit 7da61c5 into screeps:ptr Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants