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

This commit is contained in:
Pieter-Jan Briers
2022-06-07 13:44:31 +02:00
committed by GitHub
parent c5f7c61041
commit cecf87997b
162 changed files with 169 additions and 197 deletions

View File

@@ -16,7 +16,7 @@ namespace Content.Shared.Damage
/// </remarks>
[RegisterComponent]
[NetworkedComponent()]
[Access(typeof(DamageableSystem))]
[Friend(typeof(DamageableSystem))]
public sealed class DamageableComponent : Component
{
/// <summary>
@@ -24,7 +24,6 @@ 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>
@@ -47,7 +46,6 @@ namespace Content.Shared.Damage
/// </remarks>
[DataField("damage")]
[ViewVariables(VVAccess.ReadWrite)]
[Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public DamageSpecifier Damage = new();
/// <summary>
@@ -62,9 +60,7 @@ namespace Content.Shared.Damage
/// <summary>
/// The sum of all damages in the DamageableComponent.
/// </summary>
[ViewVariables]
[Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public FixedPoint2 TotalDamage;
[ViewVariables] public FixedPoint2 TotalDamage;
// Really these shouldn't be here. OnExplosion() and RadiationAct() should be handled elsewhere.
[ViewVariables]