mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Add mod name abbreviation
This commit is contained in:
1 parent
7c085b1072
commit
228ed9711a
1 file changed
+11
-1
@@ -1,4 +1,5 @@
|
||||
using BepInEx.Configuration;
|
||||
using System.Linq;
|
||||
using BepInEx.Configuration;
|
||||
|
||||
namespace MiraAPI.PluginLoading;
|
||||
|
||||
@@ -12,6 +13,15 @@ public interface IMiraPlugin
|
||||
/// </summary>
|
||||
string OptionsTitleText { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the abbreviated name to display for other mods to pick up.
|
||||
/// </summary>
|
||||
/// <returns>The <see cref="string"/> text for the plugin.</returns>
|
||||
public virtual string GetAbbreviatedModName()
|
||||
{
|
||||
return new(OptionsTitleText.Where(c => !char.IsLower(c) && !char.IsWhiteSpace(c)).ToArray());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name for the first custom category in the game options menu, if any.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user