This repository has been archived by the owner on Aug 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathILauncherEnvironment.cs
57 lines (47 loc) · 2.67 KB
/
ILauncherEnvironment.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System.Collections.Generic;
using System.IO;
using Packsly3.Core.Launcher.Instance;
using Packsly3.Core.Modpack;
namespace Packsly3.Core.Launcher {
public interface ILauncherEnvironment {
/// <summary>
/// Unique name of this environment.
/// This name is used in commands.
/// </summary>
string Name { get; }
/// <summary>
/// A flag informing the installer if it should embed Packsly instance into the workspace.
/// </summary>
bool AllowEmbeding { get; }
/// <summary>
/// Provides information about environment compatibility with given workspace.
/// Used to automatically detect environment Packsly is running in.
/// </summary>
/// <param name="workspace">Directory of the workspace Packsly is running in.</param>
/// <returns>True if this environment is compatible with specified workspace.</returns>
bool IsCompatible(DirectoryInfo workspace);
/// <summary>
/// Creates new minecraft instance with given id.
/// Used to create minecraft instance during installation from modpack definition.
/// This should is a place to prepare everything around minecraft instance itself, setting up properties like instance name is done by the installer.
/// </summary>
/// <param name="workspace">Directory of the workspace Packsly is running in.</param>
/// <param name="id">Unique identifier of currently installed minecraft instance.</param>
/// <param name="modpack">Modpack definition specs of currently installed modpack.</param>
/// <returns>New minecraft instance.</returns>
IMinecraftInstance CreateInstance(DirectoryInfo workspace, string id, ModpackDefinition modpack);
/// <summary>
/// Creates new minecraft instance from existing identifier, representing existing instance in the launcher.
/// </summary>
/// <param name="workspace">Directory of the workspace Packsly is running in.</param>
/// <param name="id">Unique identifier of existing minecraft instance.</param>
/// <returns>New minecraft instance, representing existing instance in the launcher.</returns>
IMinecraftInstance GetInstance(DirectoryInfo workspace, string id);
/// <summary>
/// Creates new minecraft instances for every existing instance in the launcher.
/// </summary>
/// <param name="workspace">Directory of the workspace Packsly is running in.</param>
/// <returns>List of minecraft instances existing in the launcher.</returns>
IReadOnlyCollection<IMinecraftInstance> GetInstances(DirectoryInfo workspace);
}
}