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

[1868WY] fix available variants on trains owned by corporations #10793

Merged
merged 1 commit into from
May 24, 2024

Conversation

michaeljb
Copy link
Collaborator

@michaeljb michaeljb commented May 24, 2024

Fixes #10783

  • the base code determined that both the 4 and 4+3 variants should be available for other corporations to buy (other code made sure the UI only presented the 4+3, which is how the train was bought initially by LNP)
  • FE&MV has $325, more than the face value of a 4-train ($300) but less than the 4+3's face value ($360)
  • the 1868 Wyoming code assumes that if two variants are available, we're buying from the depot
  • when buying from the depot, we can only buy a train we can afford or the cheapest, so the 4+3 gets filtered out

The fix is to simply return the single active variant if the train is in fact owned by a corporation instead of the depot.

Before clicking "Create"

  • Branch is derived from the latest master
  • Add the pins or archive_alpha_games label if this change will break existing games
  • Code passes linter with docker compose exec rack rubocop -a
  • Tests pass cleanly with docker compose exec rack rake

@michaeljb michaeljb merged commit 5a7aab1 into tobymao:master May 24, 2024
1 check passed
@michaeljb michaeljb deleted the 1868WY-train-buying branch May 24, 2024 03:38
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.

[1868Wyoming] train cross-buy is not working
1 participant