Update to the latest version of the API
This commit is contained in:
parent
a83eb1d405
commit
160eecabb7
2 changed files with 9 additions and 14 deletions
|
@ -81,7 +81,7 @@ namespace BuildingTools
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var block in blocks)
|
foreach (var block in blocks)
|
||||||
block.Color = new BlockColor {Color = clr, Darkness = darkness};
|
block.Color = new BlockColor(clr, darkness);
|
||||||
Logging.CommandLog("Blocks colored.");
|
Logging.CommandLog("Blocks colored.");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -281,11 +281,12 @@ namespace BuildingTools
|
||||||
private string GetPlayerInfo()
|
private string GetPlayerInfo()
|
||||||
{
|
{
|
||||||
var player = Player.LocalPlayer;
|
var player = Player.LocalPlayer;
|
||||||
if (player == null) return GetBlockInfoInBuildMode();
|
if (player == null) return "";
|
||||||
float3 pos = player.Position;
|
GamecraftModdingAPI.FlyCam cam = GameState.IsBuildMode() ? player.BuildCamera : null;
|
||||||
float3 rot = player.Rotation;
|
//float3 pos = cam?.Position ?? player.Position;
|
||||||
float3 vel = player.Velocity;
|
float3 rot = cam?.Rotation ?? player.Rotation;
|
||||||
float3 ave = player.AngularVelocity;
|
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" +
|
return $"Player rotation: {rot.x:F}° {rot.y:F}° {rot.z:F}°\n" +
|
||||||
$"- Velocity: {vel.x:F} {vel.y:F} {vel.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" +
|
$"- 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 void OnApplicationQuit() => Main.Shutdown();
|
||||||
|
|
||||||
public override string Name { get; } = "BuildingTools";
|
public override string Name => "BuildingTools";
|
||||||
public override string Version { get; } = "v1.1.0";
|
public override string Version => "v1.1.0";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -463,18 +463,12 @@
|
||||||
<Reference Include="Svelto.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
<Reference Include="Svelto.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Svelto.Tasks.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Svelto.Tasks.dll</HintPath>
|
||||||
</Reference>
|
</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">
|
<Reference Include="System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.ComponentModel.Composition.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.ComponentModel.Composition.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<Reference Include="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.Configuration.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.Configuration.dll</HintPath>
|
||||||
</Reference>
|
</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">
|
<Reference Include="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.Data.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\System.Data.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
Loading…
Reference in a new issue