2026-06-13 04:56:50 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2020-12-22 03:13:43 +00:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
|
using System;
|
2020-04-29 23:36:00 +01:00
|
|
|
using System.Collections;
|
2020-04-29 11:27:55 +01:00
|
|
|
using System.Collections.Generic;
|
2020-05-06 04:56:36 +01:00
|
|
|
using MessagePack;
|
2026-06-13 04:56:50 +01:00
|
|
|
[MessagePackObject,
|
2020-05-06 04:56:36 +01:00
|
|
|
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)),
|
2026-06-13 04:56:50 +01:00
|
|
|
Union(3, typeof(HaulingTask))]
|
2020-05-07 03:53:54 +01:00
|
|
|
public abstract class AgentTask : DatabaseEntry
|
2020-04-29 11:27:55 +01:00
|
|
|
{
|
2026-06-13 04:56:50 +01:00
|
|
|
[Key(1)]
|
2020-05-07 03:53:54 +01:00
|
|
|
public int Priority;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
|
|
|
|
[Key(2)]
|
2020-05-07 03:53:54 +01:00
|
|
|
public Guid Zone;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
|
|
|
|
[Key(3)]
|
2020-05-07 03:53:54 +01:00
|
|
|
public bool Reserved;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2020-05-07 03:53:54 +01:00
|
|
|
[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
|
|
|
}
|
2021-02-11 03:14:20 +00:00
|
|
|
|