Fix build errors from GC update
This commit is contained in:
parent
1faa9898f7
commit
934b542ea1
6 changed files with 14 additions and 14 deletions
|
@ -32,9 +32,9 @@ namespace GamecraftModdingAPI.Blocks
|
|||
/// </summary>
|
||||
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; } }
|
||||
|
||||
/// <summary>
|
||||
/// The ID of the most recently placed block
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace GamecraftModdingAPI.Blocks
|
|||
{
|
||||
case CubeCategory.SpawnPoint:
|
||||
case CubeCategory.BuildingSpawnPoint:
|
||||
newBlockID = MachineEditingGroups.NewSpawnPointBlockID;
|
||||
newBlockID = MachineEditingGroups.NewUncheckedBlockEGID;
|
||||
break;
|
||||
default:
|
||||
newBlockID = MachineEditingGroups.NewBlockID;
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace GamecraftModdingAPI.Events
|
|||
/// <summary>
|
||||
/// Event emitter engine for switching to to build mode.
|
||||
/// </summary>
|
||||
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<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode}");
|
||||
if (entitiesDB.QueryUniqueEntity<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.Build)
|
||||
if (entitiesDB.QueryUniqueEntity<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.TimeStopped)
|
||||
{
|
||||
Emit();
|
||||
}
|
||||
}
|
||||
|
||||
public JobHandle OnInitializeBuildMode()
|
||||
|
||||
public JobHandle OnInitializeTimeStoppedMode()
|
||||
{
|
||||
Emit();
|
||||
return default(JobHandle);
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace GamecraftModdingAPI.Events
|
|||
/// <summary>
|
||||
/// Event emitter engine for switching to simulation mode.
|
||||
/// </summary>
|
||||
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<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.Simulation)
|
||||
if (entitiesDB.QueryUniqueEntity<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.TimeRunning)
|
||||
{
|
||||
Emit();
|
||||
}
|
||||
}
|
||||
|
||||
public JobHandle OnInitializeSimulationMode()
|
||||
public JobHandle OnInitializeTimeRunningMode()
|
||||
{
|
||||
Emit();
|
||||
return default(JobHandle);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue