AI sleeping (#1708)
* AI sleeping AI no longer update when dead. * It was easier to merge master and re-apply it. * Update AiControllerComponent.cs Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Robust.Server.AI;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates whether an AI should be updated by the AiSystem or not.
|
||||
/// Useful to sleep AI when they die or otherwise should be inactive.
|
||||
/// </summary>
|
||||
internal sealed class SleepAiMessage : EntitySystemMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// Sleep or awake.
|
||||
/// </summary>
|
||||
public bool Sleep { get; }
|
||||
public AiLogicProcessor Processor { get; }
|
||||
|
||||
public SleepAiMessage(AiLogicProcessor processor, bool sleep)
|
||||
{
|
||||
Processor = processor;
|
||||
Sleep = sleep;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user