location heading
This commit is contained in:
@@ -31,7 +31,7 @@ namespace ReallifeGamemode.DataService.Controllers
|
|||||||
|
|
||||||
foreach(var location in list)
|
foreach(var location in list)
|
||||||
{
|
{
|
||||||
locations.Add($"{location.Description.PadRight(20)} - {Math.Round(location.X, 2).ToString(CultureInfo.InvariantCulture)}, {Math.Round(location.Y, 2).ToString(CultureInfo.InvariantCulture)}, {Math.Round(location.Z, 2).ToString(CultureInfo.InvariantCulture)}");
|
locations.Add($"{Uri.EscapeDataString(location.Description).PadRight(20)} - {Math.Round(location.X, 2).ToString(CultureInfo.InvariantCulture)}, {Math.Round(location.Y, 2).ToString(CultureInfo.InvariantCulture)}, {Math.Round(location.Z, 2).ToString(CultureInfo.InvariantCulture)} - Richtung: {Math.Round(location.Heading, 2)}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return locations;
|
return locations;
|
||||||
|
|||||||
@@ -17,5 +17,7 @@ namespace ReallifeGamemode.Database.Entities
|
|||||||
public double Y { get; set; }
|
public double Y { get; set; }
|
||||||
|
|
||||||
public double Z { get; set; }
|
public double Z { get; set; }
|
||||||
|
|
||||||
|
public double Heading { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1337
ReallifeGamemode.Database/Migrations/20190929202856_SavedLocationsHeading.Designer.cs
generated
Normal file
1337
ReallifeGamemode.Database/Migrations/20190929202856_SavedLocationsHeading.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ReallifeGamemode.Database.Migrations
|
||||||
|
{
|
||||||
|
public partial class SavedLocationsHeading : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<double>(
|
||||||
|
name: "Heading",
|
||||||
|
table: "Locations",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Heading",
|
||||||
|
table: "Locations");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -543,6 +543,8 @@ namespace ReallifeGamemode.Database.Migrations
|
|||||||
|
|
||||||
b.Property<string>("Description");
|
b.Property<string>("Description");
|
||||||
|
|
||||||
|
b.Property<double>("Heading");
|
||||||
|
|
||||||
b.Property<double>("X");
|
b.Property<double>("X");
|
||||||
|
|
||||||
b.Property<double>("Y");
|
b.Property<double>("Y");
|
||||||
|
|||||||
@@ -1905,6 +1905,7 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
X = player.Position.X,
|
X = player.Position.X,
|
||||||
Y = player.Position.Y,
|
Y = player.Position.Y,
|
||||||
Z = player.Position.Z,
|
Z = player.Position.Z,
|
||||||
|
Heading = player.Heading
|
||||||
});
|
});
|
||||||
|
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
|
|||||||
Reference in New Issue
Block a user