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
This commit is contained in:
hyperion51 2020-05-07 03:53:54 +01:00
commit ab8aa5fb9a
27 changed files with 480 additions and 190 deletions

View file

@ -9,14 +9,21 @@ using UnityEngine;
[MessagePackObject,
Union(0, typeof(StationTowing)),
JsonObject(MemberSerialization.OptIn), JsonConverter(typeof(JsonKnownTypesConverter<DatabaseEntry>))]
public abstract class AgentTask
public abstract class AgentTask : DatabaseEntry
{
[IgnoreMember] public abstract AgentJob JobType { get; }
[JsonProperty("id"), Key(0)] public int Priority;
[JsonProperty("zone"), Key(1)] public Guid Zone;
[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 AgentJob
public enum TaskType
{
Mine,
Haul,