[1840] Cannot pay for track cost as bonus action tobymao#11315 #11336
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11315
Before clicking "Create"
master
pins
orarchive_alpha_games
label if this change will break existing gamesdocker compose exec rack rubocop -a
docker compose exec rack rake
Implementation Notes
Explanation of Change
As per notes from @DestrinStorm in issue discussion, the call to lay_tile() from special_track.rb doesn't pass a spender. This means it defaults to trying to spend the money from the tram line, which never has any money to spend, and so will always fail.
The owning major corporation should always pay the cost of a bonus track lay when there is one, the same as it does for any other actions taken by the tram line, e.g. removing / placing tokens.
Fix allows the owning major corp to correctly pay the costs for the bonus yellow tile lay in a hotseat clone of both games flagged in the issue.
Screenshots
Any Assumptions / Hacks