Update to the latest version of the API

This commit is contained in:
Norbi Peti 2021-04-27 01:55:00 +02:00
parent a83eb1d405
commit 160eecabb7
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
2 changed files with 9 additions and 14 deletions

View file

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

View file

@ -463,18 +463,12 @@
<Reference Include="Svelto.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Svelto.Tasks.dll</HintPath>
</Reference>
<Reference Include="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e">
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.ComponentModel.Composition.dll</HintPath>
</Reference>
<Reference Include="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.Configuration.dll</HintPath>
</Reference>
<Reference Include="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e">
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.Core.dll</HintPath>
</Reference>
<Reference Include="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.Data.dll</HintPath>
</Reference>