2020-04-29 23:36:00 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections;
|
2020-04-29 11:27:55 +01:00
|
|
|
|
using System.Collections.Generic;
|
2020-05-06 04:56:36 +01:00
|
|
|
|
using JsonKnownTypes;
|
|
|
|
|
|
using MessagePack;
|
|
|
|
|
|
using Newtonsoft.Json;
|
2020-04-29 11:27:55 +01:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
2020-05-06 04:56:36 +01:00
|
|
|
|
[MessagePackObject,
|
|
|
|
|
|
Union(0, typeof(StationTowing)),
|
2020-05-28 04:50:40 +01:00
|
|
|
|
Union(1, typeof(Mining)),
|
2020-05-29 23:06:35 +01:00
|
|
|
|
Union(2, typeof(Survey)),
|
2020-05-06 04:56:36 +01:00
|
|
|
|
JsonObject(MemberSerialization.OptIn), JsonConverter(typeof(JsonKnownTypesConverter<DatabaseEntry>))]
|
2020-05-07 03:53:54 +01:00
|
|
|
|
public abstract class AgentTask : DatabaseEntry
|
2020-04-29 11:27:55 +01:00
|
|
|
|
{
|
2020-05-07 03:53:54 +01:00
|
|
|
|
[JsonProperty("priority"), Key(1)]
|
|
|
|
|
|
public int Priority;
|
|
|
|
|
|
|
|
|
|
|
|
[JsonProperty("zone"), Key(2)]
|
|
|
|
|
|
public Guid Zone;
|
|
|
|
|
|
|
2020-05-10 00:16:33 +01:00
|
|
|
|
[JsonProperty("reserved"), Key(3)]
|
2020-05-07 03:53:54 +01:00
|
|
|
|
public bool Reserved;
|
|
|
|
|
|
|
|
|
|
|
|
[IgnoreMember] public abstract TaskType Type { get; }
|
2020-04-29 11:27:55 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-07 03:53:54 +01:00
|
|
|
|
public enum TaskType
|
2020-04-29 11:27:55 +01:00
|
|
|
|
{
|
2020-05-28 04:50:40 +01:00
|
|
|
|
None,
|
2020-04-29 11:27:55 +01:00
|
|
|
|
Mine,
|
|
|
|
|
|
Haul,
|
|
|
|
|
|
Tow,
|
|
|
|
|
|
Defend,
|
2020-04-29 23:36:00 +01:00
|
|
|
|
Attack,
|
|
|
|
|
|
Explore
|
2020-04-29 11:27:55 +01:00
|
|
|
|
}
|