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

Equipment market sign error #5071

Closed
Bodasey opened this issue Dec 11, 2020 · 3 comments · Fixed by #5072
Closed

Equipment market sign error #5071

Bodasey opened this issue Dec 11, 2020 · 3 comments · Fixed by #5072
Assignees

Comments

@Bodasey
Copy link

Bodasey commented Dec 11, 2020

Observed behaviour

The number of an item in stock decreases when it is sold / increases when it is built into the ship

Expected behaviour

clear

My pioneer version (and OS):
20201211 master on SuSE Linux

@osjc
Copy link

osjc commented Dec 12, 2020

To be more accurate, here are steps to reproduce:

  1. Start on Mars
  2. Go to the equipment screen
  3. Find the Radar on the list of equipment for sale.
  4. Sell your radar (click on it on the right side)
  5. The count of radars on the market DECREASES.
  6. Sell your hyperdrive
  7. The count of hyperdrives on the market DECREASES.
  8. Buy the radar back
  9. The count of radars on the market INCREASES.

The expected behavior is for the count to decrease where in the above description it increases and vice versa.

@impaktor
Copy link
Member

It's because count variable is already negative, easy fix, thanks for reporting

@impaktor impaktor self-assigned this Dec 12, 2020
impaktor added a commit to impaktor/pioneer that referenced this issue Dec 12, 2020
1. The third argument to bought/sold wasn't passed correctly, instead the nil
valued member variable was used

2. When selling/buying from ship equipment market, it defaulted to -1 units,
should be 1.

Closes pioneerspacesim#5071
@Bodasey
Copy link
Author

Bodasey commented Dec 12, 2020

fix confirmed, thank you!

Web-eWorks pushed a commit that referenced this issue Dec 12, 2020
1. The third argument to bought/sold wasn't passed correctly, instead the nil
valued member variable was used

2. When selling/buying from ship equipment market, it defaulted to -1 units,
should be 1.

Closes #5071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants