OSDN Git Service

Merge branch 'vgd' of into Split_renderers
[automap/automap.git] / Automap / Data / EntitiesOfInterest.cs
index 3d5042d..e006d3c 100644 (file)
@@ -1,36 +1,46 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
-
+using System.IO;
 using System.Linq;
 
 using Vintagestory.API.Common.Entities;
 using Vintagestory.API.MathTools;
+using Vintagestory.API.Client;
 
 using ProtoBuf;
 
+using Newtonsoft.Json;
+
 namespace Automap
 {
        /// <summary>
-       /// Actual Physical Point in space - that is interesting.
+       /// Basically the same as a POI but for an entity
        /// </summary>
        [ProtoContract]
        public struct EntityOfInterest
        {
+               
                [ProtoMember(1)]
                public string Name;
-
+               
+               [DisplayName(1, "Notes")]
                [ProtoMember(2)]
                public string Notes;
 
+               [DisplayName(0, "Loc.")]
                [ProtoMember(3)]
                public BlockPos Location;
 
+               [DisplayName(2, "Time")]
                [ProtoMember(4)]
                public DateTime Timestamp;
 
+               [DisplayName(3, "ID")]
                [ProtoMember(5)]
                public long EntityId;
+
+
        }
 
        /// <summary>
@@ -39,6 +49,8 @@ namespace Automap
        /// <remarks>Tracked by ID - these never leave.</remarks>
        public class EntitiesOfInterest : KeyedCollection<long, EntityOfInterest>
        {
+               protected override long GetKeyForItem(EntityOfInterest item)
+                       => item.EntityId;
 
                internal void AddReplace(EntityOfInterest entity)
                {
@@ -48,8 +60,6 @@ namespace Automap
                        Add(entity);
                }
 
-               protected override long GetKeyForItem(EntityOfInterest item)
-                       => item.EntityId;
        }
 }