public void SetMachine(ref TechnicalBlock techBlock,Block childBlock,bool activated = true)
 {
     switch(childBlock.Type)
     {
         case Resources.BlockRegistry.BlockTypes.ThrusterIon:
             {
                 techBlock = new TechnicalBlock(childBlock, new TechnicalBlock.Machine(Rocket), activated);
                 break;
             }
         case Resources.BlockRegistry.BlockTypes.SolarPanel:
             {
                 techBlock = new TechnicalBlock(childBlock, new TechnicalBlock.Machine(SolarPanel), activated);
                 break;
             }
         case Resources.BlockRegistry.BlockTypes.Collector:
             {
                 techBlock = new TechnicalBlock(childBlock, new TechnicalBlock.Machine(HydrogenCollecter), activated);
                 break;
             }
         default:
             {
                 techBlock = new TechnicalBlock(childBlock, new TechnicalBlock.Machine(Generic), false);
                 break;
             }
     }
 }
 public ShipLogistics(Cluster outside,Block[,] grid,Controller ctrl)
 {
     External = outside;
     CargoHold = new Inventory();
     TechGrid = new TechnicalBlock[outside.Width, outside.Height];
     DoToAll(new Action((int x,int y) => { SetMachine(ref TechGrid[x, y],grid[x,y]); }));
     Parent = ctrl;
 }