summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Program.cs
diff options
context:
space:
mode:
authorGormogon <Gormogon@users.noreply.github.com>2016-05-29 16:13:24 -0400
committerGormogon <Gormogon@users.noreply.github.com>2016-05-29 16:13:24 -0400
commit625f9c89e4db470c0325b5d148c5286c1b5e54eb (patch)
tree31076fbf57cbbc993abca39eef7bc48762505754 /StardewModdingAPI/Program.cs
parent9503dfb94b432b1e6e268dc415327eec507a70c2 (diff)
downloadSMAPI-625f9c89e4db470c0325b5d148c5286c1b5e54eb.tar.gz
SMAPI-625f9c89e4db470c0325b5d148c5286c1b5e54eb.tar.bz2
SMAPI-625f9c89e4db470c0325b5d148c5286c1b5e54eb.zip
Take advantage of some new language opportunities.
Diffstat (limited to 'StardewModdingAPI/Program.cs')
-rw-r--r--StardewModdingAPI/Program.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/StardewModdingAPI/Program.cs b/StardewModdingAPI/Program.cs
index 60e6efb4..35963b08 100644
--- a/StardewModdingAPI/Program.cs
+++ b/StardewModdingAPI/Program.cs
@@ -89,25 +89,23 @@ namespace StardewModdingAPI
{
Log.AsyncY("Validating api paths...");
- _modPaths = new List<string>();
+ _modPaths = new List<string> {Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "Mods"), Path.Combine(Constants.ExecutionPath, "Mods")};
//_modContentPaths = new List<string>();
//TODO: Have an app.config and put the paths inside it so users can define locations to load mods from
- _modPaths.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "Mods"));
- _modPaths.Add(Path.Combine(Constants.ExecutionPath, "Mods"));
//Mods need to make their own content paths, since we're doing a different, manifest-driven, approach.
//_modContentPaths.Add(Path.Combine(Constants.ExecutionPath, "Mods", "Content"));
//_modContentPaths.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "Mods", "Content"));
//Checks that all defined modpaths exist as directories
- _modPaths.ForEach(path => VerifyPath(path));
+ _modPaths.ForEach(VerifyPath);
//_modContentPaths.ForEach(path => VerifyPath(path));
VerifyPath(Constants.LogDir);
if (!File.Exists(Constants.ExecutionPath + "\\Stardew Valley.exe"))
{
- throw new FileNotFoundException(string.Format("Could not found: {0}\\Stardew Valley.exe", Constants.ExecutionPath));
+ throw new FileNotFoundException($"Could not found: {Constants.ExecutionPath}\\Stardew Valley.exe");
}
}
@@ -440,10 +438,7 @@ namespace StardewModdingAPI
Log.AsyncR("The command specified could not be found");
else
{
- if (fnd.CommandArgs.Length > 0)
- Log.AsyncY($"{fnd.CommandName}: {fnd.CommandDesc} - {fnd.CommandArgs.ToSingular()}");
- else
- Log.AsyncY($"{fnd.CommandName}: {fnd.CommandDesc}");
+ Log.AsyncY(fnd.CommandArgs.Length > 0 ? $"{fnd.CommandName}: {fnd.CommandDesc} - {fnd.CommandArgs.ToSingular()}" : $"{fnd.CommandName}: {fnd.CommandDesc}");
}
}
else