Skip to content

Commit

Permalink
Use Tuple instead of ValueTuple since it's supported in Lua as a dict…
Browse files Browse the repository at this point in the history
…ionary key
  • Loading branch information
joelverhagen committed Jan 3, 2024
1 parent 5577ac8 commit 5a8ddee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FactorioTools/OilField/Steps/AddPipes.1.FBE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static (LocationSet Pipes, PipeStrategy FinalStrategy) ExecuteWithFbe(Con

private static (List<TerminalLocation> Terminals, LocationSet Pipes, PipeStrategy FinalStrategy) DelaunayTriangulation(Context context, Location middle, PipeStrategy strategy)
{
var centerDistance = new Dictionary<(Location, Location), int>();
var centerDistance = new Dictionary<Tuple<Location, Location>, int>();
var centers = context.CenterToTerminals.Keys.ToList();
for (var i = 0; i < centers.Count; i++)
{
Expand All @@ -42,8 +42,8 @@ private static (List<TerminalLocation> Terminals, LocationSet Pipes, PipeStrateg
var a = centers[i];
var b = centers[j];
var distance = a.GetManhattanDistance(b);
centerDistance.Add((a, b), distance);
centerDistance.Add((b, a), distance);
centerDistance.Add(Tuple.Create(a, b), distance);
centerDistance.Add(Tuple.Create(b, a), distance);
}
}

Expand Down

0 comments on commit 5a8ddee

Please sign in to comment.