Revert "Revert "Fix some friend access violations by allowing others access. (#8594) (#8703)" (working this time) (#8704)

This commit is contained in:
Pieter-Jan Briers
2022-06-07 15:26:28 +02:00
committed by GitHub
parent cecf87997b
commit a323ba8223
164 changed files with 199 additions and 171 deletions

View File

@@ -13,7 +13,7 @@ namespace Content.Shared.Containers.ItemSlots
/// insert/eject interactions.
/// </summary>
[RegisterComponent]
[Friend(typeof(ItemSlotsSystem))]
[Access(typeof(ItemSlotsSystem))]
public sealed class ItemSlotsComponent : Component
{
/// <summary>
@@ -60,7 +60,7 @@ namespace Content.Shared.Containers.ItemSlots
/// insert/eject sounds.
/// </summary>
[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.
/// </remarks>
[DataField("name", readOnly: true)]
[Access(typeof(ItemSlotsSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
public string Name = string.Empty;
/// <summary>
@@ -97,6 +98,7 @@ namespace Content.Shared.Containers.ItemSlots
/// when mapping.
/// </remarks>
[DataField("startingItem", readOnly: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
[Access(typeof(ItemSlotsSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
public string? StartingItem;
/// <summary>