Closed shadowmage45 closed 5 years ago
Apparently this will not work as it interferes with parsing of persistence data.
Notably KSP does not store integer-valued floating point numbers with decimals, and it is the decimals that trigger the float-based parsing. This was causing existing craft/etc to reload using the byte-notation, which was resulting in colors like (1/255 RED), instead of (1.0f RED). '1' was being parsed as a byte rather than a float due to no decimal place.
Will investigate alternative methods to implement this feature that only work for COLORs blocks and are not used for persistence load/save functions. Likely will just require a specific COLORS-block constructor.
Update the COLORS block parsing to include multi-format parsing for at least byte and float notations.
As five values are needed, cannot use the unity built-in HTML color parsing; might need to develop own hex-parsing method?