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-06-07 15:26:28 +02:00
|
|
|
[RegisterComponent, Access(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-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(MindSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
|
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
|
|
|
}
|