diff --git a/.gitignore b/.gitignore
index 4ce6fdd..d7d7d69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -337,4 +337,8 @@ ASALocalRun/
.localhistory/
# BeatPulse healthcheck temp database
-healthchecksdb
\ No newline at end of file
+healthchecksdb
+
+# Referenced DLLs
+ref
+ref/**
\ No newline at end of file
diff --git a/IllusionPlugin.dll b/IllusionPlugin.dll
new file mode 100644
index 0000000..aa7fa2e
Binary files /dev/null and b/IllusionPlugin.dll differ
diff --git a/extracommands/ExtraCommands.csproj b/extracommands/ExtraCommands.csproj
index e3d5100..1ec3ecc 100644
--- a/extracommands/ExtraCommands.csproj
+++ b/extracommands/ExtraCommands.csproj
@@ -1,7 +1,7 @@
- net45
+ netstandard2.0
@@ -10,65 +10,69 @@
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\CommandLine.dll
+ ..\ref\CommandLine.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\FullGame.dll
+ ..\ref\FullGame.dll
- ..\..\..\IPA\IPA\bin\Debug\IPA\Data\Managed\IllusionPlugin.dll
+ ..\IllusionPlugin.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\RobocraftX.Character.dll
+ ..\ref\RobocraftX.Character.dll
+
+
+ ..\ref\RobocraftX.Common.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.dll
+ ..\ref\RobocraftX.Multiplayer.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.NetworkEntityStream.dll
+ ..\ref\RobocraftX.Multiplayer.NetworkEntityStream.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\RobocraftX.MultiplayerInput.dll
+ ..\ref\RobocraftX.MultiplayerInput.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\RobocraftX.StateSync.dll
+ ..\ref\RobocraftX.StateSync.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Svelto.Common.dll
+ ..\ref\Svelto.Common.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Svelto.ECS.dll
+ ..\ref\Svelto.ECS.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Unity.Entities.dll
+ ..\ref\Unity.Entities.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Unity.Entities.Hybrid.dll
+ ..\ref\Unity.Entities.Hybrid.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Unity.Entities.Properties.dll
+ ..\ref\Unity.Entities.Properties.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Unity.Entities.StaticTypeRegistry.dll
+ ..\ref\Unity.Entities.StaticTypeRegistry.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Unity.Mathematics.dll
+ ..\ref\Unity.Mathematics.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Unity.Mathematics.Extensions.dll
+ ..\ref\Unity.Mathematics.Extensions.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\Unity.Mathematics.Extensions.Hybrid.dll
+ ..\ref\Unity.Mathematics.Extensions.Hybrid.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\UnityEngine.dll
+ ..\ref\UnityEngine.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\UnityEngine.CoreModule.dll
+ ..\ref\UnityEngine.CoreModule.dll
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\GamecraftPreview_Data\Managed\uREPL.dll
+ ..\ref\uREPL.dll
+
diff --git a/extracommands/MoveBlocksCommandEngine.cs b/extracommands/MoveBlocksCommandEngine.cs
new file mode 100644
index 0000000..1919c03
--- /dev/null
+++ b/extracommands/MoveBlocksCommandEngine.cs
@@ -0,0 +1,51 @@
+using System;
+using RobocraftX.GUI.CommandLine;
+using RobocraftX.Multiplayer;
+using RobocraftX.StateSync;
+using RobocraftX.Character;
+using RobocraftX.Common;
+using Svelto.ECS;
+using Svelto.ECS.EntityStructs;
+using Unity.Entities;
+using UnityEngine;
+using uREPL;
+using Svelto.Context;
+using RobocraftX;
+
+namespace ExtraCommands.Building
+{
+ [CustomCommand("MoveBlocks", "Move blocks from their original position")]
+ class MoveBlocksCommandEngine : CustomCommandEngine
+ {
+ public MoveBlocksCommandEngine(UnityContext ctxHolder, EnginesRoot enginesRoot, World physW, Action reloadGame, MultiplayerInitParameters mpParams) : base(ctxHolder, enginesRoot, physW, reloadGame, mpParams)
+ {
+ }
+
+ public override void Ready()
+ {
+ uREPL.RuntimeCommands.Register("MoveBlocks", MoveBlocksCommand, "Move blocks from their original position");
+ }
+
+ private void MoveBlocksCommand(float x, float y, float z)
+ {
+ uint loopCount;
+ for (loopCount = 0; loopCount < CommonExclusiveGroups.CurrentBlockEntityID; loopCount++)
+ {
+ ref PositionEntityStruct posStruct = ref this.entitiesDB.QueryEntity(loopCount, CommonExclusiveGroups.OWNED_BLOCKS_GROUP);
+ if (!posStruct.Equals(null) && !posStruct.position.Equals(null))
+ {
+ posStruct.position.x += x;
+ posStruct.position.y += y;
+ posStruct.position.z += z;
+ } else {
+ uREPL.Log.Warn("Null position found for ID "+loopCount);
+ }
+ }
+ }
+
+ public override void Dispose()
+ {
+ uREPL.RuntimeCommands.Unregister("MoveBlocks");
+ }
+ }
+}