Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Make environment temperature to use units::temperature

Open Hirmuolio opened this issue 3 years ago • 0 comments

Summary

Infrastructure "Make environment temperature to use units::temperature"

Purpose of change

Temperature was handled with mixture of integer fahenheits, double fahrenheits and other one off types. There were mixture of int->float conversion all around place. It is nicer when everything is same.

Describe the solution

Now (almost) everything temperature related is units::temperature. I usually avoided changing the math that was done with temperatures.

Describe alternatives you've considered

Do nothing. Refactor the math that is done with temperatures (especially body temperatures). get_best_fire could most likely be simplified quite a bit.

Testing

Tests pass. Weather temperatures seems same as before. Temperatures from fires same as before. Temperature stays same during save/load.

Additional context

Hirmuolio avatar Jun 30 '22 19:06 Hirmuolio