Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Lifetime profit #7919
There is now a lifetime profit value against vehicles which can be viewed alongside the profit this year and profit last year.
burty - Stores lifetime profit (gets updated at end of year)
nielsmh left a comment
Most of these comments are just thoughts and opinions.
Before reading this code I kind of expected the lifetime profit to include the purchase cost of the vehicle/train. On the other hand, that might be difficult to keep track of with trains composed of multiple vehicles, i.e. what happens if you add or remove cars from a train, how does that update the lifetime profit? (I think that can be solved, but I'm not sure if it's worth solving.)
I have a dilema - what should be the conversion approach for old savegames?
Renewed vehicles reset lifetime profit to 0, but not last year profit. It remains whatever it is.
It could be a real new vehicle, or a renewed vehicle. If it's a real new vehicle, then getting its last year profit as best guess for lifetime profit is correct, no matter its age. But if the vehicle was renewed, then its last year profit was inherited from its past vehicle, and using its last year profit to determine lifetime profit, falls into the wrong side, unless the vehicle is already 1 year old at the time of conversion.
How should I do the lifetime conversion?
There is now a lifetime profit value against vehicles which can be viewed alongside the profit this year and profit last year. burty - Stores lifetime profit (gets updated at end of year) burty - Displays on the vehicle info window where the other profits are shown. burty - Saves the lifetime profit in to the save game and loads it. burty - Sort by lifetime profit in vehicle lists. JGR - Display the current lifetime profit, instead of the lifetime profit at the start of the current year JGR - Reset overall lifetime profit to 0 when renewing vehicle. JGR - Sort by length was incorrectly available, and crashed for non ground vehicles. Samu - Displays on the vehicle group info panel where the other profits are shown. Samu - Displays on the vehicle list window where the other profits are shown. Samu - Add AI/GS functions to get lifetime profits of groups and vehicles.