From a323ba822394d3f619d59b6762300bdc9f996e26 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Tue, 7 Jun 2022 15:26:28 +0200 Subject: [PATCH] Revert "Revert "Fix some friend access violations by allowing others access. (#8594) (#8703)" (working this time) (#8704) --- 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/Jobs/AddComponentSpecial.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 +- Content.Server/Payload/EntitySystems/PayloadSystem.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 +- 164 files changed, 199 insertions(+), 171 deletions(-) diff --git a/Content.Client/DoAfter/DoAfterComponent.cs b/Content.Client/DoAfter/DoAfterComponent.cs index b7da92698e..6123b0729a 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, Friend(typeof(DoAfterSystem))] + [RegisterComponent, Access(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 e185c7948e..888b8ec004 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, Friend(typeof(TriggerSystem))] +[RegisterComponent, Access(typeof(TriggerSystem))] public sealed class TriggerOnProximityComponent : SharedTriggerOnProximityComponent {} diff --git a/Content.Client/Flash/FlashableComponent.cs b/Content.Client/Flash/FlashableComponent.cs index e843daff23..714d2d7c1c 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, Friend(typeof(FlashSystem))] + [RegisterComponent, Access(typeof(FlashSystem))] public sealed class FlashableComponent : SharedFlashableComponent { } diff --git a/Content.Client/Hands/HandsComponent.cs b/Content.Client/Hands/HandsComponent.cs index 36a15f1440..1e0b923046 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))] - [Friend(typeof(HandsSystem))] + [Access(typeof(HandsSystem))] public sealed class HandsComponent : SharedHandsComponent { /// diff --git a/Content.Client/Inventory/ClientInventoryComponent.cs b/Content.Client/Inventory/ClientInventoryComponent.cs index 62cb66cced..ef10eaf468 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))] - [Friend(typeof(ClientInventorySystem))] + [Access(typeof(ClientInventorySystem))] public sealed class ClientInventoryComponent : InventoryComponent { public Control BottomLeftButtons = default!; @@ -34,6 +34,7 @@ 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 c6bccac941..0a5f43ea93 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] - [Friend(typeof(HandheldLightSystem))] + [Access(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 dd06d52969..730c333693 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] -[Friend(typeof(ClimbSystem))] +[Access(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 7891a6ee21..e68592bd77 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] -[Friend(typeof(ClimbSystem))] +[Access(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 9f0b8e803e..8bf098de64 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, Friend(typeof(StackSystem), typeof(StatusControl))] + [RegisterComponent, Access(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 29e969ee00..a42d67c08f 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, Friend(typeof(ToolSystem), typeof(StatusControl))] + [RegisterComponent, Access(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 743d23f418..8f8ac3e0cc 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, Friend(typeof(GunSystem))] +[RegisterComponent, Access(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 e14263cf88..6e16f40fa3 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, Friend(typeof(GunSystem))] +[RegisterComponent, Access(typeof(GunSystem))] public sealed class SpentAmmoVisualsComponent : Component { /// diff --git a/Content.Server/AI/Pathfinding/GridPathfindingComponent.cs b/Content.Server/AI/Pathfinding/GridPathfindingComponent.cs index a78841abf3..4366378b93 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] -[Friend(typeof(PathfindingSystem))] +[Access(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 57edce5480..1bdefe021d 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, Friend(typeof(BufferingSystem))] +[RegisterComponent, Access(typeof(BufferingSystem))] public sealed class BufferingComponent : Component { [DataField("minBufferTime")] diff --git a/Content.Server/Advertise/AdvertiseComponent.cs b/Content.Server/Advertise/AdvertiseComponent.cs index 9620ce59d7..0b49040bdf 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, Friend(typeof(AdvertiseSystem))] + [RegisterComponent, Access(typeof(AdvertiseSystem))] public sealed class AdvertiseComponent : Component { /// diff --git a/Content.Server/Animals/Components/UdderComponent.cs b/Content.Server/Animals/Components/UdderComponent.cs index 71a465abdb..f47b9a855c 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, Friend(typeof(UdderSystem))] + [RegisterComponent, Access(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 6e58a1685e..4b72168dc2 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] - [Friend(typeof(GasMixerSystem))] + [Access(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 74f19758a9..9841b0df14 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] - [Friend(typeof(GasOutletInjectorSystem))] + [Access(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 64f0067527..46b9a75d83 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] - [Friend(typeof(GasVentScrubberSystem))] + [Access(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 3e87973df9..17e09570d7 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. /// - [Friend(typeof(AtmosphereSystem))] + [Access(typeof(AtmosphereSystem))] public sealed class TileAtmosphere : IGasMixtureHolder { [ViewVariables] @@ -48,7 +48,7 @@ namespace Content.Server.Atmos [ViewVariables] public AtmosDirection AdjacentBits = AtmosDirection.Invalid; - [ViewVariables] + [ViewVariables, Access(typeof(AtmosphereSystem), Other = AccessPermissions.ReadExecute)] public MonstermosInfo MonstermosInfo; [ViewVariables] @@ -78,6 +78,7 @@ 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 45a65fe4e4..b5adfa3a42 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, Friend(typeof(BloodstreamSystem))] + [RegisterComponent, Access(typeof(BloodstreamSystem))] public sealed class BloodstreamComponent : Component { public static string DefaultChemicalsSolutionName = "chemicals"; @@ -129,6 +129,7 @@ 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 93909607c8..44167118c3 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, Friend(typeof(BrainSystem))] + [RegisterComponent, Access(typeof(BrainSystem))] public sealed class BrainComponent : Component { } diff --git a/Content.Server/Body/Components/LungComponent.cs b/Content.Server/Body/Components/LungComponent.cs index 7bd647d0d8..0ed4ce0dae 100644 --- a/Content.Server/Body/Components/LungComponent.cs +++ b/Content.Server/Body/Components/LungComponent.cs @@ -5,10 +5,11 @@ using Content.Shared.Chemistry.Components; namespace Content.Server.Body.Components; -[RegisterComponent, Friend(typeof(LungSystem))] +[RegisterComponent, Access(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, @@ -16,5 +17,6 @@ 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 c33b6ab941..bc1355fc7e 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, Friend(typeof(MetabolizerSystem))] + [RegisterComponent, Access(typeof(MetabolizerSystem))] public sealed class MetabolizerComponent : Component { public float AccumulatedFrametime = 0.0f; @@ -40,6 +40,7 @@ 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 1daef6c536..52ae4e9414 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, Friend(typeof(RespiratorSystem))] + [RegisterComponent, Access(typeof(RespiratorSystem))] public sealed class RespiratorComponent : Component { /// diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index 4528ac51fa..c6ef9f6504 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, Friend(typeof(StomachSystem))] + [RegisterComponent, Access(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 09d870fba2..15d11f3830 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] -[Friend(typeof(ThermalRegulatorSystem))] +[Access(typeof(ThermalRegulatorSystem))] public sealed class ThermalRegulatorComponent : Component { /// diff --git a/Content.Server/Botany/Components/LogComponent.cs b/Content.Server/Botany/Components/LogComponent.cs index 621b72cbc5..f72638a74a 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] -[Friend(typeof(LogSystem))] +[Access(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 c81c7d1046..4a87c09f50 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] -[Friend(typeof(BotanySystem))] +[Access(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 d61b828907..535c916803 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, Friend(typeof(BotanySystem))] + [RegisterComponent, Access(typeof(BotanySystem))] public sealed class SeedComponent : Component { /// diff --git a/Content.Server/Botany/Components/SeedExtractorComponent.cs b/Content.Server/Botany/Components/SeedExtractorComponent.cs index 6b0488e7a3..803da611aa 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] -[Friend(typeof(SeedExtractorSystem))] +[Access(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 72297fc060..510a81bb18 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] -[Friend(typeof(BotanySystem), typeof(PlantHolderSystem), typeof(SeedExtractorSystem), typeof(PlantHolderComponent))] +[Access(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 4c0bd6f468..00a6e4c5c3 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, Friend(typeof(CargoSystem))] + [RegisterComponent, Access(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 bd44fb3d2d..bc4eb9612b 100644 --- a/Content.Server/Chemistry/Components/SolutionManager/SolutionContainerManagerComponent.cs +++ b/Content.Server/Chemistry/Components/SolutionManager/SolutionContainerManagerComponent.cs @@ -4,11 +4,12 @@ using Content.Shared.Chemistry.Components; namespace Content.Server.Chemistry.Components.SolutionManager { [RegisterComponent] - [Friend(typeof(SolutionContainerSystem))] + [Access(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 74deb1a054..5eab1b9672 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))] -[Friend(typeof(ClimbSystem))] +[Access(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 31fa30683f..e42b057e4c 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, Friend(typeof(ClimbSystem))] +[RegisterComponent, Access(typeof(ClimbSystem))] public sealed class GlassTableComponent : Component { /// diff --git a/Content.Server/Construction/Components/ConstructionComponent.cs b/Content.Server/Construction/Components/ConstructionComponent.cs index 3177eb169e..6274128423 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, Friend(typeof(ConstructionSystem))] + [RegisterComponent, Access(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 657dc1f529..1437c0e5a6 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] - [Friend(typeof(ConveyorSystem))] + [Access(typeof(ConveyorSystem))] public sealed class ConveyorComponent : Component { /// diff --git a/Content.Server/Damage/Components/DamageOtherOnHitComponent.cs b/Content.Server/Damage/Components/DamageOtherOnHitComponent.cs index 0ec5945929..55b4b5f2b1 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 { - [Friend(typeof(DamageOtherOnHitSystem))] + [Access(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 afa6a65dd6..4a195cf451 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] - [Friend(typeof(ApcNetworkSystem))] + [Access(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 f283b496d1..2f00eccdcd 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] - [Friend(typeof(DeviceNetworkSystem), typeof(DeviceNet))] + [Access(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 5b7d9a850b..eed039432f 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] - [Friend(typeof(ApcNetSwitchSystem))] + [Access(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 29755530d7..38639f5e2c 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, Friend(typeof(DiceSystem))] + [RegisterComponent, Access(typeof(DiceSystem))] public sealed class DiceComponent : Component { [ViewVariables] diff --git a/Content.Server/DoAfter/DoAfterComponent.cs b/Content.Server/DoAfter/DoAfterComponent.cs index 75d085b0a6..adf5e382a9 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, Friend(typeof(DoAfterSystem))] + [RegisterComponent, Access(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 10161b5c4e..7509f83b12 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] - [Friend(typeof(ElectrocutionSystem))] + [Access(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 1163a58c90..9767f705ba 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, Friend(typeof(ClusterGrenadeSystem))] + [RegisterComponent, Access(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 1a3f700eab..908b3126e0 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] -[Friend(typeof(ExplosionSystem))] +[Access(typeof(ExplosionSystem))] public sealed class ExplosionResistanceComponent : Component { /// diff --git a/Content.Server/Extinguisher/FireExtinguisherComponent.cs b/Content.Server/Extinguisher/FireExtinguisherComponent.cs index 46793a5c12..92008638bd 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] -[Friend(typeof(FireExtinguisherSystem))] +[Access(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 a3978aadcc..378b675ad3 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, Friend(typeof(FlashSystem))] + [RegisterComponent, Access(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 3aee0c2eb4..fe8fab2803 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, Friend(typeof(FlashSystem))] + [RegisterComponent, Access(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 bc7b23175b..65f32a10f6 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, Friend(typeof(FlashSystem))] + [RegisterComponent, Access(typeof(FlashSystem))] public sealed class FlashableComponent : SharedFlashableComponent { } diff --git a/Content.Server/Fluids/Components/AbsorbentComponent.cs b/Content.Server/Fluids/Components/AbsorbentComponent.cs index 1d285a6ee8..6b6bbc51b9 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, Friend(typeof(MoppingSystem))] +[RegisterComponent, Access(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 89f4e13d60..eaa3a1ad88 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] - [Friend(typeof(EvaporationSystem))] + [Access(typeof(EvaporationSystem))] public sealed class EvaporationComponent : Component { /// diff --git a/Content.Server/Fluids/Components/FluidSpreaderComponent.cs b/Content.Server/Fluids/Components/FluidSpreaderComponent.cs index 27ee2c4a5e..1f7eff84d1 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] -[Friend(typeof(FluidSpreaderSystem))] +[Access(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 b3485c54e8..ff387225f3 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] - [Friend(typeof(PuddleSystem))] + [Access(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 2f7920700d..80b0ba913c 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] -[Friend(typeof(SpraySystem))] +[Access(typeof(SpraySystem))] public sealed class SprayComponent : Component { public const string SolutionName = "spray"; @@ -32,5 +32,6 @@ 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 71f93149c6..5215bd68b1 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] -[Friend(typeof(GatherableSystem))] +[Access(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 f8c21047a2..5eed3339b2 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 { - [Friend(typeof(GhostRoleSystem))] + [Access(typeof(GhostRoleSystem))] public abstract class GhostRoleComponent : Component { [DataField("name")] public string _roleName = "Unknown"; @@ -21,6 +21,7 @@ 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; @@ -32,6 +33,7 @@ namespace Content.Server.Ghost.Roles.Components } [ViewVariables(VVAccess.ReadWrite)] + [Access(typeof(GhostRoleSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public string RoleDescription { get => _roleDescription; @@ -43,6 +45,7 @@ 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 fef3c3cc95..64c4373c59 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] - [Friend(typeof(GravityGeneratorSystem))] + [Access(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 c1eb417ed2..1f3dcb512b 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, Friend(typeof(HealthExaminableSystem))] +[RegisterComponent, Access(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 482d9a11b9..c543570392 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, Friend(typeof(InteractionPopupSystem))] +[RegisterComponent, Access(typeof(InteractionPopupSystem))] public sealed class InteractionPopupComponent : Component { /// diff --git a/Content.Server/Jobs/AddComponentSpecial.cs b/Content.Server/Jobs/AddComponentSpecial.cs index 627b900087..ccfb00648c 100644 --- a/Content.Server/Jobs/AddComponentSpecial.cs +++ b/Content.Server/Jobs/AddComponentSpecial.cs @@ -26,7 +26,7 @@ namespace Content.Server.Jobs var component = (Component) factory.GetComponent(name); component.Owner = mob; - var copied = (Component?) serializationManager.Copy(data, component, null); + var copied = (Component?) serializationManager.Copy(data.Component, component, null); if (copied != null) entityManager.AddComponent(mob, copied); } diff --git a/Content.Server/Kitchen/Components/ExtractableComponent.cs b/Content.Server/Kitchen/Components/ExtractableComponent.cs index 686f1f7e82..e34257a1f0 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] - [Friend(typeof(ReagentGrinderSystem))] + [Access(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 3ed4e1d025..692bde32be 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, Friend(typeof(KitchenSpikeSystem))] + [RegisterComponent, Access(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 616b02ba73..88c9ba8060 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, Friend(typeof(SpreaderSystem))] +[RegisterComponent, Access(typeof(SpreaderSystem))] public sealed class SpreaderComponent : Component { /// diff --git a/Content.Server/Light/Components/EmergencyLightComponent.cs b/Content.Server/Light/Components/EmergencyLightComponent.cs index 094b510be0..bc43c83196 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, Friend(typeof(EmergencyLightSystem))] + [RegisterComponent, Access(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 b7ab7ad194..0c347227c3 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] - [Friend(typeof(HandheldLightSystem))] + [Access(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 3008d68c61..6a72807f75 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, Friend(typeof(LightBulbSystem))] + [RegisterComponent, Access(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 fdea092d35..d456f705c9 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, Friend(typeof(PoweredLightSystem))] + [RegisterComponent, Access(typeof(PoweredLightSystem))] public sealed class LitOnPoweredComponent : Component { } diff --git a/Content.Server/Light/Components/MatchstickComponent.cs b/Content.Server/Light/Components/MatchstickComponent.cs index f996df13c3..269c3ee8e9 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] - [Friend(typeof(MatchstickSystem))] + [Access(typeof(MatchstickSystem))] public sealed class MatchstickComponent : Component { /// diff --git a/Content.Server/Light/Components/PoweredLightComponent.cs b/Content.Server/Light/Components/PoweredLightComponent.cs index 451887d796..0a7165319f 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, Friend(typeof(PoweredLightSystem))] + [RegisterComponent, Access(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 a690833375..0c9b8d0e92 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] - [Friend(typeof(SignalLinkerSystem))] + [Access(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 17a8878c84..b87564b6c1 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] - [Friend(typeof(SignalLinkerSystem))] + [Access(typeof(SignalLinkerSystem))] public sealed class SignalTransmitterComponent : Component { /// @@ -32,6 +32,7 @@ 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 269e05bea5..2ef369bf10 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] - [Friend(typeof(CrewMonitoringConsoleSystem))] + [Access(typeof(CrewMonitoringConsoleSystem))] public sealed class CrewMonitoringConsoleComponent : Component { /// diff --git a/Content.Server/Medical/SuitSensors/SuitSensorComponent.cs b/Content.Server/Medical/SuitSensors/SuitSensorComponent.cs index d957c7a000..c1a35b77d5 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] - [Friend(typeof(SuitSensorSystem))] + [Access(typeof(SuitSensorSystem))] public sealed class SuitSensorComponent : Component { /// diff --git a/Content.Server/Mind/Components/MindComponent.cs b/Content.Server/Mind/Components/MindComponent.cs index 513a5003dc..325e92123c 100644 --- a/Content.Server/Mind/Components/MindComponent.cs +++ b/Content.Server/Mind/Components/MindComponent.cs @@ -3,13 +3,14 @@ namespace Content.Server.Mind.Components /// /// Stores a on a mob. /// - [RegisterComponent, Friend(typeof(MindSystem))] + [RegisterComponent, Access(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 c689c9ddc1..61fb22b986 100644 --- a/Content.Server/Mind/Mind.cs +++ b/Content.Server/Mind/Mind.cs @@ -72,7 +72,8 @@ 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 395b1fd177..33761a9ad3 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] - [Friend(typeof(NukeSystem))] + [Access(typeof(NukeSystem))] public sealed class NukeComponent : SharedNukeComponent { /// diff --git a/Content.Server/Nutrition/Components/CigarComponent.cs b/Content.Server/Nutrition/Components/CigarComponent.cs index 8deb4c9472..b839f97cd0 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, Friend(typeof(SmokingSystem))] + [RegisterComponent, Access(typeof(SmokingSystem))] public sealed class CigarComponent : Component { } diff --git a/Content.Server/Nutrition/Components/DrinkComponent.cs b/Content.Server/Nutrition/Components/DrinkComponent.cs index 68faf0fc8c..2816ed5fb0 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] - [Friend(typeof(DrinkSystem))] + [Access(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 096f4d0974..fb81025094 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, Friend(typeof(FoodSystem))] + [RegisterComponent, Access(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 1099fec450..e3dfaad884 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, Friend(typeof(ForcefeedOnCollideSystem))] + [RegisterComponent, Access(typeof(ForcefeedOnCollideSystem))] public sealed class ForcefeedOnCollideComponent : Component { /// diff --git a/Content.Server/Nutrition/Components/IngestionBlockerComponent.cs b/Content.Server/Nutrition/Components/IngestionBlockerComponent.cs index 60613dfea2..7b1d3c64a4 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, Friend(typeof(FoodSystem), typeof(DrinkSystem))] +[RegisterComponent, Access(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 f1aeca0820..37efd0cdbf 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, Friend(typeof(SliceableFoodSystem))] + [RegisterComponent, Access(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 29b9a6f7c0..2db0579d8e 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, Friend(typeof(SmokingSystem))] + [RegisterComponent, Access(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 1a655f59d7..139ed4d6b5 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, Friend(typeof(UtensilSystem))] + [RegisterComponent, Access(typeof(UtensilSystem))] public sealed class UtensilComponent : Component { [DataField("types")] diff --git a/Content.Server/Payload/EntitySystems/PayloadSystem.cs b/Content.Server/Payload/EntitySystems/PayloadSystem.cs index 3b92dc8e18..d11747394d 100644 --- a/Content.Server/Payload/EntitySystems/PayloadSystem.cs +++ b/Content.Server/Payload/EntitySystems/PayloadSystem.cs @@ -98,7 +98,7 @@ public sealed class PayloadSystem : EntitySystem component.Owner = uid; - if (_serializationManager.Copy(data, component, null) is Component copied) + if (_serializationManager.Copy(data.Component, component, null) is Component copied) EntityManager.AddComponent(uid, copied); trigger.GrantedComponents.Add(registration.Type); diff --git a/Content.Server/Plants/Components/PottedPlantHideComponent.cs b/Content.Server/Plants/Components/PottedPlantHideComponent.cs index b04d5a918b..0c31cdb534 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] - [Friend(typeof(PottedPlantHideSystem))] + [Access(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 0dee0beef9..6e753414a0 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] - [Friend(typeof(RandomPottedPlantSystem))] + [Access(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 dc14251c1d..5ec8a7055c 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, Friend(typeof(PneumaticCannonSystem))] + [RegisterComponent, Access(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 27d6d5bb16..ad5e95b7de 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] - [Friend(typeof(RoguePointingSystem))] + [Access(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 4fa30284f5..32613c11a1 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] -[Friend(typeof(ApcSystem))] +[Access(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 99d0564b79..08a0df8467 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] - [Friend(typeof(CableSystem))] + [Access(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 fa99ad64ef..efcca65503 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] - [Friend(typeof(ExtensionCableSystem))] + [Access(typeof(ExtensionCableSystem))] public sealed class ExtensionCableProviderComponent : Component { /// diff --git a/Content.Server/Power/Components/ExtensionCableReceiverComponent.cs b/Content.Server/Power/Components/ExtensionCableReceiverComponent.cs index ee22946459..835698f4c1 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] - [Friend(typeof(ExtensionCableSystem))] + [Access(typeof(ExtensionCableSystem))] public sealed class ExtensionCableReceiverComponent : Component { [ViewVariables] diff --git a/Content.Server/RandomAppearance/RandomAppearanceComponent.cs b/Content.Server/RandomAppearance/RandomAppearanceComponent.cs index a09dc0c010..aa7483275c 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] -[Friend(typeof(RandomAppearanceSystem))] +[Access(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 2270357274..baa3794423 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, Friend(typeof(RecyclerSystem))] + [RegisterComponent, Access(typeof(RecyclerSystem))] public sealed class RecyclableComponent : Component { /// diff --git a/Content.Server/Recycling/Components/RecyclerComponent.cs b/Content.Server/Recycling/Components/RecyclerComponent.cs index da389e513f..455572e4ad 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] - [Friend(typeof(RecyclerSystem))] + [Access(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 fa55add9ae..92187e2543 100644 --- a/Content.Server/Remotes/DoorRemoteComponent.cs +++ b/Content.Server/Remotes/DoorRemoteComponent.cs @@ -1,7 +1,7 @@ namespace Content.Server.Remotes { [RegisterComponent] - [Friend(typeof(DoorRemoteSystem))] + [Access(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 5e37717f17..ec9e7f4e77 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] -[Friend(typeof(ResistLockerSystem))] +[Access(typeof(ResistLockerSystem))] public sealed class ResistLockerComponent : Component { /// diff --git a/Content.Server/Shuttles/Components/ThrusterComponent.cs b/Content.Server/Shuttles/Components/ThrusterComponent.cs index 7526a50063..7d972159a9 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] - [Friend(typeof(ThrusterSystem))] + [Access(typeof(ThrusterSystem))] public sealed class ThrusterComponent : Component { /// diff --git a/Content.Server/Singularity/Components/RadiationCollectorComponent.cs b/Content.Server/Singularity/Components/RadiationCollectorComponent.cs index 67f7f6db27..5c4130058b 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] - [Friend(typeof(RadiationCollectorSystem))] + [Access(typeof(RadiationCollectorSystem))] public sealed class RadiationCollectorComponent : Component { /// diff --git a/Content.Server/Solar/Components/SolarPanelComponent.cs b/Content.Server/Solar/Components/SolarPanelComponent.cs index a69504912c..78fe42b580 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] - [Friend(typeof(PowerSolarSystem))] + [Access(typeof(PowerSolarSystem))] public sealed class SolarPanelComponent : Component { /// diff --git a/Content.Server/Stack/StackComponent.cs b/Content.Server/Stack/StackComponent.cs index 5abae1fcb4..049bc388c2 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, Friend(typeof(StackSystem))] + [RegisterComponent, Access(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 f4358dc417..eb33ef4282 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] -[Friend(typeof(GameTicker))] +[Access(typeof(GameTicker))] public sealed class BecomesStationComponent : Component { /// diff --git a/Content.Server/Station/Components/PartOfStationComponent.cs b/Content.Server/Station/Components/PartOfStationComponent.cs index 786f7f3d6c..69df581136 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, Friend(typeof(GameTicker)), Obsolete("Performs the exact same function as BecomesStationComponent.")] +[RegisterComponent, Access(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 cccceafe13..d2b97373d4 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, Friend(typeof(StationSystem))] +[RegisterComponent, Access(typeof(StationSystem))] public sealed class StationDataComponent : Component { /// diff --git a/Content.Server/Station/Components/StationJobsComponent.cs b/Content.Server/Station/Components/StationJobsComponent.cs index b73332783f..42295fcca7 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, Friend(typeof(StationJobsSystem)), PublicAPI] +[RegisterComponent, Access(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 d9258ec6cb..684ec20530 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, Friend(typeof(StationSystem))] +[RegisterComponent, Access(typeof(StationSystem))] public sealed class StationMemberComponent : Component { /// diff --git a/Content.Server/Station/Components/StationSpawningComponent.cs b/Content.Server/Station/Components/StationSpawningComponent.cs index 1ffb3e4cb2..a26c9ee7b6 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, Friend(typeof(StationSpawningSystem))] +[RegisterComponent, Access(typeof(StationSpawningSystem))] public sealed class StationSpawningComponent : Component { } diff --git a/Content.Server/Storage/Components/SecretStashComponent.cs b/Content.Server/Storage/Components/SecretStashComponent.cs index 7848ae9c39..ca1a382c17 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] - [Friend(typeof(SecretStashSystem))] + [Access(typeof(SecretStashSystem))] public sealed class SecretStashComponent : Component { /// diff --git a/Content.Server/Storage/Components/StorageFillComponent.cs b/Content.Server/Storage/Components/StorageFillComponent.cs index 5a15296a14..c62868d5ee 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, Friend(typeof(StorageSystem))] + [RegisterComponent, Access(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 860dfc3c72..37aa03cba1 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))] - [Friend(typeof(StrippableSystem))] + [Access(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 c12f9e269e..3e63619d68 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, Friend(typeof(StunOnCollideSystem))] + [RegisterComponent, Access(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 d30ee31d0e..809806325a 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] -[Friend(typeof(SurveillanceCameraSystem))] +[Access(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 3d4101bab2..919a0860d0 100644 --- a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraMonitorComponent.cs +++ b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraMonitorComponent.cs @@ -1,7 +1,7 @@ namespace Content.Server.SurveillanceCamera; [RegisterComponent] -[Friend(typeof(SurveillanceCameraMonitorSystem))] +[Access(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 62db7db883..cd57e971c9 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, Friend(typeof(TabletopSystem))] + [RegisterComponent, Access(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 eb7523ccf9..f051b65ac3 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, Friend(typeof(TabletopSystem))] + [RegisterComponent, Access(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 289a6f354f..b59f493e23 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] -[Friend(typeof(WeldableSystem))] +[Access(typeof(WeldableSystem))] public sealed class WeldableComponent : SharedWeldableComponent { /// diff --git a/Content.Server/Wieldable/Components/IncreaseDamageOnWieldComponent.cs b/Content.Server/Wieldable/Components/IncreaseDamageOnWieldComponent.cs index 8cc42e1846..301893a29a 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, Friend(typeof(WieldableSystem))] + [RegisterComponent, Access(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 2d66ef85ea..f7f96e9763 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, Friend(typeof(WieldableSystem))] + [RegisterComponent, Access(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 0b22075408..b063f9b40c 100644 --- a/Content.Shared/Access/Components/AccessComponent.cs +++ b/Content.Shared/Access/Components/AccessComponent.cs @@ -7,10 +7,11 @@ namespace Content.Shared.Access.Components /// Simple mutable access provider found on ID cards and such. /// [RegisterComponent] - [Friend(typeof(AccessSystem))] + [Access(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 c114e0dba4..27fbeed81d 100644 --- a/Content.Shared/Access/Components/IdCardComponent.cs +++ b/Content.Shared/Access/Components/IdCardComponent.cs @@ -6,13 +6,15 @@ 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] - [Friend(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem))] + [Access(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 8c969228b2..350951b470 100644 --- a/Content.Shared/Actions/ActionsComponent.cs +++ b/Content.Shared/Actions/ActionsComponent.cs @@ -6,10 +6,11 @@ namespace Content.Shared.Actions; [NetworkedComponent] [RegisterComponent] -[Friend(typeof(SharedActionsSystem))] +[Access(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 591e2a83d2..8a15971055 100644 --- a/Content.Shared/Administration/AdminFrozenComponent.cs +++ b/Content.Shared/Administration/AdminFrozenComponent.cs @@ -2,7 +2,7 @@ namespace Content.Shared.Administration; -[RegisterComponent, Friend(typeof(AdminFrozenSystem))] +[RegisterComponent, Access(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 7545aab680..5cca464186 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] - [Friend(typeof(SharedHumanoidAppearanceSystem), typeof(SharedMagicMirrorComponent))] + [Access(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 9878628ef0..e8d370e0cf 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] -[Friend(typeof(SharedTypingIndicatorSystem))] +[Access(typeof(SharedTypingIndicatorSystem))] public sealed class TypingIndicatorComponent : Component { /// diff --git a/Content.Shared/Clothing/ClothingSpeedModifierComponent.cs b/Content.Shared/Clothing/ClothingSpeedModifierComponent.cs index e3823553f2..25f6e6dc15 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, Friend(typeof(ClothingSpeedModifierSystem))] +[RegisterComponent, NetworkedComponent, Access(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 5843c2a29e..6008ad5aa6 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. /// -[Friend(typeof(ToggleableClothingSystem))] +[Access(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 bce7ec94b9..96536f7319 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. /// -[Friend(typeof(ToggleableClothingSystem))] +[Access(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 f7e6dbc90e..dfffa6d62f 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, Friend(typeof(SharedAnchorableSystem))] + [RegisterComponent, Access(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 c7f1ff0e2b..e1a89c036a 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.Equals(MaterialPrototypeId) && stack.Count >= Amount; + return entityManager.TryGetComponent(uid, out SharedStackComponent? stack) && stack.StackTypeId == MaterialPrototypeId && stack.Count >= Amount; } public bool EntityValid(EntityUid entity, [NotNullWhen(true)] out SharedStackComponent? stack) { - if (IoCManager.Resolve().TryGetComponent(entity, out SharedStackComponent? otherStack) && otherStack.StackTypeId.Equals(MaterialPrototypeId) && otherStack.Count >= Amount) + if (IoCManager.Resolve().TryGetComponent(entity, out SharedStackComponent? otherStack) && otherStack.StackTypeId == 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 a8939b7c46..424d94a1ef 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] - [Friend(typeof(ItemSlotsSystem))] + [Access(typeof(ItemSlotsSystem))] public sealed class ItemSlotsComponent : Component { /// @@ -60,7 +60,7 @@ namespace Content.Shared.Containers.ItemSlots /// insert/eject sounds. /// [DataDefinition] - [Friend(typeof(ItemSlotsSystem))] + [Access(typeof(ItemSlotsSystem))] public sealed class ItemSlot { [DataField("whitelist")] @@ -86,6 +86,7 @@ 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; /// @@ -97,6 +98,7 @@ 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 3b8881b5c2..9a3891c5d5 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"), Friend(typeof(SharedCrayonSystem))] + [NetworkedComponent, ComponentProtoName("Crayon"), Access(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 a0ee05628c..610e8eaf2a 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()] - [Friend(typeof(DamageableSystem))] + [Access(typeof(DamageableSystem))] public sealed class DamageableComponent : Component { /// @@ -24,6 +24,7 @@ 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; /// @@ -46,6 +47,7 @@ namespace Content.Shared.Damage /// [DataField("damage")] [ViewVariables(VVAccess.ReadWrite)] + [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends public DamageSpecifier Damage = new(); /// @@ -60,7 +62,9 @@ namespace Content.Shared.Damage /// /// The sum of all damages in the DamageableComponent. /// - [ViewVariables] public FixedPoint2 TotalDamage; + [ViewVariables] + [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends + 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 7fa2aaecf1..f053dc5750 100644 --- a/Content.Shared/Decals/DecalGridComponent.cs +++ b/Content.Shared/Decals/DecalGridComponent.cs @@ -1,7 +1,7 @@ namespace Content.Shared.Decals { [RegisterComponent] - [Friend(typeof(SharedDecalSystem))] + [Access(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 cb2eceb089..c83a4501b7 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 { - [Friend(typeof(SharedElectrocutionSystem))] + [Access(typeof(SharedElectrocutionSystem))] [RegisterComponent, NetworkedComponent] public sealed class InsulatedComponent : Component { diff --git a/Content.Shared/Flash/SharedFlashableComponent.cs b/Content.Shared/Flash/SharedFlashableComponent.cs index b3617eb3bc..25b7c41394 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, Friend(typeof(SharedFlashSystem))] + [NetworkedComponent, Access(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 c83d742da1..ec29db7d98 100644 --- a/Content.Shared/Foldable/FoldableComponent.cs +++ b/Content.Shared/Foldable/FoldableComponent.cs @@ -11,7 +11,7 @@ namespace Content.Shared.Foldable; /// [RegisterComponent] [NetworkedComponent] -[Friend(typeof(SharedFoldableSystem))] +[Access(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 2495775f1a..63a71106bb 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, Friend(typeof(FollowerSystem))] +[RegisterComponent, Access(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 a216ce9953..040bab4df1 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] -[Friend(typeof(FollowerSystem))] +[Access(typeof(FollowerSystem))] [NetworkedComponent] public sealed class FollowerComponent : Component { diff --git a/Content.Shared/Friction/TileFrictionModifier.cs b/Content.Shared/Friction/TileFrictionModifier.cs index 052773b709..72ba9a86ee 100644 --- a/Content.Shared/Friction/TileFrictionModifier.cs +++ b/Content.Shared/Friction/TileFrictionModifier.cs @@ -1,7 +1,7 @@ namespace Content.Shared.Friction { [RegisterComponent] - [Friend(typeof(SharedTileFrictionController))] + [Access(typeof(SharedTileFrictionController))] public sealed class TileFrictionModifierComponent : Component { /// diff --git a/Content.Shared/Instruments/SharedInstrumentComponent.cs b/Content.Shared/Instruments/SharedInstrumentComponent.cs index a88b5d94af..6c4435e759 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, Friend(typeof(SharedInstrumentSystem))] +[NetworkedComponent, Access(typeof(SharedInstrumentSystem))] public abstract class SharedInstrumentComponent : Component { [ViewVariables] @@ -26,6 +26,7 @@ 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 8c8424dd9f..58047c7fa3 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 { - [Friend(typeof(SharedJitteringSystem))] + [Access(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 bfcfba313b..cadcb1c0c9 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] -[Friend(typeof(SharedRgbLightControllerSystem))] +[Access(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 5976c2a964..0a43d1045a 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, Friend(typeof(MovementSpeedModifierSystem))] + [NetworkedComponent, Access(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 41952868d0..eb6a6581f6 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 { - [Friend(typeof(SharedCreamPieSystem))] + [Access(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 5086be612d..3a07485f28 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 { - [Friend(typeof(SharedCreamPieSystem))] + [Access(typeof(SharedCreamPieSystem))] [RegisterComponent] public sealed class CreamPiedComponent : Component { diff --git a/Content.Shared/Pinpointer/PinpointerComponent.cs b/Content.Shared/Pinpointer/PinpointerComponent.cs index 01778fb8aa..238b35a053 100644 --- a/Content.Shared/Pinpointer/PinpointerComponent.cs +++ b/Content.Shared/Pinpointer/PinpointerComponent.cs @@ -8,7 +8,7 @@ namespace Content.Shared.Pinpointer /// [RegisterComponent] [NetworkedComponent] - [Friend(typeof(SharedPinpointerSystem))] + [Access(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 f4e64f240a..e946c41391 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] - [Friend(typeof(PlaceableSurfaceSystem))] + [Access(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 7e9e4e0738..b806e7fe33 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()] - [Friend(typeof(SharedPullingStateManagementSystem))] + [Access(typeof(SharedPullingStateManagementSystem))] [RegisterComponent] public sealed class SharedPullableComponent : Component { @@ -26,6 +26,7 @@ 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 8757ae93a5..ec0a5260ca 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] - [Friend(typeof(SharedPullingStateManagementSystem))] + [Access(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 b8d7f3d717..06bbfdcedb 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, Friend(typeof(SharedStackSystem))] + [NetworkedComponent, Access(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 10512de14d..29bb951879 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 { - [Friend(typeof(StandingStateSystem))] + [Access(typeof(StandingStateSystem))] [RegisterComponent, NetworkedComponent] public sealed class StandingStateComponent : Component { diff --git a/Content.Shared/StatusEffect/StatusEffectsComponent.cs b/Content.Shared/StatusEffect/StatusEffectsComponent.cs index 02f1aa9c09..e412a41d76 100644 --- a/Content.Shared/StatusEffect/StatusEffectsComponent.cs +++ b/Content.Shared/StatusEffect/StatusEffectsComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared.StatusEffect { [RegisterComponent] [NetworkedComponent] - [Friend(typeof(StatusEffectsSystem))] + [Access(typeof(StatusEffectsSystem))] public sealed class StatusEffectsComponent : Component { [ViewVariables] diff --git a/Content.Shared/StepTrigger/StepTriggerComponent.cs b/Content.Shared/StepTrigger/StepTriggerComponent.cs index 76f16b48a7..5a8b5a245a 100644 --- a/Content.Shared/StepTrigger/StepTriggerComponent.cs +++ b/Content.Shared/StepTrigger/StepTriggerComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared.StepTrigger; [RegisterComponent] [NetworkedComponent] -[Friend(typeof(StepTriggerSystem))] +[Access(typeof(StepTriggerSystem))] public sealed class StepTriggerComponent : Component { /// @@ -41,7 +41,7 @@ public sealed class StepTriggerComponent : Component } [RegisterComponent] -[Friend(typeof(StepTriggerSystem))] +[Access(typeof(StepTriggerSystem))] public sealed class StepTriggerActiveComponent : Component { diff --git a/Content.Shared/Storage/Components/ItemCounterComponent.cs b/Content.Shared/Storage/Components/ItemCounterComponent.cs index 2123bea9d3..3adec11cf9 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] - [Friend(typeof(SharedItemCounterSystem))] + [Access(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 c293802f58..624db7f3b1 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] - [Friend(typeof(SharedItemMapperSystem))] + [Access(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 81899e122d..d7e361f6e1 100644 --- a/Content.Shared/Stunnable/KnockedDownComponent.cs +++ b/Content.Shared/Stunnable/KnockedDownComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared.Stunnable { [RegisterComponent] [NetworkedComponent] - [Friend(typeof(SharedStunSystem))] + [Access(typeof(SharedStunSystem))] public sealed class KnockedDownComponent : Component { [DataField("helpInterval")] diff --git a/Content.Shared/Stunnable/SlowedDownComponent.cs b/Content.Shared/Stunnable/SlowedDownComponent.cs index 4106814577..f91b9567f6 100644 --- a/Content.Shared/Stunnable/SlowedDownComponent.cs +++ b/Content.Shared/Stunnable/SlowedDownComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared.Stunnable { [RegisterComponent] [NetworkedComponent] - [Friend(typeof(SharedStunSystem))] + [Access(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 a03e4df1da..8b36e11f42 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 { - [Friend(typeof(SharedStunSystem))] + [Access(typeof(SharedStunSystem))] [RegisterComponent, NetworkedComponent] public sealed class StunnedComponent : Component { diff --git a/Content.Shared/SubFloor/SubFloorHideComponent.cs b/Content.Shared/SubFloor/SubFloorHideComponent.cs index 5da08fd52f..585c998a98 100644 --- a/Content.Shared/SubFloor/SubFloorHideComponent.cs +++ b/Content.Shared/SubFloor/SubFloorHideComponent.cs @@ -10,7 +10,7 @@ namespace Content.Shared.SubFloor /// [NetworkedComponent] [RegisterComponent] - [Friend(typeof(SharedSubFloorHideSystem))] + [Access(typeof(SharedSubFloorHideSystem))] public sealed class SubFloorHideComponent : Component { /// @@ -47,6 +47,7 @@ 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 4bd10b2a25..fc303c0039 100644 --- a/Content.Shared/Tag/TagComponent.cs +++ b/Content.Shared/Tag/TagComponent.cs @@ -3,11 +3,12 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace Content.Shared.Tag { - [RegisterComponent, Friend(typeof(TagSystem))] + [RegisterComponent, Access(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 4ab43cc923..7f0feef97c 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 4ab43cc923efe313d85d1aeadb16bfb7616d84d1 +Subproject commit 7f0feef97c19b5d520a4dbe2cc19b507df27603a