Fix naming warnings

master 0.92-preview-455
D4VID 2 months ago
parent 1f35f3db60
commit a361dc725b

@ -21,8 +21,8 @@ namespace CriticalPathAnalyzer.Client.Tool {
private static AnalyzePathResponse _response;
private static Node _selectedNode;
private static readonly OutlineData StartOutline = new OutlineData(new Color24(0x00ff00));
private static readonly OutlineData EndOutline = new OutlineData(new Color24(0x00aaff));
private static readonly OutlineData startOutline = new OutlineData(new Color24(0x00ff00));
private static readonly OutlineData endOutline = new OutlineData(new Color24(0x00aaff));
public static void Init(ILogicLogger logger) {
_logger = logger;
@ -76,7 +76,7 @@ namespace CriticalPathAnalyzer.Client.Tool {
PegAddress pegAddress = RayCastPeg();
if (!pegAddress.IsEmpty()) {
Outliner.RemoveOutline(_startPegAddress);
Outliner.Outline(pegAddress, StartOutline);
Outliner.Outline(pegAddress, startOutline);
_startPegAddress = pegAddress;
if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) {
CalculateCriticalPath();
@ -121,7 +121,7 @@ namespace CriticalPathAnalyzer.Client.Tool {
PegAddress pegAddress = RayCastPeg();
if (!pegAddress.IsEmpty()) {
Outliner.RemoveOutline(_endPegAddress);
Outliner.Outline(pegAddress, EndOutline);
Outliner.Outline(pegAddress, endOutline);
_endPegAddress = pegAddress;
if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) {
CalculateCriticalPath();

@ -14,19 +14,19 @@ using LogicWorld.Server.Circuitry;
namespace CriticalPathAnalyzer.Server.Tool {
public class ServerPathTracer {
// Reflection/Delegate access helpers:
private static readonly Func<InputPeg, Cluster> GetCluster;
private static readonly Func<InputPeg, Cluster> getCluster;
// Services needed to lookup wires/pegs:
private static readonly ICircuitryManager Circuits;
private static readonly IWorldData World;
private static readonly ICircuitryManager circuits;
private static readonly IWorldData world;
static ServerPathTracer() {
GetCluster = Delegator.createPropertyGetter<InputPeg, Cluster>(
getCluster = Delegator.createPropertyGetter<InputPeg, Cluster>(
Properties.getPrivate(typeof(InputPeg), "Cluster")
);
Circuits = ServiceGetter.getService<ICircuitryManager>();
World = ServiceGetter.getService<IWorldData>();
circuits = ServiceGetter.getService<ICircuitryManager>();
world = ServiceGetter.getService<IWorldData>();
}
public static bool TracePath(
@ -342,7 +342,7 @@ namespace CriticalPathAnalyzer.Server.Tool {
/// <param name="address">Address of the peg</param>
/// <returns>True if it exists, false if it doesn't</returns>
private static bool PegExists(PegAddress address) {
IComponentInWorld component = World.Lookup(address.ComponentAddress);
IComponentInWorld component = world.Lookup(address.ComponentAddress);
if (component == null) {
return false; // Component of the peg does not exist in world.
}
@ -353,13 +353,13 @@ namespace CriticalPathAnalyzer.Server.Tool {
}
private static Cluster GetClusterAt(InputAddress peg) {
InputPeg originPeg = Circuits.LookupInput(peg);
InputPeg originPeg = circuits.LookupInput(peg);
if (originPeg == null) {
throw new Exception(
"Tried to lookup cluster on input peg, but the peg was not present in the circuit model! This should never happen, as the peg is present in the world.");
}
Cluster cluster = GetCluster(originPeg);
Cluster cluster = getCluster(originPeg);
if (cluster == null) {
throw new Exception(
"Tried to lookup cluster on input peg, but the cluster was 'null', this should never happen! As the peg is present in the world.");
@ -378,13 +378,13 @@ namespace CriticalPathAnalyzer.Server.Tool {
if (pegAddress.IsInputAddress(out InputAddress inputAddress)) {
primaryClusters.Add(GetClusterAt(inputAddress));
} else {
HashSet<WireAddress> wires = World.LookupPegWires(pegAddress);
HashSet<WireAddress> wires = world.LookupPegWires(pegAddress);
if (wires == null) {
return;
}
foreach (WireAddress wireAddress in wires) {
Wire wire = World.Lookup(wireAddress);
Wire wire = world.Lookup(wireAddress);
if (wire == null) {
throw new Exception(
"Tried to lookup wire given its address, but the world did not contain it. World must be corrupted.");

Loading…
Cancel
Save