|
|
@@ -1,7 +1,7 @@ |
|
|
|
using System.Reflection; |
|
|
|
|
|
|
|
using IllusionPlugin; |
|
|
|
//using GamecraftModdingAPI; |
|
|
|
//using TechbloxModdingAPI; |
|
|
|
|
|
|
|
namespace HelloModdingWorld |
|
|
|
{ |
|
|
@@ -17,30 +17,30 @@ namespace HelloModdingWorld |
|
|
|
public override void OnApplicationQuit() |
|
|
|
{ |
|
|
|
// Shutdown this mod |
|
|
|
GamecraftModdingAPI.Utility.Logging.LogDebug($"{Name} has shutdown"); |
|
|
|
TechbloxModdingAPI.Utility.Logging.LogDebug($"{Name} has shutdown"); |
|
|
|
|
|
|
|
// Shutdown the Gamecraft modding API last |
|
|
|
GamecraftModdingAPI.Main.Shutdown(); |
|
|
|
TechbloxModdingAPI.Main.Shutdown(); |
|
|
|
} |
|
|
|
|
|
|
|
// called when Gamecraft starts up |
|
|
|
public override void OnApplicationStart() |
|
|
|
{ |
|
|
|
// Initialize the Gamecraft modding API first |
|
|
|
GamecraftModdingAPI.Main.Init(); |
|
|
|
TechbloxModdingAPI.Main.Init(); |
|
|
|
// check out the modding API docs here: https://mod.exmods.org/ |
|
|
|
|
|
|
|
// Initialize this mod |
|
|
|
// create HelloWorld command |
|
|
|
// this writes "Hello modding world!" when you execute it in Gamecraft's console |
|
|
|
// (use the forward-slash key '/' to open the console in Gamecraft when in a game) |
|
|
|
GamecraftModdingAPI.Commands.CommandBuilder.Builder() |
|
|
|
TechbloxModdingAPI.Commands.CommandBuilder.Builder() |
|
|
|
.Name("HelloWorld") // command name (used to invoke it in the console) |
|
|
|
.Description("Says Hello modding world!") // command description (displayed in help and hint toolbar) |
|
|
|
.Action(() => { GamecraftModdingAPI.Utility.Logging.CommandLog("Hello modding world!"); }) |
|
|
|
.Action(() => { TechbloxModdingAPI.Utility.Logging.CommandLog("Hello modding world!"); }) |
|
|
|
.Build(); // construct and automatically register the command so the modding API knows about it |
|
|
|
|
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaLog($"{Name} has started up"); |
|
|
|
TechbloxModdingAPI.Utility.Logging.MetaLog($"{Name} has started up"); |
|
|
|
} |
|
|
|
|
|
|
|
// unused methods |
|
|
|