private void AutoloadTile(Type type) { ModTile tile = (ModTile)Activator.CreateInstance(type); tile.mod = this; string name = type.Name; string texture = (type.Namespace + "." + type.Name).Replace('.', '/'); if (tile.Autoload(ref name, ref texture)) { AddTile(name, tile, texture); } }