mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 08:33:19 +01:00
Cleanup ByondExecutableLock
This commit is contained in:
@@ -6,13 +6,26 @@ namespace Tgstation.Server.Host.Components.Byond
|
||||
sealed class ByondExecutableLock : IByondExecutableLock
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Version Version { get; set; }
|
||||
public Version Version { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string DreamDaemonPath { get; set; }
|
||||
public string DreamDaemonPath { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string DreamMakerPath { get; set; }
|
||||
public string DreamMakerPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Construct a <see cref="ByondExecutableLock"/>
|
||||
/// </summary>
|
||||
/// <param name="version">The value of <see cref="Version"/></param>
|
||||
/// <param name="dreamDaemonPath">The value of <see cref="DreamDaemonPath"/></param>
|
||||
/// <param name="dreamMakerPath">The value of <see cref="DreamMakerPath"/></param>
|
||||
public ByondExecutableLock(Version version, string dreamDaemonPath, string dreamMakerPath)
|
||||
{
|
||||
Version = version ?? throw new ArgumentNullException(nameof(version));
|
||||
dreamDaemonPath = dreamDaemonPath ?? throw new ArgumentNullException(nameof(dreamDaemonPath));
|
||||
dreamMakerPath = dreamMakerPath ?? throw new ArgumentNullException(nameof(dreamMakerPath));
|
||||
}
|
||||
|
||||
//at one point in design, byond versions were to delete themselves if they werent the active version
|
||||
//That changed at some point so these functions are intentioanlly left blank
|
||||
|
||||
@@ -197,12 +197,7 @@ namespace Tgstation.Server.Host.Components.Byond
|
||||
|
||||
var versionKey = VersionKey(versionToUse);
|
||||
|
||||
return new ByondExecutableLock
|
||||
{
|
||||
DreamDaemonPath = ioManager.ResolvePath(ioManager.ConcatPath(versionKey, BinPath, byondInstaller.DreamDaemonName)),
|
||||
DreamMakerPath = ioManager.ResolvePath(ioManager.ConcatPath(versionKey, BinPath, byondInstaller.DreamMakerName)),
|
||||
Version = versionToUse
|
||||
};
|
||||
return new ByondExecutableLock(versionToUse, ioManager.ResolvePath(ioManager.ConcatPath(versionKey, BinPath, byondInstaller.DreamDaemonName)), ioManager.ResolvePath(ioManager.ConcatPath(versionKey, BinPath, byondInstaller.DreamMakerName)));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user