Tie NPC services to plans (#16451)

This commit is contained in:
metalgearsloth
2023-05-15 16:18:18 +10:00
committed by GitHub
parent cbd5db3ca5
commit 66ae137b70
2 changed files with 18 additions and 31 deletions

View File

@@ -14,19 +14,18 @@ public sealed class HTNComponent : NPCComponent
DataField("rootTask", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<HTNCompoundTask>))]
public string RootTask = default!;
/// <summary>
/// Check any active services for our current plan. This is used to find new targets for example without changing our plan.
/// </summary>
[DataField("checkServices")]
public bool CheckServices = true;
/// <summary>
/// The NPC's current plan.
/// </summary>
[ViewVariables]
public HTNPlan? Plan;
// TODO: Need dictionary timeoffsetserializer.
/// <summary>
/// Last time we tried a particular <see cref="UtilityService"/>.
/// </summary>
[DataField("serviceCooldowns")]
public Dictionary<string, TimeSpan> ServiceCooldowns = new();
/// <summary>
/// How long to wait after having planned to try planning again.
/// </summary>