Page 1 of 1

Get average color or most prevalent color from existing sprite

Posted: Thu Apr 11, 2019 6:04 pm
by sparr
I have a mod that makes new sprites the same color as existing fluids, by tinting my sprite the color of the fluid which is available as a prototype property.

I would like to be able to do similar things with sprites that don't use tint or have a color like fluids, such as the science packs.

Re: Get average color or most prevalent color from existing sprite

Posted: Wed Apr 17, 2019 6:51 pm
by Rseding91
Reading sprite data isn't deterministic and as such will never be exposed in the Lua API. Additionally the server doesn't even load sprites so it would never be able to do anything with them if it was deterministic.