Fix error when Cybran air factories die while building #6636
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
When a Cybran air factory dies while building the following error occurs:
The error occurs because the wrong blueprint value is passed to the function, and it occurs after the factory dies because the function is stuck in a loop before the erroring code runs. The loop can be traced to b7169ab (10 years ago) where the Cybran naval factory build beams which are forked in a thread were added to land/air factories without being forked.
Description of the proposed changes
Testing done on the proposed changes
Spawn factories and build something in them. There should be no errors in the log and the aforementioned effects should be visible.
Paragon + all land/air factories affected:
Despite having using the function in
CSeaFactoryUnit
, Cybran naval factories are not affected as their unit scripts replaceCreateBuildEffects
with the fancier 1/2/3 build arm component'sCreateBuildEffects
.Checklist