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

Fix for ordering ammo bins for repair #1203

Merged
merged 5 commits into from
May 25, 2019

Conversation

Krashner
Copy link
Contributor

This is a fix for #1185 which now allows the player to order ammo bins for repair. Previously, when attempting to order a new ammo bin, the player would instead receive ammunition.

@NickAragua
Copy link
Member

One general comment, I would avoid updating history.txt with the PR, as that file gets updated pretty frequently and results in a lot of unnecessary merges. Usually, the person merging the PR updates that file.

@Krashner Krashner closed this May 13, 2019
@Krashner
Copy link
Contributor Author

Sorry about that, I've closed it out and I'll fix it.

Krashner added 2 commits May 12, 2019 23:16
Restoring the file after I accidentally deleted it.
@Krashner Krashner reopened this May 13, 2019
@Krashner
Copy link
Contributor Author

Alright, it should all should be square now. I've learned that Github's web interface apparently lacks a way to easily revert changes.

@NickAragua
Copy link
Member

Sorry about the delay, I've been a little out of the loop for a while. Does ordering ammo still work properly after this fix?

@Krashner
Copy link
Contributor Author

Krashner commented May 25, 2019

Yea, ammo ordering still works, I just tested it again just in case. getNewPart seems to handle the ordering of ammunition, whereas getAcquisitionWork now handles replacing the bin.

However, I have noticed a new issue, ammo bins cost 0 c-bills.

if (getShotsPerTon() <= 0) { return Money.zero(); }

Since the ammo bin is empty, when it checks for cost it returns 0.

@NickAragua
Copy link
Member

I always thought ammo bins cost 0, since they're basically just an imaginary component made up for the purposes of MekHQ.

@NickAragua NickAragua merged commit 9e60031 into MegaMek:master May 25, 2019
@Krashner
Copy link
Contributor Author

I have no idea, that might be the intended behavior. It could be changed so that replacing the bin also orders an ammo refill as well. That way you're not technically just buying a free part and you don't have to order ammunition separately.

@NickAragua
Copy link
Member

Yeah, I checked and it is that way. Let's keep the ammo bin and ammo ordering separate, since there are multiple possible ammo types that can go into a bin and we don't really know which one we should be ordering.

@Krashner
Copy link
Contributor Author

Alright, that sounds good to me.

@Krashner Krashner deleted the ammo-bin-repair branch May 25, 2019 01:54
sixlettervariables added a commit to sixlettervariables/mekhq that referenced this pull request Jun 30, 2019
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.

3 participants