Browse Source

Fix build errors from GC update

tags/v1.0.0
NGnius (Graham) 4 years ago
parent
commit
934b542ea1
6 changed files with 14 additions and 14 deletions
  1. +2
    -2
      GamecraftModdingAPI/Blocks/BlockIdentifiers.cs
  2. +1
    -1
      GamecraftModdingAPI/Blocks/PlacementEngine.cs
  3. +4
    -4
      GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs
  4. +3
    -3
      GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs
  5. +2
    -2
      GamecraftModdingAPI/Input/FakeInput.cs
  6. +2
    -2
      GamecraftModdingAPI/Utility/GameStateEngine.cs

+ 2
- 2
GamecraftModdingAPI/Blocks/BlockIdentifiers.cs View File

@@ -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


+ 1
- 1
GamecraftModdingAPI/Blocks/PlacementEngine.cs View File

@@ -85,7 +85,7 @@ namespace GamecraftModdingAPI.Blocks
{
case CubeCategory.SpawnPoint:
case CubeCategory.BuildingSpawnPoint:
newBlockID = MachineEditingGroups.NewSpawnPointBlockID;
newBlockID = MachineEditingGroups.NewUncheckedBlockEGID;
break;
default:
newBlockID = MachineEditingGroups.NewBlockID;


+ 4
- 4
GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs View File

@@ -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);


+ 3
- 3
GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs View File

@@ -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);


+ 2
- 2
GamecraftModdingAPI/Input/FakeInput.cs View File

@@ -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;


+ 2
- 2
GamecraftModdingAPI/Utility/GameStateEngine.cs View File

@@ -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…
Cancel
Save