18xx icon indicating copy to clipboard operation
18xx copied to clipboard

Retain Rusts, Available, and Events information on Info tab

Open ChrisTheCat opened this issue 1 year ago • 1 comments

https://18xx.games/game/146451?action=496#info

On the Info tab, the Trains, Price, and Remaining from previous phases are greyed out while the Rusts, Available, and Events from previous phases are erased. It would be better if the Rusts, Available, and Events were retained and greyed out.

In this example, the information that it takes 40% to float has been erased, but that is information the players need to have.

Screenshot 2023-12-27 at 1 02 53 PM

ChrisTheCat avatar Dec 27 '23 21:12 ChrisTheCat

I looked into this a bit since I agree w/ the usecase, the wrinkle is that we generate that table by iterating the list of trains and rendering each train.event

After a train is bought, we delete the event from that train, thus it's not rendered anymore in the table

https://github.com/tobymao/18xx/blob/master/lib/engine/phase.rb#L28

As a side effect, this prevents future trains of that type from re-triggering the events (as intended)

So it's a bit trickier than a rendering change upon investigation, IMO a bit of a refactor and making sure nothing breaks

benjaminxscott avatar Dec 30 '23 15:12 benjaminxscott