Browse Source

Update refs for Techblox 2022.03.17.17.24

master
NGnius (Graham) 2 years ago
parent
commit
20ca27983c
2 changed files with 1242 additions and 786 deletions
  1. +1235
    -779
      HelloModdingWorld/HelloModdingWorld.csproj
  2. +7
    -7
      HelloModdingWorld/MyPlugin.cs

+ 1235
- 779
HelloModdingWorld/HelloModdingWorld.csproj
File diff suppressed because it is too large
View File


+ 7
- 7
HelloModdingWorld/MyPlugin.cs View File

@@ -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


Loading…
Cancel
Save