Which is a little easier to do when your craft is shaped like a plane and not a simple cylinder. The loading and positioning were easier to model and then achieve in flight.
The shuttle also flew with repair kits and glue that could be used in a vacuum. The astronauts could perform an EVA and work to replace damaged tiles and there were published plans on how to do so. NASA unfortunately figured out very late that using the Canadarm to image the bottom of the shuttle immediately on achieving orbit was extremely necessary given the icing problems of the external tank.