Aetheria/Assets/Scripts/ServerShared/Agents/AgentTask.cs
hyperion51 ab8aa5fb9a Control Modules & Job System
Agent behaviors are no longer hard coded but instead created by equippable control modules
Game Context has a job system which assigns appropriate tasks to drone control modules
2020-05-07 03:53:54 +01:00

34 lines
727 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 : DatabaseEntry
{
[JsonProperty("priority"), Key(1)]
public int Priority;
[JsonProperty("zone"), Key(2)]
public Guid Zone;
[JsonProperty("assignedEntity"), Key(3)]
public bool Reserved;
[IgnoreMember] public abstract TaskType Type { get; }
}
public enum TaskType
{
Mine,
Haul,
Tow,
Defend,
Attack,
Explore
}