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