|
|
@@ -2,11 +2,11 @@ |
|
|
|
using System.Reflection; |
|
|
|
|
|
|
|
using HarmonyLib; |
|
|
|
using Svelto.Context; |
|
|
|
using Svelto.ECS; |
|
|
|
using RobocraftX.CR.MainGame; |
|
|
|
using RobocraftX.Multiplayer; |
|
|
|
using RobocraftX.StateSync; |
|
|
|
using TechbloxModdingAPI.Utility; |
|
|
|
|
|
|
|
namespace TechbloxModdingAPI.Commands |
|
|
|
{ |
|
|
@@ -26,6 +26,7 @@ namespace TechbloxModdingAPI.Commands |
|
|
|
var entityFunctions = enginesRoot.GenerateEntityFunctions(); |
|
|
|
var entityFactory = enginesRoot.GenerateEntityFactory(); |
|
|
|
var entitySerializer = enginesRoot.GenerateEntitySerializer(); |
|
|
|
Logging.MetaDebugLog("Adding existing command engines"); |
|
|
|
enginesRoot.AddEngine((IEngine) Activator.CreateInstance( |
|
|
|
AccessTools.TypeByName("RobocraftX.GUI.CommandLine.ExecuteSetGravityCommandEngine"))); |
|
|
|
enginesRoot.AddEngine((IEngine) Activator.CreateInstance( |
|
|
@@ -92,6 +93,7 @@ namespace TechbloxModdingAPI.Commands |
|
|
|
AccessTools.TypeByName("RobocraftX.GUI.CommandLine.DamageCharacterCommandEngine"), entityFactory)); |
|
|
|
enginesRoot.AddEngine((IEngine) Activator.CreateInstance( |
|
|
|
AccessTools.TypeByName("RobocraftX.GUI.CommandLine.DisableCharacterDamageCommandEngine"))); |
|
|
|
Logging.MetaDebugLog("Existing command engines added"); |
|
|
|
|
|
|
|
CommandManager.RegisterEngines(enginesRoot); |
|
|
|
} |
|
|
@@ -99,7 +101,7 @@ namespace TechbloxModdingAPI.Commands |
|
|
|
public static MethodInfo TargetMethod() |
|
|
|
{ |
|
|
|
return AccessTools.Method(typeof(MainGameCompositionRoot), "DeterministicCompose") |
|
|
|
.MakeGenericMethod(typeof(UnityContext<MainGameCompositionRoot>)); |
|
|
|
.MakeGenericMethod(typeof(object)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |