Update to GC 2020.03.11.11.02

Fixed compile issues and added new blocks
This commit is contained in:
Norbi Peti 2020-03-12 23:36:23 +01:00
parent c1bb863578
commit b4e70fcebe
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
18 changed files with 54 additions and 32 deletions

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

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

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;

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,

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;

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;

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;

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()
{

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()
{

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()
{

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()
{

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

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;

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;

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() { }

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;

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>

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;