Tie NPC services to plans (#16451)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user