diff --git a/GamecraftModdingAPI/Blocks/MovementEngine.cs b/GamecraftModdingAPI/Blocks/MovementEngine.cs
index ab4eaa4..fbeea99 100644
--- a/GamecraftModdingAPI/Blocks/MovementEngine.cs
+++ b/GamecraftModdingAPI/Blocks/MovementEngine.cs
@@ -18,9 +18,10 @@ using Svelto.ECS.EntityStructs;
using Unity.Transforms;
using Unity.Mathematics;
using UnityEngine;
+using Svelto.DataStructures;
using GamecraftModdingAPI.Utility;
-using Svelto.DataStructures;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Blocks
{
@@ -33,7 +34,9 @@ namespace GamecraftModdingAPI.Blocks
public EntitiesDB entitiesDB { set; private get; }
- public bool IsInGame = false;
+ public bool isRemovable => false;
+
+ public bool IsInGame = false;
public void Dispose()
{
diff --git a/GamecraftModdingAPI/Blocks/PlacementEngine.cs b/GamecraftModdingAPI/Blocks/PlacementEngine.cs
index d954940..17f3314 100644
--- a/GamecraftModdingAPI/Blocks/PlacementEngine.cs
+++ b/GamecraftModdingAPI/Blocks/PlacementEngine.cs
@@ -21,6 +21,7 @@ using UnityEngine;
using uREPL;
using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Blocks
{
@@ -128,7 +129,9 @@ namespace GamecraftModdingAPI.Blocks
public string Name { get; } = "GamecraftModdingAPIPlacementGameEngine";
- [HarmonyPatch]
+ public bool isRemovable => false;
+
+ [HarmonyPatch]
public class FactoryObtainerPatch
{
static void Postfix(BlockEntityFactory blockEntityFactory)
diff --git a/GamecraftModdingAPI/Blocks/RemovalEngine.cs b/GamecraftModdingAPI/Blocks/RemovalEngine.cs
index 010b2fe..823cc86 100644
--- a/GamecraftModdingAPI/Blocks/RemovalEngine.cs
+++ b/GamecraftModdingAPI/Blocks/RemovalEngine.cs
@@ -12,6 +12,7 @@ using uREPL;
using GamecraftModdingAPI.Commands;
using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Blocks
{
@@ -54,7 +55,9 @@ namespace GamecraftModdingAPI.Blocks
public string Name { get; } = "GamecraftModdingAPIRemovalGameEngine";
- [HarmonyPatch]
+ public bool isRemovable => false;
+
+ [HarmonyPatch]
public class FactoryObtainerPatch
{
static void Postfix(IEntityFunctions entityFunctions,
diff --git a/GamecraftModdingAPI/Blocks/RotationEngine.cs b/GamecraftModdingAPI/Blocks/RotationEngine.cs
index 8038739..d56994f 100644
--- a/GamecraftModdingAPI/Blocks/RotationEngine.cs
+++ b/GamecraftModdingAPI/Blocks/RotationEngine.cs
@@ -20,6 +20,7 @@ using Unity.Mathematics;
using UnityEngine;
using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Blocks
{
@@ -32,7 +33,9 @@ namespace GamecraftModdingAPI.Blocks
public EntitiesDB entitiesDB { set; private get; }
- public bool IsInGame = false;
+ public bool isRemovable => false;
+
+ public bool IsInGame = false;
public void Dispose()
{
diff --git a/GamecraftModdingAPI/Blocks/SignalEngine.cs b/GamecraftModdingAPI/Blocks/SignalEngine.cs
index b40b0bb..6bac3cb 100644
--- a/GamecraftModdingAPI/Blocks/SignalEngine.cs
+++ b/GamecraftModdingAPI/Blocks/SignalEngine.cs
@@ -22,6 +22,7 @@ using UnityEngine;
using Gamecraft.Wires;
using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Blocks
{
@@ -33,8 +34,10 @@ namespace GamecraftModdingAPI.Blocks
public string Name { get; } = "GamecraftModdingAPISignalGameEngine";
public EntitiesDB entitiesDB { set; private get; }
+
+ public bool isRemovable => false;
- public bool IsInGame = false;
+ public bool IsInGame = false;
public void Dispose()
{
diff --git a/GamecraftModdingAPI/Blocks/TweakableEngine.cs b/GamecraftModdingAPI/Blocks/TweakableEngine.cs
index 1d029ee..63b02f7 100644
--- a/GamecraftModdingAPI/Blocks/TweakableEngine.cs
+++ b/GamecraftModdingAPI/Blocks/TweakableEngine.cs
@@ -3,9 +3,11 @@ using System.Reflection;
using RobocraftX.Blocks;
using Gamecraft.Wires;
+using Svelto.ECS;
using GamecraftModdingAPI.Utility;
-using Svelto.ECS;
+using GamecraftModdingAPI.Engines;
+
namespace GamecraftModdingAPI.Blocks
{
@@ -15,6 +17,8 @@ namespace GamecraftModdingAPI.Blocks
public EntitiesDB entitiesDB { set; private get; }
+ public bool isRemovable => false;
+
public bool IsInGame = false;
public void Dispose()
diff --git a/GamecraftModdingAPI/Commands/ICustomCommandEngine.cs b/GamecraftModdingAPI/Commands/ICustomCommandEngine.cs
index b971390..aafd257 100644
--- a/GamecraftModdingAPI/Commands/ICustomCommandEngine.cs
+++ b/GamecraftModdingAPI/Commands/ICustomCommandEngine.cs
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using Svelto.ECS;
using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Commands
{
diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs
index e5ea499..d99edce 100644
--- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs
+++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs
@@ -31,7 +31,9 @@ namespace GamecraftModdingAPI.Commands
public EntitiesDB entitiesDB { set; private get; }
- public void Dispose()
+ public bool isRemovable => true;
+
+ public void Dispose()
{
GamecraftModdingAPI.Utility.Logging.MetaDebugLog($"Unregistering SimpleCustomCommandEngine {this.Name}");
CommandRegistrationHelper.Unregister(this.Name);
diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs
index 4ec5949..307cac6 100644
--- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs
+++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs
@@ -22,7 +22,9 @@ namespace GamecraftModdingAPI.Commands
public EntitiesDB entitiesDB { set; private get; }
- public void Dispose()
+ public bool isRemovable => true;
+
+ public void Dispose()
{
GamecraftModdingAPI.Utility.Logging.MetaDebugLog($"Unregistering SimpleCustomCommandEngine {this.Name}");
CommandRegistrationHelper.Unregister(this.Name);
diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs
index 2aa81a3..2e162aa 100644
--- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs
+++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs
@@ -22,7 +22,9 @@ namespace GamecraftModdingAPI.Commands
public EntitiesDB entitiesDB { set; private get; }
- public void Dispose()
+ public bool isRemovable => true;
+
+ public void Dispose()
{
GamecraftModdingAPI.Utility.Logging.MetaDebugLog($"Unregistering SimpleCustomCommandEngine {this.Name}");
CommandRegistrationHelper.Unregister(this.Name);
diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs
index 5db84c2..e88b153 100644
--- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs
+++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs
@@ -22,7 +22,9 @@ namespace GamecraftModdingAPI.Commands
public EntitiesDB entitiesDB { set; private get; }
- public void Dispose()
+ public bool isRemovable => true;
+
+ public void Dispose()
{
GamecraftModdingAPI.Utility.Logging.MetaDebugLog($"Unregistering SimpleCustomCommandEngine {this.Name}");
CommandRegistrationHelper.Unregister(this.Name);
diff --git a/GamecraftModdingAPI/Utility/IApiEngine.cs b/GamecraftModdingAPI/Engines/IApiEngine.cs
similarity index 69%
rename from GamecraftModdingAPI/Utility/IApiEngine.cs
rename to GamecraftModdingAPI/Engines/IApiEngine.cs
index 0dd3e78..210c13d 100644
--- a/GamecraftModdingAPI/Utility/IApiEngine.cs
+++ b/GamecraftModdingAPI/Engines/IApiEngine.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
using Svelto.ECS;
-namespace GamecraftModdingAPI.Utility
+namespace GamecraftModdingAPI.Engines
{
///
/// Base engine interface used by all GamecraftModdingAPI engines
@@ -17,5 +17,10 @@ namespace GamecraftModdingAPI.Utility
/// The name of the engine
///
string Name { get; }
+
+ ///
+ /// Whether the emitter can be removed with Manager.RemoveEventEmitter(name)
+ ///
+ bool isRemovable { get; }
}
}
diff --git a/GamecraftModdingAPI/Engines/IFactoryEngine.cs b/GamecraftModdingAPI/Engines/IFactoryEngine.cs
new file mode 100644
index 0000000..3e9c23e
--- /dev/null
+++ b/GamecraftModdingAPI/Engines/IFactoryEngine.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Svelto.ECS;
+
+using GamecraftModdingAPI.Utility;
+
+namespace GamecraftModdingAPI.Engines
+{
+ ///
+ /// Engine interface to create a ModEventEntityStruct in entitiesDB when Emit() is called.
+ ///
+ public interface IFactoryEngine : IApiEngine
+ {
+ ///
+ /// The EntityFactory for the entitiesDB.
+ /// Use this to create a ModEventEntityStruct when Emit() is called.
+ ///
+ IEntityFactory Factory { set; }
+ }
+}
diff --git a/GamecraftModdingAPI/Engines/IReactionaryEngine.cs b/GamecraftModdingAPI/Engines/IReactionaryEngine.cs
new file mode 100644
index 0000000..9381605
--- /dev/null
+++ b/GamecraftModdingAPI/Engines/IReactionaryEngine.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Svelto.ECS;
+using Svelto.ECS.Internal;
+
+using GamecraftModdingAPI.Events;
+
+namespace GamecraftModdingAPI.Engines
+{
+ ///
+ /// Engine interface to handle ModEventEntityStruct events emitted by IEventEmitterEngines.
+ ///
+ public interface IReactionaryEngine : IApiEngine, IReactOnAddAndRemove, IReactOnAddAndRemove where T : unmanaged, IEntityComponent
+ {
+ }
+}
diff --git a/GamecraftModdingAPI/Events/IEventEmitterEngine.cs b/GamecraftModdingAPI/Events/IEventEmitterEngine.cs
index 6a303aa..f6fefc5 100644
--- a/GamecraftModdingAPI/Events/IEventEmitterEngine.cs
+++ b/GamecraftModdingAPI/Events/IEventEmitterEngine.cs
@@ -6,35 +6,18 @@ using System.Threading.Tasks;
using Svelto.ECS;
-using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Events
{
///
- /// Engine interface to create a ModEventEntityStruct in entitiesDB when Emit() is called.
+ /// Engine interface to create a ModEventEntityStruct in entitiesDB when a specific event occurs.
///
- public interface IEventEmitterEngine : IApiEngine
+ public interface IEventEmitterEngine : IFactoryEngine
{
///
- /// The type of event emitted
+ /// Emit the event. (Optional)
///
- int type { get; }
-
- ///
- /// Whether the emitter can be removed with Manager.RemoveEventEmitter(name)
- ///
- bool isRemovable { get; }
-
- ///
- /// The EntityFactory for the entitiesDB.
- /// Use this to create a ModEventEntityStruct when Emit() is called.
- ///
- IEntityFactory Factory { set; }
-
- ///
- /// Emit the event so IEventHandlerEngines can handle it.
- /// Call Emit() to trigger the IEventEmitterEngine's event.
- ///
- void Emit();
+ void Emit();
}
}
diff --git a/GamecraftModdingAPI/Events/IEventHandlerEngine.cs b/GamecraftModdingAPI/Events/IEventHandlerEngine.cs
index 7f0aa3f..34a14af 100644
--- a/GamecraftModdingAPI/Events/IEventHandlerEngine.cs
+++ b/GamecraftModdingAPI/Events/IEventHandlerEngine.cs
@@ -7,14 +7,14 @@ using System.Threading.Tasks;
using Svelto.ECS;
using Svelto.ECS.Internal;
-using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Events
{
///
/// Engine interface to handle ModEventEntityStruct events emitted by IEventEmitterEngines.
///
- public interface IEventHandlerEngine : IApiEngine, IReactOnAddAndRemove, IReactOnAddAndRemove
+ public interface IEventHandlerEngine : IReactionaryEngine
{
}
}
diff --git a/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs b/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs
index d0bc341..b656273 100644
--- a/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs
+++ b/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs
@@ -24,7 +24,9 @@ namespace GamecraftModdingAPI.Events
public EntitiesDB entitiesDB { set; private get; }
- public void Add(ref ModEventEntityStruct entityView, EGID egid)
+ public bool isRemovable => true;
+
+ public void Add(ref ModEventEntityStruct entityView, EGID egid)
{
if (entityView.type.Equals(this.type))
{
diff --git a/GamecraftModdingAPI/Input/FakeInputEngine.cs b/GamecraftModdingAPI/Input/FakeInputEngine.cs
index dea0f3e..bc9aaa8 100644
--- a/GamecraftModdingAPI/Input/FakeInputEngine.cs
+++ b/GamecraftModdingAPI/Input/FakeInputEngine.cs
@@ -5,6 +5,7 @@ using RobocraftX.Players;
using Svelto.ECS;
using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Input
{
@@ -14,6 +15,8 @@ namespace GamecraftModdingAPI.Input
public EntitiesDB entitiesDB { set; private get; }
+ public bool isRemovable => false;
+
public bool IsReady = false;
public void Dispose()
diff --git a/GamecraftModdingAPI/Inventory/HotbarEngine.cs b/GamecraftModdingAPI/Inventory/HotbarEngine.cs
index 065298b..2079fb1 100644
--- a/GamecraftModdingAPI/Inventory/HotbarEngine.cs
+++ b/GamecraftModdingAPI/Inventory/HotbarEngine.cs
@@ -10,6 +10,7 @@ using Svelto.ECS;
using GamecraftModdingAPI.Blocks;
using GamecraftModdingAPI.Utility;
+using GamecraftModdingAPI.Engines;
namespace GamecraftModdingAPI.Inventory
{
@@ -19,6 +20,8 @@ namespace GamecraftModdingAPI.Inventory
public EntitiesDB entitiesDB { set; private get; }
+ public bool isRemovable => false;
+
public bool IsInGame = false;
public void Dispose()
diff --git a/GamecraftModdingAPI/Utility/AnalyticsDisablerPatch.cs b/GamecraftModdingAPI/Utility/AnalyticsDisablerPatch.cs
deleted file mode 100644
index 048e6fc..0000000
--- a/GamecraftModdingAPI/Utility/AnalyticsDisablerPatch.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Reflection;
-
-using Analytics;
-using HarmonyLib;
-using RobocraftX.Common;
-using Svelto.ECS;
-
-namespace GamecraftModdingAPI.Utility
-{
- ///
- /// Patch of Analytics.AnalyticsCompositionRoot.Compose(...)
- /// This stops some analytics collection built into Gamecraft.
- /// DO NOT USE! (This will likely crash your game on shutdown)
- ///
- [HarmonyPatch]
- class AnalyticsDisablerPatch
- {
- ///
- /// Don't activate gameplay analytics?
- ///
- public static bool DisableAnalytics = false;
-
- public static bool Prefix(object contextHolder, EnginesRoot enginesRoot, RCXMode rcxMode)
- {
- return !DisableAnalytics;
- }
-
- public static MethodBase TargetMethod(Harmony instance)
- {
- return typeof(Analytics.AnalyticsCompositionRoot).GetMethod("Compose").MakeGenericMethod(typeof(object));
- }
- }
-}
diff --git a/GamecraftModdingAPI/Utility/GameEngineManager.cs b/GamecraftModdingAPI/Utility/GameEngineManager.cs
index 5a52fd0..cc4973f 100644
--- a/GamecraftModdingAPI/Utility/GameEngineManager.cs
+++ b/GamecraftModdingAPI/Utility/GameEngineManager.cs
@@ -6,6 +6,8 @@ using System.Threading.Tasks;
using Svelto.ECS;
+using GamecraftModdingAPI.Engines;
+
namespace GamecraftModdingAPI.Utility
{
///
@@ -24,6 +26,10 @@ namespace GamecraftModdingAPI.Utility
{
Logging.MetaDebugLog($"Registering Game IApiEngine {engine.Name}");
_lastEngineRoot.AddEngine(engine);
+ if (typeof(IFactoryEngine).IsAssignableFrom(engine.GetType()))
+ {
+ ((IFactoryEngine)engine).Factory = _lastEngineRoot.GenerateEntityFactory();
+ }
}
}
@@ -49,16 +55,24 @@ namespace GamecraftModdingAPI.Utility
public static void RemoveGameEngine(string name)
{
- _gameEngines.Remove(name);
+ if (_gameEngines[name].isRemovable)
+ {
+ _gameEngines.Remove(name);
+ }
}
public static void RegisterEngines(EnginesRoot enginesRoot)
{
_lastEngineRoot = enginesRoot;
+ IEntityFactory factory = enginesRoot.GenerateEntityFactory();
foreach (var key in _gameEngines.Keys)
{
Logging.MetaDebugLog($"Registering Game IApiEngine {_gameEngines[key].Name}");
enginesRoot.AddEngine(_gameEngines[key]);
+ if (typeof(IFactoryEngine).IsAssignableFrom(_gameEngines[key].GetType()))
+ {
+ ((IFactoryEngine)_gameEngines[key]).Factory = factory;
+ }
}
}
}
diff --git a/GamecraftModdingAPI/Utility/GameStateEngine.cs b/GamecraftModdingAPI/Utility/GameStateEngine.cs
index 204f491..be20ba1 100644
--- a/GamecraftModdingAPI/Utility/GameStateEngine.cs
+++ b/GamecraftModdingAPI/Utility/GameStateEngine.cs
@@ -7,6 +7,8 @@ using System.Threading.Tasks;
using RobocraftX.SimulationModeState;
+using GamecraftModdingAPI.Engines;
+
namespace GamecraftModdingAPI.Utility
{
class GameStateEngine : IApiEngine
@@ -19,7 +21,9 @@ namespace GamecraftModdingAPI.Utility
public bool IsInGame { get { return _isInGame; } }
- public void Dispose()
+ public bool isRemovable => false;
+
+ public void Dispose()
{
_isInGame = false;
}
diff --git a/GamecraftModdingAPI/Utility/MenuEngineManager.cs b/GamecraftModdingAPI/Utility/MenuEngineManager.cs
index b5d7be1..9be203d 100644
--- a/GamecraftModdingAPI/Utility/MenuEngineManager.cs
+++ b/GamecraftModdingAPI/Utility/MenuEngineManager.cs
@@ -6,6 +6,8 @@ using System.Threading.Tasks;
using Svelto.ECS;
+using GamecraftModdingAPI.Engines;
+
namespace GamecraftModdingAPI.Utility
{
///
@@ -25,6 +27,10 @@ namespace GamecraftModdingAPI.Utility
{
Logging.MetaDebugLog($"Registering Menu IApiEngine {engine.Name}");
_lastEngineRoot.AddEngine(engine);
+ if (typeof(IFactoryEngine).IsAssignableFrom(engine.GetType()))
+ {
+ ((IFactoryEngine)engine).Factory = _lastEngineRoot.GenerateEntityFactory();
+ }
}
}
@@ -50,16 +56,24 @@ namespace GamecraftModdingAPI.Utility
public static void RemoveMenuEngine(string name)
{
- _menuEngines.Remove(name);
+ if (_menuEngines[name].isRemovable)
+ {
+ _menuEngines.Remove(name);
+ }
}
public static void RegisterEngines(EnginesRoot enginesRoot)
{
_lastEngineRoot = enginesRoot;
+ IEntityFactory factory = enginesRoot.GenerateEntityFactory();
foreach (var key in _menuEngines.Keys)
{
Logging.MetaDebugLog($"Registering Menu IApiEngine {_menuEngines[key].Name}");
enginesRoot.AddEngine(_menuEngines[key]);
+ if (typeof(IFactoryEngine).IsAssignableFrom(_menuEngines[key].GetType()))
+ {
+ ((IFactoryEngine)_menuEngines[key]).Factory = factory;
+ }
}
}
}
diff --git a/GamecraftModdingAPI/Utility/MinimumSpecsCheckPatch.cs b/GamecraftModdingAPI/Utility/MinimumSpecsCheckPatch.cs
deleted file mode 100644
index 23d392c..0000000
--- a/GamecraftModdingAPI/Utility/MinimumSpecsCheckPatch.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using HarmonyLib;
-using RobocraftX.FrontEnd;
-
-namespace GamecraftModdingAPI.Utility
-{
- ///
- /// Patch of bool RobocraftX.FrontEnd.MinimumSpecsCheck.CheckRequirementsMet()
- ///
- [HarmonyPatch(typeof(MinimumSpecsCheck), "CheckRequirementsMet")]
- class MinimumSpecsCheckPatch
- {
- ///
- /// Ignore result of the requirement check?
- ///
- public static bool ForcePassMinimumSpecCheck = false;
-
- public static void Postfix(ref bool __result)
- {
- __result = __result || ForcePassMinimumSpecCheck;
- }
- }
-}
diff --git a/GamecraftModdingAPI/Utility/SteamInitPatch.cs b/GamecraftModdingAPI/Utility/SteamInitPatch.cs
deleted file mode 100644
index b8546c2..0000000
--- a/GamecraftModdingAPI/Utility/SteamInitPatch.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using HarmonyLib;
-using RobocraftX.Common;
-
-namespace GamecraftModdingAPI.Utility
-{
- ///
- /// Patch of bool RobocraftX.Common.SteamManager.VerifyOrInit()
- /// This does not let you run Gamecraft without Steam.
- /// DO NOT USE!
- ///
- [HarmonyPatch(typeof(SteamManager), "VerifyOrInit")]
- class SteamInitPatch
- {
- ///
- /// Ignore the result of steam initialization?
- ///
- public static bool ForcePassSteamCheck = false;
-
- public static void Postfix(ref bool __result)
- {
- __result = __result || ForcePassSteamCheck;
- }
- }
-}