Removed extra comp name attributes (#6449)

This commit is contained in:
wrexbe
2022-02-08 00:42:49 -08:00
committed by GitHub
parent e49d6b05ef
commit 425712adea
54 changed files with 45 additions and 65 deletions

View File

@@ -5,7 +5,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent, ComponentProtoName("AtmosPlaque")]
[RegisterComponent]
public sealed class AtmosPlaqueComponent : Component
{
[DataField("plaqueType")] public PlaqueType Type = PlaqueType.Unset;

View File

@@ -9,7 +9,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Bible.Components
{
[RegisterComponent, ComponentProtoName("Bible")]
[RegisterComponent]
public sealed class BibleComponent : Component
{

View File

@@ -3,6 +3,6 @@ using Robust.Shared.Analyzers;
namespace Content.Server.Bible.Components
{
[RegisterComponent, ComponentProtoName("BibleUser")]
[RegisterComponent]
public sealed class BibleUserComponent : Component {}
}

View File

@@ -1,4 +1,4 @@
using Content.Server.Body.Systems;
using Content.Server.Body.Systems;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -6,7 +6,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Body.Components;
[RegisterComponent, ComponentProtoName("ThermalRegulator")]
[RegisterComponent]
[Friend(typeof(ThermalRegulatorSystem))]
public class ThermalRegulatorComponent : Component
{

View File

@@ -1,4 +1,4 @@
using Content.Shared.Damage;
using Content.Shared.Damage;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -11,7 +11,6 @@ namespace Content.Server.Climbing.Components;
/// not very generalized with regards to naming.
/// </summary>
[RegisterComponent, Friend(typeof(ClimbSystem))]
[ComponentProtoName("GlassTable")]
public class GlassTableComponent : Component
{
/// <summary>

View File

@@ -7,8 +7,8 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.DeviceNetwork.Components
{
[RegisterComponent]
[ComponentProtoName("ApcNetworkConnection")]
[Friend(typeof(ApcNetworkSystem))]
[ComponentProtoName("ApcNetworkConnection")]
public class ApcNetworkComponent : Component
{
/// <summary>

View File

@@ -9,7 +9,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Explosion.Components
{
[RegisterComponent, ComponentProtoName("ClusterGrenade"), Friend(typeof(ClusterGrenadeSystem))]
[RegisterComponent, Friend(typeof(ClusterGrenadeSystem))]
public sealed class ClusterGrenadeComponent : Component
{
public Container GrenadesContainer = default!;

View File

@@ -1,9 +1,9 @@
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Explosion.Components
{
[RegisterComponent, ComponentProtoName("OnUseTimerTrigger")]
[RegisterComponent]
public class OnUseTimerTriggerComponent : Component
{
[DataField("delay")] public float Delay = 0f;

View File

@@ -2,7 +2,7 @@ using Robust.Shared.GameObjects;
namespace Content.Server.Guardian;
[RegisterComponent, ComponentProtoName("CanHostGuardian")]
[RegisterComponent]
public class CanHostGuardianComponent : Component
{
}

View File

@@ -8,7 +8,6 @@ namespace Content.Server.Guardian
/// Given to guardians to monitor their link with the host
/// </summary>
[RegisterComponent]
[ComponentProtoName("Guardian")]
public class GuardianComponent : Component
{
/// <summary>

View File

@@ -10,7 +10,6 @@ namespace Content.Server.Guardian
/// Creates a GuardianComponent attached to the user's GuardianHost.
/// </summary>
[RegisterComponent]
[ComponentProtoName("GuardianCreator")]
public sealed class GuardianCreatorComponent : Component
{
/// <summary>

View File

@@ -8,7 +8,6 @@ namespace Content.Server.Guardian
/// Given to guardian users upon establishing a guardian link with the entity
/// </summary>
[RegisterComponent]
[ComponentProtoName("GuardianHost")]
public sealed class GuardianHostComponent : Component
{
/// <summary>

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Shared.Inventory;
using Content.Shared.Medical.SuitSensor;
using Robust.Shared.Analyzers;
@@ -13,7 +13,6 @@ namespace Content.Server.Medical.SuitSensors
/// </summary>
[RegisterComponent]
[Friend(typeof(SuitSensorSystem))]
[ComponentProtoName("SuitSensor")]
public sealed class SuitSensorComponent : Component
{
/// <summary>

View File

@@ -18,7 +18,7 @@ namespace Content.Server.Mind.Components
/// <summary>
/// Stores a <see cref="Server.Mind.Mind"/> on a mob.
/// </summary>
[RegisterComponent, ComponentProtoName("Mind"), Friend(typeof(MindSystem))]
[RegisterComponent, Friend(typeof(MindSystem))]
public class MindComponent : Component
{
/// <summary>

View File

@@ -1,9 +1,9 @@
using Robust.Shared.Analyzers;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
namespace Content.Server.Mining.Components;
[RegisterComponent, ComponentProtoName("Mineable")]
[RegisterComponent]
[Friend(typeof(MineableSystem))]
public class MineableComponent : Component
{

View File

@@ -6,7 +6,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Mining.Components
{
[RegisterComponent, ComponentProtoName("Pickaxe")]
[RegisterComponent]
public class PickaxeComponent : Component
{
[DataField("sound")]

View File

@@ -8,7 +8,6 @@ namespace Content.Server.Plants.Components
{
[RegisterComponent]
[Friend(typeof(RandomPottedPlantSystem))]
[ComponentProtoName("RandomPottedPlant")]
public class RandomPottedPlantComponent : Component
{
[ViewVariables(VVAccess.ReadOnly)]

View File

@@ -13,7 +13,6 @@ namespace Content.Server.Power.Components;
[RegisterComponent]
[Friend(typeof(ApcSystem))]
[ComponentProtoName("Apc")]
public class ApcComponent : BaseApcNetComponent
{
[DataField("onReceiveMessageSound")]

View File

@@ -13,7 +13,6 @@ namespace Content.Server.Power.Components
/// </summary>
[RegisterComponent]
[Friend(typeof(CableSystem))]
[ComponentProtoName("Cable")]
public class CableComponent : Component
{
[DataField("cableDroppedOnCutPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]

View File

@@ -6,7 +6,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Power.Components
{
[RegisterComponent, ComponentProtoName("CablePlacer")]
[RegisterComponent]
public sealed class CablePlacerComponent : Component
{
[ViewVariables]

View File

@@ -4,7 +4,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Radar;
[RegisterComponent, ComponentProtoName("RadarConsole")]
[RegisterComponent]
public class RadarConsoleComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]

View File

@@ -1,4 +1,4 @@
using Robust.Shared.Analyzers;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
@@ -8,7 +8,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.RandomAppearance;
[RegisterComponent, ComponentProtoName("RandomAppearance")]
[RegisterComponent]
[Friend(typeof(RandomAppearanceSystem))]
public class RandomAppearanceComponent : Component, ISerializationHooks
{

View File

@@ -10,7 +10,6 @@ namespace Content.Server.Salvage
/// A salvage magnet.
/// </summary>
[RegisterComponent]
[ComponentProtoName("SalvageMagnet")]
public class SalvageMagnetComponent : Component
{
/// <summary>

View File

@@ -8,7 +8,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Spawners.Components
{
[RegisterComponent, ComponentProtoName("ConditionalSpawner")]
[RegisterComponent]
public class ConditionalSpawnerComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]

View File

@@ -8,7 +8,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Spawners.Components
{
[RegisterComponent, ComponentProtoName("RandomSpawner")]
[RegisterComponent]
public class RandomSpawnerComponent : ConditionalSpawnerComponent
{
[ViewVariables(VVAccess.ReadWrite)]

View File

@@ -3,5 +3,4 @@ using Robust.Shared.GameObjects;
namespace Content.Server.Speech.Components;
[RegisterComponent]
[ComponentProtoName("MonkeyAccent")]
public sealed class MonkeyAccentComponent : Component {}

View File

@@ -21,7 +21,6 @@ namespace Content.Server.Speech.Components
/// Replaces any spoken sentences with a random word.
/// </summary>
[RegisterComponent]
[ComponentProtoName("ReplacementAccent")]
public class ReplacementAccentComponent : Component
{
[DataField("accent", customTypeSerializer: typeof(PrototypeIdSerializer<ReplacementAccentPrototype>), required: true)]

View File

@@ -3,5 +3,4 @@ using Robust.Shared.GameObjects;
namespace Content.Server.Speech.Components;
[RegisterComponent]
[ComponentProtoName("RussianAccent")]
public sealed class RussianAccentComponent : Component {}

View File

@@ -5,7 +5,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Sprite.Components
{
[RegisterComponent, ComponentProtoName("RandomSpriteColor")]
[RegisterComponent]
public class RandomSpriteColorComponent : Component
{
// This should handle random states + colors for layers.

View File

@@ -4,7 +4,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Sprite.Components
{
[RegisterComponent, ComponentProtoName("RandomSpriteState")]
[RegisterComponent]
public class RandomSpriteStateComponent : Component
{
[DataField("spriteStates")] public List<string>? SpriteStates;

View File

@@ -1,4 +1,4 @@
using Content.Server.GameTicking;
using Content.Server.GameTicking;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -9,7 +9,7 @@ namespace Content.Server.Station;
/// <summary>
/// Added to grids saved in maps to designate that they are the 'main station' grid.
/// </summary>
[RegisterComponent, ComponentProtoName("BecomesStation")]
[RegisterComponent]
[Friend(typeof(GameTicker))]
public class BecomesStationComponent : Component
{

View File

@@ -1,4 +1,4 @@
using Content.Server.GameTicking;
using Content.Server.GameTicking;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -10,7 +10,7 @@ namespace Content.Server.Station;
/// Added to grids saved in maps to designate them as 'part of a station' and not main grids. I.e. ancillary
/// shuttles for multi-grid stations.
/// </summary>
[RegisterComponent, ComponentProtoName("PartOfStation")]
[RegisterComponent]
[Friend(typeof(GameTicker))]
public class PartOfStationComponent : Component
{

View File

@@ -6,7 +6,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Storage.Components
{
[RegisterComponent, ComponentProtoName("StorageFill"), Friend(typeof(StorageSystem))]
[RegisterComponent, Friend(typeof(StorageSystem))]
public sealed class StorageFillComponent : Component
{
[DataField("contents")] public List<EntitySpawnEntry> Contents = new();

View File

@@ -9,7 +9,6 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Server.Toilet
{
[RegisterComponent]
[ComponentProtoName("Toilet")]
public sealed class ToiletComponent : Component, ISuicideAct
{
[DataField("pryLidTime")]

View File

@@ -1,4 +1,4 @@
using System.Threading;
using System.Threading;
using Content.Shared.Tools;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -7,7 +7,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Tools.Components
{
[RegisterComponent, ComponentProtoName("TilePrying")]
[RegisterComponent]
public sealed class TilePryingComponent : Component
{
[ViewVariables]

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Warps
/// <summary>
/// Allows ghosts etc to warp to this entity by name.
/// </summary>
[RegisterComponent, ComponentProtoName("WarpPoint")]
[RegisterComponent]
public sealed class WarpPointComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)] [DataField("location")] public string? Location { get; set; }

View File

@@ -7,7 +7,7 @@ using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Weapon.Melee.EnergySword
{
[RegisterComponent, ComponentProtoName("EnergySword")]
[RegisterComponent]
internal class EnergySwordComponent : Component
{
public Color BladeColor = Color.DodgerBlue;

View File

@@ -12,7 +12,6 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components
/// Stores ammo and can quickly transfer ammo into a magazine.
/// </summary>
[RegisterComponent]
[ComponentProtoName("AmmoBox")]
[Friend(typeof(GunSystem))]
public sealed class AmmoBoxComponent : Component
{

View File

@@ -25,7 +25,6 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components
/// Generally used for bullets but can be used for other things like bananas
/// </summary>
[RegisterComponent]
[ComponentProtoName("Ammo")]
[Friend(typeof(GunSystem))]
public sealed class AmmoComponent : Component, ISerializationHooks
{

View File

@@ -10,7 +10,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Server.Weapon.Ranged.Ammunition.Components
{
[RegisterComponent, ComponentProtoName("RangedMagazine")]
[RegisterComponent]
public class RangedMagazineComponent : Component
{
public readonly Stack<EntityUid> SpawnedAmmo = new();

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components
/// <summary>
/// Used to load certain ranged weapons quickly
/// </summary>
[RegisterComponent, ComponentProtoName("SpeedLoader")]
[RegisterComponent]
public class SpeedLoaderComponent : Component
{
[DataField("caliber")] public BallisticCaliber Caliber = BallisticCaliber.Unspecified;

View File

@@ -10,7 +10,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Weapon.Ranged.Barrels.Components
{
[RegisterComponent, NetworkedComponent, ComponentProtoName("BatteryBarrel"), ComponentReference(typeof(ServerRangedBarrelComponent))]
[RegisterComponent, NetworkedComponent, ComponentReference(typeof(ServerRangedBarrelComponent))]
public sealed class BatteryBarrelComponent : ServerRangedBarrelComponent
{
// The minimum change we need before we can fire

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
/// <summary>
/// Shotguns mostly
/// </summary>
[RegisterComponent, NetworkedComponent, ComponentProtoName("BoltActionBarrel"), ComponentReference(typeof(ServerRangedBarrelComponent))]
[RegisterComponent, NetworkedComponent, ComponentReference(typeof(ServerRangedBarrelComponent))]
public sealed class BoltActionBarrelComponent : ServerRangedBarrelComponent
{
// Originally I had this logic shared with PumpBarrel and used a couple of variables to control things

View File

@@ -14,7 +14,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Weapon.Ranged.Barrels.Components
{
[RegisterComponent, NetworkedComponent, ComponentProtoName("MagazineBarrel"), ComponentReference(typeof(ServerRangedBarrelComponent))]
[RegisterComponent, NetworkedComponent, ComponentReference(typeof(ServerRangedBarrelComponent))]
public sealed class MagazineBarrelComponent : ServerRangedBarrelComponent
{
[Dependency] private readonly IEntityManager _entities = default!;

View File

@@ -15,7 +15,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
/// <summary>
/// Bolt-action rifles
/// </summary>
[RegisterComponent, NetworkedComponent, ComponentProtoName("PumpBarrel"), ComponentReference(typeof(ServerRangedBarrelComponent))]
[RegisterComponent, NetworkedComponent, ComponentReference(typeof(ServerRangedBarrelComponent))]
public sealed class PumpBarrelComponent : ServerRangedBarrelComponent, ISerializationHooks
{
public override int ShotsLeft

View File

@@ -15,7 +15,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Weapon.Ranged.Barrels.Components
{
[RegisterComponent, ComponentProtoName("RevolverBarrel"), NetworkedComponent, ComponentReference(typeof(ServerRangedBarrelComponent))]
[RegisterComponent, NetworkedComponent, ComponentReference(typeof(ServerRangedBarrelComponent))]
public sealed class RevolverBarrelComponent : ServerRangedBarrelComponent, ISerializationHooks
{
[ViewVariables]

View File

@@ -11,7 +11,6 @@ namespace Content.Shared.Alert;
/// </summary>
[RegisterComponent]
[NetworkedComponent]
[ComponentProtoName("Alerts")]
public class AlertsComponent : Component
{
[ViewVariables] public Dictionary<AlertKey, AlertState> Alerts = new();

View File

@@ -6,7 +6,6 @@ namespace Content.Shared.Camera;
[RegisterComponent]
[NetworkedComponent]
[ComponentProtoName("CameraRecoil")]
public class CameraRecoilComponent : Component
{
public Vector2 CurrentKick { get; set; }

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
@@ -7,7 +7,7 @@ namespace Content.Shared.Follower.Components;
/// <summary>
/// Attached to entities that are currently being followed by a ghost.
/// </summary>
[RegisterComponent, ComponentProtoName("Followed"), Friend(typeof(FollowerSystem))]
[RegisterComponent, Friend(typeof(FollowerSystem))]
public class FollowedComponent : Component
{
public HashSet<EntityUid> Following = new();

View File

@@ -1,9 +1,9 @@
using Robust.Shared.Analyzers;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
namespace Content.Shared.Follower.Components;
[RegisterComponent, ComponentProtoName("Follower")]
[RegisterComponent]
[Friend(typeof(FollowerSystem))]
public class FollowerComponent : Component
{

View File

@@ -14,7 +14,6 @@ namespace Content.Shared.Light.Component;
/// </summary>
[NetworkedComponent]
[RegisterComponent]
[ComponentProtoName("RgbLightController")]
[Friend(typeof(SharedRgbLightControllerSystem))]
public sealed class RgbLightControllerComponent : Robust.Shared.GameObjects.Component
{

View File

@@ -6,7 +6,6 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Light.Component
{
[NetworkedComponent]
[ComponentProtoName("HandheldLight")]
public abstract class SharedHandheldLightComponent : Robust.Shared.GameObjects.Component
{
public const int StatusLevels = 6;

View File

@@ -13,7 +13,6 @@ namespace Content.Shared.PowerCell;
/// </summary>
[NetworkedComponent]
[RegisterComponent]
[ComponentProtoName("PowerCell")]
public sealed class PowerCellComponent : Component
{
public const string SolutionName = "powerCell";

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Timing
/// <summary>
/// Timer that creates a cooldown each time an object is activated/used
/// </summary>
[RegisterComponent, ComponentProtoName("UseDelay")]
[RegisterComponent]
public sealed class UseDelayComponent : Component
{
[ViewVariables]