Cosmetics editor has a few oddly named functions and some opportunity for refactoring to reduce duplication. For instance, GetRandomValue and RandomizeColor (which is in UIWidgets.cpp) both seem to do a lot of the same tasks with slight variations, and GetRandomColorRGB sounds like it would return a ColorRGB8 value, but instead it randomizes an entire section of cosmetic items and doesn't return anything, it just edits each element in that array of elements. Need to take a good look at it and figure out what can be consolidated, and what can be moved in/out of UIWidgets.cpp.
Cosmetics editor has a few oddly named functions and some opportunity for refactoring to reduce duplication. For instance,
GetRandomValue
andRandomizeColor
(which is inUIWidgets.cpp
) both seem to do a lot of the same tasks with slight variations, andGetRandomColorRGB
sounds like it would return aColorRGB8
value, but instead it randomizes an entire section of cosmetic items and doesn't return anything, it just edits each element in that array of elements. Need to take a good look at it and figure out what can be consolidated, and what can be moved in/out of UIWidgets.cpp.