+using System;
+using System.IO;
+
+using Vintagestory.API.Common;
+using Vintagestory.API.Datastructures;
+
+namespace Automap
+{
+ public class CommandData : IAttribute
+ {
+ public RunState State { get; set; }//Run , Stop, SingleSnapshot -> Stop
+
+ //POI Delegate list {enabled/Disable}
+ //Other params...? Tick rate?
+ //Choose : Renderer(s)
+
+
+ public CommandData( RunState assumeState)
+ {
+ State = assumeState;
+
+ }
+
+
+
+ public void FromBytes(BinaryReader stream)
+ {
+ State = ( RunState )stream.ReadByte( );
+
+
+ }
+
+ public int GetAttributeId( )
+ {
+ return 12346;
+ }
+
+ public object GetValue( )
+ {
+ return this;
+ }
+
+ public void ToBytes(BinaryWriter stream)
+ {
+ stream.Write(( byte )State);
+
+ }
+
+ public string ToJsonToken( )
+ {
+ return $"New-State:{State}, ";
+ }
+
+ public bool Equals(IWorldAccessor worldForResolve, IAttribute attr)
+ {
+ var other = attr.GetValue( ) as CommandData;
+
+ if (this.State == other.State )
+ {
+ return true;
+ }
+
+ return false;
+ }
+ }
+}
+