private void AutoloadWaterStyle(Type type)
{
ModWaterStyle waterStyle = (ModWaterStyle)Activator.CreateInstance(type);
waterStyle.mod = this;
string name = type.Name;
string texture = (type.Namespace + "." + type.Name).Replace('.', '/');
string blockTexture = texture + "_Block";
if (waterStyle.Autoload(ref name, ref texture, ref blockTexture))
{
AddWaterStyle(name, waterStyle, texture, blockTexture);
}
}