mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-19 06:28:40 +03:00
* ai stays seated while cuffed. * Do the thing I thought was dumb.... whatever. * less than (cherry picked from commit 57c3a28f2626f9b7d389d16dd7b9511391ba2da6)
30 lines
890 B
C#
30 lines
890 B
C#
using Content.Server.Buckle.Systems;
|
|
|
|
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators.Combat;
|
|
|
|
public sealed partial class UnbuckleOperator : HTNOperator
|
|
{
|
|
private BuckleSystem _buckle = default!;
|
|
|
|
[DataField("shutdownState")]
|
|
public HTNPlanState ShutdownState { get; private set; } = HTNPlanState.TaskFinished;
|
|
|
|
public override void Initialize(IEntitySystemManager sysManager)
|
|
{
|
|
base.Initialize(sysManager);
|
|
_buckle = sysManager.GetEntitySystem<BuckleSystem>();
|
|
}
|
|
|
|
public override void Startup(NPCBlackboard blackboard)
|
|
{
|
|
base.Startup(blackboard);
|
|
var owner = blackboard.GetValue<EntityUid>(NPCBlackboard.Owner);
|
|
_buckle.TryUnbuckle(owner, owner, false);
|
|
}
|
|
|
|
public override HTNOperatorStatus Update(NPCBlackboard blackboard, float frameTime)
|
|
{
|
|
return HTNOperatorStatus.Finished;
|
|
}
|
|
}
|