From 934b542ea12e72a890cf0cec3d1c0abe24ca15cc Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Thu, 14 May 2020 11:42:34 -0400 Subject: [PATCH] Fix build errors from GC update --- GamecraftModdingAPI/Blocks/BlockIdentifiers.cs | 4 ++-- GamecraftModdingAPI/Blocks/PlacementEngine.cs | 2 +- GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs | 8 ++++---- .../Events/GameStateSimulationEmitterEngine.cs | 6 +++--- GamecraftModdingAPI/Input/FakeInput.cs | 4 ++-- GamecraftModdingAPI/Utility/GameStateEngine.cs | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs index 13bafce..6da100d 100644 --- a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs +++ b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs @@ -32,9 +32,9 @@ namespace GamecraftModdingAPI.Blocks /// public static ExclusiveGroup SIM_BLOCKS_DISABLED { get { return CommonExclusiveGroups.BLOCKS_DISABLED_IN_SIM_GROUP; } } - public static ExclusiveGroup SPAWN_POINTS { get { return CommonExclusiveGroups.SPAWN_POINTS_GROUP; } } + //public static ExclusiveGroup SPAWN_POINTS { get { return CommonExclusiveGroups.SPAWN_POINTS_GROUP; } } - public static ExclusiveGroup SPAWN_POINTS_DISABLED { get { return CommonExclusiveGroups.SPAWN_POINTS_DISABLED_GROUP; } } + //public static ExclusiveGroup SPAWN_POINTS_DISABLED { get { return CommonExclusiveGroups.SPAWN_POINTS_DISABLED_GROUP; } } /// /// The ID of the most recently placed block diff --git a/GamecraftModdingAPI/Blocks/PlacementEngine.cs b/GamecraftModdingAPI/Blocks/PlacementEngine.cs index 879141c..d352fe4 100644 --- a/GamecraftModdingAPI/Blocks/PlacementEngine.cs +++ b/GamecraftModdingAPI/Blocks/PlacementEngine.cs @@ -85,7 +85,7 @@ namespace GamecraftModdingAPI.Blocks { case CubeCategory.SpawnPoint: case CubeCategory.BuildingSpawnPoint: - newBlockID = MachineEditingGroups.NewSpawnPointBlockID; + newBlockID = MachineEditingGroups.NewUncheckedBlockEGID; break; default: newBlockID = MachineEditingGroups.NewBlockID; diff --git a/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs b/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs index 1c5b363..ed89812 100644 --- a/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs +++ b/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs @@ -12,7 +12,7 @@ namespace GamecraftModdingAPI.Events /// /// Event emitter engine for switching to to build mode. /// - public class GameStateBuildEmitterEngine : IEventEmitterEngine, IInitializeOnBuildStart + public class GameStateBuildEmitterEngine : IEventEmitterEngine, IUnorderedInitializeOnTimeStoppedModeEntered { public string Name { get; } = "GamecraftModdingAPIGameStateBuildEventEmitter" ; @@ -37,13 +37,13 @@ namespace GamecraftModdingAPI.Events public void EmitIfBuildMode() { //Logging.MetaDebugLog($"nextSimulationMode: {entitiesDB.QueryUniqueEntity(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode}"); - if (entitiesDB.QueryUniqueEntity(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.Build) + if (entitiesDB.QueryUniqueEntity(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.TimeStopped) { Emit(); } } - - public JobHandle OnInitializeBuildMode() + + public JobHandle OnInitializeTimeStoppedMode() { Emit(); return default(JobHandle); diff --git a/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs b/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs index 91ee596..165e7c5 100644 --- a/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs +++ b/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs @@ -12,7 +12,7 @@ namespace GamecraftModdingAPI.Events /// /// Event emitter engine for switching to simulation mode. /// - public class GameStateSimulationEmitterEngine : IEventEmitterEngine, IInitializeOnSimulationStart + public class GameStateSimulationEmitterEngine : IEventEmitterEngine, IUnorderedInitializeOnTimeRunningModeEntered { public string Name { get; } = "GamecraftModdingAPIGameStateSimulationEventEmitter" ; @@ -36,13 +36,13 @@ namespace GamecraftModdingAPI.Events public void EmitIfSimMode() { - if (entitiesDB.QueryUniqueEntity(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.Simulation) + if (entitiesDB.QueryUniqueEntity(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.TimeRunning) { Emit(); } } - public JobHandle OnInitializeSimulationMode() + public JobHandle OnInitializeTimeRunningMode() { Emit(); return default(JobHandle); diff --git a/GamecraftModdingAPI/Input/FakeInput.cs b/GamecraftModdingAPI/Input/FakeInput.cs index 3d9a379..918531b 100644 --- a/GamecraftModdingAPI/Input/FakeInput.cs +++ b/GamecraftModdingAPI/Input/FakeInput.cs @@ -62,7 +62,7 @@ namespace GamecraftModdingAPI.Input playerID = inputEngine.GetLocalPlayerID(); } ref InputEntityStruct currentInput = ref inputEngine.GetInputRef(playerID); - Utility.Logging.CommandLog($"Current sim frame {currentInput.frame}"); + //Utility.Logging.CommandLog($"Current sim frame {currentInput.frame}"); // set inputs switch(hotbar) { @@ -114,7 +114,7 @@ namespace GamecraftModdingAPI.Input playerID = inputEngine.GetLocalPlayerID(); } ref InputEntityStruct currentInput = ref inputEngine.GetInputRef(playerID); - Utility.Logging.CommandLog($"Current sim frame {currentInput.frame}"); + //Utility.Logging.CommandLog($"Current sim frame {currentInput.frame}"); // set inputs if (toggleMode) currentInput.actionMask |= RobocraftX.Common.Input.ActionInput.ToggleSimulation; if (forward) currentInput.actionMask |= RobocraftX.Common.Input.ActionInput.Forward; diff --git a/GamecraftModdingAPI/Utility/GameStateEngine.cs b/GamecraftModdingAPI/Utility/GameStateEngine.cs index 55c0de2..204f491 100644 --- a/GamecraftModdingAPI/Utility/GameStateEngine.cs +++ b/GamecraftModdingAPI/Utility/GameStateEngine.cs @@ -31,12 +31,12 @@ namespace GamecraftModdingAPI.Utility public bool IsBuildMode() { - return _isInGame && SimModeUtil.IsBuildMode(entitiesDB); + return _isInGame && TimeRunningModeUtil.IsTimeStoppedMode(entitiesDB); } public bool IsSimulationMode() { - return _isInGame && SimModeUtil.IsSimulationMode(entitiesDB); + return _isInGame && TimeRunningModeUtil.IsTimeRunningMode(entitiesDB); } }