FactionDoctrine/RoleDoctrine (Faction key 17), Flight as the only writer of members' Target and Task, hail/grace/compliance, FollowTask/FollowState, agent removal on Entities removal, doctrine-catalog command, FlightTests. Not yet built or run; verification follows in later commits. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
35 lines
762 B
C#
35 lines
762 B
C#
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* 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;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using MessagePack;
|
|
using Newtonsoft.Json;
|
|
|
|
// Agent tasks are owned by their Agent and not persisted.
|
|
[JsonObject(MemberSerialization.OptIn)]
|
|
public abstract class AgentTask
|
|
{
|
|
[JsonProperty("priority"), Key(1)]
|
|
public int Priority;
|
|
|
|
[JsonProperty("reserved"), Key(3)]
|
|
public bool Reserved;
|
|
|
|
[IgnoreMember] public abstract TaskType Type { get; }
|
|
}
|
|
|
|
public enum TaskType
|
|
{
|
|
None,
|
|
Mine,
|
|
Haul,
|
|
Tow,
|
|
Defend,
|
|
Attack,
|
|
Explore,
|
|
Follow
|
|
}
|
|
|