2021-01-01 16:11:17 +01:00
|
|
|
using Content.Server.GameTicking;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Ghost.Components;
|
|
|
|
|
using Content.Shared.Examine;
|
2021-08-06 00:02:36 -07:00
|
|
|
using Content.Shared.Ghost;
|
2021-11-08 15:11:58 +01:00
|
|
|
using Content.Shared.MobState.Components;
|
2022-01-04 13:37:50 +01:00
|
|
|
using Robust.Shared.Analyzers;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.GameObjects;
|
2020-04-23 16:04:41 +02:00
|
|
|
using Robust.Shared.IoC;
|
2020-05-28 00:58:57 +02:00
|
|
|
using Robust.Shared.Localization;
|
2020-08-13 14:40:27 +02:00
|
|
|
using Robust.Shared.Map;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-03-16 15:50:20 +01:00
|
|
|
using Robust.Shared.Timing;
|
2020-04-20 11:14:04 +02:00
|
|
|
using Robust.Shared.Utility;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.ViewVariables;
|
2018-08-21 00:59:04 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Mind.Components
|
2018-08-21 00:59:04 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-06-09 22:19:39 +02:00
|
|
|
/// Stores a <see cref="Server.Mind.Mind"/> on a mob.
|
2018-08-21 00:59:04 +02:00
|
|
|
/// </summary>
|
2022-02-08 00:42:49 -08:00
|
|
|
[RegisterComponent, Friend(typeof(MindSystem))]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MindComponent : Component
|
2018-08-21 00:59:04 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The mind controlling this mob. Can be null.
|
|
|
|
|
/// </summary>
|
2018-09-09 15:34:43 +02:00
|
|
|
[ViewVariables]
|
2022-01-04 13:37:50 +01:00
|
|
|
public Mind? Mind { get; set; }
|
2018-08-21 00:59:04 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// True if we have a mind, false otherwise.
|
|
|
|
|
/// </summary>
|
2018-09-09 15:34:43 +02:00
|
|
|
[ViewVariables]
|
2018-08-21 00:59:04 +02:00
|
|
|
public bool HasMind => Mind != null;
|
|
|
|
|
|
2020-04-20 11:37:05 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether examining should show information about the mind or not.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("showExamineInfo")]
|
2021-01-01 16:11:17 +01:00
|
|
|
public bool ShowExamineInfo { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the mind will be put on a ghost after this component is shutdown.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("ghostOnShutdown")]
|
|
|
|
|
public bool GhostOnShutdown { get; set; } = true;
|
2018-08-21 00:59:04 +02:00
|
|
|
}
|
2021-03-31 14:17:22 -07:00
|
|
|
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MindRemovedMessage : EntityEventArgs
|
2021-03-31 14:17:22 -07:00
|
|
|
{
|
|
|
|
|
}
|
2021-05-11 16:16:08 -07:00
|
|
|
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MindAddedMessage : EntityEventArgs
|
2021-05-11 16:16:08 -07:00
|
|
|
{
|
|
|
|
|
}
|
2018-08-21 00:59:04 +02:00
|
|
|
}
|