It could work something like this.
1. A ship gets damaged. You want to repair it at least partially.
2. You get into a repair ship which contains a cargo hold full of blocks, which is linked to the repair computer.
3. You shoot the damaged ship with your astromech repair beams. In the event any of the repair beams hits a damaged block, it will repair it as it does normally. In the event none of the beams associated with the computer hit a damaged block, it will instead randomly re-add lost blocks to the ship, so long as it has the required block in the cargo hold that is associated with the repair computer.
It may be required for the cargo container that is linked to the repair system to contain a blueprint of the ship you are trying to repair so it "knows" where to place blocks (and which blocks to connect to which other blocks). Warning: using a different blueprint than the vessel you are repairing may have amusing results (the repair beam does not remove parts, but may still end up trying to build one ship on top of the gaps of another).
4. It will perform the block re-placing even if it doesn't have enough blocks to repair all the damage. It will, of course, stop being able to repair lost blocks on the vessel when it no longer has the necessary parts to do so.
This means that if you wish, you can just stuff the repair ship's cargo hold full of energy reactors, shields, and other particularly common parts. The result would be a functionally repaired (or mostly so) vessel, which may still have a lot of craters in its armor that need patching up. If you want, you could then even repair the hull manually to make it look like you welded plates over the holes or something, so that the ship doesn't look brand new. You could just leave the holes there too.
Thoughts?
1. A ship gets damaged. You want to repair it at least partially.
2. You get into a repair ship which contains a cargo hold full of blocks, which is linked to the repair computer.
3. You shoot the damaged ship with your astromech repair beams. In the event any of the repair beams hits a damaged block, it will repair it as it does normally. In the event none of the beams associated with the computer hit a damaged block, it will instead randomly re-add lost blocks to the ship, so long as it has the required block in the cargo hold that is associated with the repair computer.
It may be required for the cargo container that is linked to the repair system to contain a blueprint of the ship you are trying to repair so it "knows" where to place blocks (and which blocks to connect to which other blocks). Warning: using a different blueprint than the vessel you are repairing may have amusing results (the repair beam does not remove parts, but may still end up trying to build one ship on top of the gaps of another).
4. It will perform the block re-placing even if it doesn't have enough blocks to repair all the damage. It will, of course, stop being able to repair lost blocks on the vessel when it no longer has the necessary parts to do so.
This means that if you wish, you can just stuff the repair ship's cargo hold full of energy reactors, shields, and other particularly common parts. The result would be a functionally repaired (or mostly so) vessel, which may still have a lot of craters in its armor that need patching up. If you want, you could then even repair the hull manually to make it look like you welded plates over the holes or something, so that the ship doesn't look brand new. You could just leave the holes there too.
Thoughts?