diff --git a/Content.IntegrationTests/Tests/GameRules/NukeOpsTest.cs b/Content.IntegrationTests/Tests/GameRules/NukeOpsTest.cs index cf16617479..4f92fd4e55 100644 --- a/Content.IntegrationTests/Tests/GameRules/NukeOpsTest.cs +++ b/Content.IntegrationTests/Tests/GameRules/NukeOpsTest.cs @@ -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; diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.cs b/Content.IntegrationTests/Tests/Minds/MindTests.cs index 48e11e4648..2f77519829 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.cs @@ -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; diff --git a/Content.IntegrationTests/Tests/Minds/RoleTests.cs b/Content.IntegrationTests/Tests/Minds/RoleTests.cs index 8acfff3fb9..f0a7268a3d 100644 --- a/Content.IntegrationTests/Tests/Minds/RoleTests.cs +++ b/Content.IntegrationTests/Tests/Minds/RoleTests.cs @@ -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; diff --git a/Content.Server/Administration/Systems/AdminSystem.cs b/Content.Server/Administration/Systems/AdminSystem.cs index 78433db129..677522a83b 100644 --- a/Content.Server/Administration/Systems/AdminSystem.cs +++ b/Content.Server/Administration/Systems/AdminSystem.cs @@ -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; diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index a6809e050e..1dadca4c03 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -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; diff --git a/Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs b/Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs deleted file mode 100644 index a64b0e904a..0000000000 --- a/Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Content.Server.GameTicking.Rules.Components; -using Content.Server.Roles; -using Content.Shared.Changeling; - -namespace Content.Server.GameTicking.Rules; - -/// -/// Game rule system for Changelings -/// -public sealed class ChangelingRuleSystem : GameRuleSystem -{ - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnGetBriefing); - } - - private void OnGetBriefing(Entity ent, ref GetBriefingEvent args) - { - args.Append(Loc.GetString("changeling-briefing")); - } -} diff --git a/Content.Server/GameTicking/Rules/DragonRuleSystem.cs b/Content.Server/GameTicking/Rules/DragonRuleSystem.cs index 964b248beb..53cf3bd4b0 100644 --- a/Content.Server/GameTicking/Rules/DragonRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/DragonRuleSystem.cs @@ -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; diff --git a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs index 17d9e4c847..9c3562b152 100644 --- a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs @@ -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; diff --git a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs index 609039ae4c..ef773f59d1 100644 --- a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs @@ -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(revMindId, out var role)) + { role.Value.Comp2.ConvertedCount++; + Dirty(role.Value.Owner, role.Value.Comp2); + } } } diff --git a/Content.Server/GameTicking/Rules/SurvivorRuleSystem.cs b/Content.Server/GameTicking/Rules/SurvivorRuleSystem.cs index 4990b98b91..d673444665 100644 --- a/Content.Server/GameTicking/Rules/SurvivorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/SurvivorRuleSystem.cs @@ -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; diff --git a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs index b00ed38636..75bdd5387b 100644 --- a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs @@ -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; diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index 0a2882aa3c..e72e9d5f73 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -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; diff --git a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs index 9fab98446a..c6da622bb4 100644 --- a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs @@ -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; diff --git a/Content.Server/Ghost/ObserverRoleComponent.cs b/Content.Server/Ghost/ObserverRoleComponent.cs deleted file mode 100644 index 8421fb7343..0000000000 --- a/Content.Server/Ghost/ObserverRoleComponent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Ghost; - -/// -/// This is used to mark Observers properly, as they get Minds -/// -[RegisterComponent] -public sealed partial class ObserverRoleComponent : BaseMindRoleComponent -{ - public string Name => Loc.GetString("observer-role-name"); -} diff --git a/Content.Server/Ghost/Roles/GhostRoleMarkerRoleComponent.cs b/Content.Server/Ghost/Roles/GhostRoleMarkerRoleComponent.cs deleted file mode 100644 index da3e89ba2b..0000000000 --- a/Content.Server/Ghost/Roles/GhostRoleMarkerRoleComponent.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Ghost.Roles; - -/// -/// Added to mind role entities to tag that they are a ghostrole. -/// It also holds the name for the round end display -/// -[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; - -} diff --git a/Content.Server/Ghost/Roles/GhostRoleSystem.cs b/Content.Server/Ghost/Roles/GhostRoleSystem.cs index ec69ebe3c1..98261c0908 100644 --- a/Content.Server/Ghost/Roles/GhostRoleSystem.cs +++ b/Content.Server/Ghost/Roles/GhostRoleSystem.cs @@ -521,9 +521,6 @@ public sealed class GhostRoleSystem : EntitySystem _mindSystem.TransferTo(newMind, mob); _roleSystem.MindAddRoles(newMind.Owner, role.MindRoles, newMind.Comp); - - if (_roleSystem.MindHasRole(newMind!, out var markerRole)) - markerRole.Value.Comp2.Name = role.RoleName; } /// diff --git a/Content.Server/Mindshield/MindShieldSystem.cs b/Content.Server/Mindshield/MindShieldSystem.cs index 7cc1e8fc75..c04fb12027 100644 --- a/Content.Server/Mindshield/MindShieldSystem.cs +++ b/Content.Server/Mindshield/MindShieldSystem.cs @@ -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; diff --git a/Content.Server/Ninja/Systems/SpiderChargeSystem.cs b/Content.Server/Ninja/Systems/SpiderChargeSystem.cs index c08576a5ce..c2d9fb3f68 100644 --- a/Content.Server/Ninja/Systems/SpiderChargeSystem.cs +++ b/Content.Server/Ninja/Systems/SpiderChargeSystem.cs @@ -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; diff --git a/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs b/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs index c9e9326c1e..db78816503 100644 --- a/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs +++ b/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs @@ -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; diff --git a/Content.Server/Roles/DragonRoleComponent.cs b/Content.Server/Roles/DragonRoleComponent.cs deleted file mode 100644 index c47455d8f6..0000000000 --- a/Content.Server/Roles/DragonRoleComponent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Content.Server.Dragon; -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a space dragon. -/// -[RegisterComponent, Access(typeof(DragonSystem))] -public sealed partial class DragonRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Content.Server/Roles/InitialInfectedRoleComponent.cs b/Content.Server/Roles/InitialInfectedRoleComponent.cs deleted file mode 100644 index 475cd3ba60..0000000000 --- a/Content.Server/Roles/InitialInfectedRoleComponent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are an initial infected. -/// -[RegisterComponent] -public sealed partial class InitialInfectedRoleComponent : BaseMindRoleComponent -{ - -} diff --git a/Content.Server/Roles/NinjaRoleComponent.cs b/Content.Server/Roles/NinjaRoleComponent.cs deleted file mode 100644 index 7bdffe67a3..0000000000 --- a/Content.Server/Roles/NinjaRoleComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a space ninja. -/// -[RegisterComponent] -public sealed partial class NinjaRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Content.Server/Roles/NukeopsRoleComponent.cs b/Content.Server/Roles/NukeopsRoleComponent.cs deleted file mode 100644 index 41561088ea..0000000000 --- a/Content.Server/Roles/NukeopsRoleComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a nuke operative. -/// -[RegisterComponent] -public sealed partial class NukeopsRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Content.Server/Roles/ParadoxCloneRoleComponent.cs b/Content.Server/Roles/ParadoxCloneRoleComponent.cs deleted file mode 100644 index 32ebb2fe2d..0000000000 --- a/Content.Server/Roles/ParadoxCloneRoleComponent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a paradox clone. -/// -[RegisterComponent] -public sealed partial class ParadoxCloneRoleComponent : BaseMindRoleComponent -{ - /// - /// 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. - /// - [DataField] - public LocId? NameModifier = "paradox-clone-ghost-name-modifier"; -} diff --git a/Content.Server/Roles/ParadoxCloneRoleSystem.cs b/Content.Server/Roles/ParadoxCloneRoleSystem.cs index 83e23fef91..c957692b70 100644 --- a/Content.Server/Roles/ParadoxCloneRoleSystem.cs +++ b/Content.Server/Roles/ParadoxCloneRoleSystem.cs @@ -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; diff --git a/Content.Server/Roles/RemoveRoleCommand.cs b/Content.Server/Roles/RemoveRoleCommand.cs index 2d18415067..f3cc4a834d 100644 --- a/Content.Server/Roles/RemoveRoleCommand.cs +++ b/Content.Server/Roles/RemoveRoleCommand.cs @@ -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; diff --git a/Content.Server/Roles/RevolutionaryRoleComponent.cs b/Content.Server/Roles/RevolutionaryRoleComponent.cs deleted file mode 100644 index dcdb131b9d..0000000000 --- a/Content.Server/Roles/RevolutionaryRoleComponent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a Revolutionary. -/// -[RegisterComponent] -public sealed partial class RevolutionaryRoleComponent : BaseMindRoleComponent -{ - /// - /// For headrevs, how many people you have converted. - /// - [DataField, ViewVariables(VVAccess.ReadWrite)] - public uint ConvertedCount = 0; -} diff --git a/Content.Server/Roles/RoleBriefingComponent.cs b/Content.Server/Roles/RoleBriefingComponent.cs deleted file mode 100644 index f4d3fe6353..0000000000 --- a/Content.Server/Roles/RoleBriefingComponent.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Adds a briefing to the character info menu, does nothing else. -/// -[RegisterComponent] -public sealed partial class RoleBriefingComponent : BaseMindRoleComponent -{ - [DataField] - public string Briefing; -} diff --git a/Content.Server/Roles/RoleBriefingSystem.cs b/Content.Server/Roles/RoleBriefingSystem.cs index 17b62a08b3..6825fe8e10 100644 --- a/Content.Server/Roles/RoleBriefingSystem.cs +++ b/Content.Server/Roles/RoleBriefingSystem.cs @@ -1,3 +1,5 @@ +using Content.Shared.Roles.Components; + namespace Content.Server.Roles; public sealed class RoleBriefingSystem : EntitySystem diff --git a/Content.Server/Roles/SubvertedSiliconRoleComponent.cs b/Content.Server/Roles/SubvertedSiliconRoleComponent.cs deleted file mode 100644 index 55727573b9..0000000000 --- a/Content.Server/Roles/SubvertedSiliconRoleComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a hacked borg. -/// -[RegisterComponent] -public sealed partial class SubvertedSiliconRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Content.Server/Roles/SurvivorRoleComponent.cs b/Content.Server/Roles/SurvivorRoleComponent.cs deleted file mode 100644 index e5e6dd9f87..0000000000 --- a/Content.Server/Roles/SurvivorRoleComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Adds to a mind role ent to tag they're a Survivor -/// -[RegisterComponent] -public sealed partial class SurvivorRoleComponent : BaseMindRoleComponent; diff --git a/Content.Server/Roles/ThiefRoleComponent.cs b/Content.Server/Roles/ThiefRoleComponent.cs deleted file mode 100644 index c0ddee71a4..0000000000 --- a/Content.Server/Roles/ThiefRoleComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a thief. -/// -[RegisterComponent] -public sealed partial class ThiefRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Content.Server/Roles/TraitorRoleComponent.cs b/Content.Server/Roles/TraitorRoleComponent.cs deleted file mode 100644 index a8a11a8f1b..0000000000 --- a/Content.Server/Roles/TraitorRoleComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a syndicate traitor. -/// -[RegisterComponent] -public sealed partial class TraitorRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Content.Server/Roles/WizardRoleComponent.cs b/Content.Server/Roles/WizardRoleComponent.cs deleted file mode 100644 index 72a89ee2ca..0000000000 --- a/Content.Server/Roles/WizardRoleComponent.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Content.Server.Roles; - -/// -/// Mind role to tag entities that they're a Wizard -/// -[RegisterComponent] -public sealed partial class WizardRoleComponent : Component; diff --git a/Content.Server/Roles/ZombieRoleComponent.cs b/Content.Server/Roles/ZombieRoleComponent.cs deleted file mode 100644 index cff25e53e8..0000000000 --- a/Content.Server/Roles/ZombieRoleComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Server.Roles; - -/// -/// Added to mind role entities to tag that they are a zombie. -/// -[RegisterComponent] -public sealed partial class ZombieRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Content.Server/Silicons/Borgs/BorgSystem.MMI.cs b/Content.Server/Silicons/Borgs/BorgSystem.MMI.cs index 7435e38f5a..b41f1397ec 100644 --- a/Content.Server/Silicons/Borgs/BorgSystem.MMI.cs +++ b/Content.Server/Silicons/Borgs/BorgSystem.MMI.cs @@ -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; diff --git a/Content.Server/Silicons/Laws/SiliconLawSystem.cs b/Content.Server/Silicons/Laws/SiliconLawSystem.cs index 444732b2b3..e672cb5005 100644 --- a/Content.Server/Silicons/Laws/SiliconLawSystem.cs +++ b/Content.Server/Silicons/Laws/SiliconLawSystem.cs @@ -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; diff --git a/Content.Server/Thief/Systems/ThiefBeaconSystem.cs b/Content.Server/Thief/Systems/ThiefBeaconSystem.cs index 4c65ba5c44..069966a8a4 100644 --- a/Content.Server/Thief/Systems/ThiefBeaconSystem.cs +++ b/Content.Server/Thief/Systems/ThiefBeaconSystem.cs @@ -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; diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs index 11185da61f..f4ff5dd60c 100644 --- a/Content.Server/Zombies/ZombieSystem.cs +++ b/Content.Server/Zombies/ZombieSystem.cs @@ -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; diff --git a/Content.Shared/Changeling/ChangelingRoleComponent.cs b/Content.Shared/Changeling/ChangelingRoleComponent.cs deleted file mode 100644 index d2e9c1eccb..0000000000 --- a/Content.Shared/Changeling/ChangelingRoleComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Content.Shared.Roles; - -namespace Content.Shared.Changeling; - -/// -/// The Mindrole for Changeling Antags -/// -[RegisterComponent] -public sealed partial class ChangelingRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/EntityEffects/EffectConditions/JobCondition.cs b/Content.Shared/EntityEffects/EffectConditions/JobCondition.cs index 7fec087d6b..0b942a3e09 100644 --- a/Content.Shared/EntityEffects/EffectConditions/JobCondition.cs +++ b/Content.Shared/EntityEffects/EffectConditions/JobCondition.cs @@ -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; diff --git a/Content.Shared/Roles/Components/ChangelingRoleComponent.cs b/Content.Shared/Roles/Components/ChangelingRoleComponent.cs new file mode 100644 index 0000000000..fb9bc05af3 --- /dev/null +++ b/Content.Shared/Roles/Components/ChangelingRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a changeling. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class ChangelingRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/DragonRoleComponent.cs b/Content.Shared/Roles/Components/DragonRoleComponent.cs new file mode 100644 index 0000000000..8f5abecd24 --- /dev/null +++ b/Content.Shared/Roles/Components/DragonRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a space dragon. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class DragonRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/GhostRoleMarkerRoleComponent.cs b/Content.Shared/Roles/Components/GhostRoleMarkerRoleComponent.cs new file mode 100644 index 0000000000..623f298474 --- /dev/null +++ b/Content.Shared/Roles/Components/GhostRoleMarkerRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a ghostrole. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class GhostRoleMarkerRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/InitialInfectedRoleComponent.cs b/Content.Shared/Roles/Components/InitialInfectedRoleComponent.cs new file mode 100644 index 0000000000..a96c9a4e1d --- /dev/null +++ b/Content.Shared/Roles/Components/InitialInfectedRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are an initial infected. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class InitialInfectedRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Jobs/JobRoleComponent.cs b/Content.Shared/Roles/Components/JobRoleComponent.cs similarity index 59% rename from Content.Shared/Roles/Jobs/JobRoleComponent.cs rename to Content.Shared/Roles/Components/JobRoleComponent.cs index dbaf12beec..c62c0ea1f4 100644 --- a/Content.Shared/Roles/Jobs/JobRoleComponent.cs +++ b/Content.Shared/Roles/Components/JobRoleComponent.cs @@ -1,12 +1,9 @@ using Robust.Shared.GameStates; -namespace Content.Shared.Roles.Jobs; +namespace Content.Shared.Roles.Components; /// -/// 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. /// [RegisterComponent, NetworkedComponent] -public sealed partial class JobRoleComponent : BaseMindRoleComponent -{ - -} +public sealed partial class JobRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/MindRoleComponent.cs b/Content.Shared/Roles/Components/MindRoleComponent.cs similarity index 52% rename from Content.Shared/Roles/MindRoleComponent.cs rename to Content.Shared/Roles/Components/MindRoleComponent.cs index 09593c94cd..45ab808192 100644 --- a/Content.Shared/Roles/MindRoleComponent.cs +++ b/Content.Shared/Roles/Components/MindRoleComponent.cs @@ -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; /// /// This holds data for, and indicates, a Mind Role entity @@ -11,49 +11,52 @@ namespace Content.Shared.Roles; public sealed partial class MindRoleComponent : BaseMindRoleComponent { /// - /// 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. /// [DataField] public bool Antag; /// - /// The mind's current antagonist/special role, or lack thereof; + /// The mind's current antagonist/special role, or lack thereof. /// [DataField] public ProtoId? RoleType; /// - /// 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. /// [DataField] public LocId? Subtype; /// - /// 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. /// [DataField] public bool ExclusiveAntag; /// - /// The Mind that this role belongs to + /// The Mind that this role belongs to. /// - public Entity Mind { get; set; } + /// + /// TODO: Make this a datafield. Also components should not store other components. + /// + public Entity Mind; /// - /// The Antagonist prototype of this role + /// The Antagonist prototype of this role. /// [DataField] - public ProtoId? AntagPrototype { get; set; } + public ProtoId? AntagPrototype; /// - /// The Job prototype of this role + /// The Job prototype of this role. /// [DataField] - public ProtoId? JobPrototype { get; set; } + public ProtoId? JobPrototype; /// - /// 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. /// [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; diff --git a/Content.Shared/Roles/Components/NinjaRoleComponent.cs b/Content.Shared/Roles/Components/NinjaRoleComponent.cs new file mode 100644 index 0000000000..4aa72e1628 --- /dev/null +++ b/Content.Shared/Roles/Components/NinjaRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a space ninja. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class NinjaRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/NukeopsRoleComponent.cs b/Content.Shared/Roles/Components/NukeopsRoleComponent.cs new file mode 100644 index 0000000000..57b90236e5 --- /dev/null +++ b/Content.Shared/Roles/Components/NukeopsRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a nuke operative. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class NukeopsRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/ObserverRoleComponent.cs b/Content.Shared/Roles/Components/ObserverRoleComponent.cs new file mode 100644 index 0000000000..c7a451eac3 --- /dev/null +++ b/Content.Shared/Roles/Components/ObserverRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// This is used to mark Observers properly, as they get Minds. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class ObserverRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/ParadoxCloneRoleComponent.cs b/Content.Shared/Roles/Components/ParadoxCloneRoleComponent.cs new file mode 100644 index 0000000000..40a6e86499 --- /dev/null +++ b/Content.Shared/Roles/Components/ParadoxCloneRoleComponent.cs @@ -0,0 +1,17 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a paradox clone. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class ParadoxCloneRoleComponent : BaseMindRoleComponent +{ + /// + /// 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. + /// + [DataField] + public LocId? NameModifier = "paradox-clone-ghost-name-modifier"; +} diff --git a/Content.Shared/Roles/Components/RevolutionaryRoleComponent.cs b/Content.Shared/Roles/Components/RevolutionaryRoleComponent.cs new file mode 100644 index 0000000000..d4d4660814 --- /dev/null +++ b/Content.Shared/Roles/Components/RevolutionaryRoleComponent.cs @@ -0,0 +1,16 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a Revolutionary. +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public sealed partial class RevolutionaryRoleComponent : BaseMindRoleComponent +{ + /// + /// For headrevs, how many people you have converted. + /// + [DataField, AutoNetworkedField] + public uint ConvertedCount = 0; +} diff --git a/Content.Shared/Roles/Components/RoleBriefingComponent.cs b/Content.Shared/Roles/Components/RoleBriefingComponent.cs new file mode 100644 index 0000000000..99eccf8a34 --- /dev/null +++ b/Content.Shared/Roles/Components/RoleBriefingComponent.cs @@ -0,0 +1,13 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Adds a briefing to the character info menu, does nothing else. +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public sealed partial class RoleBriefingComponent : BaseMindRoleComponent +{ + [DataField(required: true), AutoNetworkedField] + public LocId Briefing; +} diff --git a/Content.Shared/Roles/Components/SiliconBrainRoleComponent.cs b/Content.Shared/Roles/Components/SiliconBrainRoleComponent.cs new file mode 100644 index 0000000000..d8eaebbe1f --- /dev/null +++ b/Content.Shared/Roles/Components/SiliconBrainRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Used on Silicon's minds to get the appropriate mind role +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class SiliconBrainRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/StartingMindRoleComponent.cs b/Content.Shared/Roles/Components/StartingMindRoleComponent.cs similarity index 84% rename from Content.Shared/Roles/StartingMindRoleComponent.cs rename to Content.Shared/Roles/Components/StartingMindRoleComponent.cs index 768307d391..a37ed29a23 100644 --- a/Content.Shared/Roles/StartingMindRoleComponent.cs +++ b/Content.Shared/Roles/Components/StartingMindRoleComponent.cs @@ -1,26 +1,25 @@ using Robust.Shared.GameStates; using Robust.Shared.Prototypes; -namespace Content.Shared.Roles; +namespace Content.Shared.Roles.Components; /// /// 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. -/// /// [RegisterComponent, NetworkedComponent] public sealed partial class StartingMindRoleComponent : Component { /// - /// The ID of the mind role to add + /// The ID of the mind role to add /// [DataField(required: true)] public EntProtoId MindRole; /// - /// Add the mind role silently + /// Add the mind role silently /// [DataField] public bool Silent = true; diff --git a/Content.Shared/Roles/Components/SubvertedSiliconRoleComponent.cs b/Content.Shared/Roles/Components/SubvertedSiliconRoleComponent.cs new file mode 100644 index 0000000000..6b62f458ce --- /dev/null +++ b/Content.Shared/Roles/Components/SubvertedSiliconRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a hacked borg. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class SubvertedSiliconRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/SurvivorRoleComponent.cs b/Content.Shared/Roles/Components/SurvivorRoleComponent.cs new file mode 100644 index 0000000000..1eee04d9e5 --- /dev/null +++ b/Content.Shared/Roles/Components/SurvivorRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are survivor. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class SurvivorRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/ThiefRoleComponent.cs b/Content.Shared/Roles/Components/ThiefRoleComponent.cs new file mode 100644 index 0000000000..ee30833970 --- /dev/null +++ b/Content.Shared/Roles/Components/ThiefRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a thief. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class ThiefRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/TraitorRoleComponent.cs b/Content.Shared/Roles/Components/TraitorRoleComponent.cs new file mode 100644 index 0000000000..7348fe0c57 --- /dev/null +++ b/Content.Shared/Roles/Components/TraitorRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a syndicate traitor. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class TraitorRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Components/WizardRoleComponent.cs b/Content.Shared/Roles/Components/WizardRoleComponent.cs new file mode 100644 index 0000000000..0d24897216 --- /dev/null +++ b/Content.Shared/Roles/Components/WizardRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a wizard. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class WizardRoleComponent : Component; diff --git a/Content.Shared/Roles/Components/ZombieRoleComponent.cs b/Content.Shared/Roles/Components/ZombieRoleComponent.cs new file mode 100644 index 0000000000..e137fb0b0f --- /dev/null +++ b/Content.Shared/Roles/Components/ZombieRoleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Roles.Components; + +/// +/// Added to mind role entities to tag that they are a zombie. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class ZombieRoleComponent : BaseMindRoleComponent; diff --git a/Content.Shared/Roles/Jobs/SharedJobSystem.cs b/Content.Shared/Roles/Jobs/SharedJobSystem.cs index 12d673feda..6526a3237a 100644 --- a/Content.Shared/Roles/Jobs/SharedJobSystem.cs +++ b/Content.Shared/Roles/Jobs/SharedJobSystem.cs @@ -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; diff --git a/Content.Shared/Roles/SharedRoleSystem.cs b/Content.Shared/Roles/SharedRoleSystem.cs index 4f307d8b31..3269680c32 100644 --- a/Content.Shared/Roles/SharedRoleSystem.cs +++ b/Content.Shared/Roles/SharedRoleSystem.cs @@ -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; diff --git a/Content.Shared/Roles/SiliconBrainRoleComponent.cs b/Content.Shared/Roles/SiliconBrainRoleComponent.cs deleted file mode 100644 index 72ad0a86b6..0000000000 --- a/Content.Shared/Roles/SiliconBrainRoleComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Shared.Roles; - -/// -/// Used on Silicon's minds to get the appropriate mind role -/// -[RegisterComponent] -public sealed partial class SiliconBrainRoleComponent : BaseMindRoleComponent -{ -} diff --git a/Resources/Locale/en-US/ghost/observer-role.ftl b/Resources/Locale/en-US/ghost/observer-role.ftl deleted file mode 100644 index acb30b128f..0000000000 --- a/Resources/Locale/en-US/ghost/observer-role.ftl +++ /dev/null @@ -1,2 +0,0 @@ -observer-role-name = Observer - diff --git a/Resources/Prototypes/Roles/MindRoles/mind_roles.yml b/Resources/Prototypes/Roles/MindRoles/mind_roles.yml index 95d49c1b83..d387903ec4 100644 --- a/Resources/Prototypes/Roles/MindRoles/mind_roles.yml +++ b/Resources/Prototypes/Roles/MindRoles/mind_roles.yml @@ -320,3 +320,5 @@ roleType: SoloAntagonist subtype: role-subtype-changeling - type: ChangelingRole + - type: RoleBriefing + briefing: changeling-briefing