From 05778734a21ce2a9f454ab71a455d44c9e940883 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 6 Dec 2018 17:48:27 -0500 Subject: [PATCH] move mod path into constants --- src/SMAPI/Constants.cs | 5 ++++- src/SMAPI/Framework/SCore.cs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index b71c6195..8667b63f 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -91,9 +91,12 @@ namespace StardewModdingAPI /// The file path which stores the detected update version for the next run. internal static string UpdateMarker => Path.Combine(Constants.InternalFilesPath, "StardewModdingAPI.update.marker"); - /// The full path to the folder containing mods. + /// The default full path to search for mods. internal static string DefaultModsPath { get; } = Path.Combine(Constants.ExecutionPath, "Mods"); + /// The actual full path to search for mods. + internal static string ModsPath { get; set; } + /// The game's current semantic version. internal static ISemanticVersion GameVersion { get; } = new GameVersion(Constants.GetGameVersion()); diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index d4dffea5..53704bcf 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -117,7 +117,7 @@ namespace StardewModdingAPI.Framework private readonly ModToolkit Toolkit = new ModToolkit(); /// The path to search for mods. - private readonly string ModsPath; + private string ModsPath => Constants.ModsPath; /********* @@ -131,7 +131,7 @@ namespace StardewModdingAPI.Framework // init paths this.VerifyPath(modsPath); this.VerifyPath(Constants.LogDir); - this.ModsPath = modsPath; + Constants.ModsPath = modsPath; // init log file this.PurgeNormalLogs();