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

Stop the selling & buying list having the same Good #1214

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Conversation

bevans2000
Copy link
Member

@bevans2000 bevans2000 commented Jan 7, 2024

Deals have the same Goods in the to sell and to Buy list which make no sense. This change prevents, for each Settlement, a Good in the buying list will not be added to the selling list. The buying list takes priority.

Changes:

  • GoodManager adds the Good in the buying list to the excluded Goods when creating the selling list.
  • Clean code smells in Good class

Close #1178

Deals have the same Goods in the to sell and to Buy list which make no sense.
This change prevents, for each Settlement, a Good in the buying list will not be added to the
selling list. THe buying list takes priority.

Changes:
- GoodManager adds the Good in the buying list to the excluded Goods when creating the selling list.
- Clean code smells in Good class

Part of #1178
@bevans2000 bevans2000 requested a review from mokun January 7, 2024 15:07
@bevans2000 bevans2000 marked this pull request as ready for review January 7, 2024 15:08
@mokun mokun added this pull request to the merge queue Jan 7, 2024
Merged via the queue into master with commit 6a7bb6d Jan 7, 2024
2 of 3 checks passed
@mokun
Copy link
Member

mokun commented Jan 7, 2024

@bevans2000,

Can we merge these changes onto 3.7.x as well since it's considered a bug fix ?

It's not like it's adding any new features.

@bevans2000 bevans2000 deleted the goods_issue1178 branch January 7, 2024 19:10
@mokun mokun restored the goods_issue1178 branch January 7, 2024 20:48
@bevans2000
Copy link
Member Author

Well I don't think the impact of the problem justifies the bugfix. Its bit that easy because it may pick up a lot of other changes. You round have to cherry pick the commit

@mokun
Copy link
Member

mokun commented Jan 8, 2024

Well I don't think the impact of the problem justifies the bugfix.

I don't understand that.

Its bit that easy because it may pick up a lot of other changes. You round have to cherry pick the commit

have to cherry pick the commit ? what does it mean ?

You only changed 2 files right ?

I'll simply copy and paste the new contents to the 3.7.x branch.

@bevans2000
Copy link
Member Author

The issue was marked for 3.8.0 so that's is where it is fixed.
You could double fix it and copy the 1 file (it's only GoidsManager) but you will then gave a merge conflict when you merge your bugfux branch back to master.
Search for git cherry picking commits.

mokun added a commit that referenced this pull request Jan 9, 2024
1.9.2024

- Deals have the same Goods in the to sell and to Buy list which make
no sense.
- This change prevents, for each Settlement, a Good in the buying list
will not be added to the selling list. The buying list takes priority.

Changes:

- GoodManager adds the Good in the buying list to the excluded Goods
when creating the selling list.
- Clean code smells in Good class

Note: manually merge changes from Master branch

Relates to #1178 and #1214
@bevans2000 bevans2000 deleted the goods_issue1178 branch February 5, 2024 21:42
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.

Goods to buy and sell
2 participants