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

@@ -16,7 +16,7 @@ namespace Content.Shared.Damage
/// </remarks>
[RegisterComponent]
[NetworkedComponent()]
[Friend(typeof(DamageableSystem))]
[Access(typeof(DamageableSystem))]
public sealed class DamageableComponent : Component
{
/// <summary>
@@ -24,6 +24,7 @@ namespace Content.Shared.Damage
/// If null, all damage types will be supported.
/// </summary>
[DataField("damageContainer", customTypeSerializer: typeof(PrototypeIdSerializer<DamageContainerPrototype>))]
[Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public string? DamageContainerID;
/// <summary>
@@ -46,6 +47,7 @@ namespace Content.Shared.Damage
/// </remarks>
[DataField("damage")]
[ViewVariables(VVAccess.ReadWrite)]
[Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public DamageSpecifier Damage = new();
/// <summary>
@@ -60,7 +62,9 @@ namespace Content.Shared.Damage
/// <summary>
/// The sum of all damages in the DamageableComponent.
/// </summary>
[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]