using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Content.Server.Mobs;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.Log;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Mobs
{
///
/// Stores a on a mob.
///
public class MindComponent : Component
{
///
public override string Name => "Mind";
///
/// The mind controlling this mob. Can be null.
///
[ViewVariables]
public Mind Mind { get; private set; }
///
/// True if we have a mind, false otherwise.
///
[ViewVariables]
public bool HasMind => Mind != null;
///
/// Don't call this unless you know what the hell you're doing.
/// Use instead.
/// If that doesn't cover it, make something to cover it.
///
public void InternalEjectMind()
{
Mind = null;
}
///
/// Don't call this unless you know what the hell you're doing.
/// Use instead.
/// If that doesn't cover it, make something to cover it.
///
public void InternalAssignMind(Mind value)
{
Mind = value;
}
public override void OnRemove()
{
base.OnRemove();
if (HasMind)
{
Mind.TransferTo(null);
}
}
}
}