feat(Database) Direct database/Throne links now work in the database. Added a Detailed/Plain view button
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Model.Immortal.Entity.Data;
|
||||
using Model.Immortal.Entity.Parts;
|
||||
using Model.Immortal.Types;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Model.Immortal.Entity;
|
||||
|
||||
@@ -28,6 +28,13 @@ public class EntityModel {
|
||||
IsSpeculative = isSpeculative;
|
||||
}
|
||||
|
||||
public string AsYaml() {
|
||||
var stringBuilder = new StringBuilder();
|
||||
var serializer = new Serializer();
|
||||
stringBuilder.AppendLine(serializer.Serialize(this));
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
public string DataType { get; set; }
|
||||
|
||||
// TODO Serilization currently being used for build orders
|
||||
@@ -71,6 +78,8 @@ public class EntityModel {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static List<EntityModel> GetList() {
|
||||
if (entityModels == null) entityModels = DATA.Get().Values.ToList();
|
||||
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user