public void CreateReactorFromView() { IsReactorBuilt = false; InternalWidth = NewReactor.Width; InternalLength = NewReactor.Length; InternalHeight = NewReactor.Height; int interiorX = InternalWidth; int interiorY = InternalLength; int totalX = interiorX + 2; int totalY = interiorY + 2; int totalHeight = InternalHeight + 2; Reactor.ClearColumn(); Reactor.ClearRows(); Reactor.ClearTiles(); Reactor.SurfaceTiles.Clear(); AddCasingTop(totalX); for (int y = 1; y <= interiorY; y++) { AddBordersAndTypeColumn(TileType.BlockConductorAir, totalX, y); } AddCasingBottom(totalX, totalY); IsReactorBuilt = true; RecalculateLayout(); }