1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-11 23:50:29 +01:00

Renamed local variables

This commit is contained in:
Rich Dunne 2020-08-24 09:13:34 -06:00
parent 0c2f9134da
commit 4857ce2095

View file

@ -82,9 +82,9 @@ namespace SceneManager
pathsNum.Insert(indexToInsertAt, pathNum); pathsNum.Insert(indexToInsertAt, pathNum);
} }
public static void RefreshMenu(UIMenuItem trafficRemoveWaypoint) public static void RefreshMenu()
{ {
trafficRemoveWaypoint.Enabled = true; //trafficRemoveWaypoint.Enabled = true;
pathMainMenu.Clear(); pathMainMenu.Clear();
pathMainMenu.AddItem(createNewPath = new UIMenuItem("Continue Creating Current Path")); pathMainMenu.AddItem(createNewPath = new UIMenuItem("Continue Creating Current Path"));
createNewPath.ForeColor = Color.Gold; createNewPath.ForeColor = Color.Gold;
@ -157,19 +157,19 @@ namespace SceneManager
// Remove the speed zone so cars don't continue to be affected after the path is deleted // Remove the speed zone so cars don't continue to be affected after the path is deleted
Game.LogTrivial($"Removing yield zone and waypoint blips"); Game.LogTrivial($"Removing yield zone and waypoint blips");
foreach (Waypoint wp in path.Waypoints) foreach (Waypoint waypoint in path.Waypoints)
{ {
if (wp.YieldZone != 0) if (waypoint.YieldZone != 0)
{ {
World.RemoveSpeedZone(wp.YieldZone); World.RemoveSpeedZone(waypoint.YieldZone);
} }
if (wp.Blip) if (waypoint.Blip)
{ {
wp.Blip.Delete(); waypoint.Blip.Delete();
} }
if (wp.CollectorRadiusBlip) if (waypoint.CollectorRadiusBlip)
{ {
wp.CollectorRadiusBlip.Delete(); waypoint.CollectorRadiusBlip.Delete();
} }
} }
@ -196,6 +196,7 @@ namespace SceneManager
{ {
if (selectedItem == createNewPath) if (selectedItem == createNewPath)
{ {
RefreshMenu();
pathMainMenu.Visible = false; pathMainMenu.Visible = false;
PathCreationMenu.pathCreationMenu.Visible = true; PathCreationMenu.pathCreationMenu.Visible = true;
@ -244,9 +245,9 @@ namespace SceneManager
} }
foreach (Path path in paths) foreach (Path path in paths)
{ {
foreach(Waypoint wp in path.Waypoints.Where(wp => wp.YieldZone != 0)) foreach(Waypoint waypoint in path.Waypoints.Where(wp => wp.YieldZone != 0))
{ {
World.RemoveSpeedZone(wp.YieldZone); World.RemoveSpeedZone(waypoint.YieldZone);
} }
path.Waypoints.Clear(); path.Waypoints.Clear();
} }