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:
committed by
GitHub
parent
379555e933
commit
c5f7c61041
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user