blob: a36994fd3deb12a2903df3a3d5747025cddb7c22 (
plain)
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
|
using StardewModdingAPI.Framework.Models;
using StardewModdingAPI.Framework.ModLoading;
namespace StardewModdingAPI.Framework
{
/// <summary>Metadata for a mod.</summary>
internal interface IModMetadata
{
/*********
** Accessors
*********/
/// <summary>The mod's display name.</summary>
string DisplayName { get; }
/// <summary>The mod's full directory path.</summary>
string DirectoryPath { get; }
/// <summary>The mod manifest.</summary>
IManifest Manifest { get; }
/// <summary>>Metadata about the mod from SMAPI's internal data (if any).</summary>
ModDataRecord DataRecord { get; }
/// <summary>The metadata resolution status.</summary>
ModMetadataStatus Status { get; }
/// <summary>The reason the metadata is invalid, if any.</summary>
string Error { get; }
/// <summary>The mod instance (if it was loaded).</summary>
IMod Mod { get; }
/// <summary>The mod-provided API (if any).</summary>
object Api { get; }
/*********
** Public methods
*********/
/// <summary>Set the mod status.</summary>
/// <param name="status">The metadata resolution status.</param>
/// <param name="error">The reason the metadata is invalid, if any.</param>
/// <returns>Return the instance for chaining.</returns>
IModMetadata SetStatus(ModMetadataStatus status, string error = null);
/// <summary>Set the mod instance.</summary>
/// <param name="mod">The mod instance to set.</param>
IModMetadata SetMod(IMod mod);
/// <summary>Set the mod-provided API instance.</summary>
/// <param name="api">The mod-provided API.</param>
IModMetadata SetApi(object api);
}
}
|