NGnius 4 years ago
parent
commit
206ec19d1e
18 changed files with 54 additions and 32 deletions
  1. +28
    -1
      GamecraftModdingAPI/Blocks/BlockIDs.cs
  2. +7
    -3
      GamecraftModdingAPI/Blocks/BlockIdentifiers.cs
  3. +1
    -1
      GamecraftModdingAPI/Blocks/MovementEngine.cs
  4. +1
    -1
      GamecraftModdingAPI/Blocks/PlacementEngine.cs
  5. +1
    -1
      GamecraftModdingAPI/Blocks/RotationEngine.cs
  6. +1
    -1
      GamecraftModdingAPI/Blocks/SignalEngine.cs
  7. +1
    -1
      GamecraftModdingAPI/Blocks/TweakableEngine.cs
  8. +1
    -1
      GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs
  9. +1
    -1
      GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs
  10. +1
    -1
      GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs
  11. +1
    -1
      GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs
  12. +1
    -1
      GamecraftModdingAPI/Events/EventEngineFactory.cs
  13. +1
    -1
      GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs
  14. +1
    -1
      GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs
  15. +1
    -1
      GamecraftModdingAPI/Events/SimpleEventEmitterEngine.cs
  16. +5
    -5
      GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs
  17. +0
    -9
      GamecraftModdingAPI/GamecraftModdingAPI.csproj
  18. +1
    -1
      GamecraftModdingAPI/Utility/GameStateEngine.cs

+ 28
- 1
GamecraftModdingAPI/Blocks/BlockIDs.cs View File

@@ -163,6 +163,23 @@ namespace GamecraftModdingAPI.Blocks
MonsterTruckTyre,
MotocrossBikeTyre,
CartTyre,
ANDLogicBlock = 170,
NANDLogicBlock,
NORLogicBlock,
NOTLogicBlock,
ORLogicBlock,
XNORLogicBlock,
XORLogicBlock,
AbsoluteMathsBlock,
AdderMathsBlock,
DividerMathsBlock,
SignMathsBlock, //180
MaxMathsBlock,
MinMathsBlock,
MultiplierMathsBlock,
SubtractorMathsBlock,
SimpleConnector,
MeanMathsBlock,
BeachTree1 = 200,
BeachTree2,
BeachTree3,
@@ -181,6 +198,16 @@ namespace GamecraftModdingAPI.Blocks
Flower3,
Shrub1,
Shrub2,
Shrub3
Shrub3,
CliffCube,
CliffSlicedCorner,
CliffCornerA,
CliffCornerB,
CliffSlopeA,
CliffSlopeB,
GrassEdge,
GrassEdgeInnerCorner,
GrassEdgeCorner,
GrassEdgeSlope
}
}

+ 7
- 3
GamecraftModdingAPI/Blocks/BlockIdentifiers.cs View File

@@ -33,11 +33,15 @@ namespace GamecraftModdingAPI.Blocks

public static ExclusiveGroup SPAWN_POINTS_DISABLED { get { return CommonExclusiveGroups.SPAWN_POINTS_DISABLED_GROUP; } }

public static ExclusiveGroup OUTPUT_SIGNAL_CHANNELS { get { return CommonExclusiveGroups.CHANNEL_OUTPUT_SIGNAL_GROUPS; } }

/// <summary>
/// The ID of the most recently placed block
/// </summary>
public static uint LatestBlockID { get { return CommonExclusiveGroups.CurrentBlockEntityID - 1; } }
public static uint LatestBlockID {
get
{
//return CommonExclusiveGroups.CurrentBlockEntityID - 1; //TODO
return 0;
}
}
}
}

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

@@ -31,7 +31,7 @@ namespace GamecraftModdingAPI.Blocks
{
public string Name { get; } = "GamecraftModdingAPIMovementGameEngine";

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public bool IsInGame = false;



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

@@ -41,7 +41,7 @@ namespace GamecraftModdingAPI.Blocks
IsInGame = true;
}

public IEntitiesDB entitiesDB { get; set; }
public EntitiesDB entitiesDB { get; set; }
internal static BlockEntityFactory _blockEntityFactory; //Injected from PlaceBlockEngine

public void PlaceBlock(BlockIDs block, BlockColors color, byte darkness, float3 position, int uscale,


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

@@ -30,7 +30,7 @@ namespace GamecraftModdingAPI.Blocks
{
public string Name { get; } = "GamecraftModdingAPIRotationGameEngine";

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public bool IsInGame = false;



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

@@ -32,7 +32,7 @@ namespace GamecraftModdingAPI.Blocks
{
public string Name { get; } = "GamecraftModdingAPISignalGameEngine";

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public bool IsInGame = false;



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

@@ -13,7 +13,7 @@ namespace GamecraftModdingAPI.Blocks
{
public string Name { get; } = "GamecraftModdingAPITweakableGameEngine";

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public bool IsInGame = false;



+ 1
- 1
GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs View File

@@ -29,7 +29,7 @@ namespace GamecraftModdingAPI.Commands
/// </summary>
private Action runCommand;

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public void Dispose()
{


+ 1
- 1
GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs View File

@@ -20,7 +20,7 @@ namespace GamecraftModdingAPI.Commands

private Action<A> runCommand;

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public void Dispose()
{


+ 1
- 1
GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs View File

@@ -20,7 +20,7 @@ namespace GamecraftModdingAPI.Commands

private Action<A,B> runCommand;

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public void Dispose()
{


+ 1
- 1
GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs View File

@@ -20,7 +20,7 @@ namespace GamecraftModdingAPI.Commands

private Action<A,B,C> runCommand;

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public void Dispose()
{


+ 1
- 1
GamecraftModdingAPI/Events/EventEngineFactory.cs View File

@@ -36,7 +36,7 @@ namespace GamecraftModdingAPI.Events
/// <param name="onActivated">The operation to do when the event is created</param>
/// <param name="onDestroyed">The operation to do when the event is destroyed (if applicable)</param>
/// <returns>The created object</returns>
public static SimpleEventHandlerEngine CreateAddSimpleHandler(string name, object type, Action<IEntitiesDB> onActivated, Action<IEntitiesDB> onDestroyed)
public static SimpleEventHandlerEngine CreateAddSimpleHandler(string name, object type, Action<EntitiesDB> onActivated, Action<EntitiesDB> onDestroyed)
{
var engine = new SimpleEventHandlerEngine(onActivated, onDestroyed, type, name);
EventManager.AddEventHandler(engine);


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

@@ -15,7 +15,7 @@ namespace GamecraftModdingAPI.Events
{
public string Name { get; } = "GamecraftModdingAPIGameStateBuildEventEmitter" ;

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public object type { get; } = EventType.BuildSwitchedTo;



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

@@ -15,7 +15,7 @@ namespace GamecraftModdingAPI.Events
{
public string Name { get; } = "GamecraftModdingAPIGameStateSimulationEventEmitter" ;

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public object type { get; } = EventType.SimulationSwitchedTo;



+ 1
- 1
GamecraftModdingAPI/Events/SimpleEventEmitterEngine.cs View File

@@ -21,7 +21,7 @@ namespace GamecraftModdingAPI.Events

public IEntityFactory Factory { private get; set; }

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public void Ready() { }



+ 5
- 5
GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs View File

@@ -18,11 +18,11 @@ namespace GamecraftModdingAPI.Events

private bool isActivated = false;

private readonly Action<IEntitiesDB> onActivated;
private readonly Action<EntitiesDB> onActivated;

private readonly Action<IEntitiesDB> onDestroyed;
private readonly Action<EntitiesDB> onDestroyed;

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

public void Add(ref ModEventEntityStruct entityView, EGID egid)
{
@@ -72,7 +72,7 @@ namespace GamecraftModdingAPI.Events
/// <param name="name">The name of the engine</param>
/// <param name="simple">A useless parameter to use to avoid Python overload resolution errors</param>
public SimpleEventHandlerEngine(Action activated, Action removed, object type, string name, bool simple = true)
: this((IEntitiesDB _) => { activated.Invoke(); }, (IEntitiesDB _) => { removed.Invoke(); }, type, name) { }
: this((EntitiesDB _) => { activated.Invoke(); }, (EntitiesDB _) => { removed.Invoke(); }, type, name) { }

/// <summary>
/// Construct the engine
@@ -81,7 +81,7 @@ namespace GamecraftModdingAPI.Events
/// <param name="removed">The operation to do when the event is destroyed (if applicable)</param>
/// <param name="type">The type of event to handler</param>
/// <param name="name">The name of the engine</param>
public SimpleEventHandlerEngine(Action<IEntitiesDB> activated, Action<IEntitiesDB> removed, object type, string name)
public SimpleEventHandlerEngine(Action<EntitiesDB> activated, Action<EntitiesDB> removed, object type, string name)
{
this.type = type;
this.Name = name;


+ 0
- 9
GamecraftModdingAPI/GamecraftModdingAPI.csproj View File

@@ -277,12 +277,6 @@
<Reference Include="Unity.Burst.Unsafe">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Burst.Unsafe.dll</HintPath>
</Reference>
<Reference Include="Unity.Cloud.UserReporting.Client">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Cloud.UserReporting.Client.dll</HintPath>
</Reference>
<Reference Include="Unity.Cloud.UserReporting.Plugin">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Cloud.UserReporting.Plugin.dll</HintPath>
</Reference>
<Reference Include="Unity.Collections">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Collections.dll</HintPath>
</Reference>
@@ -541,9 +535,6 @@
<Reference Include="uREPL">
<HintPath>..\ref\Gamecraft_Data\Managed\uREPL.dll</HintPath>
</Reference>
<Reference Include="UserReporting">
<HintPath>..\ref\Gamecraft_Data\Managed\UserReporting.dll</HintPath>
</Reference>
<Reference Include="VisualProfiler">
<HintPath>..\ref\Gamecraft_Data\Managed\VisualProfiler.dll</HintPath>
</Reference>


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

@@ -13,7 +13,7 @@ namespace GamecraftModdingAPI.Utility
{
public string Name { get; } = "GamecraftModdingAPIGameStateGameEngine";

public IEntitiesDB entitiesDB { set; private get; }
public EntitiesDB entitiesDB { set; private get; }

private bool _isInGame = false;



Loading…
Cancel
Save