Mind Role Entities (#31318)

* Mind Role Entities wip

* headrev count fix

* silicon stuff, cleanup

* exclusive antag config, cleanup

* jobroleadd overwerite

* logging stuff

* MindHasRole cleanup, admin log stuff

* last second cleanup

* ocd

* minor cleanup

* remove createdTime datafield

* now actually using the event replacement I made for role time tracking

* weh
This commit is contained in:
Errant
2024-10-10 10:48:56 +02:00
committed by GitHub
parent 3e078ab3e0
commit 93c7bdc134
65 changed files with 1082 additions and 556 deletions

View File

@@ -0,0 +1,48 @@
using Content.Shared.Mind;
using JetBrains.Annotations;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Roles;
/// <summary>
/// This holds data for, and indicates, a Mind Role entity
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class MindRoleComponent : BaseMindRoleComponent
{
/// <summary>
/// Marks this Mind Role as Antagonist
/// A single antag Mind Role is enough to make the owner mind count as Antagonist.
/// </summary>
[DataField]
public bool Antag { get; set; } = false;
/// <summary>
/// True if this mindrole is an exclusive antagonist. Antag setting is not checked if this is True.
/// </summary>
[DataField]
public bool ExclusiveAntag { get; set; } = false;
/// <summary>
/// The Mind that this role belongs to
/// </summary>
public Entity<MindComponent> Mind { get; set; }
/// <summary>
/// The Antagonist prototype of this role
/// </summary>
[DataField]
public ProtoId<AntagPrototype>? AntagPrototype { get; set; }
/// <summary>
/// The Job prototype of this role
/// </summary>
[DataField]
public ProtoId<JobPrototype>? JobPrototype { get; set; }
}
public abstract partial class BaseMindRoleComponent : Component
{
}