Update to newer Gamecraft version

This commit is contained in:
Norbi Peti 2020-02-07 01:25:31 +01:00
parent 6c83b44d4e
commit 878ebdb491
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
4 changed files with 10 additions and 20 deletions

View file

@ -20,6 +20,7 @@ using Unity.Mathematics;
using UnityEngine;
using GamecraftModdingAPI.Utility;
using Svelto.DataStructures;
namespace GamecraftModdingAPI.Blocks
{
@ -69,9 +70,9 @@ namespace GamecraftModdingAPI.Blocks
public float3 MoveConnectedBlocks(uint blockID, float3 vector)
{
Stack<uint> cubeStack = new Stack<uint>();
Gamecraft.DataStructures.FasterList<uint> cubesToMove = new Gamecraft.DataStructures.FasterList<uint>();
FasterList<uint> cubesToMove = new FasterList<uint>();
ConnectedCubesUtility.TreeTraversal.GetConnectedCubes(entitiesDB, blockID, cubeStack, cubesToMove, (in GridConnectionsEntityStruct g) => { return false; });
for (int i = 0; i < cubesToMove.Count; i++)
for (int i = 0; i < cubesToMove.count; i++)
{
MoveBlock(cubesToMove[i], vector);
entitiesDB.QueryEntity<GridConnectionsEntityStruct>(cubesToMove[i], CommonExclusiveGroups.OWNED_BLOCKS_GROUP).isProcessed = false;

View file

@ -13,6 +13,7 @@ using RobocraftX.SimulationModeState;
using RobocraftX.UECS;
using Unity.Entities;
using Svelto.Context;
using Svelto.DataStructures;
using Svelto.ECS;
using Svelto.ECS.EntityStructs;
using Unity.Transforms;
@ -37,7 +38,7 @@ namespace GamecraftModdingAPI.Blocks
private Stack<uint> cubesStack = new Stack<uint>();
private bool stackInUse = false;
private Gamecraft.DataStructures.FasterList<uint> cubesList = new Gamecraft.DataStructures.FasterList<uint>();
private FasterList<uint> cubesList = new FasterList<uint>();
private bool listInUse = false;
public void Dispose()
@ -171,7 +172,7 @@ namespace GamecraftModdingAPI.Blocks
else
{
Stack<uint> cubeStack = new Stack<uint>();
Gamecraft.DataStructures.FasterList<uint> cubeList = new Gamecraft.DataStructures.FasterList<uint>();
FasterList<uint> cubeList = new FasterList<uint>();
ConnectedCubesUtility.TreeTraversal.GetConnectedCubes(entitiesDB, blockID, cubesStack, cubesList, (in GridConnectionsEntityStruct g) => { return g.isIsolator; });
uint[] res = cubesList.ToArray();
foreach (var id in res)

View file

@ -253,9 +253,6 @@
<Reference Include="Unity.Addressables">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Addressables.dll</HintPath>
</Reference>
<Reference Include="Unity.Animation.Rigging">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Animation.Rigging.dll</HintPath>
</Reference>
<Reference Include="Unity.Burst">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Burst.dll</HintPath>
</Reference>
@ -307,9 +304,6 @@
<Reference Include="Unity.Properties">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Properties.dll</HintPath>
</Reference>
<Reference Include="Unity.Rendering.Hybrid">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.Rendering.Hybrid.dll</HintPath>
</Reference>
<Reference Include="Unity.RenderPipelines.Core.Runtime">
<HintPath>..\ref\Gamecraft_Data\Managed\Unity.RenderPipelines.Core.Runtime.dll</HintPath>
</Reference>

View file

@ -89,15 +89,9 @@ namespace GamecraftModdingAPI.Utility
/// <param name="extraData">The extra data to pass to the ILogger.
/// This is automatically populated with "OuterException#" and "OuterStacktrace#" entries</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void LogException(Exception e, Dictionary<string, string> extraData = null)
public static void LogException(Exception e, string msg = null, Dictionary<string, string> extraData = null)
{
Svelto.Console.LogException(e, extraData);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void LogException(string msg, Exception e, Dictionary<string, string> extraData = null)
{
Svelto.Console.LogException(msg, e, extraData);
Svelto.Console.LogException(e, msg, extraData);
}
/// <summary>
@ -108,9 +102,9 @@ namespace GamecraftModdingAPI.Utility
/// <param name="extraData">The extra data to pass to the ILogger.
/// This is implemented similar to LogException(Exception e, Dictionary extraData)'s extraData</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void LogException(object obj, Exception e, Dictionary<string, string> extraData = null)
public static void LogException(Exception e, object obj, Dictionary<string, string> extraData = null)
{
Svelto.Console.LogException(obj.ToString(), e, extraData);
Svelto.Console.LogException(e, obj.ToString(), extraData);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]