diff --git a/BuildingTools/BuildingTools.cs b/BuildingTools/BuildingTools.cs
index 1d5b899..4427cea 100644
--- a/BuildingTools/BuildingTools.cs
+++ b/BuildingTools/BuildingTools.cs
@@ -81,7 +81,7 @@ namespace BuildingTools
}
foreach (var block in blocks)
- block.Color = new BlockColor {Color = clr, Darkness = darkness};
+ block.Color = new BlockColor(clr, darkness);
Logging.CommandLog("Blocks colored.");
});
@@ -281,11 +281,12 @@ namespace BuildingTools
private string GetPlayerInfo()
{
var player = Player.LocalPlayer;
- if (player == null) return GetBlockInfoInBuildMode();
- float3 pos = player.Position;
- float3 rot = player.Rotation;
- float3 vel = player.Velocity;
- float3 ave = player.AngularVelocity;
+ if (player == null) return "";
+ GamecraftModdingAPI.FlyCam cam = GameState.IsBuildMode() ? player.BuildCamera : null;
+ //float3 pos = cam?.Position ?? player.Position;
+ float3 rot = cam?.Rotation ?? player.Rotation;
+ float3 vel = cam?.Velocity ?? player.Velocity;
+ float3 ave = cam?.AngularVelocity ?? player.AngularVelocity;
return $"Player rotation: {rot.x:F}° {rot.y:F}° {rot.z:F}°\n" +
$"- Velocity: {vel.x:F} {vel.y:F} {vel.z:F}\n" +
$"- Angular velocity: {ave.x:F} {ave.y:F} {ave.z:F}\n" +
@@ -298,7 +299,7 @@ namespace BuildingTools
public override void OnApplicationQuit() => Main.Shutdown();
- public override string Name { get; } = "BuildingTools";
- public override string Version { get; } = "v1.1.0";
+ public override string Name => "BuildingTools";
+ public override string Version => "v1.1.0";
}
}
\ No newline at end of file
diff --git a/BuildingTools/BuildingTools.csproj b/BuildingTools/BuildingTools.csproj
index 8a4e6a9..29e5a5e 100644
--- a/BuildingTools/BuildingTools.csproj
+++ b/BuildingTools/BuildingTools.csproj
@@ -463,18 +463,12 @@
..\..\ref\TechbloxPreview_Data\Managed\Svelto.Tasks.dll
-
- ..\..\ref\TechbloxPreview_Data\Managed\System.dll
-
..\..\ref\TechbloxPreview_Data\Managed\System.ComponentModel.Composition.dll
..\..\ref\TechbloxPreview_Data\Managed\System.Configuration.dll
-
- ..\..\ref\TechbloxPreview_Data\Managed\System.Core.dll
-
..\..\ref\TechbloxPreview_Data\Managed\System.Data.dll