muffin v7.5.11

This commit is contained in:
alydev 2026-08-17 20:29:32 +10:00
parent addf2d530f
commit 3102923ce2
522 changed files with 41082 additions and 211592 deletions

View file

@ -1,45 +1,10 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace SmartNav.Graph;
public sealed class NavGraph
{
[CompilerGenerated]
private sealed class _003C_003Ec__DisplayClass11_0
{
public NavEdge edge;
internal bool _003CReplaceEdge_003Eb__0(NavEdge e)
{
int num = ((!_206D_200B_200F_202D_206A_206D_206E_202E_200C_202D_200B_206A_206D_200B_206B_200E_202B_202C_202C_202B_200F_206A_202A_202C_202C_200F_206D_202C_200F_206E_200B_200C_206B_202A_202A_206D_206C_200C_200B_206D_202E(e.ToNodeId, edge.ToNodeId)) ? 1864125654 : 1864125653);
while (true)
{
int num2 = num;
int num3 = 1864125655;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 0:
goto IL_0056;
case 2:
return e.EdgeType == edge.EdgeType;
case 1:
return false;
}
continue;
IL_0056:
num = 1864125653;
}
}
static bool _206D_200B_200F_202D_206A_206D_206E_202E_200C_202D_200B_206A_206D_200B_206B_200E_202B_202C_202C_202B_200F_206A_202A_202C_202C_200F_206D_202C_200F_206E_200B_200C_206B_202A_202A_206D_206C_200C_200B_206D_202E(string P_0, string P_1)
{
return P_0 == P_1;
}
}
private readonly Dictionary<string, NavNode> _nodes = new Dictionary<string, NavNode>();
private readonly Dictionary<string, List<NavEdge>> _adjacency = new Dictionary<string, List<NavEdge>>();
@ -59,34 +24,11 @@ public sealed class NavGraph
get
{
int num = 0;
using Dictionary<string, List<NavEdge>>.ValueCollection.Enumerator enumerator = _adjacency.Values.GetEnumerator();
int num2 = 165728447;
while (true)
foreach (List<NavEdge> value in _adjacency.Values)
{
int num3 = num2;
int num4 = 165728444;
int num5 = num3;
int num6 = num5 + num4;
int num7 = num5 & num4;
switch (num6 - (num7 + num7))
{
case 3:
num2 = (enumerator.MoveNext() ? 165728445 : 165728446);
break;
case 1:
{
List<NavEdge> current = enumerator.Current;
num += current.Count;
num2 = 165728447;
break;
}
case 0:
num2 = 165728447;
break;
case 2:
return num;
}
num += value.Count;
}
return num;
}
}
@ -94,210 +36,71 @@ public sealed class NavGraph
{
bool num = !_nodes.ContainsKey(node.Id);
_nodes[node.Id] = node;
int num2 = ((!num) ? (-2079391440) : (-2079391437));
List<string> value = default(List<string>);
while (true)
if (num)
{
int num3 = num2;
int num4 = -2079391439;
int num5 = num3;
switch ((num5 | num4) - (num5 & num4))
_adjacency[node.Id] = new List<NavEdge>();
if (!_territoryIndex.TryGetValue(node.TerritoryId, out List<string> value))
{
case 0:
num2 = -2079391437;
break;
case 4:
value.Add(node.Id);
num2 = -2079391440;
break;
case 3:
value = new List<string>();
_territoryIndex[node.TerritoryId] = value;
num2 = -2079391435;
break;
case 2:
_adjacency[node.Id] = new List<NavEdge>();
num2 = (_territoryIndex.TryGetValue(node.TerritoryId, out value) ? (-2079391435) : (-2079391438));
break;
case 1:
return;
}
value.Add(node.Id);
}
}
public void AddEdge(NavEdge edge)
{
List<NavEdge> value;
int num = (_adjacency.TryGetValue(edge.FromNodeId, out value) ? (-2081875728) : (-2081875725));
while (true)
if (!_adjacency.TryGetValue(edge.FromNodeId, out List<NavEdge> value))
{
int num2 = num;
int num3 = -2081875726;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 0:
num = -2081875725;
break;
case 2:
value.Add(edge);
return;
case 1:
value = new List<NavEdge>();
_adjacency[edge.FromNodeId] = value;
num = -2081875728;
break;
}
value = new List<NavEdge>();
_adjacency[edge.FromNodeId] = value;
}
value.Add(edge);
}
public void ReplaceEdge(NavEdge edge)
{
List<NavEdge> value;
int num = (_adjacency.TryGetValue(edge.FromNodeId, out value) ? (-1414739437) : (-1414739440));
while (true)
if (!_adjacency.TryGetValue(edge.FromNodeId, out List<NavEdge> value))
{
int num2 = num;
int num3 = -1414739438;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 1:
value.RemoveAll(delegate(NavEdge e)
{
int num5 = ((!_003C_003Ec__DisplayClass11_0._206D_200B_200F_202D_206A_206D_206E_202E_200C_202D_200B_206A_206D_200B_206B_200E_202B_202C_202C_202B_200F_206A_202A_202C_202C_200F_206D_202C_200F_206E_200B_200C_206B_202A_202A_206D_206C_200C_200B_206D_202E(e.ToNodeId, edge.ToNodeId)) ? 1864125654 : 1864125653);
while (true)
{
int num6 = num5;
int num7 = 1864125655;
int num8 = num6;
switch ((num8 | num7) - (num8 & num7))
{
case 0:
goto IL_0056;
case 2:
return e.EdgeType == edge.EdgeType;
case 1:
return false;
}
continue;
IL_0056:
num5 = 1864125653;
}
});
value.Add(edge);
return;
case 2:
value = new List<NavEdge>();
_adjacency[edge.FromNodeId] = value;
num = -1414739437;
break;
case 0:
num = -1414739440;
break;
}
value = new List<NavEdge>();
_adjacency[edge.FromNodeId] = value;
}
value.RemoveAll((NavEdge e) => e.ToNodeId == edge.ToNodeId && e.EdgeType == edge.EdgeType);
value.Add(edge);
}
public void RemoveEdges(string fromNodeId, Predicate<NavEdge> predicate)
{
List<NavEdge> value;
int num = ((!_adjacency.TryGetValue(fromNodeId, out value)) ? 1405127907 : 1405127904);
while (true)
if (_adjacency.TryGetValue(fromNodeId, out List<NavEdge> value))
{
int num2 = num;
int num3 = 1405127906;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 0:
num = 1405127904;
break;
case 1:
return;
case 2:
value.RemoveAll(predicate);
num = 1405127907;
break;
}
value.RemoveAll(predicate);
}
}
public NavNode? GetNode(string nodeId)
{
NavNode value;
int num = (_nodes.TryGetValue(nodeId, out value) ? 640244294 : 640244295);
while (true)
if (!_nodes.TryGetValue(nodeId, out NavNode value))
{
int num2 = num;
int num3 = 640244294;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 0:
return value;
case 1:
return null;
case 2:
goto IL_0054;
}
continue;
IL_0054:
num = 640244295;
return null;
}
return value;
}
public IReadOnlyList<NavEdge> GetEdges(string nodeId)
{
List<NavEdge> value;
int num = (_adjacency.TryGetValue(nodeId, out value) ? 577743021 : 577743022);
while (true)
if (!_adjacency.TryGetValue(nodeId, out List<NavEdge> value))
{
int num2 = num;
int num3 = 577743023;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 2:
return value;
case 1:
return new List<NavEdge>();
case 0:
goto IL_0058;
}
continue;
IL_0058:
num = 577743022;
return new List<NavEdge>();
}
return value;
}
public IReadOnlyList<string> GetNodesInTerritory(uint territoryId)
{
List<string> value;
int num = (_territoryIndex.TryGetValue(territoryId, out value) ? 111271957 : 111271958);
while (true)
if (!_territoryIndex.TryGetValue(territoryId, out List<string> value))
{
int num2 = num;
int num3 = 111271959;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 0:
goto IL_004e;
case 1:
return new List<string>();
case 2:
return value;
}
continue;
IL_004e:
num = 111271958;
return new List<string>();
}
return value;
}
}