Object builders sent to the server by projectors/consoles contain corrupted data
I'm working on a modded SE server which would need access to the blueprints loaded into projectors/console blocks by the players.
When one player loads a blueprint consisting of multiple subgrids into a console block, other players watching the same console block in-game will see only the first grid most of the time.
By studying your dedicated server code and running it in a debugger I figured out what causes this problem and more:
Reason is that the List<MyObjectBuilder_CubeGrid> projectedGrids data sent to the server by the MyProjectorBase.SendNewBlueprint method is corrupted.
The PositionAndOrientation.Position of the first grid is reset to Vector3(0,0,0), which is used by the console of the other players for displaying. While the first subgrid is positioned properly, the rest of grids will be displayed with a potentially huge offset depending on the blueprint's original save position. Zeroing the first subgrid's position seems to be an unintended side-effect of transforming the blueprint above the console block.
Another issue is that MyProjectorBase.InitFromObjectBuilder runs parallel remapping of the grids sent which corrupts the connection between grids by changing the Entity IDs in an inconsistent way. It also breaks any direct button (or cockpit) mapping between subgrids. Piston top's ParentEntityId is not remapped either.
Maybe this is why you had to disable projecting multiple subgrids by choosing the largest one, making it impossible to print multi-grid ships. If you fix this data corruption it will bring you a step closer to enable that feature, in case you plan to do that.
Could you please consider fixing the above data corruption in the client's codebase? My plugin would need the unmodified object builders being sent to the server or at least one with consistently remapped IDs and no corrupted coordinates. I have no way to fix these on server side with a plugin, since the data corruption happens on client side.
I'm studying your code base a lot these days. If one of your developers can spend 30 minutes with me on Skype, then I can show where the problem is. It could be fixed quickly on your side.