-
-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start MelonHandler.cs, Streamlined Generics setup for Melons
- Loading branch information
1 parent
1b8a553
commit df74724
Showing
5 changed files
with
37 additions
and
2 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
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,12 @@ | ||
using MelonLoader.Utils; | ||
|
||
namespace MelonLoader.Melons; | ||
|
||
public static class MelonHandler | ||
{ | ||
public static void LoadMelonsFromDirectory<T>(string path) where T : MelonBase<T> | ||
{ | ||
MelonLogger.WriteSpacer(); | ||
MelonLogger.Msg($"Loading {MelonBase<T>.TypeName}s from '{path}'..."); | ||
} | ||
} |
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,7 @@ | ||
namespace MelonLoader.Melons; | ||
|
||
public abstract class MelonMod : MelonBase<MelonMod> | ||
{ | ||
static MelonMod() => TypeName = "Mod"; | ||
|
||
} |
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,6 @@ | ||
namespace MelonLoader.Melons; | ||
|
||
public abstract class MelonPlugin : MelonBase<MelonPlugin> | ||
{ | ||
static MelonPlugin() => TypeName = "Plugin"; | ||
} |