Move mind role components to shared (#39606)
This commit is contained in:
@@ -9,7 +9,6 @@ using Content.Server.Mind;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.RoundEnd;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Station.Components;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
@@ -20,6 +19,7 @@ using Content.Shared.NPC.Prototypes;
|
||||
using Content.Shared.NPC.Systems;
|
||||
using Content.Shared.NukeOps;
|
||||
using Content.Shared.Pinpointer;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Station.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Linq;
|
||||
using Content.Server.Ghost.Roles;
|
||||
using Content.Server.Ghost.Roles.Components;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Prototypes;
|
||||
using Content.Shared.FixedPoint;
|
||||
@@ -11,7 +10,7 @@ using Content.Shared.Mind;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Players;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Server.Console;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Reflection;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Administration.Managers;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Forensics;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Hands.Systems;
|
||||
using Content.Server.Mind;
|
||||
@@ -21,6 +20,7 @@ using Content.Shared.PDA;
|
||||
using Content.Shared.Players.PlayTimeTracking;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Content.Shared.StationRecords;
|
||||
using Content.Shared.Throwing;
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Numerics;
|
||||
using Content.Server.Announcements;
|
||||
using Content.Server.Discord;
|
||||
using Content.Server.GameTicking.Events;
|
||||
using Content.Server.Ghost;
|
||||
using Content.Server.Maps;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.CCVar;
|
||||
@@ -12,6 +11,7 @@ using Content.Shared.GameTicking;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Players;
|
||||
using Content.Shared.Preferences;
|
||||
using Content.Shared.Roles.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Prometheus;
|
||||
using Robust.Shared.Asynchronous;
|
||||
@@ -19,7 +19,6 @@ using Robust.Shared.Audio;
|
||||
using Robust.Shared.EntitySerialization;
|
||||
using Robust.Shared.EntitySerialization.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Changeling;
|
||||
|
||||
namespace Content.Server.GameTicking.Rules;
|
||||
|
||||
/// <summary>
|
||||
/// Game rule system for Changelings
|
||||
/// </summary>
|
||||
public sealed class ChangelingRuleSystem : GameRuleSystem<ChangelingRuleComponent>
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<ChangelingRoleComponent, GetBriefingEvent>(OnGetBriefing);
|
||||
}
|
||||
|
||||
private void OnGetBriefing(Entity<ChangelingRoleComponent> ent, ref GetBriefingEvent args)
|
||||
{
|
||||
args.Append(Loc.GetString("changeling-briefing"));
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using Content.Server.Mind;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.Localizations;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.GameTicking.Rules;
|
||||
|
||||
@@ -17,6 +17,7 @@ using Content.Shared.NPC.Components;
|
||||
using Content.Shared.NPC.Systems;
|
||||
using Content.Shared.Nuke;
|
||||
using Content.Shared.NukeOps;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Store;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Zombies;
|
||||
|
||||
@@ -23,6 +23,7 @@ using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.NPC.Prototypes;
|
||||
using Content.Shared.NPC.Systems;
|
||||
using Content.Shared.Revolutionary.Components;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Zombies;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -161,7 +162,10 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
|
||||
if (_mind.TryGetMind(ev.User.Value, out var revMindId, out _))
|
||||
{
|
||||
if (_role.MindHasRole<RevolutionaryRoleComponent>(revMindId, out var role))
|
||||
{
|
||||
role.Value.Comp2.ConvertedCount++;
|
||||
Dirty(role.Value.Owner, role.Value.Comp2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Content.Server.Shuttles.Systems;
|
||||
using Content.Shared.GameTicking.Components;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Survivor.Components;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Server.Antag;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Shared.Roles.Components;
|
||||
|
||||
namespace Content.Server.GameTicking.Rules;
|
||||
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Antag;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Objectives;
|
||||
using Content.Server.PDA.Ringer;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.Traitor.Uplink;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.GameTicking.Components;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.NPC.Systems;
|
||||
using Content.Shared.PDA;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Content.Shared.Roles.RoleCodeword;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -13,6 +13,7 @@ using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Zombies;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Ghost;
|
||||
|
||||
/// <summary>
|
||||
/// This is used to mark Observers properly, as they get Minds
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class ObserverRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
public string Name => Loc.GetString("observer-role-name");
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Ghost.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a ghostrole.
|
||||
/// It also holds the name for the round end display
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class GhostRoleMarkerRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
//TODO does anything still use this? It gets populated by GhostRolesystem but I don't see anything ever reading it
|
||||
[DataField] public string? Name;
|
||||
|
||||
}
|
||||
@@ -521,9 +521,6 @@ public sealed class GhostRoleSystem : EntitySystem
|
||||
_mindSystem.TransferTo(newMind, mob);
|
||||
|
||||
_roleSystem.MindAddRoles(newMind.Owner, role.MindRoles, newMind.Comp);
|
||||
|
||||
if (_roleSystem.MindHasRole<GhostRoleMarkerRoleComponent>(newMind!, out var markerRole))
|
||||
markerRole.Value.Comp2.Name = role.RoleName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,6 +6,7 @@ using Content.Shared.Database;
|
||||
using Content.Shared.Implants;
|
||||
using Content.Shared.Mindshield.Components;
|
||||
using Content.Shared.Revolutionary.Components;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Shared.Containers;
|
||||
|
||||
namespace Content.Server.Mindshield;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Objectives.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Ninja.Components;
|
||||
using Content.Shared.Ninja.Systems;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Sticky;
|
||||
using Content.Shared.Trigger;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Content.Server.Objectives.Components;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Objectives.Components;
|
||||
using Content.Shared.Ninja.Components;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Warps;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using Content.Server.Dragon;
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a space dragon.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(DragonSystem))]
|
||||
public sealed partial class DragonRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are an initial infected.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class InitialInfectedRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a space ninja.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class NinjaRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a nuke operative.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class NukeopsRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a paradox clone.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class ParadoxCloneRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Name modifer applied to the player when they turn into a ghost.
|
||||
/// Needed to be able to keep the original and the clone apart in dead chat.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId? NameModifier = "paradox-clone-ghost-name-modifier";
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Content.Shared.Ghost;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.NameModifier.EntitySystems;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Shared.Administration;
|
||||
using Content.Shared.Players;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a Revolutionary.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class RevolutionaryRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// For headrevs, how many people you have converted.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public uint ConvertedCount = 0;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a briefing to the character info menu, does nothing else.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class RoleBriefingComponent : BaseMindRoleComponent
|
||||
{
|
||||
[DataField]
|
||||
public string Briefing;
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using Content.Shared.Roles.Components;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
public sealed class RoleBriefingSystem : EntitySystem
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a hacked borg.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SubvertedSiliconRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Adds to a mind role ent to tag they're a Survivor
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SurvivorRoleComponent : BaseMindRoleComponent;
|
||||
@@ -1,11 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a thief.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class ThiefRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a syndicate traitor.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class TraitorRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Mind role to tag entities that they're a Wizard
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class WizardRoleComponent : Component;
|
||||
@@ -1,11 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a zombie.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class ZombieRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Silicons.Borgs.Components;
|
||||
using Robust.Shared.Containers;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ using System.Linq;
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Radio.Components;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Chat;
|
||||
@@ -11,9 +10,9 @@ using Content.Shared.GameTicking;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Silicons.Laws;
|
||||
using Content.Shared.Silicons.Laws.Components;
|
||||
using Content.Shared.Wires;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Containers;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Objectives.Components;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.Thief.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Foldable;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
|
||||
namespace Content.Server.Thief.Systems;
|
||||
|
||||
@@ -6,7 +6,6 @@ using Content.Server.Chat;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Emoting.Systems;
|
||||
using Content.Server.Speech.EntitySystems;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Anomaly.Components;
|
||||
using Content.Shared.Armor;
|
||||
using Content.Shared.Bed.Sleep;
|
||||
@@ -21,6 +20,7 @@ using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Content.Shared.Zombies;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Shared.Roles;
|
||||
|
||||
namespace Content.Shared.Changeling;
|
||||
|
||||
/// <summary>
|
||||
/// The Mindrole for Changeling Antags
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class ChangelingRoleComponent : BaseMindRoleComponent;
|
||||
@@ -3,7 +3,7 @@ using Content.Shared.Localizations;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.EntityEffects.EffectConditions;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a changeling.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class ChangelingRoleComponent : BaseMindRoleComponent;
|
||||
9
Content.Shared/Roles/Components/DragonRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/DragonRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a space dragon.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class DragonRoleComponent : BaseMindRoleComponent;
|
||||
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a ghostrole.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class GhostRoleMarkerRoleComponent : BaseMindRoleComponent;
|
||||
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are an initial infected.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class InitialInfectedRoleComponent : BaseMindRoleComponent;
|
||||
@@ -1,12 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Jobs;
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to mark them as a job role entity.
|
||||
/// Added to mind role entities to mark them as a job role entity.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class JobRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
|
||||
}
|
||||
public sealed partial class JobRoleComponent : BaseMindRoleComponent;
|
||||
@@ -2,7 +2,7 @@ using Content.Shared.Mind;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Roles;
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This holds data for, and indicates, a Mind Role entity
|
||||
@@ -11,49 +11,52 @@ namespace Content.Shared.Roles;
|
||||
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.
|
||||
/// 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;
|
||||
|
||||
/// <summary>
|
||||
/// The mind's current antagonist/special role, or lack thereof;
|
||||
/// The mind's current antagonist/special role, or lack thereof.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public ProtoId<RoleTypePrototype>? RoleType;
|
||||
|
||||
/// <summary>
|
||||
/// The role's subtype, shown only to admins to help with antag categorization
|
||||
/// The role's subtype, shown only to admins to help with antag categorization.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId? Subtype;
|
||||
|
||||
/// <summary>
|
||||
/// True if this mindrole is an exclusive antagonist. Antag setting is not checked if this is True.
|
||||
/// True if this mindrole is an exclusive antagonist. Antag setting is not checked if this is True.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool ExclusiveAntag;
|
||||
|
||||
/// <summary>
|
||||
/// The Mind that this role belongs to
|
||||
/// The Mind that this role belongs to.
|
||||
/// </summary>
|
||||
public Entity<MindComponent> Mind { get; set; }
|
||||
/// <remarks>
|
||||
/// TODO: Make this a datafield. Also components should not store other components.
|
||||
/// </remarks>
|
||||
public Entity<MindComponent> Mind;
|
||||
|
||||
/// <summary>
|
||||
/// The Antagonist prototype of this role
|
||||
/// The Antagonist prototype of this role.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public ProtoId<AntagPrototype>? AntagPrototype { get; set; }
|
||||
public ProtoId<AntagPrototype>? AntagPrototype;
|
||||
|
||||
/// <summary>
|
||||
/// The Job prototype of this role
|
||||
/// The Job prototype of this role.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public ProtoId<JobPrototype>? JobPrototype { get; set; }
|
||||
public ProtoId<JobPrototype>? JobPrototype;
|
||||
|
||||
/// <summary>
|
||||
/// Used to order the characters on by role/antag status. Highest numbers are shown first.
|
||||
/// Used to order the characters on by role/antag status. Highest numbers are shown first.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public int SortWeight;
|
||||
@@ -62,7 +65,4 @@ public sealed partial class MindRoleComponent : BaseMindRoleComponent
|
||||
// Why does this base component actually exist? It does make auto-categorization easy, but before that it was useless?
|
||||
// I used it for easy organisation/bookkeeping of what components are for mindroles
|
||||
[EntityCategory("Roles")]
|
||||
public abstract partial class BaseMindRoleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
public abstract partial class BaseMindRoleComponent : Component;
|
||||
9
Content.Shared/Roles/Components/NinjaRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/NinjaRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a space ninja.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class NinjaRoleComponent : BaseMindRoleComponent;
|
||||
9
Content.Shared/Roles/Components/NukeopsRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/NukeopsRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a nuke operative.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class NukeopsRoleComponent : BaseMindRoleComponent;
|
||||
9
Content.Shared/Roles/Components/ObserverRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/ObserverRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used to mark Observers properly, as they get Minds.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class ObserverRoleComponent : BaseMindRoleComponent;
|
||||
17
Content.Shared/Roles/Components/ParadoxCloneRoleComponent.cs
Normal file
17
Content.Shared/Roles/Components/ParadoxCloneRoleComponent.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a paradox clone.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class ParadoxCloneRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Name modifer applied to the player when they turn into a ghost.
|
||||
/// Needed to be able to keep the original and the clone apart in dead chat.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId? NameModifier = "paradox-clone-ghost-name-modifier";
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a Revolutionary.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class RevolutionaryRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// For headrevs, how many people you have converted.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public uint ConvertedCount = 0;
|
||||
}
|
||||
13
Content.Shared/Roles/Components/RoleBriefingComponent.cs
Normal file
13
Content.Shared/Roles/Components/RoleBriefingComponent.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a briefing to the character info menu, does nothing else.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class RoleBriefingComponent : BaseMindRoleComponent
|
||||
{
|
||||
[DataField(required: true), AutoNetworkedField]
|
||||
public LocId Briefing;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Used on Silicon's minds to get the appropriate mind role
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class SiliconBrainRoleComponent : BaseMindRoleComponent;
|
||||
@@ -1,26 +1,25 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Roles;
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is most likely not the component you are looking for, almost nothing should be using this.
|
||||
/// Consider using GhostRoleComponent or AntagSelectionComponent instead.
|
||||
///
|
||||
/// The specified mind role will be added to the mob on spawn.
|
||||
///
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class StartingMindRoleComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of the mind role to add
|
||||
/// The ID of the mind role to add
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public EntProtoId MindRole;
|
||||
|
||||
/// <summary>
|
||||
/// Add the mind role silently
|
||||
/// Add the mind role silently
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool Silent = true;
|
||||
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a hacked borg.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class SubvertedSiliconRoleComponent : BaseMindRoleComponent;
|
||||
9
Content.Shared/Roles/Components/SurvivorRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/SurvivorRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are survivor.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class SurvivorRoleComponent : BaseMindRoleComponent;
|
||||
9
Content.Shared/Roles/Components/ThiefRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/ThiefRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a thief.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class ThiefRoleComponent : BaseMindRoleComponent;
|
||||
9
Content.Shared/Roles/Components/TraitorRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/TraitorRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a syndicate traitor.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class TraitorRoleComponent : BaseMindRoleComponent;
|
||||
9
Content.Shared/Roles/Components/WizardRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/WizardRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a wizard.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class WizardRoleComponent : Component;
|
||||
9
Content.Shared/Roles/Components/ZombieRoleComponent.cs
Normal file
9
Content.Shared/Roles/Components/ZombieRoleComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Roles.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to mind role entities to tag that they are a zombie.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class ZombieRoleComponent : BaseMindRoleComponent;
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.Players;
|
||||
using Content.Shared.Players.PlayTimeTracking;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -5,7 +5,7 @@ using Content.Shared.CCVar;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Content.Shared.Roles.Components;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Content.Shared.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Used on Silicon's minds to get the appropriate mind role
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SiliconBrainRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
observer-role-name = Observer
|
||||
|
||||
@@ -320,3 +320,5 @@
|
||||
roleType: SoloAntagonist
|
||||
subtype: role-subtype-changeling
|
||||
- type: ChangelingRole
|
||||
- type: RoleBriefing
|
||||
briefing: changeling-briefing
|
||||
|
||||
Reference in New Issue
Block a user