void EditCell(HexCell cell)
 {
     if (cell)
     {
         if (activeTerrainTypeIndex >= 0)
         {
             cell.TerrainTypeIndex = activeTerrainTypeIndex;
         }
         if (applyElevation)
         {
             cell.Elevation = activeElevation;
         }
         if (applyWaterLevel)
         {
             cell.WaterLevel = activeWaterLevel;
         }
         if (riverMode == OptionalToggle.No)
         {
             cell.RemoveRiver();
         }
         if (roadMode == OptionalToggle.No)
         {
             cell.RemoveRoads();
         }
         if (applyUrbanLevel)
         {
             cell.UrbanLevel = activeUrbanLevel;
         }
         if (applyFarmLevel)
         {
             cell.FarmLevel = activeFarmLevel;
         }
         if (applyPlantLevel)
         {
             cell.PlantLevel = activePlantLevel;
         }
         if (walledMode != OptionalToggle.Ignore)
         {
             cell.Walled = walledMode == OptionalToggle.Yes;
         }
         if (applySpecialIndex)
         {
             cell.SpecialIndex = activeSpecialIndex;
         }
         if (isDrag)
         {
             HexCell otherCell = cell.GetNeighbor(dragDirection.Opposite());
             if (otherCell)
             {
                 if (riverMode == OptionalToggle.Yes)
                 {
                     otherCell.SetOutgoingRiver(dragDirection);
                 }
                 if (roadMode == OptionalToggle.Yes)
                 {
                     otherCell.AddRoad(dragDirection);
                 }
             }
         }
     }
 }