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

update IsPlattonDelay logic to work correctly in BuilderManager #5068

Merged

Conversation

relent0r
Copy link
Contributor

@relent0r relent0r commented Jun 13, 2023

This PR updates the BuilderManager logic to handle the builder delay logic.

Updates the IsPlattonBuildDelayed to no longer update the brain table for the delay. This was causing any builder that passed through the builder manager to update.

It shifts the delay update to the builder return logic statement. This means that only the builder that is selected will be updated.

Testing
In order to validate this logic you will need to
add logs to line 299 that will tell you when a builder fails the delay check.
add logs to line 226 and 234 to log when the delay is added.

The delay is triggered when a builder gets triggered multiple times. The goal of the delay is to stop a situation where an engineer gets a job and starts moving to the builder location, then another engineer gets the same job before the first could start the construction. This trys to avoid situations where multiple builders or multiple instances of the builder will trigger because the conditions are right for the seconds it takes for the engineer to move to the build location.

in draft so I can quickly test this tonight.

As a side note. There are only 3 AI using this functionality at the moment(incase we want to consider fixing the typo in the name).

@relent0r relent0r marked this pull request as ready for review June 14, 2023 06:49
@Garanas
Copy link
Member

Garanas commented Jun 14, 2023

Great find @relent0r , it now appears to work as usual again. This is with Uveso AI:

image

@Garanas Garanas added the area: AI related to AI functions label Jun 14, 2023
@Garanas Garanas added this to the Development iteration II milestone Jun 14, 2023
@Garanas Garanas merged commit a1ad4b9 into FAForever:deploy/fafdevelop Jun 14, 2023
2 checks passed
@Garanas Garanas added the area: sim Area that is affected by the Simulation of the Game label Jun 24, 2023
@relent0r relent0r deleted the fix/ai-builder-delaylogic branch September 14, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: AI related to AI functions area: sim Area that is affected by the Simulation of the Game
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants