While the upgrade part probably works, I have a problem with theupgrade system. It doesn't make sense that a ship anywhere in the galaxy, whether in orbit or deep in enemy space, can all of a sudden, upgrade into something new with new parts. I honestly think either there should somehow be a limitation that a ship can only be upgraded either in orbit, near a planet you control with a starbase, or not at all. JMO.
I'm not alone ! I find it weird also. IMO, upgrades should be allowed only at a planet orbit (only if a starport is present), docked inside a bigger ship (if carriers will exist someday) or at a starbase having a "docking bay" module (which would also allow the player to put his small ships inside).
Note that because "carriers" and "docking" are dead horses, well military starbases could allow you to upgrade your ships if it is placed next to it.
And again you think the same way has I do. Starbases don't last very long so...
JMO also!