public static void Initialize(string modName, string configDirectoryPath) { Name = modName; RootPath = ConfigPath = Pathfinder.FindModRootPath(modName); if (configDirectoryPath != null) { ConfigPath += Path.DirectorySeparatorChar + configDirectoryPath; } Logger.LogDebug($"Initialized {modName} mod at path {RootPath}, with config root at {ConfigPath}"); }
public Core(string modName, string configDirectoryPath, bool logDebugMessages) { this.Logger = new Logger(modName, logDebugMessages); this.ModName = modName; this.RootPath = this.ConfigPath = Pathfinder.FindModRootPath(modName); if (configDirectoryPath != null) { this.ConfigPath = Pathfinder.MergePath(this.ConfigPath, configDirectoryPath); } this.Logger.LogDebug($"Initialized {modName} mod at path {this.RootPath}, with config root at {this.ConfigPath}"); }
public Core(string modName, string workshopID, string configDirectoryPath, bool logDebugMessages) { this.Logger = new Logger(modName, logDebugMessages); this.ModName = modName; if (Pathfinder.FindModRootPath(modName, workshopID, out var path)) { this.RootPath = this.ConfigPath = path; } if (configDirectoryPath != null) { this.ConfigPath = Pathfinder.MergePath(this.ConfigPath, configDirectoryPath); } this.Logger.Log($"Initialized successfully. Version: {Assembly.GetCallingAssembly().GetName().Version}, Path: {this.RootPath}, Config root: {this.ConfigPath}"); }