Renamed all references of Gamecraft to Techblox

Except those that actually refer to the game's code
This commit is contained in:
Norbi Peti 2021-05-02 01:56:20 +02:00
parent a6f52070ee
commit c914b5b393
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
51 changed files with 94 additions and 95 deletions

View file

@ -16,7 +16,7 @@ namespace TechbloxModdingAPI.App
public IEntityFactory Factory { set; private get; } public IEntityFactory Factory { set; private get; }
public string Name => "GamecraftModdingAPIAppEngine"; public string Name => "TechbloxModdingAPIAppEngine";
public bool isRemovable => false; public bool isRemovable => false;

View file

@ -3,7 +3,7 @@ using System.Runtime.Serialization;
namespace TechbloxModdingAPI.App namespace TechbloxModdingAPI.App
{ {
public class AppException : GamecraftModdingAPIException public class AppException : TechbloxModdingAPIException
{ {
public AppException() public AppException()
{ {

View file

@ -10,7 +10,7 @@ using TechbloxModdingAPI.Utility;
namespace TechbloxModdingAPI.App namespace TechbloxModdingAPI.App
{ {
/// <summary> /// <summary>
/// The Gamecraft application that is running this code right now. /// The Techblox application that is running this code right now.
/// </summary> /// </summary>
public class Client public class Client
{ {
@ -42,7 +42,7 @@ namespace TechbloxModdingAPI.App
} }
/// <summary> /// <summary>
/// Gamecraft build version string. /// Techblox build version string.
/// Usually this is in the form YYYY.mm.DD.HH.MM.SS /// Usually this is in the form YYYY.mm.DD.HH.MM.SS
/// </summary> /// </summary>
/// <value>The version.</value> /// <value>The version.</value>
@ -75,7 +75,7 @@ namespace TechbloxModdingAPI.App
} }
/// <summary> /// <summary>
/// Whether Gamecraft is in the Main Menu /// Whether Techblox is in the Main Menu
/// </summary> /// </summary>
/// <value><c>true</c> if in menu; <c>false</c> when loading or in a game.</value> /// <value><c>true</c> if in menu; <c>false</c> when loading or in a game.</value>
public bool InMenu public bool InMenu
@ -85,7 +85,7 @@ namespace TechbloxModdingAPI.App
/// <summary> /// <summary>
/// Open a popup which prompts the user to click a button. /// Open a popup which prompts the user to click a button.
/// This reuses Gamecraft's error dialog popup /// This reuses Techblox's error dialog popup
/// </summary> /// </summary>
/// <param name="popup">The popup to display. Use an instance of SingleChoicePrompt or DualChoicePrompt.</param> /// <param name="popup">The popup to display. Use an instance of SingleChoicePrompt or DualChoicePrompt.</param>
public void PromptUser(Error popup) public void PromptUser(Error popup)

View file

@ -118,7 +118,7 @@ namespace TechbloxModdingAPI.App
/// <summary> /// <summary>
/// An event that fires right before a game returns to the main menu. /// An event that fires right before a game returns to the main menu.
/// At this point, Gamecraft is transitioning state so many things are invalid/unstable here. /// At this point, Techblox is transitioning state so many things are invalid/unstable here.
/// </summary> /// </summary>
public static event EventHandler<GameEventArgs> Exit public static event EventHandler<GameEventArgs> Exit
{ {

View file

@ -15,7 +15,7 @@ namespace TechbloxModdingAPI.App
public event EventHandler<GameEventArgs> BuildMode; public event EventHandler<GameEventArgs> BuildMode;
public string Name => "GamecraftModdingAPIBuildSimEventGameEngine"; public string Name => "TechbloxModdingAPIBuildSimEventGameEngine";
public bool isRemovable => false; public bool isRemovable => false;

View file

@ -22,7 +22,7 @@ namespace TechbloxModdingAPI.App
public event EventHandler<GameEventArgs> ExitGame; public event EventHandler<GameEventArgs> ExitGame;
public string Name => "GamecraftModdingAPIGameInfoMenuEngine"; public string Name => "TechbloxModdingAPIGameInfoMenuEngine";
public bool isRemovable => false; public bool isRemovable => false;

View file

@ -17,7 +17,7 @@ namespace TechbloxModdingAPI.App
{ {
public IEntityFactory Factory { set; private get; } public IEntityFactory Factory { set; private get; }
public string Name => "GamecraftModdingAPIGameInfoGameEngine"; public string Name => "TechbloxModdingAPIGameInfoGameEngine";
public bool isRemovable => false; public bool isRemovable => false;

View file

@ -100,7 +100,7 @@ namespace TechbloxModdingAPI.Blocks
} }
} }
public string Name { get; } = "GamecraftModdingAPIBlockCloneGameEngine"; public string Name { get; } = "TechbloxModdingAPIBlockCloneGameEngine";
public bool isRemovable { get; } = false; public bool isRemovable { get; } = false;
} }
} }

View file

@ -24,7 +24,7 @@ namespace TechbloxModdingAPI.Blocks
/// </summary> /// </summary>
public partial class BlockEngine : IApiEngine public partial class BlockEngine : IApiEngine
{ {
public string Name { get; } = "GamecraftModdingAPIBlockGameEngine"; public string Name { get; } = "TechbloxModdingAPIBlockGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -23,7 +23,7 @@ namespace TechbloxModdingAPI.Blocks
{ {
} }
public string Name { get; } = "GamecraftModdingAPIBlockEventsEngine"; public string Name { get; } = "TechbloxModdingAPIBlockEventsEngine";
public bool isRemovable { get; } = false; public bool isRemovable { get; } = false;
private bool shouldAddRemove; private bool shouldAddRemove;

View file

@ -4,7 +4,7 @@ using TechbloxModdingAPI;
namespace TechbloxModdingAPI.Blocks namespace TechbloxModdingAPI.Blocks
{ {
public class BlockException : GamecraftModdingAPIException public class BlockException : TechbloxModdingAPIException
{ {
public BlockException() public BlockException()
{ {

View file

@ -6,7 +6,7 @@ namespace TechbloxModdingAPI.Blocks
public enum BlockIDs : ushort public enum BlockIDs : ushort
{ {
/// <summary> /// <summary>
/// Called "nothing" in Gamecraft. (DBID.NOTHING) /// Called "nothing" in Techblox. (DBID.NOTHING)
/// </summary> /// </summary>
Invalid = ushort.MaxValue, Invalid = ushort.MaxValue,
Cube = 0, Cube = 0,

View file

@ -248,7 +248,7 @@ namespace TechbloxModdingAPI.Blocks
clipboardManager.DecrementRefCount(blueprintID); clipboardManager.DecrementRefCount(blueprintID);
} }
public string Name { get; } = "GamecraftModdingAPIBlueprintGameEngine"; public string Name { get; } = "TechbloxModdingAPIBlueprintGameEngine";
public bool isRemovable { get; } = false; public bool isRemovable { get; } = false;
[HarmonyPatch] [HarmonyPatch]

View file

@ -14,7 +14,7 @@ namespace TechbloxModdingAPI.Blocks
{ {
public class CustomBlockEntityDescriptor : SerializableEntityDescriptor<CustomBlockEntityDescriptor._CustomBlockDescriptor> public class CustomBlockEntityDescriptor : SerializableEntityDescriptor<CustomBlockEntityDescriptor._CustomBlockDescriptor>
{ {
[HashName("GamecraftModdingAPICustomBlockV0")] [HashName("TechbloxModdingAPICustomBlockV0")]
public class _CustomBlockDescriptor : IEntityDescriptor public class _CustomBlockDescriptor : IEntityDescriptor
{ {
public IComponentBuilder[] componentsToBuild { get; } = public IComponentBuilder[] componentsToBuild { get; } =
@ -57,7 +57,7 @@ namespace TechbloxModdingAPI.Blocks
_registeredBlocks.Add((id, name)); _registeredBlocks.Add((id, name));
} }
public string Name { get; } = "GamecraftModdingAPICustomBlockEngine"; public string Name { get; } = "TechbloxModdingAPICustomBlockEngine";
public bool isRemovable { get; } = false; public bool isRemovable { get; } = false;
public IEntityFactory Factory { get; set; } public IEntityFactory Factory { get; set; }
}*/ }*/

View file

@ -14,7 +14,7 @@ namespace TechbloxModdingAPI.Blocks
/// </summary> /// </summary>
public class MovementEngine : IApiEngine public class MovementEngine : IApiEngine
{ {
public string Name { get; } = "GamecraftModdingAPIMovementGameEngine"; public string Name { get; } = "TechbloxModdingAPIMovementGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -80,7 +80,7 @@ namespace TechbloxModdingAPI.Blocks
return structInitializer; return structInitializer;
} }
public string Name => "GamecraftModdingAPIPlacementGameEngine"; public string Name => "TechbloxModdingAPIPlacementGameEngine";
public bool isRemovable => false; public bool isRemovable => false;

View file

@ -38,7 +38,7 @@ namespace TechbloxModdingAPI.Blocks
{ {
} }
public string Name { get; } = "GamecraftModdingAPIRemovalGameEngine"; public string Name { get; } = "TechbloxModdingAPIRemovalGameEngine";
public bool isRemovable => false; public bool isRemovable => false;

View file

@ -14,7 +14,7 @@ namespace TechbloxModdingAPI.Blocks
/// </summary> /// </summary>
public class RotationEngine : IApiEngine public class RotationEngine : IApiEngine
{ {
public string Name { get; } = "GamecraftModdingAPIRotationGameEngine"; public string Name { get; } = "TechbloxModdingAPIRotationGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -23,7 +23,7 @@ namespace TechbloxModdingAPI.Blocks
{ {
} }
public string Name { get; } = "GamecraftModdingAPIScalingEngine"; public string Name { get; } = "TechbloxModdingAPIScalingEngine";
public bool isRemovable { get; } = false; public bool isRemovable { get; } = false;
private EntityManager _entityManager; //Unity entity manager private EntityManager _entityManager; //Unity entity manager

View file

@ -16,7 +16,7 @@ namespace TechbloxModdingAPI.Blocks
public const float HIGH = 1.0f; public const float HIGH = 1.0f;
public const float ZERO = 0.0f; public const float ZERO = 0.0f;
public string Name { get; } = "GamecraftModdingAPISignalGameEngine"; public string Name { get; } = "TechbloxModdingAPISignalGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -1,7 +1,7 @@
using System; using System;
namespace TechbloxModdingAPI.Commands namespace TechbloxModdingAPI.Commands
{ {
public class CommandException : GamecraftModdingAPIException public class CommandException : TechbloxModdingAPIException
{ {
public CommandException() : base() {} public CommandException() : base() {}

View file

@ -10,7 +10,7 @@ using RobocraftX.CommandLine.Custom;
namespace TechbloxModdingAPI.Commands namespace TechbloxModdingAPI.Commands
{ {
/// <summary> /// <summary>
/// Convenient methods for registering commands to Gamecraft. /// Convenient methods for registering commands to Techblox.
/// All methods register to the command line and console block by default. /// All methods register to the command line and console block by default.
/// </summary> /// </summary>
public static class CommandRegistrationHelper public static class CommandRegistrationHelper

View file

@ -1,7 +1,7 @@
using System; using System;
namespace TechbloxModdingAPI.Events namespace TechbloxModdingAPI.Events
{ {
public class EventException : GamecraftModdingAPIException public class EventException : TechbloxModdingAPIException
{ {
public EventException() public EventException()
{ {

View file

@ -34,18 +34,18 @@ namespace TechbloxModdingAPI.Events
// so all event emitters and handlers must be re-registered. // so all event emitters and handlers must be re-registered.
EventManager.RegisterEngines(enginesRoot); EventManager.RegisterEngines(enginesRoot);
Logging.Log("Dispatching Game Activated event"); Logging.Log("Dispatching Game Activated event");
EventManager.GetEventEmitter("GamecraftModdingAPIGameActivatedEventEmitter").Emit(); EventManager.GetEventEmitter("TechbloxModdingAPIGameActivatedEventEmitter").Emit();
if (IsGameSwitching) if (IsGameSwitching)
{ {
IsGameSwitching = false; IsGameSwitching = false;
Logging.Log("Dispatching Game Switched To event"); Logging.Log("Dispatching Game Switched To event");
EventManager.GetEventEmitter("GamecraftModdingAPIGameSwitchedToEventEmitter").Emit(); EventManager.GetEventEmitter("TechbloxModdingAPIGameSwitchedToEventEmitter").Emit();
} }
if (IsGameReloading) if (IsGameReloading)
{ {
IsGameReloading = false; IsGameReloading = false;
Logging.Log("Dispatching Game Reloaded event"); Logging.Log("Dispatching Game Reloaded event");
EventManager.GetEventEmitter("GamecraftModdingAPIGameReloadedEventEmitter").Emit(); EventManager.GetEventEmitter("TechbloxModdingAPIGameReloadedEventEmitter").Emit();
} }
} }

View file

@ -14,7 +14,7 @@ namespace TechbloxModdingAPI.Events
[Obsolete] [Obsolete]
public class GameStateBuildEmitterEngine : IEventEmitterEngine, IUnorderedInitializeOnTimeStoppedModeEntered public class GameStateBuildEmitterEngine : IEventEmitterEngine, IUnorderedInitializeOnTimeStoppedModeEntered
{ {
public string Name { get; } = "GamecraftModdingAPIGameStateBuildEventEmitter" ; public string Name { get; } = "TechbloxModdingAPIGameStateBuildEventEmitter" ;
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -14,7 +14,7 @@ namespace TechbloxModdingAPI.Events
[Obsolete] [Obsolete]
public class GameStateSimulationEmitterEngine : IEventEmitterEngine, IUnorderedInitializeOnTimeRunningModeEntered public class GameStateSimulationEmitterEngine : IEventEmitterEngine, IUnorderedInitializeOnTimeRunningModeEntered
{ {
public string Name { get; } = "GamecraftModdingAPIGameStateSimulationEventEmitter" ; public string Name { get; } = "TechbloxModdingAPIGameStateSimulationEventEmitter" ;
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -33,10 +33,10 @@ namespace TechbloxModdingAPI.Events
FullGameFields.Init(__instance); FullGameFields.Init(__instance);
//Application.Application.SetFullGameCompositionRoot(__instance); //Application.Application.SetFullGameCompositionRoot(__instance);
Logging.Log("Dispatching App Init event"); Logging.Log("Dispatching App Init event");
EventManager.GetEventEmitter("GamecraftModdingAPIApplicationInitializedEventEmitter").Emit(); EventManager.GetEventEmitter("TechbloxModdingAPIApplicationInitializedEventEmitter").Emit();
} }
Logging.Log("Dispatching Menu Activated event"); Logging.Log("Dispatching Menu Activated event");
EventManager.GetEventEmitter("GamecraftModdingAPIMenuActivatedEventEmitter").Emit(); EventManager.GetEventEmitter("TechbloxModdingAPIMenuActivatedEventEmitter").Emit();
} }
} }
} }

View file

@ -22,7 +22,7 @@ namespace TechbloxModdingAPI.Events
{ {
// Event emitters and handlers should already be registered by MenuActivated event // Event emitters and handlers should already be registered by MenuActivated event
Logging.Log("Dispatching Menu Switched To event"); Logging.Log("Dispatching Menu Switched To event");
EventManager.GetEventEmitter("GamecraftModdingAPIMenuSwitchedToEventEmitter").Emit(); EventManager.GetEventEmitter("TechbloxModdingAPIMenuSwitchedToEventEmitter").Emit();
} }
} }
} }

View file

@ -3,21 +3,21 @@ using System.Runtime.Serialization;
namespace TechbloxModdingAPI namespace TechbloxModdingAPI
{ {
public class GamecraftModdingAPIException : Exception public class TechbloxModdingAPIException : Exception
{ {
public GamecraftModdingAPIException() public TechbloxModdingAPIException()
{ {
} }
public GamecraftModdingAPIException(string message) : base(message) public TechbloxModdingAPIException(string message) : base(message)
{ {
} }
public GamecraftModdingAPIException(string message, Exception innerException) : base(message, innerException) public TechbloxModdingAPIException(string message, Exception innerException) : base(message, innerException)
{ {
} }
protected GamecraftModdingAPIException(SerializationInfo info, StreamingContext context) : base(info, context) protected TechbloxModdingAPIException(SerializationInfo info, StreamingContext context) : base(info, context)
{ {
} }
} }

View file

@ -12,7 +12,7 @@ namespace TechbloxModdingAPI.Input
{ {
public class FakeInputEngine : IApiEngine public class FakeInputEngine : IApiEngine
{ {
public string Name { get; } = "GamecraftModdingAPIFakeInputEngine"; public string Name { get; } = "TechbloxModdingAPIFakeInputEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -22,9 +22,9 @@ namespace TechbloxModdingAPI.Interface.IMGUI
private static GUISkin _default = null; private static GUISkin _default = null;
/// <summary> /// <summary>
/// Best-effort imitation of Gamecraft's UI style. /// Best-effort imitation of Techblox's UI style.
/// </summary> /// </summary>
public static GUISkin Default public static GUISkin Default //TODO: Update to Techblox style
{ {
get get
{ {
@ -122,7 +122,7 @@ namespace TechbloxModdingAPI.Interface.IMGUI
_defaultCompletion++; _defaultCompletion++;
}; };
_blueBackground = new Texture2D(1, 1); _blueBackground = new Texture2D(1, 1);
_blueBackground.SetPixel(0, 0, new Color(0.004f, 0.522f, 0.847f) /* Gamecraft Blue */); _blueBackground.SetPixel(0, 0, new Color(0.004f, 0.522f, 0.847f) /* Techblox Blue */);
_blueBackground.Apply(); _blueBackground.Apply();
_grayBackground = new Texture2D(1, 1); _grayBackground = new Texture2D(1, 1);
_grayBackground.SetPixel(0, 0, new Color(0.745f, 0.745f, 0.745f) /* Gray */); _grayBackground.SetPixel(0, 0, new Color(0.745f, 0.745f, 0.745f) /* Gray */);

View file

@ -20,7 +20,7 @@ namespace TechbloxModdingAPI.Interface.IMGUI
/// </summary> /// </summary>
public static class IMGUIManager public static class IMGUIManager
{ {
internal static OnGuiRunner ImguiScheduler = new OnGuiRunner("GamecraftModdingAPI_IMGUIScheduler"); internal static OnGuiRunner ImguiScheduler = new OnGuiRunner("TechbloxModdingAPI_IMGUIScheduler");
private static Dictionary<string, UIElement> _activeElements = new Dictionary<string,UIElement>(); private static Dictionary<string, UIElement> _activeElements = new Dictionary<string,UIElement>();

View file

@ -18,7 +18,7 @@ namespace TechbloxModdingAPI.Inventory
{ {
public class HotbarEngine : IApiEngine public class HotbarEngine : IApiEngine
{ {
public string Name { get; } = "GamecraftModdingAPIHotbarGameEngine"; public string Name { get; } = "TechbloxModdingAPIHotbarGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -31,7 +31,7 @@ namespace TechbloxModdingAPI
/// <summary> /// <summary>
/// Initializes the TechbloxModdingAPI. /// Initializes the TechbloxModdingAPI.
/// Call this as soon as possible after Gamecraft starts up. /// Call this as soon as possible after Techblox starts up.
/// Ideally, this should be called from your main Plugin class's OnApplicationStart() method. /// Ideally, this should be called from your main Plugin class's OnApplicationStart() method.
/// </summary> /// </summary>
public static void Init() public static void Init()
@ -43,7 +43,7 @@ namespace TechbloxModdingAPI
Logging.LogWarning("TechbloxModdingAPI.Main.Init() called but API is already initialized!"); Logging.LogWarning("TechbloxModdingAPI.Main.Init() called but API is already initialized!");
return; return;
} }
Logging.MetaDebugLog($"Patching Gamecraft"); Logging.MetaDebugLog($"Patching Techblox");
var currentAssembly = Assembly.GetExecutingAssembly(); var currentAssembly = Assembly.GetExecutingAssembly();
harmony = new Harmony(currentAssembly.GetName().Name); harmony = new Harmony(currentAssembly.GetName().Name);
try try
@ -53,7 +53,7 @@ namespace TechbloxModdingAPI
catch (Exception e) catch (Exception e)
{ //Can't use ErrorBuilder or Logging.LogException (which eventually uses ErrorBuilder) yet { //Can't use ErrorBuilder or Logging.LogException (which eventually uses ErrorBuilder) yet
Logging.Log(e.ToString()); Logging.Log(e.ToString());
Logging.LogWarning("Failed to patch Gamecraft. Attempting to patch to display error..."); Logging.LogWarning("Failed to patch Techblox. Attempting to patch to display error...");
harmony.Patch(AccessTools.Method(typeof(FullGameCompositionRoot), "OnContextInitialized") harmony.Patch(AccessTools.Method(typeof(FullGameCompositionRoot), "OnContextInitialized")
.MakeGenericMethod(typeof(UnityContext<FullGameCompositionRoot>)), .MakeGenericMethod(typeof(UnityContext<FullGameCompositionRoot>)),
new HarmonyMethod(((Action) OnPatchError).Method)); //Can't use lambdas here :( new HarmonyMethod(((Action) OnPatchError).Method)); //Can't use lambdas here :(
@ -67,12 +67,12 @@ namespace TechbloxModdingAPI
Utility.VersionTracking.Init(); Utility.VersionTracking.Init();
// create default event emitters // create default event emitters
Logging.MetaDebugLog($"Initializing Events"); Logging.MetaDebugLog($"Initializing Events");
EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.ApplicationInitialized, "GamecraftModdingAPIApplicationInitializedEventEmitter", false)); EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.ApplicationInitialized, "TechbloxModdingAPIApplicationInitializedEventEmitter", false));
EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.Menu, "GamecraftModdingAPIMenuActivatedEventEmitter", false)); EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.Menu, "TechbloxModdingAPIMenuActivatedEventEmitter", false));
EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.MenuSwitchedTo, "GamecraftModdingAPIMenuSwitchedToEventEmitter", false)); EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.MenuSwitchedTo, "TechbloxModdingAPIMenuSwitchedToEventEmitter", false));
EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.Game, "GamecraftModdingAPIGameActivatedEventEmitter", false)); EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.Game, "TechbloxModdingAPIGameActivatedEventEmitter", false));
EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.GameReloaded, "GamecraftModdingAPIGameReloadedEventEmitter", false)); EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.GameReloaded, "TechbloxModdingAPIGameReloadedEventEmitter", false));
EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.GameSwitchedTo, "GamecraftModdingAPIGameSwitchedToEventEmitter", false)); EventManager.AddEventEmitter(new SimpleEventEmitterEngine(EventType.GameSwitchedTo, "TechbloxModdingAPIGameSwitchedToEventEmitter", false));
EventManager.AddEventEmitter(GameHostTransitionDeterministicGroupEnginePatch.buildEngine); EventManager.AddEventEmitter(GameHostTransitionDeterministicGroupEnginePatch.buildEngine);
EventManager.AddEventEmitter(GameHostTransitionDeterministicGroupEnginePatch.simEngine); EventManager.AddEventEmitter(GameHostTransitionDeterministicGroupEnginePatch.simEngine);
#pragma warning restore 0612,0618 #pragma warning restore 0612,0618
@ -100,7 +100,7 @@ namespace TechbloxModdingAPI
/// <summary> /// <summary>
/// Shuts down & cleans up the TechbloxModdingAPI. /// Shuts down & cleans up the TechbloxModdingAPI.
/// Call this as late as possible before Gamecraft quits. /// Call this as late as possible before Techblox quits.
/// Ideally, this should be called from your main Plugin class's OnApplicationQuit() method. /// Ideally, this should be called from your main Plugin class's OnApplicationQuit() method.
/// </summary> /// </summary>
public static void Shutdown() public static void Shutdown()

View file

@ -17,7 +17,7 @@ namespace TechbloxModdingAPI.Persistence
{ {
internal static EntitiesDB entitiesDB = null; internal static EntitiesDB entitiesDB = null;
private static readonly byte[] frameStart = Encoding.UTF8.GetBytes("\0\0\0GamecraftModdingAPI\0\0\0"); private static readonly byte[] frameStart = Encoding.UTF8.GetBytes("\0\0\0TechbloxModdingAPI\0\0\0");
public static void Prefix(ref ISerializationData ____serializationData, ref FasterList<byte> ____bytesStream, ref IEntitySerialization ____entitySerializer, bool ____spawnBlocksOnly) public static void Prefix(ref ISerializationData ____serializationData, ref FasterList<byte> ____bytesStream, ref IEntitySerialization ____entitySerializer, bool ____spawnBlocksOnly)
{ {

View file

@ -8,7 +8,7 @@ using TechbloxModdingAPI.Utility;
namespace TechbloxModdingAPI.Persistence namespace TechbloxModdingAPI.Persistence
{ {
/// <summary> /// <summary>
/// Entity serializer and deserializer interface for storing and retrieving data in a Gamecraft save file (GameSave.GC). /// Entity serializer and deserializer interface for storing and retrieving data in a Techblox save file (GameSave.GC).
/// </summary> /// </summary>
public interface IEntitySerializer : IDeserializationFactory, IQueryingEntitiesEngine public interface IEntitySerializer : IDeserializationFactory, IQueryingEntitiesEngine
{ {

View file

@ -15,7 +15,7 @@ namespace TechbloxModdingAPI.Persistence
//[HarmonyPatch] - TODO //[HarmonyPatch] - TODO
class SaveGameEnginePatch class SaveGameEnginePatch
{ {
private static readonly byte[] frameStart = Encoding.UTF8.GetBytes("\0\0\0GamecraftModdingAPI\0\0\0"); private static readonly byte[] frameStart = Encoding.UTF8.GetBytes("\0\0\0TechbloxModdingAPI\0\0\0");
public static void Postfix(ref ISerializationData serializationData, EntitiesDB entitiesDB, IEntitySerialization entitySerializer) public static void Postfix(ref ISerializationData serializationData, EntitiesDB entitiesDB, IEntitySerialization entitySerializer)
{ {

View file

@ -11,7 +11,7 @@ namespace TechbloxModdingAPI.Persistence
/// <summary> /// <summary>
/// Keeps track of serializers. /// Keeps track of serializers.
/// This is used to add and retrieve serializers. /// This is used to add and retrieve serializers.
/// Added IEntitySerializations are used in serializing and deserializing Gamecraft save files (GameSave.GC). /// Added IEntitySerializations are used in serializing and deserializing Techblox save files (GameSave.GC).
/// </summary> /// </summary>
public static class SerializerManager public static class SerializerManager
{ {

View file

@ -26,7 +26,7 @@ namespace TechbloxModdingAPI.Players
{ {
internal class PlayerEngine : IApiEngine, IFactoryEngine internal class PlayerEngine : IApiEngine, IFactoryEngine
{ {
public string Name { get; } = "GamecraftModdingAPIPlayerGameEngine"; public string Name { get; } = "TechbloxModdingAPIPlayerGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -1,7 +1,7 @@
using System; using System;
namespace TechbloxModdingAPI.Players namespace TechbloxModdingAPI.Players
{ {
public class PlayerException : GamecraftModdingAPIException public class PlayerException : TechbloxModdingAPIException
{ {
public PlayerException() public PlayerException()
{ {

View file

@ -32,9 +32,9 @@ namespace TechbloxModdingAPI.Tasks
} }
} }
public static readonly Svelto.Tasks.ExtraLean.Unity.UpdateMonoRunner extraLeanRunner = new Svelto.Tasks.ExtraLean.Unity.UpdateMonoRunner("GamecraftModdingAPIExtraLean"); public static readonly Svelto.Tasks.ExtraLean.Unity.UpdateMonoRunner extraLeanRunner = new Svelto.Tasks.ExtraLean.Unity.UpdateMonoRunner("TechbloxModdingAPIExtraLean");
public static readonly Svelto.Tasks.Lean.Unity.UpdateMonoRunner leanRunner = new Svelto.Tasks.Lean.Unity.UpdateMonoRunner("GamecraftModdingAPILean"); public static readonly Svelto.Tasks.Lean.Unity.UpdateMonoRunner leanRunner = new Svelto.Tasks.Lean.Unity.UpdateMonoRunner("TechbloxModdingAPILean");
/// <summary> /// <summary>
/// Schedule a task to run asynchronously. /// Schedule a task to run asynchronously.
@ -42,7 +42,7 @@ namespace TechbloxModdingAPI.Tasks
/// </summary> /// </summary>
/// <param name="toRun">The task to run</param> /// <param name="toRun">The task to run</param>
/// <param name="extraLean">Schedule toRun on an extra lean runner?</param> /// <param name="extraLean">Schedule toRun on an extra lean runner?</param>
/// <param name="ui">Schedule toRun on Gamecraft's built-in UI task runner?</param> /// <param name="ui">Schedule toRun on Techblox's built-in UI task runner?</param>
public static void Schedule(ISchedulable toRun, bool extraLean = false, bool ui = false) public static void Schedule(ISchedulable toRun, bool extraLean = false, bool ui = false)
{ {
if (extraLean) if (extraLean)

View file

@ -8,7 +8,6 @@
<PackageProjectUrl>https://git.exmods.org/modtainers/GamecraftModdingAPI</PackageProjectUrl> <PackageProjectUrl>https://git.exmods.org/modtainers/GamecraftModdingAPI</PackageProjectUrl>
<NeutralLanguage>en-CA</NeutralLanguage> <NeutralLanguage>en-CA</NeutralLanguage>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>GamecraftModdingAPI</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
</PropertyGroup> </PropertyGroup>

View file

@ -55,7 +55,7 @@ namespace TechbloxModdingAPI.Tests
/// Modding API implemented as a standalone IPA Plugin. /// Modding API implemented as a standalone IPA Plugin.
/// Ideally, TechbloxModdingAPI should be loaded by another mod; not itself /// Ideally, TechbloxModdingAPI should be loaded by another mod; not itself
/// </summary> /// </summary>
public class GamecraftModdingAPIPluginTest : IllusionPlugin.IEnhancedPlugin public class TechbloxModdingAPIPluginTest : IllusionPlugin.IEnhancedPlugin
{ {
private static Harmony harmony { get; set; } private static Harmony harmony { get; set; }
@ -64,7 +64,7 @@ namespace TechbloxModdingAPI.Tests
public override string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString(); public override string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString();
public string HarmonyID { get; } = "org.git.exmods.modtainers.gamecraftmoddingapi"; public string HarmonyID { get; } = "org.git.exmods.modtainers.techbloxmoddingapi";
public override void OnApplicationQuit() public override void OnApplicationQuit()
{ {
@ -367,16 +367,16 @@ namespace TechbloxModdingAPI.Tests
} }
// dependency test // dependency test
if (Dependency.Hell("GamecraftScripting", new Version("0.0.1.0"))) if (Dependency.Hell("TechbloxScripting", new Version("0.0.1.0")))
{ {
Logging.LogWarning("You're in GamecraftScripting dependency hell"); Logging.LogWarning("You're in TechbloxScripting dependency hell");
} }
else else
{ {
Logging.Log("Compatible GamecraftScripting detected"); Logging.Log("Compatible TechbloxScripting detected");
} }
// Interface test // Interface test
/*Interface.IMGUI.Group uiGroup = new Group(new Rect(20, 20, 200, 500), "GamecraftModdingAPI_UITestGroup", true); /*Interface.IMGUI.Group uiGroup = new Group(new Rect(20, 20, 200, 500), "TechbloxModdingAPI_UITestGroup", true);
Interface.IMGUI.Button button = new Button("TEST"); Interface.IMGUI.Button button = new Button("TEST");
button.OnClick += (b, __) => { Logging.MetaDebugLog($"Click on {((Interface.IMGUI.Button)b).Name}");}; button.OnClick += (b, __) => { Logging.MetaDebugLog($"Click on {((Interface.IMGUI.Button)b).Name}");};
Interface.IMGUI.Button button2 = new Button("TEST2"); Interface.IMGUI.Button button2 = new Button("TEST2");

View file

@ -21,7 +21,7 @@ namespace TechbloxModdingAPI.Tests
{ {
public static bool AutoShutdown = true; public static bool AutoShutdown = true;
public const string ReportFile = "GamecraftModdingAPI_tests.log"; public const string ReportFile = "TechbloxModdingAPI_tests.log";
private static bool _testsPassed = false; private static bool _testsPassed = false;
@ -283,7 +283,7 @@ namespace TechbloxModdingAPI.Tests
Logging.MetaLog("Starting test run"); Logging.MetaLog("Starting test run");
// log metadata // log metadata
Assert.Log($"Unity {Application.unityVersion}"); Assert.Log($"Unity {Application.unityVersion}");
Assert.Log($"Gamecraft {Application.version}"); Assert.Log($"Techblox {Application.version}");
Assert.Log($"TechbloxModdingAPI {Assembly.GetExecutingAssembly().GetName().Version}"); Assert.Log($"TechbloxModdingAPI {Assembly.GetExecutingAssembly().GetName().Version}");
Assert.Log($"Testing {asm.GetName().Name} {asm.GetName().Version}"); Assert.Log($"Testing {asm.GetName().Name} {asm.GetName().Version}");
Assert.Log($"START: --- {DateTime.Now.ToString()} --- ({testTypes.Count} tests classes detected)"); Assert.Log($"START: --- {DateTime.Now.ToString()} --- ({testTypes.Count} tests classes detected)");

View file

@ -57,7 +57,7 @@ namespace TechbloxModdingAPI.Utility
{ {
} }
public string Name { get; } = "GamecraftModdingAPIAsyncUtilsGameEngine"; public string Name { get; } = "TechbloxModdingAPIAsyncUtilsGameEngine";
public bool isRemovable { get; } = false; public bool isRemovable { get; } = false;
} }
} }

View file

@ -31,7 +31,7 @@ namespace TechbloxModdingAPI.Utility
public void SetInfo(string id, Func<string> contentGetter) => _extraInfo[id] = contentGetter; public void SetInfo(string id, Func<string> contentGetter) => _extraInfo[id] = contentGetter;
public bool RemoveInfo(string id) => _extraInfo.Remove(id); public bool RemoveInfo(string id) => _extraInfo.Remove(id);
public string Name => "GamecraftModdingAPIDebugInterfaceGameEngine"; public string Name => "TechbloxModdingAPIDebugInterfaceGameEngine";
public bool isRemovable => true; public bool isRemovable => true;
[HarmonyPatch] [HarmonyPatch]

View file

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TechbloxModdingAPI.Utility namespace TechbloxModdingAPI.Utility
{ {
/// <summary> /// <summary>
/// Utility to get the state of the current Gamecraft game /// Utility to get the state of the current Techblox game
/// </summary> /// </summary>
public static class GameState public static class GameState
{ {
@ -34,7 +34,7 @@ namespace TechbloxModdingAPI.Utility
/// <summary> /// <summary>
/// Is a game loaded? /// Is a game loaded?
/// </summary> /// </summary>
/// <returns>Whether Gamecraft has a game open (false = Main Menu)</returns> /// <returns>Whether Techblox has a game open (false = Main Menu)</returns>
public static bool IsInGame() public static bool IsInGame()
{ {
return gameEngine.IsInGame; return gameEngine.IsInGame;

View file

@ -12,7 +12,7 @@ namespace TechbloxModdingAPI.Utility
{ {
class GameStateEngine : IApiEngine class GameStateEngine : IApiEngine
{ {
public string Name { get; } = "GamecraftModdingAPIGameStateGameEngine"; public string Name { get; } = "TechbloxModdingAPIGameStateGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }

View file

@ -9,8 +9,8 @@ using System.Threading.Tasks;
namespace TechbloxModdingAPI.Utility namespace TechbloxModdingAPI.Utility
{ {
/// <summary> /// <summary>
/// Utility class to access Gamecraft's built-in logging capabilities. /// Utility class to access Techblox's built-in logging capabilities.
/// The log is saved to %APPDATA%\..\LocalLow\FreeJam\Gamecraft\Player.Log /// The log is saved to %APPDATA%\..\LocalLow\FreeJam\Techblox\Player.Log
/// </summary> /// </summary>
public static class Logging public static class Logging
{ {
@ -21,7 +21,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write a regular message to Gamecraft's log /// Write a regular message to Techblox's log
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -37,7 +37,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write a debug message to Gamecraft's log /// Write a debug message to Techblox's log
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -53,7 +53,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write a debug message and object to Gamecraft's log /// Write a debug message and object to Techblox's log
/// The reason this method exists in Svelto.Console is beyond my understanding /// The reason this method exists in Svelto.Console is beyond my understanding
/// </summary> /// </summary>
/// <typeparam name="T">The type of the extra debug object</typeparam> /// <typeparam name="T">The type of the extra debug object</typeparam>
@ -72,7 +72,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write an error message to Gamecraft's log /// Write an error message to Techblox's log
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
/// <param name="extraData">The extra data to pass to the ILogger</param> /// <param name="extraData">The extra data to pass to the ILogger</param>
@ -83,7 +83,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write an exception to Gamecraft's log and to the screen and exit game /// Write an exception to Techblox's log and to the screen and exit game
/// </summary> /// </summary>
/// <param name="e">The exception to log</param> /// <param name="e">The exception to log</param>
/// <param name="extraData">The extra data to pass to the ILogger. /// <param name="extraData">The extra data to pass to the ILogger.
@ -95,7 +95,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write an exception message to Gamecraft's log and to the screen and exit game /// Write an exception message to Techblox's log and to the screen and exit game
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
/// <param name="e">The exception to log</param> /// <param name="e">The exception to log</param>
@ -114,7 +114,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write a warning message to Gamecraft's log /// Write a warning message to Techblox's log
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -144,7 +144,7 @@ namespace TechbloxModdingAPI.Utility
// descriptive logging // descriptive logging
/// <summary> /// <summary>
/// Write a descriptive message to Gamecraft's log only when the API is a Debug build /// Write a descriptive message to Techblox's log only when the API is a Debug build
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -156,7 +156,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write a descriptive message to Gamecraft's log including the current time and the calling method's name /// Write a descriptive message to Techblox's log including the current time and the calling method's name
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -169,7 +169,7 @@ namespace TechbloxModdingAPI.Utility
// CLI logging // CLI logging
/// <summary> /// <summary>
/// Write a message to Gamecraft's command line /// Write a message to Techblox's command line
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -185,7 +185,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write an error message to Gamecraft's command line /// Write an error message to Techblox's command line
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -201,7 +201,7 @@ namespace TechbloxModdingAPI.Utility
} }
/// <summary> /// <summary>
/// Write a warning message to Gamecraft's command line /// Write a warning message to Techblox's command line
/// </summary> /// </summary>
/// <param name="obj">The object to log</param> /// <param name="obj">The object to log</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]

View file

@ -61,7 +61,7 @@ namespace TechbloxModdingAPI.Utility
[Obsolete] [Obsolete]
internal class VersionTrackingEngine : IEventEmitterEngine internal class VersionTrackingEngine : IEventEmitterEngine
{ {
public string Name { get; } = "GamecraftModdingAPIVersionTrackingGameEngine"; public string Name { get; } = "TechbloxModdingAPIVersionTrackingGameEngine";
public EntitiesDB entitiesDB { set; private get; } public EntitiesDB entitiesDB { set; private get; }
@ -104,7 +104,7 @@ namespace TechbloxModdingAPI.Utility
[Obsolete] [Obsolete]
public class ModVersionDescriptor: SerializableEntityDescriptor<ModVersionDescriptor._ModVersionDescriptor> public class ModVersionDescriptor: SerializableEntityDescriptor<ModVersionDescriptor._ModVersionDescriptor>
{ {
[HashName("GamecraftModdingAPIVersionV0")] [HashName("TechbloxModdingAPIVersionV0")]
public class _ModVersionDescriptor : IEntityDescriptor public class _ModVersionDescriptor : IEntityDescriptor
{ {
public IComponentBuilder[] componentsToBuild { get; } = new IComponentBuilder[]{ public IComponentBuilder[] componentsToBuild { get; } = new IComponentBuilder[]{