Files
tbd-station-14/Content.Server/NPC/HTN/HTNPlan.cs
metalgearsloth c31c848afd Shooting NPCs and more (#18042)
* Add pirate shooting

* Shooting working

* Basics working

* Refactor time

* More conversion

* Update primitives

* Update yml

* weh

* Building again

* Draft

* weh

* b

* Start shutdown

* Starting to take form

* Code side done

* is it worky

* Fix prototypes

* stuff

* Shitty working

* Juke events working

* Even more cleanup

* RTX

* Fix interaction combat mode and compquery

* GetAmmoCount relays

* Fix rotation speed

* Juke fixes

* fixes

* weh

* The collision avoidance never ends

* Fixes

* Pause support

* framework

* lazy

* Fix idling

* Fix drip

* goobed

* Fix takeover shutdown bug

* Merge fixes

* shitter

* Fix carpos
2023-08-01 19:48:56 -05:00

35 lines
938 B
C#

using Content.Server.NPC.HTN.PrimitiveTasks;
namespace Content.Server.NPC.HTN;
/// <summary>
/// The current plan for a HTN NPC.
/// </summary>
public sealed class HTNPlan
{
/// <summary>
/// Effects that were applied for each primitive task in the plan.
/// </summary>
public readonly List<Dictionary<string, object>?> Effects;
public readonly List<int> BranchTraversalRecord;
public readonly List<HTNPrimitiveTask> Tasks;
public HTNPrimitiveTask CurrentTask => Tasks[Index];
public HTNOperator CurrentOperator => CurrentTask.Operator;
/// <summary>
/// Where we are up to in the <see cref="Tasks"/>
/// </summary>
public int Index = 0;
public HTNPlan(List<HTNPrimitiveTask> tasks, List<int> branchTraversalRecord, List<Dictionary<string, object>?> effects)
{
Tasks = tasks;
BranchTraversalRecord = branchTraversalRecord;
Effects = effects;
}
}