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

simplify repairs logic #2840

Merged
merged 1 commit into from Oct 7, 2022

Conversation

gantsevdenis
Copy link
Contributor

@gantsevdenis gantsevdenis commented Oct 5, 2022

  • This makes impossible for a repair station to be stuck while waiting for a unit: there is no more such thing as "order the droid to repair to come closer and wait for it".
  • Removes "work stealing" between repair stations, we already have randomized repair station assignment
  • Previous logic was iterating over all the droids for the selected player (+ eventually through all the droids of all allies). Now we only iterate once over droids in some specified area.
  • fixes inconsistencies between Repair Station and Mobile Repair Turret: both are now using the same logic
  • makes don't repair flying vtols #2823 obsolete

TODO in later pull requests:

  • DACTION_WAITFORREPAIR is useless. Just use DACTION_NONE.
  • Could be simplified a little further if droids were able to handle their own DORDER_RTR when their HP is already full.

@gantsevdenis gantsevdenis force-pushed the simplify-repair-station branch 2 times, most recently from d087385 to d734077 Compare October 5, 2022 11:03
@lgtm-com
Copy link

lgtm-com bot commented Oct 5, 2022

This pull request fixes 1 alert when merging c12a956 into d56551d - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

@gantsevdenis gantsevdenis force-pushed the simplify-repair-station branch 2 times, most recently from c4078e3 to 76302c7 Compare October 5, 2022 15:24
@past-due past-due added this to the 4.3.0-beta1 milestone Oct 5, 2022
@lgtm-com
Copy link

lgtm-com bot commented Oct 5, 2022

This pull request fixes 1 alert when merging 76302c7 into d56551d - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

@lgtm-com
Copy link

lgtm-com bot commented Oct 7, 2022

This pull request fixes 1 alert when merging 68c8286 into 36758d2 - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

@past-due past-due merged commit 1c812bd into Warzone2100:master Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants