TTT-2 / TTT2

Trouble in Terrorist Town 2 for Garry's Mod (gmod)
https://steamcommunity.com/sharedfiles/filedetails/?id=1357204556
178 stars 76 forks source link

consolidate Color() calls #1481

Open EntranceJew opened 7 months ago

EntranceJew commented 7 months ago

a lot of Color() calls reinvent color values for things which already exist or are so isolated that they can't be reached and shared, so they should be consolidated

Histalek commented 7 months ago

We might want to look at our colors in general:

$ rg ' Color\(' --stats --quiet

192 matches
192 matched lines
68 files contained matches
972 files searched

We have 192 calls to Color() in 68 different files in our codebase. at a glance i can even spot a few duplicates. Consolidating and moving the creation of these colors to a single place might be a good idea. Even if it is only to give them meaningful names.

EntranceJew commented 7 months ago

agreed, my single biggest pain point with extending the UI was being able to reach the color variations from the VSKIN -- otherwise i could attach all the parts, i just couldn't style it to part

saibotk commented 5 months ago

I think this needs more investigation than just the spec color :)

TimGoll commented 5 months ago

I renamed the issue to reflect that