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

From StringBuilder to Logger #6462

Merged
merged 6 commits into from
Jan 31, 2025
Merged

From StringBuilder to Logger #6462

merged 6 commits into from
Jan 31, 2025

Conversation

Scoppio
Copy link
Collaborator

@Scoppio Scoppio commented Jan 30, 2025

Using logging trace level for all this stuff instead of debug because it really is a level lower than debug what it is doing.
Kept the reasoning in the RankedPath as it is a great tool to understand what happened to select that object, but other than that, not much was changed in code.

@Scoppio Scoppio self-assigned this Jan 30, 2025
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.56%. Comparing base (e5da205) to head (a4b6f49).
Report is 26 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6462      +/-   ##
============================================
- Coverage     28.59%   28.56%   -0.03%     
+ Complexity    14377    14373       -4     
============================================
  Files          2798     2798              
  Lines        274895   275068     +173     
  Branches      48630    48664      +34     
============================================
- Hits          78593    78578      -15     
- Misses       191669   191855     +186     
- Partials       4633     4635       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

(Mek.LOC_CT == loc) ||
(ProtoMek.LOC_HEAD == loc) ||
(ProtoMek.LOC_TORSO == loc) ||
!(movingUnit.isMek() && !(movingUnit.isProtoMek()))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe the first ! must go inside the parentheses; this new construction will evaluate to true if the unit is a ProtoMek, but previously it would only evaluate to true if the unit is not a Mek and not a ProtoMek.

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

One update needed, otherwise looks great!

@Scoppio Scoppio requested a review from Sleet01 January 31, 2025 00:14
logMsg.append(" breached and critical (1000).");
if ((Mek.LOC_HEAD == loc) ||
(Mek.LOC_CT == loc) ||
(ProtoMek.LOC_HEAD == loc) ||

Check warning

Code scanning / CodeQL

Useless comparison test Warning

Test is always false, because of
this condition
.
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Sleet01 Sleet01 merged commit b30eae4 into MegaMek:master Jan 31, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants