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

Fixed Original Unit Value Being Deducted from Payout Sum When Personnel Resign/Retire #4275

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

IllianiCBT
Copy link
Collaborator

This PR fixes an unintended interaction where personnel would reduce their payout value based on the value of the unit they are given, when resigning or retiring, even if that unit was a unit they owned.

Furthermore, I adjusted the value of mechs being given as part-payment so that they use the sell value of the unit and not the buy price. This ensures mhq isn't treating half an atlas as equal to an intact atlas.

- Removed unnecessary if conditions and repetition
- Used unit sell value instead of buy cost for payout calculation
@IllianiCBT IllianiCBT added Bug Personnel Personnel-related Issues Finances labels Jun 22, 2024
@IllianiCBT IllianiCBT self-assigned this Jun 22, 2024
@IllianiCBT IllianiCBT merged commit 705635c into MegaMek:master Jun 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Finances Personnel Personnel-related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants