1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-11 07:30:40 +01:00

Commented out unused code

This commit is contained in:
Rich Dunne 2021-05-23 08:29:58 -06:00
parent 58dd8afa22
commit c9e40a49d9

View file

@ -15,60 +15,60 @@ namespace SceneManager.Managers
internal static Paths.Path[] Paths { get; } = new Paths.Path[10]; internal static Paths.Path[] Paths { get; } = new Paths.Path[10];
internal static Dictionary<string, List<Paths.Path>> ImportedPaths { get; } = new Dictionary<string, List<Paths.Path>>(); internal static Dictionary<string, List<Paths.Path>> ImportedPaths { get; } = new Dictionary<string, List<Paths.Path>>();
internal static Paths.Path ImportPath(Paths.Path importedPath) //internal static Paths.Path ImportPath(Paths.Path importedPath)
{ //{
importedPath.State = State.Creating; // importedPath.State = State.Creating;
var firstVacantIndex = Array.IndexOf(Paths, Paths.First(x => x == null)); // var firstVacantIndex = Array.IndexOf(Paths, Paths.First(x => x == null));
if (firstVacantIndex < 0) // if (firstVacantIndex < 0)
{ // {
firstVacantIndex = 0; // firstVacantIndex = 0;
} // }
var pathNumber = firstVacantIndex + 1; // var pathNumber = firstVacantIndex + 1;
importedPath.Number = pathNumber; // importedPath.Number = pathNumber;
Paths[firstVacantIndex] = importedPath; // Paths[firstVacantIndex] = importedPath;
Game.LogTrivial($"Importing {importedPath.Name} at Paths index {firstVacantIndex}"); // Game.LogTrivial($"Importing {importedPath.Name} at Paths index {firstVacantIndex}");
Game.DisplayNotification($"~o~Scene Manager ~y~[Importing]\n~w~Importing path: ~b~{importedPath.Name} ~w~."); // Game.DisplayNotification($"~o~Scene Manager ~y~[Importing]\n~w~Importing path: ~b~{importedPath.Name} ~w~.");
return importedPath; // return importedPath;
} //}
internal static void ExportPath() //internal static void ExportPath()
{ //{
var currentPath = Paths[PathMainMenu.EditPath.Index]; // var currentPath = Paths[PathMainMenu.EditPath.Index];
// If the path is in the import menu, autosave with the same name. // // If the path is in the import menu, autosave with the same name.
if(ImportPathMenu.Menu.MenuItems.Any(x=> x.Text == currentPath.Name)) // if(ImportPathMenu.Menu.MenuItems.Any(x=> x.Text == currentPath.Name))
{ // {
Game.LogTrivial($"Autosaving {currentPath.Name}"); // Game.LogTrivial($"Autosaving {currentPath.Name}");
currentPath.Save(); // currentPath.Save();
} // }
else // else
{ // {
// Reference PNWParks's UserInput class from LiveLights // // Reference PNWParks's UserInput class from LiveLights
var filename = UserInput.PromptPlayerForFileName("Type the name you would like to save your file as", "Enter a filename", 100); // var filename = UserInput.PromptPlayerForFileName("Type the name you would like to save your file as", "Enter a filename", 100);
// If filename != null or empty, check if export directory exists (GTA V/Plugins/SceneManager/Saved Paths) // // If filename != null or empty, check if export directory exists (GTA V/Plugins/SceneManager/Saved Paths)
if (string.IsNullOrWhiteSpace(filename)) // if (string.IsNullOrWhiteSpace(filename))
{ // {
Game.DisplayHelp($"Invalid filename given. Filename cannot be null, empty, or consist of just white spaces."); // Game.DisplayHelp($"Invalid filename given. Filename cannot be null, empty, or consist of just white spaces.");
Game.LogTrivial($"Invalid filename given. Filename cannot be null, empty, or consist of just white spaces."); // Game.LogTrivial($"Invalid filename given. Filename cannot be null, empty, or consist of just white spaces.");
return; // return;
} // }
Game.LogTrivial($"Filename: {filename}"); // Game.LogTrivial($"Filename: {filename}");
currentPath.Name = filename; // currentPath.Name = filename;
currentPath.Save(); // currentPath.Save();
} // }
PathMainMenu.ImportPath.Enabled = true; // PathMainMenu.ImportPath.Enabled = true;
ImportPathMenu.Build(); // ImportPathMenu.Build();
PathMainMenu.Build(); // PathMainMenu.Build();
BarrierMenu.Build(); // BarrierMenu.Build();
PathMainMenu.Menu.Visible = true; // PathMainMenu.Menu.Visible = true;
} //}
internal static Paths.Path InitializeNewPath() internal static Paths.Path InitializeNewPath()
{ {