Fix some friend access violations by allowing others access. (#8594)

Rename Friend attribute to Access attribute.
Updates submodule to v0.21.0.0 as well.
This commit is contained in:
Vera Aguilera Puerto
2022-06-07 11:30:27 +02:00
committed by GitHub
parent 379555e933
commit c5f7c61041
162 changed files with 197 additions and 169 deletions

View File

@@ -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<byte, ClientDoAfter> DoAfters = new();

View File

@@ -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 {}

View File

@@ -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
{
}

View File

@@ -4,7 +4,7 @@ namespace Content.Client.Hands
{
[RegisterComponent]
[ComponentReference(typeof(SharedHandsComponent))]
[Friend(typeof(HandsSystem))]
[Access(typeof(HandsSystem))]
public sealed class HandsComponent : SharedHandsComponent
{
/// <summary>

View File

@@ -16,7 +16,7 @@ namespace Content.Client.Inventory
/// </summary>
[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.
/// </summary>
[ViewVariables]
[Access(typeof(ClientInventorySystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
public readonly Dictionary<string, HashSet<string>> VisualLayerKeys = new();
public bool AttachedToGameHud;

View File

@@ -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;

View File

@@ -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 { }

View File

@@ -3,6 +3,6 @@
namespace Content.Client.Movement.Components;
[RegisterComponent]
[Friend(typeof(ClimbSystem))]
[Access(typeof(ClimbSystem))]
[ComponentReference(typeof(SharedClimbingComponent))]
public sealed class ClimbingComponent : SharedClimbingComponent { }

View File

@@ -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
{

View File

@@ -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)]

View File

@@ -5,7 +5,7 @@ namespace Content.Client.Weapons.Ranged.Components;
/// <summary>
/// Visualizer for gun mag presence; can change states based on ammo count or toggle visibility entirely.
/// </summary>
[RegisterComponent, Friend(typeof(GunSystem))]
[RegisterComponent, Access(typeof(GunSystem))]
public sealed class MagazineVisualsComponent : Component
{
/// <summary>

View File

@@ -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
{
/// <summary>