From cecf87997b99134208681fb5bb7837041f6dd2b8 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Tue, 7 Jun 2022 13:44:31 +0200 Subject: [PATCH] Revert "Fix some friend access violations by allowing others access. (#8594) (#8703) --- Content.Client/DoAfter/DoAfterComponent.cs | 2 +- Content.Client/Explosion/TriggerOnProximityComponent.cs | 2 +- Content.Client/Flash/FlashableComponent.cs | 2 +- Content.Client/Hands/HandsComponent.cs | 2 +- Content.Client/Inventory/ClientInventoryComponent.cs | 3 +-- Content.Client/Light/Components/HandheldLightComponent.cs | 2 +- Content.Client/Movement/Components/ClimbableComponent.cs | 2 +- Content.Client/Movement/Components/ClimbingComponent.cs | 2 +- Content.Client/Stack/StackComponent.cs | 2 +- Content.Client/Tools/Components/WelderComponent.cs | 2 +- .../Weapons/Ranged/Components/MagazineVisualsComponent.cs | 2 +- .../Ranged/Components/SpentAmmoVisualsComponent.cs | 2 +- Content.Server/AI/Pathfinding/GridPathfindingComponent.cs | 2 +- .../Administration/Components/BufferingComponent.cs | 2 +- Content.Server/Advertise/AdvertiseComponent.cs | 2 +- Content.Server/Animals/Components/UdderComponent.cs | 2 +- .../Atmos/Piping/Trinary/Components/GasMixerComponent.cs | 2 +- .../Piping/Unary/Components/GasOutletInjectorComponent.cs | 2 +- .../Piping/Unary/Components/GasVentScrubberComponent.cs | 2 +- Content.Server/Atmos/TileAtmosphere.cs | 5 ++--- Content.Server/Body/Components/BloodstreamComponent.cs | 3 +-- Content.Server/Body/Components/BrainComponent.cs | 2 +- Content.Server/Body/Components/LungComponent.cs | 4 +--- Content.Server/Body/Components/MetabolizerComponent.cs | 3 +-- Content.Server/Body/Components/RespiratorComponent.cs | 2 +- Content.Server/Body/Components/StomachComponent.cs | 2 +- .../Body/Components/ThermalRegulatorComponent.cs | 2 +- Content.Server/Botany/Components/LogComponent.cs | 2 +- Content.Server/Botany/Components/ProduceComponent.cs | 2 +- Content.Server/Botany/Components/SeedComponent.cs | 2 +- .../Botany/Components/SeedExtractorComponent.cs | 2 +- Content.Server/Botany/SeedPrototype.cs | 2 +- Content.Server/Cargo/Components/CargoTelepadComponent.cs | 2 +- .../SolutionManager/SolutionContainerManagerComponent.cs | 3 +-- Content.Server/Climbing/Components/ClimbingComponent.cs | 2 +- Content.Server/Climbing/Components/GlassTableComponent.cs | 2 +- .../Construction/Components/ConstructionComponent.cs | 2 +- Content.Server/Conveyor/ConveyorComponent.cs | 2 +- .../Damage/Components/DamageOtherOnHitComponent.cs | 2 +- .../DeviceNetwork/Components/ApcNetworkComponent.cs | 2 +- .../DeviceNetwork/Components/DeviceNetworkComponent.cs | 2 +- .../Components/Devices/ApcNetSwitchComponent.cs | 2 +- Content.Server/Dice/DiceComponent.cs | 2 +- Content.Server/DoAfter/DoAfterComponent.cs | 2 +- .../Electrocution/Components/ElectrocutionComponent.cs | 2 +- .../Explosion/Components/ClusterGrenadeComponent.cs | 2 +- .../Explosion/Components/ExplosionResistanceComponent.cs | 2 +- Content.Server/Extinguisher/FireExtinguisherComponent.cs | 2 +- Content.Server/Flash/Components/FlashComponent.cs | 2 +- Content.Server/Flash/Components/FlashImmunityComponent.cs | 2 +- Content.Server/Flash/Components/FlashableComponent.cs | 2 +- Content.Server/Fluids/Components/AbsorbentComponent.cs | 2 +- Content.Server/Fluids/Components/EvaporationComponent.cs | 2 +- .../Fluids/Components/FluidSpreaderComponent.cs | 2 +- Content.Server/Fluids/Components/PuddleComponent.cs | 2 +- Content.Server/Fluids/Components/SprayComponent.cs | 3 +-- .../Gatherable/Components/GatherableComponent.cs | 6 +++--- .../Ghost/Roles/Components/GhostRoleComponent.cs | 5 +---- Content.Server/Gravity/GravityGeneratorComponent.cs | 2 +- .../HealthExaminable/HealthExaminableComponent.cs | 2 +- .../Interaction/Components/InteractionPopupComponent.cs | 2 +- Content.Server/Kitchen/Components/ExtractableComponent.cs | 2 +- .../Kitchen/Components/KitchenSpikeComponent.cs | 2 +- Content.Server/Kudzu/SpreaderComponent.cs | 2 +- .../Light/Components/EmergencyLightComponent.cs | 2 +- Content.Server/Light/Components/HandheldLightComponent.cs | 2 +- Content.Server/Light/Components/LightBulbComponent.cs | 2 +- Content.Server/Light/Components/LitOnPoweredComponent.cs | 2 +- Content.Server/Light/Components/MatchstickComponent.cs | 2 +- Content.Server/Light/Components/PoweredLightComponent.cs | 2 +- .../MachineLinking/Components/SignalReceiverComponent.cs | 2 +- .../Components/SignalTransmitterComponent.cs | 3 +-- .../CrewMonitoring/CrewMonitoringConsoleComponent.cs | 2 +- Content.Server/Medical/SuitSensors/SuitSensorComponent.cs | 2 +- Content.Server/Mind/Components/MindComponent.cs | 3 +-- Content.Server/Mind/Mind.cs | 3 +-- Content.Server/Nuke/NukeComponent.cs | 2 +- Content.Server/Nutrition/Components/CigarComponent.cs | 2 +- Content.Server/Nutrition/Components/DrinkComponent.cs | 2 +- Content.Server/Nutrition/Components/FoodComponent.cs | 2 +- .../Nutrition/Components/ForcefeedOnCollideComponent.cs | 2 +- .../Nutrition/Components/IngestionBlockerComponent.cs | 2 +- .../Nutrition/Components/SliceableFoodComponent.cs | 2 +- Content.Server/Nutrition/Components/SmokableComponent.cs | 2 +- Content.Server/Nutrition/Components/UtensilComponent.cs | 2 +- .../Plants/Components/PottedPlantHideComponent.cs | 2 +- .../Plants/Components/RandomPottedPlantComponent.cs | 2 +- .../PneumaticCannon/PneumaticCannonComponent.cs | 2 +- .../Pointing/Components/RoguePointingArrowComponent.cs | 2 +- Content.Server/Power/Components/ApcComponent.cs | 2 +- Content.Server/Power/Components/CableComponent.cs | 2 +- .../Power/Components/ExtensionCableProviderComponent.cs | 2 +- .../Power/Components/ExtensionCableReceiverComponent.cs | 2 +- .../RandomAppearance/RandomAppearanceComponent.cs | 2 +- .../Recycling/Components/RecyclableComponent.cs | 2 +- Content.Server/Recycling/Components/RecyclerComponent.cs | 2 +- Content.Server/Remotes/DoorRemoteComponent.cs | 2 +- Content.Server/Resist/ResistLockerComponent.cs | 2 +- Content.Server/Shuttles/Components/ThrusterComponent.cs | 2 +- .../Singularity/Components/RadiationCollectorComponent.cs | 2 +- Content.Server/Solar/Components/SolarPanelComponent.cs | 2 +- Content.Server/Stack/StackComponent.cs | 2 +- .../Station/Components/BecomesStationComponent.cs | 2 +- .../Station/Components/PartOfStationComponent.cs | 2 +- Content.Server/Station/Components/StationDataComponent.cs | 2 +- Content.Server/Station/Components/StationJobsComponent.cs | 2 +- .../Station/Components/StationMemberComponent.cs | 2 +- .../Station/Components/StationSpawningComponent.cs | 2 +- Content.Server/Storage/Components/SecretStashComponent.cs | 2 +- Content.Server/Storage/Components/StorageFillComponent.cs | 2 +- Content.Server/Strip/StrippableComponent.cs | 2 +- .../Stunnable/Components/StunOnCollideComponent.cs | 2 +- .../Components/SurveillanceCameraComponent.cs | 2 +- .../Components/SurveillanceCameraMonitorComponent.cs | 2 +- .../Tabletop/Components/TabletopGameComponent.cs | 2 +- .../Tabletop/Components/TabletopGamerComponent.cs | 2 +- Content.Server/Tools/Components/WeldableComponent.cs | 2 +- .../Components/IncreaseDamageOnWieldComponent.cs | 2 +- Content.Server/Wieldable/Components/WieldableComponent.cs | 2 +- Content.Shared/Access/Components/AccessComponent.cs | 3 +-- Content.Shared/Access/Components/IdCardComponent.cs | 4 +--- Content.Shared/Actions/ActionsComponent.cs | 3 +-- Content.Shared/Administration/AdminFrozenComponent.cs | 2 +- .../Components/HumanoidAppearanceComponent.cs | 2 +- .../Chat/TypingIndicator/TypingIndicatorComponent.cs | 2 +- Content.Shared/Clothing/ClothingSpeedModifierComponent.cs | 2 +- .../Clothing/Components/AttachedClothingComponent.cs | 2 +- .../Clothing/Components/ToggleableClothingComponent.cs | 2 +- .../Construction/Components/AnchorableComponent.cs | 2 +- .../Construction/Steps/MaterialConstructionGraphStep.cs | 4 ++-- Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs | 6 ++---- Content.Shared/Crayon/SharedCrayonComponent.cs | 2 +- Content.Shared/Damage/Components/DamageableComponent.cs | 8 ++------ Content.Shared/Decals/DecalGridComponent.cs | 2 +- Content.Shared/Electrocution/InsulatedComponent.cs | 2 +- Content.Shared/Flash/SharedFlashableComponent.cs | 2 +- Content.Shared/Foldable/FoldableComponent.cs | 2 +- Content.Shared/Follower/Components/FollowedComponent.cs | 2 +- Content.Shared/Follower/Components/FollowerComponent.cs | 2 +- Content.Shared/Friction/TileFrictionModifier.cs | 2 +- Content.Shared/Instruments/SharedInstrumentComponent.cs | 3 +-- Content.Shared/Jittering/JitteringComponent.cs | 2 +- .../Light/Component/RgbLightControllerComponent.cs | 2 +- .../Movement/Components/MovementSpeedModifierComponent.cs | 2 +- Content.Shared/Nutrition/Components/CreamPieComponent.cs | 2 +- Content.Shared/Nutrition/Components/CreamPiedComponent.cs | 2 +- Content.Shared/Pinpointer/PinpointerComponent.cs | 2 +- Content.Shared/Placeable/PlaceableSurfaceComponent.cs | 2 +- Content.Shared/Pulling/Components/PullableComponent.cs | 3 +-- .../Pulling/Components/SharedPullerComponent.cs | 2 +- Content.Shared/Stacks/SharedStackComponent.cs | 2 +- Content.Shared/Standing/StandingStateComponent.cs | 2 +- Content.Shared/StatusEffect/StatusEffectsComponent.cs | 2 +- Content.Shared/StepTrigger/StepTriggerComponent.cs | 4 ++-- Content.Shared/Storage/Components/ItemCounterComponent.cs | 2 +- Content.Shared/Storage/Components/ItemMapperComponent.cs | 2 +- Content.Shared/Stunnable/KnockedDownComponent.cs | 2 +- Content.Shared/Stunnable/SlowedDownComponent.cs | 2 +- Content.Shared/Stunnable/StunnedComponent.cs | 2 +- Content.Shared/SubFloor/SubFloorHideComponent.cs | 3 +-- Content.Shared/Tag/TagComponent.cs | 3 +-- RobustToolbox | 2 +- 162 files changed, 169 insertions(+), 197 deletions(-) diff --git a/Content.Client/DoAfter/DoAfterComponent.cs b/Content.Client/DoAfter/DoAfterComponent.cs index 6123b0729a..b7da92698e 100644 --- a/Content.Client/DoAfter/DoAfterComponent.cs +++ b/Content.Client/DoAfter/DoAfterComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.DoAfter; namespace Content.Client.DoAfter { - [RegisterComponent, Access(typeof(DoAfterSystem))] + [RegisterComponent, Friend(typeof(DoAfterSystem))] public sealed class DoAfterComponent : SharedDoAfterComponent { public readonly Dictionary DoAfters = new(); diff --git a/Content.Client/Explosion/TriggerOnProximityComponent.cs b/Content.Client/Explosion/TriggerOnProximityComponent.cs index 888b8ec004..e185c7948e 100644 --- a/Content.Client/Explosion/TriggerOnProximityComponent.cs +++ b/Content.Client/Explosion/TriggerOnProximityComponent.cs @@ -2,5 +2,5 @@ using Content.Shared.Explosion; namespace Content.Client.Explosion; -[RegisterComponent, Access(typeof(TriggerSystem))] +[RegisterComponent, Friend(typeof(TriggerSystem))] public sealed class TriggerOnProximityComponent : SharedTriggerOnProximityComponent {} diff --git a/Content.Client/Flash/FlashableComponent.cs b/Content.Client/Flash/FlashableComponent.cs index 714d2d7c1c..e843daff23 100644 --- a/Content.Client/Flash/FlashableComponent.cs +++ b/Content.Client/Flash/FlashableComponent.cs @@ -5,7 +5,7 @@ using Robust.Shared.GameObjects; namespace Content.Client.Flash { [ComponentReference(typeof(SharedFlashableComponent))] - [RegisterComponent, Access(typeof(FlashSystem))] + [RegisterComponent, Friend(typeof(FlashSystem))] public sealed class FlashableComponent : SharedFlashableComponent { } diff --git a/Content.Client/Hands/HandsComponent.cs b/Content.Client/Hands/HandsComponent.cs index 1e0b923046..36a15f1440 100644 --- a/Content.Client/Hands/HandsComponent.cs +++ b/Content.Client/Hands/HandsComponent.cs @@ -4,7 +4,7 @@ namespace Content.Client.Hands { [RegisterComponent] [ComponentReference(typeof(SharedHandsComponent))] - [Access(typeof(HandsSystem))] + [Friend(typeof(HandsSystem))] public sealed class HandsComponent : SharedHandsComponent { /// diff --git a/Content.Client/Inventory/ClientInventoryComponent.cs b/Content.Client/Inventory/ClientInventoryComponent.cs index ef10eaf468..62cb66cced 100644 --- a/Content.Client/Inventory/ClientInventoryComponent.cs +++ b/Content.Client/Inventory/ClientInventoryComponent.cs @@ -16,7 +16,7 @@ namespace Content.Client.Inventory /// [RegisterComponent] [ComponentReference(typeof(InventoryComponent))] - [Access(typeof(ClientInventorySystem))] + [Friend(typeof(ClientInventorySystem))] public sealed class ClientInventoryComponent : InventoryComponent { public Control BottomLeftButtons = default!; @@ -34,7 +34,6 @@ namespace Content.Client.Inventory /// Data about the current layers that have been added to the players sprite due to the items in each equipment slot. /// [ViewVariables] - [Access(typeof(ClientInventorySystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public readonly Dictionary> VisualLayerKeys = new(); public bool AttachedToGameHud; diff --git a/Content.Client/Light/Components/HandheldLightComponent.cs b/Content.Client/Light/Components/HandheldLightComponent.cs index 0a5f43ea93..c6bccac941 100644 --- a/Content.Client/Light/Components/HandheldLightComponent.cs +++ b/Content.Client/Light/Components/HandheldLightComponent.cs @@ -9,7 +9,7 @@ using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Light.Components { [RegisterComponent] - [Access(typeof(HandheldLightSystem))] + [Friend(typeof(HandheldLightSystem))] public sealed class HandheldLightComponent : SharedHandheldLightComponent, IItemStatus { public byte? Level; diff --git a/Content.Client/Movement/Components/ClimbableComponent.cs b/Content.Client/Movement/Components/ClimbableComponent.cs index 730c333693..dd06d52969 100644 --- a/Content.Client/Movement/Components/ClimbableComponent.cs +++ b/Content.Client/Movement/Components/ClimbableComponent.cs @@ -3,6 +3,6 @@ using Content.Shared.Climbing; namespace Content.Client.Movement.Components; [RegisterComponent] -[Access(typeof(ClimbSystem))] +[Friend(typeof(ClimbSystem))] [ComponentReference(typeof(SharedClimbableComponent))] public sealed class ClimbableComponent : SharedClimbableComponent { } diff --git a/Content.Client/Movement/Components/ClimbingComponent.cs b/Content.Client/Movement/Components/ClimbingComponent.cs index e68592bd77..7891a6ee21 100644 --- a/Content.Client/Movement/Components/ClimbingComponent.cs +++ b/Content.Client/Movement/Components/ClimbingComponent.cs @@ -3,6 +3,6 @@ namespace Content.Client.Movement.Components; [RegisterComponent] -[Access(typeof(ClimbSystem))] +[Friend(typeof(ClimbSystem))] [ComponentReference(typeof(SharedClimbingComponent))] public sealed class ClimbingComponent : SharedClimbingComponent { } diff --git a/Content.Client/Stack/StackComponent.cs b/Content.Client/Stack/StackComponent.cs index 8bf098de64..9f0b8e803e 100644 --- a/Content.Client/Stack/StackComponent.cs +++ b/Content.Client/Stack/StackComponent.cs @@ -8,7 +8,7 @@ using Robust.Shared.Timing; namespace Content.Client.Stack { - [RegisterComponent, Access(typeof(StackSystem), typeof(StatusControl))] + [RegisterComponent, Friend(typeof(StackSystem), typeof(StatusControl))] [ComponentReference(typeof(SharedStackComponent))] public sealed class StackComponent : SharedStackComponent, IItemStatus { diff --git a/Content.Client/Tools/Components/WelderComponent.cs b/Content.Client/Tools/Components/WelderComponent.cs index a42d67c08f..29e969ee00 100644 --- a/Content.Client/Tools/Components/WelderComponent.cs +++ b/Content.Client/Tools/Components/WelderComponent.cs @@ -13,7 +13,7 @@ using Robust.Shared.ViewVariables; namespace Content.Client.Tools.Components { - [RegisterComponent, Access(typeof(ToolSystem), typeof(StatusControl))] + [RegisterComponent, Friend(typeof(ToolSystem), typeof(StatusControl))] public sealed class WelderComponent : SharedWelderComponent, IItemStatus { [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Client/Weapons/Ranged/Components/MagazineVisualsComponent.cs b/Content.Client/Weapons/Ranged/Components/MagazineVisualsComponent.cs index 8f8ac3e0cc..743d23f418 100644 --- a/Content.Client/Weapons/Ranged/Components/MagazineVisualsComponent.cs +++ b/Content.Client/Weapons/Ranged/Components/MagazineVisualsComponent.cs @@ -5,7 +5,7 @@ namespace Content.Client.Weapons.Ranged.Components; /// /// Visualizer for gun mag presence; can change states based on ammo count or toggle visibility entirely. /// -[RegisterComponent, Access(typeof(GunSystem))] +[RegisterComponent, Friend(typeof(GunSystem))] public sealed class MagazineVisualsComponent : Component { /// diff --git a/Content.Client/Weapons/Ranged/Components/SpentAmmoVisualsComponent.cs b/Content.Client/Weapons/Ranged/Components/SpentAmmoVisualsComponent.cs index 6e16f40fa3..e14263cf88 100644 --- a/Content.Client/Weapons/Ranged/Components/SpentAmmoVisualsComponent.cs +++ b/Content.Client/Weapons/Ranged/Components/SpentAmmoVisualsComponent.cs @@ -2,7 +2,7 @@ using Content.Client.Weapons.Ranged.Systems; namespace Content.Client.Weapons.Ranged.Components; -[RegisterComponent, Access(typeof(GunSystem))] +[RegisterComponent, Friend(typeof(GunSystem))] public sealed class SpentAmmoVisualsComponent : Component { /// diff --git a/Content.Server/AI/Pathfinding/GridPathfindingComponent.cs b/Content.Server/AI/Pathfinding/GridPathfindingComponent.cs index 4366378b93..a78841abf3 100644 --- a/Content.Server/AI/Pathfinding/GridPathfindingComponent.cs +++ b/Content.Server/AI/Pathfinding/GridPathfindingComponent.cs @@ -1,7 +1,7 @@ namespace Content.Server.AI.Pathfinding; [RegisterComponent] -[Access(typeof(PathfindingSystem))] +[Friend(typeof(PathfindingSystem))] public sealed class GridPathfindingComponent : Component, IPathfindingGraph { public Dictionary Graph = new(); diff --git a/Content.Server/Administration/Components/BufferingComponent.cs b/Content.Server/Administration/Components/BufferingComponent.cs index 1bdefe021d..57edce5480 100644 --- a/Content.Server/Administration/Components/BufferingComponent.cs +++ b/Content.Server/Administration/Components/BufferingComponent.cs @@ -2,7 +2,7 @@ namespace Content.Server.Administration.Components; -[RegisterComponent, Access(typeof(BufferingSystem))] +[RegisterComponent, Friend(typeof(BufferingSystem))] public sealed class BufferingComponent : Component { [DataField("minBufferTime")] diff --git a/Content.Server/Advertise/AdvertiseComponent.cs b/Content.Server/Advertise/AdvertiseComponent.cs index 0b49040bdf..9620ce59d7 100644 --- a/Content.Server/Advertise/AdvertiseComponent.cs +++ b/Content.Server/Advertise/AdvertiseComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Advertise { - [RegisterComponent, Access(typeof(AdvertiseSystem))] + [RegisterComponent, Friend(typeof(AdvertiseSystem))] public sealed class AdvertiseComponent : Component { /// diff --git a/Content.Server/Animals/Components/UdderComponent.cs b/Content.Server/Animals/Components/UdderComponent.cs index f47b9a855c..71a465abdb 100644 --- a/Content.Server/Animals/Components/UdderComponent.cs +++ b/Content.Server/Animals/Components/UdderComponent.cs @@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Animals.Components { - [RegisterComponent, Access(typeof(UdderSystem))] + [RegisterComponent, Friend(typeof(UdderSystem))] internal sealed class UdderComponent : Component { /// diff --git a/Content.Server/Atmos/Piping/Trinary/Components/GasMixerComponent.cs b/Content.Server/Atmos/Piping/Trinary/Components/GasMixerComponent.cs index 4b72168dc2..6e58a1685e 100644 --- a/Content.Server/Atmos/Piping/Trinary/Components/GasMixerComponent.cs +++ b/Content.Server/Atmos/Piping/Trinary/Components/GasMixerComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Atmos; namespace Content.Server.Atmos.Piping.Trinary.Components { [RegisterComponent] - [Access(typeof(GasMixerSystem))] + [Friend(typeof(GasMixerSystem))] public sealed class GasMixerComponent : Component { [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasOutletInjectorComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasOutletInjectorComponent.cs index 9841b0df14..74f19758a9 100644 --- a/Content.Server/Atmos/Piping/Unary/Components/GasOutletInjectorComponent.cs +++ b/Content.Server/Atmos/Piping/Unary/Components/GasOutletInjectorComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Atmos; namespace Content.Server.Atmos.Piping.Unary.Components { [RegisterComponent] - [Access(typeof(GasOutletInjectorSystem))] + [Friend(typeof(GasOutletInjectorSystem))] public sealed class GasOutletInjectorComponent : Component { diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs index 46b9a75d83..64f0067527 100644 --- a/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs +++ b/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs @@ -6,7 +6,7 @@ using Content.Shared.Atmos.Piping.Unary.Components; namespace Content.Server.Atmos.Piping.Unary.Components { [RegisterComponent] - [Access(typeof(GasVentScrubberSystem))] + [Friend(typeof(GasVentScrubberSystem))] public sealed class GasVentScrubberComponent : Component { [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Server/Atmos/TileAtmosphere.cs b/Content.Server/Atmos/TileAtmosphere.cs index 17e09570d7..3e87973df9 100644 --- a/Content.Server/Atmos/TileAtmosphere.cs +++ b/Content.Server/Atmos/TileAtmosphere.cs @@ -9,7 +9,7 @@ namespace Content.Server.Atmos /// Internal Atmos class that stores data about the atmosphere in a grid. /// You shouldn't use this directly, use instead. /// - [Access(typeof(AtmosphereSystem))] + [Friend(typeof(AtmosphereSystem))] public sealed class TileAtmosphere : IGasMixtureHolder { [ViewVariables] @@ -48,7 +48,7 @@ namespace Content.Server.Atmos [ViewVariables] public AtmosDirection AdjacentBits = AtmosDirection.Invalid; - [ViewVariables, Access(typeof(AtmosphereSystem), Other = AccessPermissions.ReadExecute)] + [ViewVariables] public MonstermosInfo MonstermosInfo; [ViewVariables] @@ -78,7 +78,6 @@ namespace Content.Server.Atmos /// This can be immutable if the tile is spaced. /// [ViewVariables] - [Access(typeof(AtmosphereSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public GasMixture? Air { get; set; } GasMixture IGasMixtureHolder.Air diff --git a/Content.Server/Body/Components/BloodstreamComponent.cs b/Content.Server/Body/Components/BloodstreamComponent.cs index b5adfa3a42..45a65fe4e4 100644 --- a/Content.Server/Body/Components/BloodstreamComponent.cs +++ b/Content.Server/Body/Components/BloodstreamComponent.cs @@ -8,7 +8,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Body.Components { - [RegisterComponent, Access(typeof(BloodstreamSystem))] + [RegisterComponent, Friend(typeof(BloodstreamSystem))] public sealed class BloodstreamComponent : Component { public static string DefaultChemicalsSolutionName = "chemicals"; @@ -129,7 +129,6 @@ namespace Content.Server.Body.Components /// Internal solution for reagent storage /// [ViewVariables(VVAccess.ReadWrite)] - [Access(typeof(BloodstreamSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public Solution ChemicalSolution = default!; /// diff --git a/Content.Server/Body/Components/BrainComponent.cs b/Content.Server/Body/Components/BrainComponent.cs index 44167118c3..93909607c8 100644 --- a/Content.Server/Body/Components/BrainComponent.cs +++ b/Content.Server/Body/Components/BrainComponent.cs @@ -2,7 +2,7 @@ namespace Content.Server.Body.Components { - [RegisterComponent, Access(typeof(BrainSystem))] + [RegisterComponent, Friend(typeof(BrainSystem))] public sealed class BrainComponent : Component { } diff --git a/Content.Server/Body/Components/LungComponent.cs b/Content.Server/Body/Components/LungComponent.cs index 0ed4ce0dae..7bd647d0d8 100644 --- a/Content.Server/Body/Components/LungComponent.cs +++ b/Content.Server/Body/Components/LungComponent.cs @@ -5,11 +5,10 @@ using Content.Shared.Chemistry.Components; namespace Content.Server.Body.Components; -[RegisterComponent, Access(typeof(LungSystem))] +[RegisterComponent, Friend(typeof(LungSystem))] public sealed class LungComponent : Component { [DataField("air")] - [Access(typeof(LungSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public GasMixture Air { get; set; } = new() { Volume = 6, @@ -17,6 +16,5 @@ public sealed class LungComponent : Component }; [ViewVariables] - [Access(typeof(LungSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public Solution LungSolution = default!; } diff --git a/Content.Server/Body/Components/MetabolizerComponent.cs b/Content.Server/Body/Components/MetabolizerComponent.cs index bc1355fc7e..c33b6ab941 100644 --- a/Content.Server/Body/Components/MetabolizerComponent.cs +++ b/Content.Server/Body/Components/MetabolizerComponent.cs @@ -9,7 +9,7 @@ namespace Content.Server.Body.Components /// /// Handles metabolizing various reagents with given effects. /// - [RegisterComponent, Access(typeof(MetabolizerSystem))] + [RegisterComponent, Friend(typeof(MetabolizerSystem))] public sealed class MetabolizerComponent : Component { public float AccumulatedFrametime = 0.0f; @@ -40,7 +40,6 @@ namespace Content.Server.Body.Components /// List of metabolizer types that this organ is. ex. Human, Slime, Felinid, w/e. /// [DataField("metabolizerTypes", customTypeSerializer:typeof(PrototypeIdHashSetSerializer))] - [Access(typeof(MetabolizerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public HashSet? MetabolizerTypes = null; /// diff --git a/Content.Server/Body/Components/RespiratorComponent.cs b/Content.Server/Body/Components/RespiratorComponent.cs index 52ae4e9414..1daef6c536 100644 --- a/Content.Server/Body/Components/RespiratorComponent.cs +++ b/Content.Server/Body/Components/RespiratorComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Damage; namespace Content.Server.Body.Components { - [RegisterComponent, Access(typeof(RespiratorSystem))] + [RegisterComponent, Friend(typeof(RespiratorSystem))] public sealed class RespiratorComponent : Component { /// diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index c6ef9f6504..4528ac51fa 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.FixedPoint; namespace Content.Server.Body.Components { - [RegisterComponent, Access(typeof(StomachSystem))] + [RegisterComponent, Friend(typeof(StomachSystem))] public sealed class StomachComponent : Component { public float AccumulatedFrameTime; diff --git a/Content.Server/Body/Components/ThermalRegulatorComponent.cs b/Content.Server/Body/Components/ThermalRegulatorComponent.cs index 15d11f3830..09d870fba2 100644 --- a/Content.Server/Body/Components/ThermalRegulatorComponent.cs +++ b/Content.Server/Body/Components/ThermalRegulatorComponent.cs @@ -3,7 +3,7 @@ using Content.Server.Body.Systems; namespace Content.Server.Body.Components; [RegisterComponent] -[Access(typeof(ThermalRegulatorSystem))] +[Friend(typeof(ThermalRegulatorSystem))] public sealed class ThermalRegulatorComponent : Component { /// diff --git a/Content.Server/Botany/Components/LogComponent.cs b/Content.Server/Botany/Components/LogComponent.cs index f72638a74a..621b72cbc5 100644 --- a/Content.Server/Botany/Components/LogComponent.cs +++ b/Content.Server/Botany/Components/LogComponent.cs @@ -6,7 +6,7 @@ namespace Content.Server.Botany.Components; // TODO: This should probably be merged with SliceableFood somehow or made into a more generic Choppable. [RegisterComponent] -[Access(typeof(LogSystem))] +[Friend(typeof(LogSystem))] public sealed class LogComponent : Component { [DataField("spawnedPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))] diff --git a/Content.Server/Botany/Components/ProduceComponent.cs b/Content.Server/Botany/Components/ProduceComponent.cs index 4a87c09f50..c81c7d1046 100644 --- a/Content.Server/Botany/Components/ProduceComponent.cs +++ b/Content.Server/Botany/Components/ProduceComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Botany.Components; [RegisterComponent] -[Access(typeof(BotanySystem))] +[Friend(typeof(BotanySystem))] public sealed class ProduceComponent : Component { [DataField("targetSolution")] public string SolutionName { get; set; } = "food"; diff --git a/Content.Server/Botany/Components/SeedComponent.cs b/Content.Server/Botany/Components/SeedComponent.cs index 535c916803..d61b828907 100644 --- a/Content.Server/Botany/Components/SeedComponent.cs +++ b/Content.Server/Botany/Components/SeedComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Botany.Components { - [RegisterComponent, Access(typeof(BotanySystem))] + [RegisterComponent, Friend(typeof(BotanySystem))] public sealed class SeedComponent : Component { /// diff --git a/Content.Server/Botany/Components/SeedExtractorComponent.cs b/Content.Server/Botany/Components/SeedExtractorComponent.cs index 803da611aa..6b0488e7a3 100644 --- a/Content.Server/Botany/Components/SeedExtractorComponent.cs +++ b/Content.Server/Botany/Components/SeedExtractorComponent.cs @@ -3,7 +3,7 @@ using Content.Server.Botany.Systems; namespace Content.Server.Botany.Components; [RegisterComponent] -[Access(typeof(SeedExtractorSystem))] +[Friend(typeof(SeedExtractorSystem))] public sealed class SeedExtractorComponent : Component { // TODO: Upgradeable machines. diff --git a/Content.Server/Botany/SeedPrototype.cs b/Content.Server/Botany/SeedPrototype.cs index 510a81bb18..72297fc060 100644 --- a/Content.Server/Botany/SeedPrototype.cs +++ b/Content.Server/Botany/SeedPrototype.cs @@ -63,7 +63,7 @@ public struct SeedChemQuantity // TODO reduce the number of friends to a reasonable level. Requires ECS-ing things like plant holder component. [Virtual, DataDefinition] -[Access(typeof(BotanySystem), typeof(PlantHolderSystem), typeof(SeedExtractorSystem), typeof(PlantHolderComponent))] +[Friend(typeof(BotanySystem), typeof(PlantHolderSystem), typeof(SeedExtractorSystem), typeof(PlantHolderComponent))] public class SeedData { #region Tracking diff --git a/Content.Server/Cargo/Components/CargoTelepadComponent.cs b/Content.Server/Cargo/Components/CargoTelepadComponent.cs index 00a6e4c5c3..4c0bd6f468 100644 --- a/Content.Server/Cargo/Components/CargoTelepadComponent.cs +++ b/Content.Server/Cargo/Components/CargoTelepadComponent.cs @@ -11,7 +11,7 @@ namespace Content.Server.Cargo.Components /// /// Handles teleporting in requested cargo after the specified delay. /// - [RegisterComponent, Access(typeof(CargoSystem))] + [RegisterComponent, Friend(typeof(CargoSystem))] public sealed class CargoTelepadComponent : SharedCargoTelepadComponent { [DataField("delay")] diff --git a/Content.Server/Chemistry/Components/SolutionManager/SolutionContainerManagerComponent.cs b/Content.Server/Chemistry/Components/SolutionManager/SolutionContainerManagerComponent.cs index bc4eb9612b..bd44fb3d2d 100644 --- a/Content.Server/Chemistry/Components/SolutionManager/SolutionContainerManagerComponent.cs +++ b/Content.Server/Chemistry/Components/SolutionManager/SolutionContainerManagerComponent.cs @@ -4,12 +4,11 @@ using Content.Shared.Chemistry.Components; namespace Content.Server.Chemistry.Components.SolutionManager { [RegisterComponent] - [Access(typeof(SolutionContainerSystem))] + [Friend(typeof(SolutionContainerSystem))] public sealed class SolutionContainerManagerComponent : Component { [ViewVariables] [DataField("solutions")] - [Access(typeof(SolutionContainerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public readonly Dictionary Solutions = new(); } } diff --git a/Content.Server/Climbing/Components/ClimbingComponent.cs b/Content.Server/Climbing/Components/ClimbingComponent.cs index 5eab1b9672..74deb1a054 100644 --- a/Content.Server/Climbing/Components/ClimbingComponent.cs +++ b/Content.Server/Climbing/Components/ClimbingComponent.cs @@ -4,7 +4,7 @@ namespace Content.Server.Climbing.Components; [RegisterComponent] [ComponentReference(typeof(SharedClimbingComponent))] -[Access(typeof(ClimbSystem))] +[Friend(typeof(ClimbSystem))] public sealed class ClimbingComponent : SharedClimbingComponent { [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Server/Climbing/Components/GlassTableComponent.cs b/Content.Server/Climbing/Components/GlassTableComponent.cs index e42b057e4c..31fa30683f 100644 --- a/Content.Server/Climbing/Components/GlassTableComponent.cs +++ b/Content.Server/Climbing/Components/GlassTableComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Climbing.Components; /// This is a really entity-specific behavior, so opted to make it /// not very generalized with regards to naming. /// -[RegisterComponent, Access(typeof(ClimbSystem))] +[RegisterComponent, Friend(typeof(ClimbSystem))] public sealed class GlassTableComponent : Component { /// diff --git a/Content.Server/Construction/Components/ConstructionComponent.cs b/Content.Server/Construction/Components/ConstructionComponent.cs index 6274128423..3177eb169e 100644 --- a/Content.Server/Construction/Components/ConstructionComponent.cs +++ b/Content.Server/Construction/Components/ConstructionComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Construction.Components { - [RegisterComponent, Access(typeof(ConstructionSystem))] + [RegisterComponent, Friend(typeof(ConstructionSystem))] public sealed class ConstructionComponent : Component { [DataField("graph", required:true, customTypeSerializer:typeof(PrototypeIdSerializer))] diff --git a/Content.Server/Conveyor/ConveyorComponent.cs b/Content.Server/Conveyor/ConveyorComponent.cs index 1437c0e5a6..657dc1f529 100644 --- a/Content.Server/Conveyor/ConveyorComponent.cs +++ b/Content.Server/Conveyor/ConveyorComponent.cs @@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Conveyor { [RegisterComponent] - [Access(typeof(ConveyorSystem))] + [Friend(typeof(ConveyorSystem))] public sealed class ConveyorComponent : Component { /// diff --git a/Content.Server/Damage/Components/DamageOtherOnHitComponent.cs b/Content.Server/Damage/Components/DamageOtherOnHitComponent.cs index 55b4b5f2b1..0ec5945929 100644 --- a/Content.Server/Damage/Components/DamageOtherOnHitComponent.cs +++ b/Content.Server/Damage/Components/DamageOtherOnHitComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Damage; namespace Content.Server.Damage.Components { - [Access(typeof(DamageOtherOnHitSystem))] + [Friend(typeof(DamageOtherOnHitSystem))] [RegisterComponent] public sealed class DamageOtherOnHitComponent : Component { diff --git a/Content.Server/DeviceNetwork/Components/ApcNetworkComponent.cs b/Content.Server/DeviceNetwork/Components/ApcNetworkComponent.cs index 4a195cf451..afa6a65dd6 100644 --- a/Content.Server/DeviceNetwork/Components/ApcNetworkComponent.cs +++ b/Content.Server/DeviceNetwork/Components/ApcNetworkComponent.cs @@ -4,7 +4,7 @@ using Content.Server.NodeContainer.Nodes; namespace Content.Server.DeviceNetwork.Components { [RegisterComponent] - [Access(typeof(ApcNetworkSystem))] + [Friend(typeof(ApcNetworkSystem))] [ComponentProtoName("ApcNetworkConnection")] public sealed class ApcNetworkComponent : Component { diff --git a/Content.Server/DeviceNetwork/Components/DeviceNetworkComponent.cs b/Content.Server/DeviceNetwork/Components/DeviceNetworkComponent.cs index 2f00eccdcd..f283b496d1 100644 --- a/Content.Server/DeviceNetwork/Components/DeviceNetworkComponent.cs +++ b/Content.Server/DeviceNetwork/Components/DeviceNetworkComponent.cs @@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.DeviceNetwork.Components { [RegisterComponent] - [Access(typeof(DeviceNetworkSystem), typeof(DeviceNet))] + [Friend(typeof(DeviceNetworkSystem), typeof(DeviceNet))] public sealed class DeviceNetworkComponent : Component { public enum DeviceNetIdDefaults diff --git a/Content.Server/DeviceNetwork/Components/Devices/ApcNetSwitchComponent.cs b/Content.Server/DeviceNetwork/Components/Devices/ApcNetSwitchComponent.cs index eed039432f..5b7d9a850b 100644 --- a/Content.Server/DeviceNetwork/Components/Devices/ApcNetSwitchComponent.cs +++ b/Content.Server/DeviceNetwork/Components/Devices/ApcNetSwitchComponent.cs @@ -3,7 +3,7 @@ namespace Content.Server.DeviceNetwork.Components.Devices { [RegisterComponent] - [Access(typeof(ApcNetSwitchSystem))] + [Friend(typeof(ApcNetSwitchSystem))] public sealed class ApcNetSwitchComponent : Component { [ViewVariables] public bool State; diff --git a/Content.Server/Dice/DiceComponent.cs b/Content.Server/Dice/DiceComponent.cs index 38639f5e2c..29755530d7 100644 --- a/Content.Server/Dice/DiceComponent.cs +++ b/Content.Server/Dice/DiceComponent.cs @@ -2,7 +2,7 @@ using Content.Shared.Sound; namespace Content.Server.Dice { - [RegisterComponent, Access(typeof(DiceSystem))] + [RegisterComponent, Friend(typeof(DiceSystem))] public sealed class DiceComponent : Component { [ViewVariables] diff --git a/Content.Server/DoAfter/DoAfterComponent.cs b/Content.Server/DoAfter/DoAfterComponent.cs index adf5e382a9..75d085b0a6 100644 --- a/Content.Server/DoAfter/DoAfterComponent.cs +++ b/Content.Server/DoAfter/DoAfterComponent.cs @@ -2,7 +2,7 @@ using Content.Shared.DoAfter; namespace Content.Server.DoAfter { - [RegisterComponent, Access(typeof(DoAfterSystem))] + [RegisterComponent, Friend(typeof(DoAfterSystem))] public sealed class DoAfterComponent : SharedDoAfterComponent { public readonly Dictionary DoAfters = new(); diff --git a/Content.Server/Electrocution/Components/ElectrocutionComponent.cs b/Content.Server/Electrocution/Components/ElectrocutionComponent.cs index 7509f83b12..10161b5c4e 100644 --- a/Content.Server/Electrocution/Components/ElectrocutionComponent.cs +++ b/Content.Server/Electrocution/Components/ElectrocutionComponent.cs @@ -4,7 +4,7 @@ /// Component for virtual electrocution entities (representing an in-progress shock). /// [RegisterComponent] - [Access(typeof(ElectrocutionSystem))] + [Friend(typeof(ElectrocutionSystem))] public sealed class ElectrocutionComponent : Component { [DataField("timeLeft")] public float TimeLeft { get; set; } diff --git a/Content.Server/Explosion/Components/ClusterGrenadeComponent.cs b/Content.Server/Explosion/Components/ClusterGrenadeComponent.cs index 9767f705ba..1163a58c90 100644 --- a/Content.Server/Explosion/Components/ClusterGrenadeComponent.cs +++ b/Content.Server/Explosion/Components/ClusterGrenadeComponent.cs @@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Explosion.Components { - [RegisterComponent, Access(typeof(ClusterGrenadeSystem))] + [RegisterComponent, Friend(typeof(ClusterGrenadeSystem))] public sealed class ClusterGrenadeComponent : Component { public Container GrenadesContainer = default!; diff --git a/Content.Server/Explosion/Components/ExplosionResistanceComponent.cs b/Content.Server/Explosion/Components/ExplosionResistanceComponent.cs index 908b3126e0..1a3f700eab 100644 --- a/Content.Server/Explosion/Components/ExplosionResistanceComponent.cs +++ b/Content.Server/Explosion/Components/ExplosionResistanceComponent.cs @@ -12,7 +12,7 @@ namespace Content.Server.Explosion.Components; /// significantly reduce the damage, but shouldn't be silly overpowered in regular combat. /// [RegisterComponent] -[Access(typeof(ExplosionSystem))] +[Friend(typeof(ExplosionSystem))] public sealed class ExplosionResistanceComponent : Component { /// diff --git a/Content.Server/Extinguisher/FireExtinguisherComponent.cs b/Content.Server/Extinguisher/FireExtinguisherComponent.cs index 92008638bd..46793a5c12 100644 --- a/Content.Server/Extinguisher/FireExtinguisherComponent.cs +++ b/Content.Server/Extinguisher/FireExtinguisherComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Sound; namespace Content.Server.Extinguisher; [RegisterComponent] -[Access(typeof(FireExtinguisherSystem))] +[Friend(typeof(FireExtinguisherSystem))] public sealed class FireExtinguisherComponent : Component { [DataField("refillSound")] public SoundSpecifier RefillSound = new SoundPathSpecifier("/Audio/Effects/refill.ogg"); diff --git a/Content.Server/Flash/Components/FlashComponent.cs b/Content.Server/Flash/Components/FlashComponent.cs index 378b675ad3..a3978aadcc 100644 --- a/Content.Server/Flash/Components/FlashComponent.cs +++ b/Content.Server/Flash/Components/FlashComponent.cs @@ -2,7 +2,7 @@ using Content.Shared.Sound; namespace Content.Server.Flash.Components { - [RegisterComponent, Access(typeof(FlashSystem))] + [RegisterComponent, Friend(typeof(FlashSystem))] public sealed class FlashComponent : Component { [DataField("duration")] diff --git a/Content.Server/Flash/Components/FlashImmunityComponent.cs b/Content.Server/Flash/Components/FlashImmunityComponent.cs index fe8fab2803..3aee0c2eb4 100644 --- a/Content.Server/Flash/Components/FlashImmunityComponent.cs +++ b/Content.Server/Flash/Components/FlashImmunityComponent.cs @@ -1,6 +1,6 @@ namespace Content.Server.Flash.Components { - [RegisterComponent, Access(typeof(FlashSystem))] + [RegisterComponent, Friend(typeof(FlashSystem))] public sealed class FlashImmunityComponent : Component { [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Server/Flash/Components/FlashableComponent.cs b/Content.Server/Flash/Components/FlashableComponent.cs index 65f32a10f6..bc7b23175b 100644 --- a/Content.Server/Flash/Components/FlashableComponent.cs +++ b/Content.Server/Flash/Components/FlashableComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Flash; namespace Content.Server.Flash.Components { [ComponentReference(typeof(SharedFlashableComponent))] - [RegisterComponent, Access(typeof(FlashSystem))] + [RegisterComponent, Friend(typeof(FlashSystem))] public sealed class FlashableComponent : SharedFlashableComponent { } diff --git a/Content.Server/Fluids/Components/AbsorbentComponent.cs b/Content.Server/Fluids/Components/AbsorbentComponent.cs index 6b6bbc51b9..1d285a6ee8 100644 --- a/Content.Server/Fluids/Components/AbsorbentComponent.cs +++ b/Content.Server/Fluids/Components/AbsorbentComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Fluids.Components; /// /// For entities that can clean up puddles /// -[RegisterComponent, Access(typeof(MoppingSystem))] +[RegisterComponent, Friend(typeof(MoppingSystem))] public sealed class AbsorbentComponent : Component { public const string SolutionName = "absorbed"; diff --git a/Content.Server/Fluids/Components/EvaporationComponent.cs b/Content.Server/Fluids/Components/EvaporationComponent.cs index eaa3a1ad88..89f4e13d60 100644 --- a/Content.Server/Fluids/Components/EvaporationComponent.cs +++ b/Content.Server/Fluids/Components/EvaporationComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.FixedPoint; namespace Content.Server.Fluids.Components { [RegisterComponent] - [Access(typeof(EvaporationSystem))] + [Friend(typeof(EvaporationSystem))] public sealed class EvaporationComponent : Component { /// diff --git a/Content.Server/Fluids/Components/FluidSpreaderComponent.cs b/Content.Server/Fluids/Components/FluidSpreaderComponent.cs index 1f7eff84d1..27ee2c4a5e 100644 --- a/Content.Server/Fluids/Components/FluidSpreaderComponent.cs +++ b/Content.Server/Fluids/Components/FluidSpreaderComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Chemistry.Components; namespace Content.Server.Fluids.Components; [RegisterComponent] -[Access(typeof(FluidSpreaderSystem))] +[Friend(typeof(FluidSpreaderSystem))] public sealed class FluidSpreaderComponent : Component { [ViewVariables] diff --git a/Content.Server/Fluids/Components/PuddleComponent.cs b/Content.Server/Fluids/Components/PuddleComponent.cs index ff387225f3..b3485c54e8 100644 --- a/Content.Server/Fluids/Components/PuddleComponent.cs +++ b/Content.Server/Fluids/Components/PuddleComponent.cs @@ -8,7 +8,7 @@ namespace Content.Server.Fluids.Components /// Puddle on a floor /// [RegisterComponent] - [Access(typeof(PuddleSystem))] + [Friend(typeof(PuddleSystem))] public sealed class PuddleComponent : Component { public const string DefaultSolutionName = "puddle"; diff --git a/Content.Server/Fluids/Components/SprayComponent.cs b/Content.Server/Fluids/Components/SprayComponent.cs index 80b0ba913c..2f7920700d 100644 --- a/Content.Server/Fluids/Components/SprayComponent.cs +++ b/Content.Server/Fluids/Components/SprayComponent.cs @@ -7,7 +7,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Fluids.Components; [RegisterComponent] -[Access(typeof(SpraySystem))] +[Friend(typeof(SpraySystem))] public sealed class SprayComponent : Component { public const string SolutionName = "spray"; @@ -32,6 +32,5 @@ public sealed class SprayComponent : Component [DataField("impulse")] public float Impulse; [DataField("spraySound", required: true)] - [Access(typeof(SpraySystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public SoundSpecifier SpraySound { get; } = default!; } diff --git a/Content.Server/Gatherable/Components/GatherableComponent.cs b/Content.Server/Gatherable/Components/GatherableComponent.cs index 5215bd68b1..71f93149c6 100644 --- a/Content.Server/Gatherable/Components/GatherableComponent.cs +++ b/Content.Server/Gatherable/Components/GatherableComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Whitelist; namespace Content.Server.Gatherable.Components; [RegisterComponent] -[Access(typeof(GatherableSystem))] +[Friend(typeof(GatherableSystem))] public sealed class GatherableComponent : Component { /// @@ -11,7 +11,7 @@ public sealed class GatherableComponent : Component /// Supports multiple tags. /// [ViewVariables] - [DataField("whitelist", required: true)] + [DataField("whitelist", required: true)] public EntityWhitelist? ToolWhitelist; /// @@ -27,6 +27,6 @@ public sealed class GatherableComponent : Component /// Tag1: LootTableID1 /// Tag2: LootTableID2 /// - [DataField("loot")] + [DataField("loot")] public Dictionary? MappedLoot = new(); } diff --git a/Content.Server/Ghost/Roles/Components/GhostRoleComponent.cs b/Content.Server/Ghost/Roles/Components/GhostRoleComponent.cs index 5eed3339b2..f8c21047a2 100644 --- a/Content.Server/Ghost/Roles/Components/GhostRoleComponent.cs +++ b/Content.Server/Ghost/Roles/Components/GhostRoleComponent.cs @@ -3,7 +3,7 @@ using Robust.Server.Player; namespace Content.Server.Ghost.Roles.Components { - [Access(typeof(GhostRoleSystem))] + [Friend(typeof(GhostRoleSystem))] public abstract class GhostRoleComponent : Component { [DataField("name")] public string _roleName = "Unknown"; @@ -21,7 +21,6 @@ namespace Content.Server.Ghost.Roles.Components // We do this so updating RoleName and RoleDescription in VV updates the open EUIs. [ViewVariables(VVAccess.ReadWrite)] - [Access(typeof(GhostRoleSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public string RoleName { get => _roleName; @@ -33,7 +32,6 @@ namespace Content.Server.Ghost.Roles.Components } [ViewVariables(VVAccess.ReadWrite)] - [Access(typeof(GhostRoleSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public string RoleDescription { get => _roleDescription; @@ -45,7 +43,6 @@ namespace Content.Server.Ghost.Roles.Components } [ViewVariables(VVAccess.ReadWrite)] - [Access(typeof(GhostRoleSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public string RoleRules { get => _roleRules; diff --git a/Content.Server/Gravity/GravityGeneratorComponent.cs b/Content.Server/Gravity/GravityGeneratorComponent.cs index 64c4373c59..fef3c3cc95 100644 --- a/Content.Server/Gravity/GravityGeneratorComponent.cs +++ b/Content.Server/Gravity/GravityGeneratorComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Gravity; namespace Content.Server.Gravity { [RegisterComponent] - [Access(typeof(GravityGeneratorSystem))] + [Friend(typeof(GravityGeneratorSystem))] public sealed class GravityGeneratorComponent : SharedGravityGeneratorComponent { // 1% charge per second. diff --git a/Content.Server/HealthExaminable/HealthExaminableComponent.cs b/Content.Server/HealthExaminable/HealthExaminableComponent.cs index 1f3dcb512b..c1eb417ed2 100644 --- a/Content.Server/HealthExaminable/HealthExaminableComponent.cs +++ b/Content.Server/HealthExaminable/HealthExaminableComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.HealthExaminable; -[RegisterComponent, Access(typeof(HealthExaminableSystem))] +[RegisterComponent, Friend(typeof(HealthExaminableSystem))] public sealed class HealthExaminableComponent : Component { public List Thresholds = new() diff --git a/Content.Server/Interaction/Components/InteractionPopupComponent.cs b/Content.Server/Interaction/Components/InteractionPopupComponent.cs index c543570392..482d9a11b9 100644 --- a/Content.Server/Interaction/Components/InteractionPopupComponent.cs +++ b/Content.Server/Interaction/Components/InteractionPopupComponent.cs @@ -2,7 +2,7 @@ using Content.Shared.Sound; namespace Content.Server.Interaction.Components; -[RegisterComponent, Access(typeof(InteractionPopupSystem))] +[RegisterComponent, Friend(typeof(InteractionPopupSystem))] public sealed class InteractionPopupComponent : Component { /// diff --git a/Content.Server/Kitchen/Components/ExtractableComponent.cs b/Content.Server/Kitchen/Components/ExtractableComponent.cs index e34257a1f0..686f1f7e82 100644 --- a/Content.Server/Kitchen/Components/ExtractableComponent.cs +++ b/Content.Server/Kitchen/Components/ExtractableComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Kitchen.Components /// Tag component that denotes an entity as Extractable /// [RegisterComponent] - [Access(typeof(ReagentGrinderSystem))] + [Friend(typeof(ReagentGrinderSystem))] public sealed class ExtractableComponent : Component { [ViewVariables] diff --git a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs index 692bde32be..3ed4e1d025 100644 --- a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs +++ b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Kitchen.Components; namespace Content.Server.Kitchen.Components { - [RegisterComponent, Access(typeof(KitchenSpikeSystem))] + [RegisterComponent, Friend(typeof(KitchenSpikeSystem))] public sealed class KitchenSpikeComponent : SharedKitchenSpikeComponent { public List? PrototypesToSpawn; diff --git a/Content.Server/Kudzu/SpreaderComponent.cs b/Content.Server/Kudzu/SpreaderComponent.cs index 88c9ba8060..616b02ba73 100644 --- a/Content.Server/Kudzu/SpreaderComponent.cs +++ b/Content.Server/Kudzu/SpreaderComponent.cs @@ -5,7 +5,7 @@ namespace Content.Server.Kudzu; /// ONLY USE THIS FOR ANCHORED OBJECTS. An error will be logged if not anchored/static. /// Currently does not support growing in space. /// -[RegisterComponent, Access(typeof(SpreaderSystem))] +[RegisterComponent, Friend(typeof(SpreaderSystem))] public sealed class SpreaderComponent : Component { /// diff --git a/Content.Server/Light/Components/EmergencyLightComponent.cs b/Content.Server/Light/Components/EmergencyLightComponent.cs index bc43c83196..094b510be0 100644 --- a/Content.Server/Light/Components/EmergencyLightComponent.cs +++ b/Content.Server/Light/Components/EmergencyLightComponent.cs @@ -6,7 +6,7 @@ namespace Content.Server.Light.Components /// /// Component that represents an emergency light, it has an internal battery that charges when the power is on. /// - [RegisterComponent, Access(typeof(EmergencyLightSystem))] + [RegisterComponent, Friend(typeof(EmergencyLightSystem))] public sealed class EmergencyLightComponent : SharedEmergencyLightComponent { [ViewVariables] diff --git a/Content.Server/Light/Components/HandheldLightComponent.cs b/Content.Server/Light/Components/HandheldLightComponent.cs index 0c347227c3..b7ab7ad194 100644 --- a/Content.Server/Light/Components/HandheldLightComponent.cs +++ b/Content.Server/Light/Components/HandheldLightComponent.cs @@ -8,7 +8,7 @@ namespace Content.Server.Light.Components /// Component that represents a powered handheld light source which can be toggled on and off. /// [RegisterComponent] - [Access(typeof(HandheldLightSystem))] + [Friend(typeof(HandheldLightSystem))] public sealed class HandheldLightComponent : SharedHandheldLightComponent { [ViewVariables(VVAccess.ReadWrite)] [DataField("wattage")] public float Wattage { get; set; } = .8f; diff --git a/Content.Server/Light/Components/LightBulbComponent.cs b/Content.Server/Light/Components/LightBulbComponent.cs index 6a72807f75..3008d68c61 100644 --- a/Content.Server/Light/Components/LightBulbComponent.cs +++ b/Content.Server/Light/Components/LightBulbComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Light.Components /// /// Component that represents a light bulb. Can be broken, or burned, which turns them mostly useless. /// - [RegisterComponent, Access(typeof(LightBulbSystem))] + [RegisterComponent, Friend(typeof(LightBulbSystem))] public sealed class LightBulbComponent : Component { [DataField("color")] diff --git a/Content.Server/Light/Components/LitOnPoweredComponent.cs b/Content.Server/Light/Components/LitOnPoweredComponent.cs index d456f705c9..fdea092d35 100644 --- a/Content.Server/Light/Components/LitOnPoweredComponent.cs +++ b/Content.Server/Light/Components/LitOnPoweredComponent.cs @@ -8,7 +8,7 @@ namespace Content.Server.Light.Components /// Enables or disables a pointlight depending on the powered /// state of an entity. /// - [RegisterComponent, Access(typeof(PoweredLightSystem))] + [RegisterComponent, Friend(typeof(PoweredLightSystem))] public sealed class LitOnPoweredComponent : Component { } diff --git a/Content.Server/Light/Components/MatchstickComponent.cs b/Content.Server/Light/Components/MatchstickComponent.cs index 269c3ee8e9..f996df13c3 100644 --- a/Content.Server/Light/Components/MatchstickComponent.cs +++ b/Content.Server/Light/Components/MatchstickComponent.cs @@ -5,7 +5,7 @@ using Content.Server.Light.EntitySystems; namespace Content.Server.Light.Components { [RegisterComponent] - [Access(typeof(MatchstickSystem))] + [Friend(typeof(MatchstickSystem))] public sealed class MatchstickComponent : Component { /// diff --git a/Content.Server/Light/Components/PoweredLightComponent.cs b/Content.Server/Light/Components/PoweredLightComponent.cs index 0a7165319f..451887d796 100644 --- a/Content.Server/Light/Components/PoweredLightComponent.cs +++ b/Content.Server/Light/Components/PoweredLightComponent.cs @@ -12,7 +12,7 @@ namespace Content.Server.Light.Components /// /// Component that represents a wall light. It has a light bulb that can be replaced when broken. /// - [RegisterComponent, Access(typeof(PoweredLightSystem))] + [RegisterComponent, Friend(typeof(PoweredLightSystem))] public sealed class PoweredLightComponent : Component { [DataField("burnHandSound")] diff --git a/Content.Server/MachineLinking/Components/SignalReceiverComponent.cs b/Content.Server/MachineLinking/Components/SignalReceiverComponent.cs index 0c9b8d0e92..a690833375 100644 --- a/Content.Server/MachineLinking/Components/SignalReceiverComponent.cs +++ b/Content.Server/MachineLinking/Components/SignalReceiverComponent.cs @@ -3,7 +3,7 @@ using Content.Server.MachineLinking.System; namespace Content.Server.MachineLinking.Components { [RegisterComponent] - [Access(typeof(SignalLinkerSystem))] + [Friend(typeof(SignalLinkerSystem))] public sealed class SignalReceiverComponent : Component { [DataField("inputs")] diff --git a/Content.Server/MachineLinking/Components/SignalTransmitterComponent.cs b/Content.Server/MachineLinking/Components/SignalTransmitterComponent.cs index b87564b6c1..17a8878c84 100644 --- a/Content.Server/MachineLinking/Components/SignalTransmitterComponent.cs +++ b/Content.Server/MachineLinking/Components/SignalTransmitterComponent.cs @@ -19,7 +19,7 @@ namespace Content.Server.MachineLinking.Components } [RegisterComponent] - [Access(typeof(SignalLinkerSystem))] + [Friend(typeof(SignalLinkerSystem))] public sealed class SignalTransmitterComponent : Component { /// @@ -32,7 +32,6 @@ namespace Content.Server.MachineLinking.Components public float TransmissionRange = 30f; [DataField("outputs")] - [Access(typeof(SignalLinkerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public Dictionary> Outputs = new(); } } diff --git a/Content.Server/Medical/CrewMonitoring/CrewMonitoringConsoleComponent.cs b/Content.Server/Medical/CrewMonitoring/CrewMonitoringConsoleComponent.cs index 2ef369bf10..269e05bea5 100644 --- a/Content.Server/Medical/CrewMonitoring/CrewMonitoringConsoleComponent.cs +++ b/Content.Server/Medical/CrewMonitoring/CrewMonitoringConsoleComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Medical.SuitSensor; namespace Content.Server.Medical.CrewMonitoring { [RegisterComponent] - [Access(typeof(CrewMonitoringConsoleSystem))] + [Friend(typeof(CrewMonitoringConsoleSystem))] public sealed class CrewMonitoringConsoleComponent : Component { /// diff --git a/Content.Server/Medical/SuitSensors/SuitSensorComponent.cs b/Content.Server/Medical/SuitSensors/SuitSensorComponent.cs index c1a35b77d5..d957c7a000 100644 --- a/Content.Server/Medical/SuitSensors/SuitSensorComponent.cs +++ b/Content.Server/Medical/SuitSensors/SuitSensorComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Medical.SuitSensors /// If enabled, will report to crew monitoring console owners position and status. /// [RegisterComponent] - [Access(typeof(SuitSensorSystem))] + [Friend(typeof(SuitSensorSystem))] public sealed class SuitSensorComponent : Component { /// diff --git a/Content.Server/Mind/Components/MindComponent.cs b/Content.Server/Mind/Components/MindComponent.cs index 325e92123c..513a5003dc 100644 --- a/Content.Server/Mind/Components/MindComponent.cs +++ b/Content.Server/Mind/Components/MindComponent.cs @@ -3,14 +3,13 @@ namespace Content.Server.Mind.Components /// /// Stores a on a mob. /// - [RegisterComponent, Access(typeof(MindSystem))] + [RegisterComponent, Friend(typeof(MindSystem))] public sealed class MindComponent : Component { /// /// The mind controlling this mob. Can be null. /// [ViewVariables] - [Access(typeof(MindSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public Mind? Mind { get; set; } /// diff --git a/Content.Server/Mind/Mind.cs b/Content.Server/Mind/Mind.cs index 61fb22b986..c689c9ddc1 100644 --- a/Content.Server/Mind/Mind.cs +++ b/Content.Server/Mind/Mind.cs @@ -72,8 +72,7 @@ namespace Content.Server.Mind /// The time of death for this Mind. /// Can be null - will be null if the Mind is not considered "dead". /// - [ViewVariables] - public TimeSpan? TimeOfDeath { get; set; } = null; + [ViewVariables] public TimeSpan? TimeOfDeath { get; set; } = null; /// /// The component currently owned by this mind. diff --git a/Content.Server/Nuke/NukeComponent.cs b/Content.Server/Nuke/NukeComponent.cs index 33761a9ad3..395b1fd177 100644 --- a/Content.Server/Nuke/NukeComponent.cs +++ b/Content.Server/Nuke/NukeComponent.cs @@ -13,7 +13,7 @@ namespace Content.Server.Nuke /// To activate it, user needs to insert an authorization disk and enter a secret code. /// [RegisterComponent] - [Access(typeof(NukeSystem))] + [Friend(typeof(NukeSystem))] public sealed class NukeComponent : SharedNukeComponent { /// diff --git a/Content.Server/Nutrition/Components/CigarComponent.cs b/Content.Server/Nutrition/Components/CigarComponent.cs index b839f97cd0..8deb4c9472 100644 --- a/Content.Server/Nutrition/Components/CigarComponent.cs +++ b/Content.Server/Nutrition/Components/CigarComponent.cs @@ -5,7 +5,7 @@ namespace Content.Server.Nutrition.Components /// /// A disposable, single-use smokable. /// - [RegisterComponent, Access(typeof(SmokingSystem))] + [RegisterComponent, Friend(typeof(SmokingSystem))] public sealed class CigarComponent : Component { } diff --git a/Content.Server/Nutrition/Components/DrinkComponent.cs b/Content.Server/Nutrition/Components/DrinkComponent.cs index 2816ed5fb0..68faf0fc8c 100644 --- a/Content.Server/Nutrition/Components/DrinkComponent.cs +++ b/Content.Server/Nutrition/Components/DrinkComponent.cs @@ -7,7 +7,7 @@ using System.Threading; namespace Content.Server.Nutrition.Components { [RegisterComponent] - [Access(typeof(DrinkSystem))] + [Friend(typeof(DrinkSystem))] public sealed class DrinkComponent : Component { [DataField("solution")] diff --git a/Content.Server/Nutrition/Components/FoodComponent.cs b/Content.Server/Nutrition/Components/FoodComponent.cs index fb81025094..096f4d0974 100644 --- a/Content.Server/Nutrition/Components/FoodComponent.cs +++ b/Content.Server/Nutrition/Components/FoodComponent.cs @@ -8,7 +8,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Nutrition.Components { - [RegisterComponent, Access(typeof(FoodSystem))] + [RegisterComponent, Friend(typeof(FoodSystem))] public sealed class FoodComponent : Component { [DataField("solution")] diff --git a/Content.Server/Nutrition/Components/ForcefeedOnCollideComponent.cs b/Content.Server/Nutrition/Components/ForcefeedOnCollideComponent.cs index e3dfaad884..1099fec450 100644 --- a/Content.Server/Nutrition/Components/ForcefeedOnCollideComponent.cs +++ b/Content.Server/Nutrition/Components/ForcefeedOnCollideComponent.cs @@ -5,7 +5,7 @@ namespace Content.Server.Nutrition.Components /// /// A food item with this component will be forcefully fed to anyone /// - [RegisterComponent, Access(typeof(ForcefeedOnCollideSystem))] + [RegisterComponent, Friend(typeof(ForcefeedOnCollideSystem))] public sealed class ForcefeedOnCollideComponent : Component { /// diff --git a/Content.Server/Nutrition/Components/IngestionBlockerComponent.cs b/Content.Server/Nutrition/Components/IngestionBlockerComponent.cs index 7b1d3c64a4..60613dfea2 100644 --- a/Content.Server/Nutrition/Components/IngestionBlockerComponent.cs +++ b/Content.Server/Nutrition/Components/IngestionBlockerComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Nutrition.EntitySystems; /// In the event that more head-wear & mask functionality is added (like identity systems, or raising/lowering of /// masks), then this component might become redundant. /// -[RegisterComponent, Access(typeof(FoodSystem), typeof(DrinkSystem))] +[RegisterComponent, Friend(typeof(FoodSystem), typeof(DrinkSystem))] public sealed class IngestionBlockerComponent : Component { /// diff --git a/Content.Server/Nutrition/Components/SliceableFoodComponent.cs b/Content.Server/Nutrition/Components/SliceableFoodComponent.cs index 37efd0cdbf..f1aeca0820 100644 --- a/Content.Server/Nutrition/Components/SliceableFoodComponent.cs +++ b/Content.Server/Nutrition/Components/SliceableFoodComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Sound; namespace Content.Server.Nutrition.Components { - [RegisterComponent, Access(typeof(SliceableFoodSystem))] + [RegisterComponent, Friend(typeof(SliceableFoodSystem))] internal sealed class SliceableFoodComponent : Component { [DataField("slice")] diff --git a/Content.Server/Nutrition/Components/SmokableComponent.cs b/Content.Server/Nutrition/Components/SmokableComponent.cs index 2db0579d8e..29b9a6f7c0 100644 --- a/Content.Server/Nutrition/Components/SmokableComponent.cs +++ b/Content.Server/Nutrition/Components/SmokableComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Smoking; namespace Content.Server.Nutrition.Components { - [RegisterComponent, Access(typeof(SmokingSystem))] + [RegisterComponent, Friend(typeof(SmokingSystem))] public sealed class SmokableComponent : Component { [DataField("solution")] diff --git a/Content.Server/Nutrition/Components/UtensilComponent.cs b/Content.Server/Nutrition/Components/UtensilComponent.cs index 139ed4d6b5..1a655f59d7 100644 --- a/Content.Server/Nutrition/Components/UtensilComponent.cs +++ b/Content.Server/Nutrition/Components/UtensilComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Sound; namespace Content.Server.Nutrition.Components { - [RegisterComponent, Access(typeof(UtensilSystem))] + [RegisterComponent, Friend(typeof(UtensilSystem))] public sealed class UtensilComponent : Component { [DataField("types")] diff --git a/Content.Server/Plants/Components/PottedPlantHideComponent.cs b/Content.Server/Plants/Components/PottedPlantHideComponent.cs index 0c31cdb534..b04d5a918b 100644 --- a/Content.Server/Plants/Components/PottedPlantHideComponent.cs +++ b/Content.Server/Plants/Components/PottedPlantHideComponent.cs @@ -9,7 +9,7 @@ namespace Content.Server.Plants.Components /// Gently rustle after each interaction with plant. /// [RegisterComponent] - [Access(typeof(PottedPlantHideSystem))] + [Friend(typeof(PottedPlantHideSystem))] public sealed class PottedPlantHideComponent : Component { [DataField("rustleSound")] diff --git a/Content.Server/Plants/Components/RandomPottedPlantComponent.cs b/Content.Server/Plants/Components/RandomPottedPlantComponent.cs index 6e753414a0..0dee0beef9 100644 --- a/Content.Server/Plants/Components/RandomPottedPlantComponent.cs +++ b/Content.Server/Plants/Components/RandomPottedPlantComponent.cs @@ -3,7 +3,7 @@ using Content.Server.Plants.Systems; namespace Content.Server.Plants.Components { [RegisterComponent] - [Access(typeof(RandomPottedPlantSystem))] + [Friend(typeof(RandomPottedPlantSystem))] public sealed class RandomPottedPlantComponent : Component { [ViewVariables(VVAccess.ReadOnly)] diff --git a/Content.Server/PneumaticCannon/PneumaticCannonComponent.cs b/Content.Server/PneumaticCannon/PneumaticCannonComponent.cs index 5ec8a7055c..dc14251c1d 100644 --- a/Content.Server/PneumaticCannon/PneumaticCannonComponent.cs +++ b/Content.Server/PneumaticCannon/PneumaticCannonComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.PneumaticCannon { // TODO: ideally, this and most of the actual firing code doesn't need to exist, and guns can be flexible enough // to handle shooting things that aren't ammo (just firing any entity) - [RegisterComponent, Access(typeof(PneumaticCannonSystem))] + [RegisterComponent, Friend(typeof(PneumaticCannonSystem))] public sealed class PneumaticCannonComponent : Component { [ViewVariables] diff --git a/Content.Server/Pointing/Components/RoguePointingArrowComponent.cs b/Content.Server/Pointing/Components/RoguePointingArrowComponent.cs index ad5e95b7de..27d6d5bb16 100644 --- a/Content.Server/Pointing/Components/RoguePointingArrowComponent.cs +++ b/Content.Server/Pointing/Components/RoguePointingArrowComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Pointing.Components; namespace Content.Server.Pointing.Components { [RegisterComponent] - [Access(typeof(RoguePointingSystem))] + [Friend(typeof(RoguePointingSystem))] public sealed class RoguePointingArrowComponent : SharedRoguePointingArrowComponent { [ViewVariables] diff --git a/Content.Server/Power/Components/ApcComponent.cs b/Content.Server/Power/Components/ApcComponent.cs index 32613c11a1..4fa30284f5 100644 --- a/Content.Server/Power/Components/ApcComponent.cs +++ b/Content.Server/Power/Components/ApcComponent.cs @@ -6,7 +6,7 @@ using Content.Shared.Sound; namespace Content.Server.Power.Components; [RegisterComponent] -[Access(typeof(ApcSystem))] +[Friend(typeof(ApcSystem))] public sealed class ApcComponent : BaseApcNetComponent { [DataField("onReceiveMessageSound")] diff --git a/Content.Server/Power/Components/CableComponent.cs b/Content.Server/Power/Components/CableComponent.cs index 08a0df8467..99d0564b79 100644 --- a/Content.Server/Power/Components/CableComponent.cs +++ b/Content.Server/Power/Components/CableComponent.cs @@ -9,7 +9,7 @@ namespace Content.Server.Power.Components /// Allows the attached entity to be destroyed by a cutting tool, dropping a piece of cable. /// [RegisterComponent] - [Access(typeof(CableSystem))] + [Friend(typeof(CableSystem))] public sealed class CableComponent : Component { [DataField("cableDroppedOnCutPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))] diff --git a/Content.Server/Power/Components/ExtensionCableProviderComponent.cs b/Content.Server/Power/Components/ExtensionCableProviderComponent.cs index efcca65503..fa99ad64ef 100644 --- a/Content.Server/Power/Components/ExtensionCableProviderComponent.cs +++ b/Content.Server/Power/Components/ExtensionCableProviderComponent.cs @@ -3,7 +3,7 @@ namespace Content.Server.Power.Components { [RegisterComponent] - [Access(typeof(ExtensionCableSystem))] + [Friend(typeof(ExtensionCableSystem))] public sealed class ExtensionCableProviderComponent : Component { /// diff --git a/Content.Server/Power/Components/ExtensionCableReceiverComponent.cs b/Content.Server/Power/Components/ExtensionCableReceiverComponent.cs index 835698f4c1..ee22946459 100644 --- a/Content.Server/Power/Components/ExtensionCableReceiverComponent.cs +++ b/Content.Server/Power/Components/ExtensionCableReceiverComponent.cs @@ -3,7 +3,7 @@ namespace Content.Server.Power.Components { [RegisterComponent] - [Access(typeof(ExtensionCableSystem))] + [Friend(typeof(ExtensionCableSystem))] public sealed class ExtensionCableReceiverComponent : Component { [ViewVariables] diff --git a/Content.Server/RandomAppearance/RandomAppearanceComponent.cs b/Content.Server/RandomAppearance/RandomAppearanceComponent.cs index aa7483275c..a09dc0c010 100644 --- a/Content.Server/RandomAppearance/RandomAppearanceComponent.cs +++ b/Content.Server/RandomAppearance/RandomAppearanceComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization; namespace Content.Server.RandomAppearance; [RegisterComponent] -[Access(typeof(RandomAppearanceSystem))] +[Friend(typeof(RandomAppearanceSystem))] public sealed class RandomAppearanceComponent : Component, ISerializationHooks { [DataField("spriteStates")] diff --git a/Content.Server/Recycling/Components/RecyclableComponent.cs b/Content.Server/Recycling/Components/RecyclableComponent.cs index baa3794423..2270357274 100644 --- a/Content.Server/Recycling/Components/RecyclableComponent.cs +++ b/Content.Server/Recycling/Components/RecyclableComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.Recycling.Components { - [RegisterComponent, Access(typeof(RecyclerSystem))] + [RegisterComponent, Friend(typeof(RecyclerSystem))] public sealed class RecyclableComponent : Component { /// diff --git a/Content.Server/Recycling/Components/RecyclerComponent.cs b/Content.Server/Recycling/Components/RecyclerComponent.cs index 455572e4ad..da389e513f 100644 --- a/Content.Server/Recycling/Components/RecyclerComponent.cs +++ b/Content.Server/Recycling/Components/RecyclerComponent.cs @@ -5,7 +5,7 @@ namespace Content.Server.Recycling.Components { // TODO: Add sound and safe beep [RegisterComponent] - [Access(typeof(RecyclerSystem))] + [Friend(typeof(RecyclerSystem))] public sealed class RecyclerComponent : Component { [Dependency] private readonly IEntityManager _entMan = default!; diff --git a/Content.Server/Remotes/DoorRemoteComponent.cs b/Content.Server/Remotes/DoorRemoteComponent.cs index 92187e2543..fa55add9ae 100644 --- a/Content.Server/Remotes/DoorRemoteComponent.cs +++ b/Content.Server/Remotes/DoorRemoteComponent.cs @@ -1,7 +1,7 @@ namespace Content.Server.Remotes { [RegisterComponent] - [Access(typeof(DoorRemoteSystem))] + [Friend(typeof(DoorRemoteSystem))] public sealed class DoorRemoteComponent : Component { public OperatingMode Mode = OperatingMode.OpenClose; diff --git a/Content.Server/Resist/ResistLockerComponent.cs b/Content.Server/Resist/ResistLockerComponent.cs index ec9e7f4e77..5e37717f17 100644 --- a/Content.Server/Resist/ResistLockerComponent.cs +++ b/Content.Server/Resist/ResistLockerComponent.cs @@ -3,7 +3,7 @@ using System.Threading; namespace Content.Server.Resist; [RegisterComponent] -[Access(typeof(ResistLockerSystem))] +[Friend(typeof(ResistLockerSystem))] public sealed class ResistLockerComponent : Component { /// diff --git a/Content.Server/Shuttles/Components/ThrusterComponent.cs b/Content.Server/Shuttles/Components/ThrusterComponent.cs index 7d972159a9..7526a50063 100644 --- a/Content.Server/Shuttles/Components/ThrusterComponent.cs +++ b/Content.Server/Shuttles/Components/ThrusterComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Damage; namespace Content.Server.Shuttles.Components { [RegisterComponent] - [Access(typeof(ThrusterSystem))] + [Friend(typeof(ThrusterSystem))] public sealed class ThrusterComponent : Component { /// diff --git a/Content.Server/Singularity/Components/RadiationCollectorComponent.cs b/Content.Server/Singularity/Components/RadiationCollectorComponent.cs index 5c4130058b..67f7f6db27 100644 --- a/Content.Server/Singularity/Components/RadiationCollectorComponent.cs +++ b/Content.Server/Singularity/Components/RadiationCollectorComponent.cs @@ -6,7 +6,7 @@ namespace Content.Server.Singularity.Components /// Generates electricity from radiation. /// [RegisterComponent] - [Access(typeof(RadiationCollectorSystem))] + [Friend(typeof(RadiationCollectorSystem))] public sealed class RadiationCollectorComponent : Component { /// diff --git a/Content.Server/Solar/Components/SolarPanelComponent.cs b/Content.Server/Solar/Components/SolarPanelComponent.cs index 78fe42b580..a69504912c 100644 --- a/Content.Server/Solar/Components/SolarPanelComponent.cs +++ b/Content.Server/Solar/Components/SolarPanelComponent.cs @@ -8,7 +8,7 @@ namespace Content.Server.Solar.Components /// It generates power from the sun based on coverage. /// [RegisterComponent] - [Access(typeof(PowerSolarSystem))] + [Friend(typeof(PowerSolarSystem))] public sealed class SolarPanelComponent : Component { /// diff --git a/Content.Server/Stack/StackComponent.cs b/Content.Server/Stack/StackComponent.cs index 049bc388c2..5abae1fcb4 100644 --- a/Content.Server/Stack/StackComponent.cs +++ b/Content.Server/Stack/StackComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Stacks; namespace Content.Server.Stack { // TODO: Naming and presentation and such could use some improvement. - [RegisterComponent, Access(typeof(StackSystem))] + [RegisterComponent, Friend(typeof(StackSystem))] [ComponentReference(typeof(SharedStackComponent))] public sealed class StackComponent : SharedStackComponent { diff --git a/Content.Server/Station/Components/BecomesStationComponent.cs b/Content.Server/Station/Components/BecomesStationComponent.cs index eb33ef4282..f4358dc417 100644 --- a/Content.Server/Station/Components/BecomesStationComponent.cs +++ b/Content.Server/Station/Components/BecomesStationComponent.cs @@ -6,7 +6,7 @@ namespace Content.Server.Station.Components; /// Added to grids saved in maps to designate that they are the 'main station' grid. /// [RegisterComponent] -[Access(typeof(GameTicker))] +[Friend(typeof(GameTicker))] public sealed class BecomesStationComponent : Component { /// diff --git a/Content.Server/Station/Components/PartOfStationComponent.cs b/Content.Server/Station/Components/PartOfStationComponent.cs index 69df581136..786f7f3d6c 100644 --- a/Content.Server/Station/Components/PartOfStationComponent.cs +++ b/Content.Server/Station/Components/PartOfStationComponent.cs @@ -6,7 +6,7 @@ namespace Content.Server.Station.Components; /// 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. /// -[RegisterComponent, Access(typeof(GameTicker)), Obsolete("Performs the exact same function as BecomesStationComponent.")] +[RegisterComponent, Friend(typeof(GameTicker)), Obsolete("Performs the exact same function as BecomesStationComponent.")] public sealed class PartOfStationComponent : Component { [DataField("id", required: true)] diff --git a/Content.Server/Station/Components/StationDataComponent.cs b/Content.Server/Station/Components/StationDataComponent.cs index d2b97373d4..cccceafe13 100644 --- a/Content.Server/Station/Components/StationDataComponent.cs +++ b/Content.Server/Station/Components/StationDataComponent.cs @@ -6,7 +6,7 @@ namespace Content.Server.Station.Components; /// Stores core information about a station, namely it's config and associated grids. /// All station entities will have this component. /// -[RegisterComponent, Access(typeof(StationSystem))] +[RegisterComponent, Friend(typeof(StationSystem))] public sealed class StationDataComponent : Component { /// diff --git a/Content.Server/Station/Components/StationJobsComponent.cs b/Content.Server/Station/Components/StationJobsComponent.cs index 42295fcca7..b73332783f 100644 --- a/Content.Server/Station/Components/StationJobsComponent.cs +++ b/Content.Server/Station/Components/StationJobsComponent.cs @@ -9,7 +9,7 @@ namespace Content.Server.Station.Components; /// /// Stores information about a station's job selection. /// -[RegisterComponent, Access(typeof(StationJobsSystem)), PublicAPI] +[RegisterComponent, Friend(typeof(StationJobsSystem)), PublicAPI] public sealed class StationJobsComponent : Component { /// diff --git a/Content.Server/Station/Components/StationMemberComponent.cs b/Content.Server/Station/Components/StationMemberComponent.cs index 684ec20530..d9258ec6cb 100644 --- a/Content.Server/Station/Components/StationMemberComponent.cs +++ b/Content.Server/Station/Components/StationMemberComponent.cs @@ -5,7 +5,7 @@ namespace Content.Server.Station.Components; /// /// Indicates that a grid is a member of the given station. /// -[RegisterComponent, Access(typeof(StationSystem))] +[RegisterComponent, Friend(typeof(StationSystem))] public sealed class StationMemberComponent : Component { /// diff --git a/Content.Server/Station/Components/StationSpawningComponent.cs b/Content.Server/Station/Components/StationSpawningComponent.cs index a26c9ee7b6..1ffb3e4cb2 100644 --- a/Content.Server/Station/Components/StationSpawningComponent.cs +++ b/Content.Server/Station/Components/StationSpawningComponent.cs @@ -5,7 +5,7 @@ namespace Content.Server.Station.Components; /// /// Controls spawning on the given station, tracking spawners present on it. /// -[RegisterComponent, Access(typeof(StationSpawningSystem))] +[RegisterComponent, Friend(typeof(StationSpawningSystem))] public sealed class StationSpawningComponent : Component { } diff --git a/Content.Server/Storage/Components/SecretStashComponent.cs b/Content.Server/Storage/Components/SecretStashComponent.cs index ca1a382c17..7848ae9c39 100644 --- a/Content.Server/Storage/Components/SecretStashComponent.cs +++ b/Content.Server/Storage/Components/SecretStashComponent.cs @@ -12,7 +12,7 @@ namespace Content.Server.Storage.Components /// Other classes like should implement it. /// [RegisterComponent] - [Access(typeof(SecretStashSystem))] + [Friend(typeof(SecretStashSystem))] public sealed class SecretStashComponent : Component { /// diff --git a/Content.Server/Storage/Components/StorageFillComponent.cs b/Content.Server/Storage/Components/StorageFillComponent.cs index c62868d5ee..5a15296a14 100644 --- a/Content.Server/Storage/Components/StorageFillComponent.cs +++ b/Content.Server/Storage/Components/StorageFillComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Storage; namespace Content.Server.Storage.Components { - [RegisterComponent, Access(typeof(StorageSystem))] + [RegisterComponent, Friend(typeof(StorageSystem))] public sealed class StorageFillComponent : Component { [DataField("contents")] public List Contents = new(); diff --git a/Content.Server/Strip/StrippableComponent.cs b/Content.Server/Strip/StrippableComponent.cs index 37aa03cba1..860dfc3c72 100644 --- a/Content.Server/Strip/StrippableComponent.cs +++ b/Content.Server/Strip/StrippableComponent.cs @@ -6,7 +6,7 @@ namespace Content.Server.Strip { [RegisterComponent] [ComponentReference(typeof(SharedStrippableComponent))] - [Access(typeof(StrippableSystem))] + [Friend(typeof(StrippableSystem))] public sealed class StrippableComponent : SharedStrippableComponent { [ViewVariables] diff --git a/Content.Server/Stunnable/Components/StunOnCollideComponent.cs b/Content.Server/Stunnable/Components/StunOnCollideComponent.cs index 3e63619d68..c12f9e269e 100644 --- a/Content.Server/Stunnable/Components/StunOnCollideComponent.cs +++ b/Content.Server/Stunnable/Components/StunOnCollideComponent.cs @@ -3,7 +3,7 @@ namespace Content.Server.Stunnable.Components /// /// Adds stun when it collides with an entity /// - [RegisterComponent, Access(typeof(StunOnCollideSystem))] + [RegisterComponent, Friend(typeof(StunOnCollideSystem))] public sealed class StunOnCollideComponent : Component { // TODO: Can probably predict this. diff --git a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs index 809806325a..d30ee31d0e 100644 --- a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs +++ b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Server.SurveillanceCamera; [RegisterComponent] -[Access(typeof(SurveillanceCameraSystem))] +[Friend(typeof(SurveillanceCameraSystem))] public sealed class SurveillanceCameraComponent : Component { // List of active viewers. This is for bookkeeping purposes, diff --git a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraMonitorComponent.cs b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraMonitorComponent.cs index 919a0860d0..3d4101bab2 100644 --- a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraMonitorComponent.cs +++ b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraMonitorComponent.cs @@ -1,7 +1,7 @@ namespace Content.Server.SurveillanceCamera; [RegisterComponent] -[Access(typeof(SurveillanceCameraMonitorSystem))] +[Friend(typeof(SurveillanceCameraMonitorSystem))] public sealed class SurveillanceCameraMonitorComponent : Component { // Currently active camera viewed by this monitor. diff --git a/Content.Server/Tabletop/Components/TabletopGameComponent.cs b/Content.Server/Tabletop/Components/TabletopGameComponent.cs index cd57e971c9..62db7db883 100644 --- a/Content.Server/Tabletop/Components/TabletopGameComponent.cs +++ b/Content.Server/Tabletop/Components/TabletopGameComponent.cs @@ -3,7 +3,7 @@ namespace Content.Server.Tabletop.Components /// /// A component that makes an object playable as a tabletop game. /// - [RegisterComponent, Access(typeof(TabletopSystem))] + [RegisterComponent, Friend(typeof(TabletopSystem))] public sealed class TabletopGameComponent : Component { [DataField("boardName")] diff --git a/Content.Server/Tabletop/Components/TabletopGamerComponent.cs b/Content.Server/Tabletop/Components/TabletopGamerComponent.cs index f051b65ac3..eb7523ccf9 100644 --- a/Content.Server/Tabletop/Components/TabletopGamerComponent.cs +++ b/Content.Server/Tabletop/Components/TabletopGamerComponent.cs @@ -3,7 +3,7 @@ namespace Content.Server.Tabletop.Components /// /// Component for marking an entity as currently playing a tabletop. /// - [RegisterComponent, Access(typeof(TabletopSystem))] + [RegisterComponent, Friend(typeof(TabletopSystem))] public sealed class TabletopGamerComponent : Component { [DataField("tabletop")] diff --git a/Content.Server/Tools/Components/WeldableComponent.cs b/Content.Server/Tools/Components/WeldableComponent.cs index b59f493e23..289a6f354f 100644 --- a/Content.Server/Tools/Components/WeldableComponent.cs +++ b/Content.Server/Tools/Components/WeldableComponent.cs @@ -9,7 +9,7 @@ namespace Content.Server.Tools.Components; /// Allows users to weld/unweld doors, crates and lockers. /// [RegisterComponent] -[Access(typeof(WeldableSystem))] +[Friend(typeof(WeldableSystem))] public sealed class WeldableComponent : SharedWeldableComponent { /// diff --git a/Content.Server/Wieldable/Components/IncreaseDamageOnWieldComponent.cs b/Content.Server/Wieldable/Components/IncreaseDamageOnWieldComponent.cs index 301893a29a..8cc42e1846 100644 --- a/Content.Server/Wieldable/Components/IncreaseDamageOnWieldComponent.cs +++ b/Content.Server/Wieldable/Components/IncreaseDamageOnWieldComponent.cs @@ -2,7 +2,7 @@ namespace Content.Server.Wieldable.Components { - [RegisterComponent, Access(typeof(WieldableSystem))] + [RegisterComponent, Friend(typeof(WieldableSystem))] public sealed class IncreaseDamageOnWieldComponent : Component { [DataField("modifiers", required: true)] diff --git a/Content.Server/Wieldable/Components/WieldableComponent.cs b/Content.Server/Wieldable/Components/WieldableComponent.cs index f7f96e9763..2d66ef85ea 100644 --- a/Content.Server/Wieldable/Components/WieldableComponent.cs +++ b/Content.Server/Wieldable/Components/WieldableComponent.cs @@ -5,7 +5,7 @@ namespace Content.Server.Wieldable.Components /// /// Used for objects that can be wielded in two or more hands, /// - [RegisterComponent, Access(typeof(WieldableSystem))] + [RegisterComponent, Friend(typeof(WieldableSystem))] public sealed class WieldableComponent : Component { [DataField("wieldSound")] diff --git a/Content.Shared/Access/Components/AccessComponent.cs b/Content.Shared/Access/Components/AccessComponent.cs index b063f9b40c..0b22075408 100644 --- a/Content.Shared/Access/Components/AccessComponent.cs +++ b/Content.Shared/Access/Components/AccessComponent.cs @@ -7,11 +7,10 @@ namespace Content.Shared.Access.Components /// Simple mutable access provider found on ID cards and such. /// [RegisterComponent] - [Access(typeof(AccessSystem))] + [Friend(typeof(AccessSystem))] public sealed class AccessComponent : Component { [DataField("tags", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - [Access(typeof(AccessSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public HashSet Tags = new(); [DataField("groups", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] diff --git a/Content.Shared/Access/Components/IdCardComponent.cs b/Content.Shared/Access/Components/IdCardComponent.cs index 27fbeed81d..c114e0dba4 100644 --- a/Content.Shared/Access/Components/IdCardComponent.cs +++ b/Content.Shared/Access/Components/IdCardComponent.cs @@ -6,15 +6,13 @@ namespace Content.Shared.Access.Components // TODO BUI NETWORKING if ever clients can open their own BUI's (id card console, pda), then this data should be // networked. [RegisterComponent] - [Access(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem))] + [Friend(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem))] public sealed class IdCardComponent : Component { [DataField("originalOwnerName")] public string OriginalOwnerName = default!; [DataField("fullName")] - [Access(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem), - Other = AccessPermissions.ReadWrite)] // FIXME Friends public string? FullName; [DataField("jobTitle")] diff --git a/Content.Shared/Actions/ActionsComponent.cs b/Content.Shared/Actions/ActionsComponent.cs index 350951b470..8c969228b2 100644 --- a/Content.Shared/Actions/ActionsComponent.cs +++ b/Content.Shared/Actions/ActionsComponent.cs @@ -6,11 +6,10 @@ namespace Content.Shared.Actions; [NetworkedComponent] [RegisterComponent] -[Access(typeof(SharedActionsSystem))] +[Friend(typeof(SharedActionsSystem))] public sealed class ActionsComponent : Component { [ViewVariables] - [Access(typeof(SharedActionsSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public SortedSet Actions = new(); } diff --git a/Content.Shared/Administration/AdminFrozenComponent.cs b/Content.Shared/Administration/AdminFrozenComponent.cs index 8a15971055..591e2a83d2 100644 --- a/Content.Shared/Administration/AdminFrozenComponent.cs +++ b/Content.Shared/Administration/AdminFrozenComponent.cs @@ -2,7 +2,7 @@ namespace Content.Shared.Administration; -[RegisterComponent, Access(typeof(AdminFrozenSystem))] +[RegisterComponent, Friend(typeof(AdminFrozenSystem))] [NetworkedComponent] public sealed class AdminFrozenComponent : Component { diff --git a/Content.Shared/CharacterAppearance/Components/HumanoidAppearanceComponent.cs b/Content.Shared/CharacterAppearance/Components/HumanoidAppearanceComponent.cs index 5cca464186..7545aab680 100644 --- a/Content.Shared/CharacterAppearance/Components/HumanoidAppearanceComponent.cs +++ b/Content.Shared/CharacterAppearance/Components/HumanoidAppearanceComponent.cs @@ -7,7 +7,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.CharacterAppearance.Components { [RegisterComponent] - [Access(typeof(SharedHumanoidAppearanceSystem), typeof(SharedMagicMirrorComponent))] + [Friend(typeof(SharedHumanoidAppearanceSystem), typeof(SharedMagicMirrorComponent))] [NetworkedComponent] public sealed class HumanoidAppearanceComponent : Component { diff --git a/Content.Shared/Chat/TypingIndicator/TypingIndicatorComponent.cs b/Content.Shared/Chat/TypingIndicator/TypingIndicatorComponent.cs index e8d370e0cf..9878628ef0 100644 --- a/Content.Shared/Chat/TypingIndicator/TypingIndicatorComponent.cs +++ b/Content.Shared/Chat/TypingIndicator/TypingIndicatorComponent.cs @@ -8,7 +8,7 @@ namespace Content.Shared.Chat.TypingIndicator; /// Added automatically when player poses entity. /// [RegisterComponent, NetworkedComponent] -[Access(typeof(SharedTypingIndicatorSystem))] +[Friend(typeof(SharedTypingIndicatorSystem))] public sealed class TypingIndicatorComponent : Component { /// diff --git a/Content.Shared/Clothing/ClothingSpeedModifierComponent.cs b/Content.Shared/Clothing/ClothingSpeedModifierComponent.cs index 25f6e6dc15..e3823553f2 100644 --- a/Content.Shared/Clothing/ClothingSpeedModifierComponent.cs +++ b/Content.Shared/Clothing/ClothingSpeedModifierComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Clothing; -[RegisterComponent, NetworkedComponent, Access(typeof(ClothingSpeedModifierSystem))] +[RegisterComponent, NetworkedComponent, Friend(typeof(ClothingSpeedModifierSystem))] public sealed class ClothingSpeedModifierComponent : Component { [DataField("walkModifier", required: true)] [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Shared/Clothing/Components/AttachedClothingComponent.cs b/Content.Shared/Clothing/Components/AttachedClothingComponent.cs index 6008ad5aa6..5843c2a29e 100644 --- a/Content.Shared/Clothing/Components/AttachedClothingComponent.cs +++ b/Content.Shared/Clothing/Components/AttachedClothingComponent.cs @@ -8,7 +8,7 @@ namespace Content.Shared.Clothing.Components; /// attached to, rather than being dumped on the floor or something like that. Intended for use with hardsuits and /// hardsuit helmets. /// -[Access(typeof(ToggleableClothingSystem))] +[Friend(typeof(ToggleableClothingSystem))] [RegisterComponent] public sealed class AttachedClothingComponent : Component { diff --git a/Content.Shared/Clothing/Components/ToggleableClothingComponent.cs b/Content.Shared/Clothing/Components/ToggleableClothingComponent.cs index 96536f7319..bce7ec94b9 100644 --- a/Content.Shared/Clothing/Components/ToggleableClothingComponent.cs +++ b/Content.Shared/Clothing/Components/ToggleableClothingComponent.cs @@ -11,7 +11,7 @@ namespace Content.Shared.Clothing.Components; /// This component gives an item an action that will equip or un-equip some clothing. Intended for use with /// hardsuits and hardsuit helmets. /// -[Access(typeof(ToggleableClothingSystem))] +[Friend(typeof(ToggleableClothingSystem))] [RegisterComponent] public sealed class ToggleableClothingComponent : Component { diff --git a/Content.Shared/Construction/Components/AnchorableComponent.cs b/Content.Shared/Construction/Components/AnchorableComponent.cs index dfffa6d62f..f7e6dbc90e 100644 --- a/Content.Shared/Construction/Components/AnchorableComponent.cs +++ b/Content.Shared/Construction/Components/AnchorableComponent.cs @@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Shared.Construction.Components { - [RegisterComponent, Access(typeof(SharedAnchorableSystem))] + [RegisterComponent, Friend(typeof(SharedAnchorableSystem))] public sealed class AnchorableComponent : Component { [DataField("tool", customTypeSerializer: typeof(PrototypeIdSerializer))] diff --git a/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs b/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs index e1a89c036a..c7f1ff0e2b 100644 --- a/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs +++ b/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs @@ -25,12 +25,12 @@ namespace Content.Shared.Construction.Steps public override bool EntityValid(EntityUid uid, IEntityManager entityManager) { - return entityManager.TryGetComponent(uid, out SharedStackComponent? stack) && stack.StackTypeId == MaterialPrototypeId && stack.Count >= Amount; + return entityManager.TryGetComponent(uid, out SharedStackComponent? stack) && stack.StackTypeId.Equals(MaterialPrototypeId) && stack.Count >= Amount; } public bool EntityValid(EntityUid entity, [NotNullWhen(true)] out SharedStackComponent? stack) { - if (IoCManager.Resolve().TryGetComponent(entity, out SharedStackComponent? otherStack) && otherStack.StackTypeId == MaterialPrototypeId && otherStack.Count >= Amount) + if (IoCManager.Resolve().TryGetComponent(entity, out SharedStackComponent? otherStack) && otherStack.StackTypeId.Equals(MaterialPrototypeId) && otherStack.Count >= Amount) stack = otherStack; else stack = null; diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs index 424d94a1ef..a8939b7c46 100644 --- a/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs +++ b/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs @@ -13,7 +13,7 @@ namespace Content.Shared.Containers.ItemSlots /// insert/eject interactions. /// [RegisterComponent] - [Access(typeof(ItemSlotsSystem))] + [Friend(typeof(ItemSlotsSystem))] public sealed class ItemSlotsComponent : Component { /// @@ -60,7 +60,7 @@ namespace Content.Shared.Containers.ItemSlots /// insert/eject sounds. /// [DataDefinition] - [Access(typeof(ItemSlotsSystem))] + [Friend(typeof(ItemSlotsSystem))] public sealed class ItemSlot { [DataField("whitelist")] @@ -86,7 +86,6 @@ namespace Content.Shared.Containers.ItemSlots /// of the currently held or currently inserted entity instead. /// [DataField("name", readOnly: true)] - [Access(typeof(ItemSlotsSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public string Name = string.Empty; /// @@ -98,7 +97,6 @@ namespace Content.Shared.Containers.ItemSlots /// when mapping. /// [DataField("startingItem", readOnly: true, customTypeSerializer: typeof(PrototypeIdSerializer))] - [Access(typeof(ItemSlotsSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public string? StartingItem; /// diff --git a/Content.Shared/Crayon/SharedCrayonComponent.cs b/Content.Shared/Crayon/SharedCrayonComponent.cs index 9a3891c5d5..3b8881b5c2 100644 --- a/Content.Shared/Crayon/SharedCrayonComponent.cs +++ b/Content.Shared/Crayon/SharedCrayonComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Crayon { - [NetworkedComponent, ComponentProtoName("Crayon"), Access(typeof(SharedCrayonSystem))] + [NetworkedComponent, ComponentProtoName("Crayon"), Friend(typeof(SharedCrayonSystem))] public abstract class SharedCrayonComponent : Component { public string SelectedState { get; set; } = string.Empty; diff --git a/Content.Shared/Damage/Components/DamageableComponent.cs b/Content.Shared/Damage/Components/DamageableComponent.cs index 610e8eaf2a..a0ee05628c 100644 --- a/Content.Shared/Damage/Components/DamageableComponent.cs +++ b/Content.Shared/Damage/Components/DamageableComponent.cs @@ -16,7 +16,7 @@ namespace Content.Shared.Damage /// [RegisterComponent] [NetworkedComponent()] - [Access(typeof(DamageableSystem))] + [Friend(typeof(DamageableSystem))] public sealed class DamageableComponent : Component { /// @@ -24,7 +24,6 @@ namespace Content.Shared.Damage /// If null, all damage types will be supported. /// [DataField("damageContainer", customTypeSerializer: typeof(PrototypeIdSerializer))] - [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public string? DamageContainerID; /// @@ -47,7 +46,6 @@ namespace Content.Shared.Damage /// [DataField("damage")] [ViewVariables(VVAccess.ReadWrite)] - [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public DamageSpecifier Damage = new(); /// @@ -62,9 +60,7 @@ namespace Content.Shared.Damage /// /// The sum of all damages in the DamageableComponent. /// - [ViewVariables] - [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends - public FixedPoint2 TotalDamage; + [ViewVariables] public FixedPoint2 TotalDamage; // Really these shouldn't be here. OnExplosion() and RadiationAct() should be handled elsewhere. [ViewVariables] diff --git a/Content.Shared/Decals/DecalGridComponent.cs b/Content.Shared/Decals/DecalGridComponent.cs index f053dc5750..7fa2aaecf1 100644 --- a/Content.Shared/Decals/DecalGridComponent.cs +++ b/Content.Shared/Decals/DecalGridComponent.cs @@ -1,7 +1,7 @@ namespace Content.Shared.Decals { [RegisterComponent] - [Access(typeof(SharedDecalSystem))] + [Friend(typeof(SharedDecalSystem))] public sealed class DecalGridComponent : Component { [DataField("chunkCollection", serverOnly: true)] diff --git a/Content.Shared/Electrocution/InsulatedComponent.cs b/Content.Shared/Electrocution/InsulatedComponent.cs index c83a4501b7..cb2eceb089 100644 --- a/Content.Shared/Electrocution/InsulatedComponent.cs +++ b/Content.Shared/Electrocution/InsulatedComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Electrocution { - [Access(typeof(SharedElectrocutionSystem))] + [Friend(typeof(SharedElectrocutionSystem))] [RegisterComponent, NetworkedComponent] public sealed class InsulatedComponent : Component { diff --git a/Content.Shared/Flash/SharedFlashableComponent.cs b/Content.Shared/Flash/SharedFlashableComponent.cs index 25b7c41394..b3617eb3bc 100644 --- a/Content.Shared/Flash/SharedFlashableComponent.cs +++ b/Content.Shared/Flash/SharedFlashableComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Flash { - [NetworkedComponent, Access(typeof(SharedFlashSystem))] + [NetworkedComponent, Friend(typeof(SharedFlashSystem))] public abstract class SharedFlashableComponent : Component { public float Duration { get; set; } diff --git a/Content.Shared/Foldable/FoldableComponent.cs b/Content.Shared/Foldable/FoldableComponent.cs index ec29db7d98..c83d742da1 100644 --- a/Content.Shared/Foldable/FoldableComponent.cs +++ b/Content.Shared/Foldable/FoldableComponent.cs @@ -11,7 +11,7 @@ namespace Content.Shared.Foldable; /// [RegisterComponent] [NetworkedComponent] -[Access(typeof(SharedFoldableSystem))] +[Friend(typeof(SharedFoldableSystem))] public sealed class FoldableComponent : Component { [DataField("folded")] diff --git a/Content.Shared/Follower/Components/FollowedComponent.cs b/Content.Shared/Follower/Components/FollowedComponent.cs index 63a71106bb..2495775f1a 100644 --- a/Content.Shared/Follower/Components/FollowedComponent.cs +++ b/Content.Shared/Follower/Components/FollowedComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared.Follower.Components; /// /// Attached to entities that are currently being followed by a ghost. /// -[RegisterComponent, Access(typeof(FollowerSystem))] +[RegisterComponent, Friend(typeof(FollowerSystem))] [NetworkedComponent] public sealed class FollowedComponent : Component { diff --git a/Content.Shared/Follower/Components/FollowerComponent.cs b/Content.Shared/Follower/Components/FollowerComponent.cs index 040bab4df1..a216ce9953 100644 --- a/Content.Shared/Follower/Components/FollowerComponent.cs +++ b/Content.Shared/Follower/Components/FollowerComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.GameStates; namespace Content.Shared.Follower.Components; [RegisterComponent] -[Access(typeof(FollowerSystem))] +[Friend(typeof(FollowerSystem))] [NetworkedComponent] public sealed class FollowerComponent : Component { diff --git a/Content.Shared/Friction/TileFrictionModifier.cs b/Content.Shared/Friction/TileFrictionModifier.cs index 72ba9a86ee..052773b709 100644 --- a/Content.Shared/Friction/TileFrictionModifier.cs +++ b/Content.Shared/Friction/TileFrictionModifier.cs @@ -1,7 +1,7 @@ namespace Content.Shared.Friction { [RegisterComponent] - [Access(typeof(SharedTileFrictionController))] + [Friend(typeof(SharedTileFrictionController))] public sealed class TileFrictionModifierComponent : Component { /// diff --git a/Content.Shared/Instruments/SharedInstrumentComponent.cs b/Content.Shared/Instruments/SharedInstrumentComponent.cs index 6c4435e759..a88b5d94af 100644 --- a/Content.Shared/Instruments/SharedInstrumentComponent.cs +++ b/Content.Shared/Instruments/SharedInstrumentComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Instruments; -[NetworkedComponent, Access(typeof(SharedInstrumentSystem))] +[NetworkedComponent, Friend(typeof(SharedInstrumentSystem))] public abstract class SharedInstrumentComponent : Component { [ViewVariables] @@ -26,7 +26,6 @@ public abstract class SharedInstrumentComponent : Component public bool RespectMidiLimits { get; set; } = true; [ViewVariables(VVAccess.ReadWrite)] - [Access(typeof(SharedInstrumentSystem), Other = AccessPermissions.ReadWrite)] // FIXME Friends public bool DirtyRenderer { get; set; } } diff --git a/Content.Shared/Jittering/JitteringComponent.cs b/Content.Shared/Jittering/JitteringComponent.cs index 58047c7fa3..8c8424dd9f 100644 --- a/Content.Shared/Jittering/JitteringComponent.cs +++ b/Content.Shared/Jittering/JitteringComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Jittering { - [Access(typeof(SharedJitteringSystem))] + [Friend(typeof(SharedJitteringSystem))] [RegisterComponent, NetworkedComponent] public sealed class JitteringComponent : Component { diff --git a/Content.Shared/Light/Component/RgbLightControllerComponent.cs b/Content.Shared/Light/Component/RgbLightControllerComponent.cs index cadcb1c0c9..bfcfba313b 100644 --- a/Content.Shared/Light/Component/RgbLightControllerComponent.cs +++ b/Content.Shared/Light/Component/RgbLightControllerComponent.cs @@ -12,7 +12,7 @@ namespace Content.Shared.Light.Component; /// [NetworkedComponent] [RegisterComponent] -[Access(typeof(SharedRgbLightControllerSystem))] +[Friend(typeof(SharedRgbLightControllerSystem))] public sealed class RgbLightControllerComponent : Robust.Shared.GameObjects.Component { [DataField("cycleRate")] diff --git a/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs b/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs index 0a43d1045a..5976c2a964 100644 --- a/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs +++ b/Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.GameStates; namespace Content.Shared.Movement.Components { [RegisterComponent] - [NetworkedComponent, Access(typeof(MovementSpeedModifierSystem))] + [NetworkedComponent, Friend(typeof(MovementSpeedModifierSystem))] public sealed class MovementSpeedModifierComponent : Component { public const float DefaultBaseWalkSpeed = 3.0f; diff --git a/Content.Shared/Nutrition/Components/CreamPieComponent.cs b/Content.Shared/Nutrition/Components/CreamPieComponent.cs index eb6a6581f6..41952868d0 100644 --- a/Content.Shared/Nutrition/Components/CreamPieComponent.cs +++ b/Content.Shared/Nutrition/Components/CreamPieComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Sound; namespace Content.Shared.Nutrition.Components { - [Access(typeof(SharedCreamPieSystem))] + [Friend(typeof(SharedCreamPieSystem))] [RegisterComponent] public sealed class CreamPieComponent : Component { diff --git a/Content.Shared/Nutrition/Components/CreamPiedComponent.cs b/Content.Shared/Nutrition/Components/CreamPiedComponent.cs index 3a07485f28..5086be612d 100644 --- a/Content.Shared/Nutrition/Components/CreamPiedComponent.cs +++ b/Content.Shared/Nutrition/Components/CreamPiedComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Nutrition.Components { - [Access(typeof(SharedCreamPieSystem))] + [Friend(typeof(SharedCreamPieSystem))] [RegisterComponent] public sealed class CreamPiedComponent : Component { diff --git a/Content.Shared/Pinpointer/PinpointerComponent.cs b/Content.Shared/Pinpointer/PinpointerComponent.cs index 238b35a053..01778fb8aa 100644 --- a/Content.Shared/Pinpointer/PinpointerComponent.cs +++ b/Content.Shared/Pinpointer/PinpointerComponent.cs @@ -8,7 +8,7 @@ namespace Content.Shared.Pinpointer /// [RegisterComponent] [NetworkedComponent] - [Access(typeof(SharedPinpointerSystem))] + [Friend(typeof(SharedPinpointerSystem))] public sealed class PinpointerComponent : Component { // TODO: Type serializer oh god diff --git a/Content.Shared/Placeable/PlaceableSurfaceComponent.cs b/Content.Shared/Placeable/PlaceableSurfaceComponent.cs index e946c41391..f4e64f240a 100644 --- a/Content.Shared/Placeable/PlaceableSurfaceComponent.cs +++ b/Content.Shared/Placeable/PlaceableSurfaceComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Placeable { [RegisterComponent, NetworkedComponent] - [Access(typeof(PlaceableSurfaceSystem))] + [Friend(typeof(PlaceableSurfaceSystem))] public sealed class PlaceableSurfaceComponent : Component { [ViewVariables] diff --git a/Content.Shared/Pulling/Components/PullableComponent.cs b/Content.Shared/Pulling/Components/PullableComponent.cs index b806e7fe33..7e9e4e0738 100644 --- a/Content.Shared/Pulling/Components/PullableComponent.cs +++ b/Content.Shared/Pulling/Components/PullableComponent.cs @@ -7,7 +7,7 @@ namespace Content.Shared.Pulling.Components { // Before you try to add another type than SharedPullingStateManagementSystem, consider the can of worms you may be opening! [NetworkedComponent()] - [Access(typeof(SharedPullingStateManagementSystem))] + [Friend(typeof(SharedPullingStateManagementSystem))] [RegisterComponent] public sealed class SharedPullableComponent : Component { @@ -26,7 +26,6 @@ namespace Content.Shared.Pulling.Components public bool BeingPulled => Puller != null; - [Access(typeof(SharedPullingStateManagementSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public EntityCoordinates? MovingTo { get; set; } public override ComponentState GetComponentState() diff --git a/Content.Shared/Pulling/Components/SharedPullerComponent.cs b/Content.Shared/Pulling/Components/SharedPullerComponent.cs index ec0a5260ca..8757ae93a5 100644 --- a/Content.Shared/Pulling/Components/SharedPullerComponent.cs +++ b/Content.Shared/Pulling/Components/SharedPullerComponent.cs @@ -1,7 +1,7 @@ namespace Content.Shared.Pulling.Components { [RegisterComponent] - [Access(typeof(SharedPullingStateManagementSystem))] + [Friend(typeof(SharedPullingStateManagementSystem))] public sealed class SharedPullerComponent : Component { // Before changing how this is updated, please see SharedPullerSystem.RefreshMovementSpeed diff --git a/Content.Shared/Stacks/SharedStackComponent.cs b/Content.Shared/Stacks/SharedStackComponent.cs index 06bbfdcedb..b8d7f3d717 100644 --- a/Content.Shared/Stacks/SharedStackComponent.cs +++ b/Content.Shared/Stacks/SharedStackComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Shared.Stacks { - [NetworkedComponent, Access(typeof(SharedStackSystem))] + [NetworkedComponent, Friend(typeof(SharedStackSystem))] public abstract class SharedStackComponent : Component, ISerializationHooks { [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Shared/Standing/StandingStateComponent.cs b/Content.Shared/Standing/StandingStateComponent.cs index 29bb951879..10512de14d 100644 --- a/Content.Shared/Standing/StandingStateComponent.cs +++ b/Content.Shared/Standing/StandingStateComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.GameStates; namespace Content.Shared.Standing { - [Access(typeof(StandingStateSystem))] + [Friend(typeof(StandingStateSystem))] [RegisterComponent, NetworkedComponent] public sealed class StandingStateComponent : Component { diff --git a/Content.Shared/StatusEffect/StatusEffectsComponent.cs b/Content.Shared/StatusEffect/StatusEffectsComponent.cs index e412a41d76..02f1aa9c09 100644 --- a/Content.Shared/StatusEffect/StatusEffectsComponent.cs +++ b/Content.Shared/StatusEffect/StatusEffectsComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared.StatusEffect { [RegisterComponent] [NetworkedComponent] - [Access(typeof(StatusEffectsSystem))] + [Friend(typeof(StatusEffectsSystem))] public sealed class StatusEffectsComponent : Component { [ViewVariables] diff --git a/Content.Shared/StepTrigger/StepTriggerComponent.cs b/Content.Shared/StepTrigger/StepTriggerComponent.cs index 5a8b5a245a..76f16b48a7 100644 --- a/Content.Shared/StepTrigger/StepTriggerComponent.cs +++ b/Content.Shared/StepTrigger/StepTriggerComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared.StepTrigger; [RegisterComponent] [NetworkedComponent] -[Access(typeof(StepTriggerSystem))] +[Friend(typeof(StepTriggerSystem))] public sealed class StepTriggerComponent : Component { /// @@ -41,7 +41,7 @@ public sealed class StepTriggerComponent : Component } [RegisterComponent] -[Access(typeof(StepTriggerSystem))] +[Friend(typeof(StepTriggerSystem))] public sealed class StepTriggerActiveComponent : Component { diff --git a/Content.Shared/Storage/Components/ItemCounterComponent.cs b/Content.Shared/Storage/Components/ItemCounterComponent.cs index 3adec11cf9..2123bea9d3 100644 --- a/Content.Shared/Storage/Components/ItemCounterComponent.cs +++ b/Content.Shared/Storage/Components/ItemCounterComponent.cs @@ -16,7 +16,7 @@ namespace Content.Shared.Storage.Components /// tags: [Cigarette] /// [RegisterComponent] - [Access(typeof(SharedItemCounterSystem))] + [Friend(typeof(SharedItemCounterSystem))] public sealed class ItemCounterComponent : Component { [DataField("count", required: true)] diff --git a/Content.Shared/Storage/Components/ItemMapperComponent.cs b/Content.Shared/Storage/Components/ItemMapperComponent.cs index 624db7f3b1..c293802f58 100644 --- a/Content.Shared/Storage/Components/ItemMapperComponent.cs +++ b/Content.Shared/Storage/Components/ItemMapperComponent.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization; namespace Content.Shared.Storage.Components { [RegisterComponent] - [Access(typeof(SharedItemMapperSystem))] + [Friend(typeof(SharedItemMapperSystem))] public sealed class ItemMapperComponent : Component, ISerializationHooks { [DataField("mapLayers")] public readonly Dictionary MapLayers = new(); diff --git a/Content.Shared/Stunnable/KnockedDownComponent.cs b/Content.Shared/Stunnable/KnockedDownComponent.cs index d7e361f6e1..81899e122d 100644 --- a/Content.Shared/Stunnable/KnockedDownComponent.cs +++ b/Content.Shared/Stunnable/KnockedDownComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared.Stunnable { [RegisterComponent] [NetworkedComponent] - [Access(typeof(SharedStunSystem))] + [Friend(typeof(SharedStunSystem))] public sealed class KnockedDownComponent : Component { [DataField("helpInterval")] diff --git a/Content.Shared/Stunnable/SlowedDownComponent.cs b/Content.Shared/Stunnable/SlowedDownComponent.cs index f91b9567f6..4106814577 100644 --- a/Content.Shared/Stunnable/SlowedDownComponent.cs +++ b/Content.Shared/Stunnable/SlowedDownComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared.Stunnable { [RegisterComponent] [NetworkedComponent] - [Access(typeof(SharedStunSystem))] + [Friend(typeof(SharedStunSystem))] public sealed class SlowedDownComponent : Component { public float SprintSpeedModifier { get; set; } = 0.5f; diff --git a/Content.Shared/Stunnable/StunnedComponent.cs b/Content.Shared/Stunnable/StunnedComponent.cs index 8b36e11f42..a03e4df1da 100644 --- a/Content.Shared/Stunnable/StunnedComponent.cs +++ b/Content.Shared/Stunnable/StunnedComponent.cs @@ -2,7 +2,7 @@ using Robust.Shared.GameStates; namespace Content.Shared.Stunnable { - [Access(typeof(SharedStunSystem))] + [Friend(typeof(SharedStunSystem))] [RegisterComponent, NetworkedComponent] public sealed class StunnedComponent : Component { diff --git a/Content.Shared/SubFloor/SubFloorHideComponent.cs b/Content.Shared/SubFloor/SubFloorHideComponent.cs index 585c998a98..5da08fd52f 100644 --- a/Content.Shared/SubFloor/SubFloorHideComponent.cs +++ b/Content.Shared/SubFloor/SubFloorHideComponent.cs @@ -10,7 +10,7 @@ namespace Content.Shared.SubFloor /// [NetworkedComponent] [RegisterComponent] - [Access(typeof(SharedSubFloorHideSystem))] + [Friend(typeof(SharedSubFloorHideSystem))] public sealed class SubFloorHideComponent : Component { /// @@ -47,7 +47,6 @@ namespace Content.Shared.SubFloor /// The entities this subfloor is revealed by. /// [ViewVariables] - [Access(typeof(SharedSubFloorHideSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public HashSet RevealedBy { get; set; } = new(); } } diff --git a/Content.Shared/Tag/TagComponent.cs b/Content.Shared/Tag/TagComponent.cs index fc303c0039..4bd10b2a25 100644 --- a/Content.Shared/Tag/TagComponent.cs +++ b/Content.Shared/Tag/TagComponent.cs @@ -3,12 +3,11 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Shared.Tag { - [RegisterComponent, Access(typeof(TagSystem))] + [RegisterComponent, Friend(typeof(TagSystem))] public sealed class TagComponent : Component, ISerializationHooks { [ViewVariables] [DataField("tags", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - [Access(typeof(TagSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public readonly HashSet Tags = new(); } } diff --git a/RobustToolbox b/RobustToolbox index 7f0feef97c..4ab43cc923 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 7f0feef97c19b5d520a4dbe2cc19b507df27603a +Subproject commit 4ab43cc923efe313d85d1aeadb16bfb7616d84d1