-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Mod Requirement Attribute for IConfigurators (#86)
* Added Mod Requirement Attribute for IConfigurators * Added Has to ModRepository and changed modDependencies description
- Loading branch information
1 parent
d2aef4b
commit 20c5f0a
Showing
4 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
Core/TimberApi/ConfiguratorSystem/RequiredModDependencies.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
|
||
namespace TimberApi.ConfiguratorSystem | ||
{ | ||
/// <summary> | ||
/// Attribute to register mod dependencies for a configurator | ||
/// Attribute should be placed on a `IConfigurator` class with a Configurator attribute, optional | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public class RequiredModDependencies : Attribute | ||
{ | ||
/// <summary> | ||
/// Required ModIds to install the configurator | ||
/// </summary> | ||
public string[] ModDependencies; | ||
|
||
/// <summary> | ||
/// Specify which mods are required to install the configurator. | ||
/// Requires ALL mods to be active. | ||
/// </summary> | ||
/// <param name="modDependencies">Unique mod id's that are required to be active to install the configurator</param> | ||
public RequiredModDependencies(params string[] modDependencies) | ||
{ | ||
ModDependencies = modDependencies; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters