Aetheria/Assets/Scripts/ServerShared/Agents/AgentTask.cs
hyperion51 6aeb2ae280 Entity Persistence Refactoring
Entities refactored to enable robust persistence
Entities detect stale data references and reload behaviors
2020-05-06 04:56:36 +01:00

27 lines
614 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using JsonKnownTypes;
using MessagePack;
using Newtonsoft.Json;
using UnityEngine;
[MessagePackObject,
Union(0, typeof(StationTowing)),
JsonObject(MemberSerialization.OptIn), JsonConverter(typeof(JsonKnownTypesConverter<DatabaseEntry>))]
public abstract class AgentTask
{
[IgnoreMember] public abstract AgentJob JobType { get; }
[JsonProperty("id"), Key(0)] public int Priority;
[JsonProperty("zone"), Key(1)] public Guid Zone;
}
public enum AgentJob
{
Mine,
Haul,
Tow,
Defend,
Attack,
Explore
}