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

[site] Discard Trains step to display page description instead of default 'Discard Trains' #11322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/app/view/game/discard_trains.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def render
&.include?('scrap_train')
overflow << h(Map, game: @game) if @game.round.is_a?(Engine::Round::Operating)

discard_description = step.description
h(:div, [
h(:h3, 'Discard Trains'),
h(:h3, discard_description),
*overflow,
])
end
Expand Down
4 changes: 4 additions & 0 deletions lib/engine/game/g_18_ny/step/discard_train.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ class DiscardTrain < Engine::Step::DiscardTrain
def process_discard_train(action)
@game.salvage_train(action.train)
end

def description
'Salvage Excess Trains'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rulebook explicitly uses discard here.

Whenever trains are salvaged or discarded, the owning company receives the salvage value
If a phase change includes a reduction in the Train Limit [3], all companies, including the one
operating, must immediately discard any trains in excess of the Train Limit to the Bank Pool 
for salvage value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, but is that the optimum phrasing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the site doesn't add the text "for salvage value", I feel this is an improvement.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Salvage, as a verb, means to save something from destruction. So salvaging a train would be rescuing one from the scrap yard and putting it back into use, the opposite of what is happening here.

end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/step/discard_train.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def active?
end

def description
'Discard Train'
'Discard Trains'
end

def process_discard_train(action)
Expand Down
Loading