RiddleTime / Race-Element

Solutions for Sim Racing
https://race.elementfuture.com
GNU General Public License v3.0
79 stars 18 forks source link

Add tyre pressure loss on TyreInfoOverlay #85

Closed Mominon closed 1 year ago

Mominon commented 1 year ago

This PR adds the ability to display the loss of pressure per tyre.

A had to use a workaround for the wet tyre sets, as I'm using the index of the tyre set to check if it has changed in order to reset the pressure losses. The wet tyre sets do not have an index, so I'm always assuming that leaving the pitlane with a wet set on is to be considered as a new set and thus, reseting the pressure losses.

If you have a better idea to handle this edge case, I'm all ears!

I also added a way to compute some arbitrary data when building an overlay's preview, which can be used when relying on a tracker's internal data.

Preview image

In-game image

We could use this new TyreTracker on the pressure graph overlay too I guess.

RiddleTime commented 1 year ago

I like it!

Also the addition of "SetupPreviewData" is good, I hope the PreviewCache class wasn't too hard to find.

I will make some layout adjustments on the tyre info hud as now the pressure loss is blocking out on the contact temperature colors of the vanilla hud.