public override void Do() { this.m_oldFocus = FPGA.FPGA.Instance.Current; Tile current = FPGA.FPGA.Instance.Current; Types.Direction direction = Types.ParseDirectionFromString(this.DirectionString); while (true) { TileKey targetKey = V5Navigator.GetDestination(current, direction, 1); if (!FPGA.FPGA.Instance.Contains(targetKey)) { throw new ArgumentException("Left FPGA during navigation from " + current + " in direction " + direction); } current = FPGA.FPGA.Instance.GetTile(targetKey); if (!FPGA.FPGA.Instance.Contains(current.TileKey)) { throw new ArgumentException("Leaving FPGA"); } if (current.Location.StartsWith(this.TargetPrefix)) { FPGA.FPGA.Instance.Current = current; break; } } }
public override void Do() { this.m_oldFocus = FPGA.FPGA.Instance.Current; Tile current = FPGA.FPGA.Instance.Current; Types.Direction direction = Types.ParseDirectionFromString(this.DirectionString); while (true) { TileKey targetKey = V5Navigator.GetDestination(current, direction, 1); if (!FPGA.FPGA.Instance.Contains(targetKey)) throw new ArgumentException("Left FPGA during navigation from " + current + " in direction " + direction); current = FPGA.FPGA.Instance.GetTile(targetKey); if (!FPGA.FPGA.Instance.Contains(current.TileKey)) { throw new ArgumentException("Leaving FPGA"); } if (System.Text.RegularExpressions.Regex.IsMatch(current.Location, this.Regex)) { FPGA.FPGA.Instance.Current = current; break; } } }