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

Refactor fleet missions' code | Part 13 | Report data aquisition refactor #119

Merged
merged 23 commits into from
May 15, 2020

Conversation

mdziekon
Copy link
Owner

@mdziekon mdziekon commented May 15, 2020

Summary:

All three possible combat missions (MissionAttack, MissionDestruction & MissionGroupAttack) share almost the same mechanism of combat report data aquisition. This mechanism should be implemented in just one place and shared among them.

Changelog:

  • Move combat report data creation to a helper function
  • Generalise combat participant details initialisation
    • Reuse when generating joined attackers details (GroupAttack only)
    • Reuse when generating main attackers details
  • Fix missing morale_points field fetching for defending fleets
  • Fix missing morale details for joined attackers when they also participate in the defense
  • In ACS, main attacker (the leader) should attack as soon as possible (but still taking into account ship types)

Notes:

  • While working on this, I've noticed that Abandoned planets have no user entry. This is fine for now (as in, no major bugs caused by this), but eventually the "empty user" entry should be filled with default data to at least prevent PHP notices about access to non-existent object.

Related issues or PRs:

@mdziekon mdziekon added pr:enhancement_request All pull requests related to enhancements proposals pr:bugfix All pull requests related to fixing bugs labels May 15, 2020
@mdziekon mdziekon marked this pull request as ready for review May 15, 2020 01:54
@mdziekon mdziekon force-pushed the mdziekon/91/fleet-mission-attack-refactor-part13 branch from b817d0f to 8047ba0 Compare May 15, 2020 01:55
@mdziekon mdziekon merged commit bc34a62 into master May 15, 2020
@mdziekon mdziekon added this to Done in Basic modernisation via automation May 15, 2020
@mdziekon mdziekon deleted the mdziekon/91/fleet-mission-attack-refactor-part13 branch May 15, 2020 01:59
@mdziekon mdziekon removed this from Done in Basic modernisation Apr 8, 2022
@mdziekon mdziekon added this to In progress in Flight Control refactor via automation Apr 8, 2022
@mdziekon mdziekon moved this from In progress to Done in Flight Control refactor Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:bugfix All pull requests related to fixing bugs pr:enhancement_request All pull requests related to enhancements proposals
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant