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:
parent
6aeb2ae280
commit
ab8aa5fb9a
27 changed files with 480 additions and 190 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue