public override void onClick(MapViewWindow source, Location loc, Point ab)
 {
     if (anchor == UNPLACED)
     {
         anchor = loc;
         sameLevelDisambiguator = new SameLevelDisambiguator(anchor.z);
     }
     else
     {
         loc = align(loc);
         if (anchor != loc)
         {
             if (isPlacing)
             {
                 if (type.canBeBuilt(anchor, loc))
                 {
                     // build new railroads.
                     type.build(anchor, loc);
                 }
             }
             else
             {
                 // remove existing ones
                 type.remove(anchor, loc);
             }
             World.world.onVoxelUpdated(Cube.createInclusive(anchor, loc));
         }
         anchor = UNPLACED;
     }
 }
 public void onClick(MapViewWindow source, Location loc, Point ab)
 {
     if (anchor == UNPLACED)
     {
         anchor                 = loc;
         currentPos             = loc;
         curSide                = getSide(loc, ab);
         sameLevelDisambiguator = new SameLevelDisambiguator(anchor.z);
     }
     else
     {
         loc = align(loc);
         onLineSelected(anchor, loc, curSide);
         //World.world.onVoxelUpdated(Cube.createInclusive(anchor,loc));
         anchor = UNPLACED;
     }
 }