From b4e70fcebe1d7572c0f1a65618b115029d498af6 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 12 Mar 2020 23:36:23 +0100 Subject: [PATCH] Update to GC 2020.03.11.11.02 Fixed compile issues and added new blocks --- GamecraftModdingAPI/Blocks/BlockIDs.cs | 29 ++++++++++++++++++- .../Blocks/BlockIdentifiers.cs | 10 +++++-- GamecraftModdingAPI/Blocks/MovementEngine.cs | 2 +- GamecraftModdingAPI/Blocks/PlacementEngine.cs | 2 +- GamecraftModdingAPI/Blocks/RotationEngine.cs | 2 +- GamecraftModdingAPI/Blocks/SignalEngine.cs | 2 +- GamecraftModdingAPI/Blocks/TweakableEngine.cs | 2 +- .../Commands/SimpleCustomCommandEngine.cs | 2 +- .../Commands/SimpleCustomCommandEngine1.cs | 2 +- .../Commands/SimpleCustomCommandEngine2.cs | 2 +- .../Commands/SimpleCustomCommandEngine3.cs | 2 +- .../Events/EventEngineFactory.cs | 2 +- .../Events/GameStateBuildEmitterEngine.cs | 2 +- .../GameStateSimulationEmitterEngine.cs | 2 +- .../Events/SimpleEventEmitterEngine.cs | 2 +- .../Events/SimpleEventHandlerEngine.cs | 10 +++---- .../GamecraftModdingAPI.csproj | 9 ------ .../Utility/GameStateEngine.cs | 2 +- 18 files changed, 54 insertions(+), 32 deletions(-) diff --git a/GamecraftModdingAPI/Blocks/BlockIDs.cs b/GamecraftModdingAPI/Blocks/BlockIDs.cs index 4915041..3aa1bb3 100644 --- a/GamecraftModdingAPI/Blocks/BlockIDs.cs +++ b/GamecraftModdingAPI/Blocks/BlockIDs.cs @@ -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 } } \ No newline at end of file diff --git a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs index bd0d8a6..a340bd9 100644 --- a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs +++ b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs @@ -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; } } - /// /// The ID of the most recently placed block /// - public static uint LatestBlockID { get { return CommonExclusiveGroups.CurrentBlockEntityID - 1; } } + public static uint LatestBlockID { + get + { + //return CommonExclusiveGroups.CurrentBlockEntityID - 1; //TODO + return 0; + } + } } } diff --git a/GamecraftModdingAPI/Blocks/MovementEngine.cs b/GamecraftModdingAPI/Blocks/MovementEngine.cs index ffb8dde..77d73c4 100644 --- a/GamecraftModdingAPI/Blocks/MovementEngine.cs +++ b/GamecraftModdingAPI/Blocks/MovementEngine.cs @@ -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; diff --git a/GamecraftModdingAPI/Blocks/PlacementEngine.cs b/GamecraftModdingAPI/Blocks/PlacementEngine.cs index 683d14f..3856bc0 100644 --- a/GamecraftModdingAPI/Blocks/PlacementEngine.cs +++ b/GamecraftModdingAPI/Blocks/PlacementEngine.cs @@ -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, diff --git a/GamecraftModdingAPI/Blocks/RotationEngine.cs b/GamecraftModdingAPI/Blocks/RotationEngine.cs index c605bf1..50dbb4c 100644 --- a/GamecraftModdingAPI/Blocks/RotationEngine.cs +++ b/GamecraftModdingAPI/Blocks/RotationEngine.cs @@ -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; diff --git a/GamecraftModdingAPI/Blocks/SignalEngine.cs b/GamecraftModdingAPI/Blocks/SignalEngine.cs index 7109b64..2f1d413 100644 --- a/GamecraftModdingAPI/Blocks/SignalEngine.cs +++ b/GamecraftModdingAPI/Blocks/SignalEngine.cs @@ -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; diff --git a/GamecraftModdingAPI/Blocks/TweakableEngine.cs b/GamecraftModdingAPI/Blocks/TweakableEngine.cs index 6d23f85..1d029ee 100644 --- a/GamecraftModdingAPI/Blocks/TweakableEngine.cs +++ b/GamecraftModdingAPI/Blocks/TweakableEngine.cs @@ -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; diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs index 52b2a74..e5ea499 100644 --- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs +++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine.cs @@ -29,7 +29,7 @@ namespace GamecraftModdingAPI.Commands /// private Action runCommand; - public IEntitiesDB entitiesDB { set; private get; } + public EntitiesDB entitiesDB { set; private get; } public void Dispose() { diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs index 92cdab9..4ec5949 100644 --- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs +++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine1.cs @@ -20,7 +20,7 @@ namespace GamecraftModdingAPI.Commands private Action runCommand; - public IEntitiesDB entitiesDB { set; private get; } + public EntitiesDB entitiesDB { set; private get; } public void Dispose() { diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs index 31ec0cb..2aa81a3 100644 --- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs +++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine2.cs @@ -20,7 +20,7 @@ namespace GamecraftModdingAPI.Commands private Action runCommand; - public IEntitiesDB entitiesDB { set; private get; } + public EntitiesDB entitiesDB { set; private get; } public void Dispose() { diff --git a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs index 2ccd5db..5db84c2 100644 --- a/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs +++ b/GamecraftModdingAPI/Commands/SimpleCustomCommandEngine3.cs @@ -20,7 +20,7 @@ namespace GamecraftModdingAPI.Commands private Action runCommand; - public IEntitiesDB entitiesDB { set; private get; } + public EntitiesDB entitiesDB { set; private get; } public void Dispose() { diff --git a/GamecraftModdingAPI/Events/EventEngineFactory.cs b/GamecraftModdingAPI/Events/EventEngineFactory.cs index 817e64e..4efd018 100644 --- a/GamecraftModdingAPI/Events/EventEngineFactory.cs +++ b/GamecraftModdingAPI/Events/EventEngineFactory.cs @@ -36,7 +36,7 @@ namespace GamecraftModdingAPI.Events /// The operation to do when the event is created /// The operation to do when the event is destroyed (if applicable) /// The created object - public static SimpleEventHandlerEngine CreateAddSimpleHandler(string name, object type, Action onActivated, Action onDestroyed) + public static SimpleEventHandlerEngine CreateAddSimpleHandler(string name, object type, Action onActivated, Action onDestroyed) { var engine = new SimpleEventHandlerEngine(onActivated, onDestroyed, type, name); EventManager.AddEventHandler(engine); diff --git a/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs b/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs index c9b267e..9905446 100644 --- a/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs +++ b/GamecraftModdingAPI/Events/GameStateBuildEmitterEngine.cs @@ -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; diff --git a/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs b/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs index 7427dd0..57b1c00 100644 --- a/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs +++ b/GamecraftModdingAPI/Events/GameStateSimulationEmitterEngine.cs @@ -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; diff --git a/GamecraftModdingAPI/Events/SimpleEventEmitterEngine.cs b/GamecraftModdingAPI/Events/SimpleEventEmitterEngine.cs index be4f61d..799cfed 100644 --- a/GamecraftModdingAPI/Events/SimpleEventEmitterEngine.cs +++ b/GamecraftModdingAPI/Events/SimpleEventEmitterEngine.cs @@ -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() { } diff --git a/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs b/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs index 9d9cd4c..9968cc7 100644 --- a/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs +++ b/GamecraftModdingAPI/Events/SimpleEventHandlerEngine.cs @@ -18,11 +18,11 @@ namespace GamecraftModdingAPI.Events private bool isActivated = false; - private readonly Action onActivated; + private readonly Action onActivated; - private readonly Action onDestroyed; + private readonly Action 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 /// The name of the engine /// A useless parameter to use to avoid Python overload resolution errors 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) { } /// /// Construct the engine @@ -81,7 +81,7 @@ namespace GamecraftModdingAPI.Events /// The operation to do when the event is destroyed (if applicable) /// The type of event to handler /// The name of the engine - public SimpleEventHandlerEngine(Action activated, Action removed, object type, string name) + public SimpleEventHandlerEngine(Action activated, Action removed, object type, string name) { this.type = type; this.Name = name; diff --git a/GamecraftModdingAPI/GamecraftModdingAPI.csproj b/GamecraftModdingAPI/GamecraftModdingAPI.csproj index f7a0abf..6e9f5f3 100644 --- a/GamecraftModdingAPI/GamecraftModdingAPI.csproj +++ b/GamecraftModdingAPI/GamecraftModdingAPI.csproj @@ -277,12 +277,6 @@ ..\ref\Gamecraft_Data\Managed\Unity.Burst.Unsafe.dll - - ..\ref\Gamecraft_Data\Managed\Unity.Cloud.UserReporting.Client.dll - - - ..\ref\Gamecraft_Data\Managed\Unity.Cloud.UserReporting.Plugin.dll - ..\ref\Gamecraft_Data\Managed\Unity.Collections.dll @@ -541,9 +535,6 @@ ..\ref\Gamecraft_Data\Managed\uREPL.dll - - ..\ref\Gamecraft_Data\Managed\UserReporting.dll - ..\ref\Gamecraft_Data\Managed\VisualProfiler.dll diff --git a/GamecraftModdingAPI/Utility/GameStateEngine.cs b/GamecraftModdingAPI/Utility/GameStateEngine.cs index e86b902..55c0de2 100644 --- a/GamecraftModdingAPI/Utility/GameStateEngine.cs +++ b/GamecraftModdingAPI/Utility/GameStateEngine.cs @@ -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;