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

Restore UnitDB function - Update and improve displayed data #18

Merged
merged 5 commits into from
Apr 7, 2024

Conversation

PViddy72
Copy link
Collaborator

@PViddy72 PViddy72 commented Apr 5, 2024

Correct script errors related to differences between PHP 8.x and earlier versions.
Example:
count() generates an error if the argument is not an array object (string being passed). Previously, a string argument would return a 1.

Correct update.php to read in blueprint data in the correct order (3599 files serve as a baseline, and must be read first).
Improved error handling.
Add code to properly handle reformatted blueprints.

Overhaul of unit DPS and fire cycle calculations to improve accuracy.
General improvements in accuracy and completeness of unit data.
Displaying of Missile cost (nukes, tacticals) restored.
All code for calculating missile/projectile counts was re-written to improve accuracy. Moved all such code to calculateFireCycle, to eliminate duplication.

Added filter to prevent units that don't have a 'faction' from causing the script to fail.

Improved error handling. Detect when commands fail. Exit script on failure.
Removed use of shell_exec (it does not detect command failures).
Correct script errors related to differences between PHP 8.x and earlier versions.
Example:
count() generates an error if the argument is not an array object (string being passed).  Previously, a string argument would return a 1.

Correct update.php to read in blueprint data in the correct order (3599 files serve as a baseline, and must be read first).
Improved error handling. Add code to properly handle reformatted blueprints.

Overhaul of unit DPS and fire cycle calculations to improve accuracy.
General improvements in accuracy and completeness of unit data.
Copy link
Member

@Brutus5000 Brutus5000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just briefly glanced over your code despite not really know anything about the internals

www/include/Git.php Outdated Show resolved Hide resolved
www/include/Git.php Outdated Show resolved Hide resolved
www/res/scripts/functions.php Outdated Show resolved Hide resolved
www/update.php Outdated Show resolved Hide resolved
www/res/scripts/calculations.php Outdated Show resolved Hide resolved
www/res/scripts/functions.php Outdated Show resolved Hide resolved
Requested changes of 2024-04-05 (code cleanup).
Corrected DPS code for Salvation.
@PViddy72 PViddy72 requested a review from Brutus5000 April 5, 2024 21:53
Updated comment per request.
@Brutus5000 Brutus5000 merged commit 41c6933 into FAForever:master Apr 7, 2024
1 check passed
@PViddy72 PViddy72 linked an issue Apr 17, 2024 that may be closed by this pull request
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.

Unit database in client outdated/missing information
2 participants