Browse Source

Update to the latest version of the API

tags/v1.2.0
NorbiPeti 3 years ago
parent
commit
160eecabb7
Signed by: NorbiPeti <szatmari.norbert.peter@gmail.com> GPG Key ID: DBA4C4549A927E56
2 changed files with 9 additions and 14 deletions
  1. +9
    -8
      BuildingTools/BuildingTools.cs
  2. +0
    -6
      BuildingTools/BuildingTools.csproj

+ 9
- 8
BuildingTools/BuildingTools.cs 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";
}
}

+ 0
- 6
BuildingTools/BuildingTools.csproj 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>


Loading…
Cancel
Save