From 90c224a1c1c813a4bfba474d7584c5ecf9323dd5 Mon Sep 17 00:00:00 2001
From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Date: Mon, 13 Jun 2022 11:19:49 +1200
Subject: [PATCH] Add ReadExecute perms to all of DamageableComponent (#8800)
---
.../Damage/Components/DamageableComponent.cs | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/Content.Shared/Damage/Components/DamageableComponent.cs b/Content.Shared/Damage/Components/DamageableComponent.cs
index 610e8eaf2a..cd85981c05 100644
--- a/Content.Shared/Damage/Components/DamageableComponent.cs
+++ b/Content.Shared/Damage/Components/DamageableComponent.cs
@@ -16,7 +16,7 @@ namespace Content.Shared.Damage
///
[RegisterComponent]
[NetworkedComponent()]
- [Access(typeof(DamageableSystem))]
+ [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)]
public sealed class DamageableComponent : Component
{
///
@@ -24,7 +24,6 @@ namespace Content.Shared.Damage
/// If null, all damage types will be supported.
///
[DataField("damageContainer", customTypeSerializer: typeof(PrototypeIdSerializer))]
- [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public string? DamageContainerID;
///
@@ -35,7 +34,6 @@ namespace Content.Shared.Damage
/// Though DamageModifierSets can be deserialized directly, we only want to use the prototype version here
/// to reduce duplication.
///
- [ViewVariables(VVAccess.ReadWrite)]
[DataField("damageModifierSet", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string? DamageModifierSetId;
@@ -46,8 +44,6 @@ namespace Content.Shared.Damage
/// If this data-field is specified, this allows damageable components to be initialized with non-zero damage.
///
[DataField("damage")]
- [ViewVariables(VVAccess.ReadWrite)]
- [Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public DamageSpecifier Damage = new();
///
@@ -63,16 +59,10 @@ namespace Content.Shared.Damage
/// The sum of all damages in the DamageableComponent.
///
[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]
[DataField("radiationDamageTypes", customTypeSerializer: typeof(PrototypeIdListSerializer))]
public List RadiationDamageTypeIDs = new() {"Radiation"};
- [ViewVariables]
- [DataField("explosionDamageTypes", customTypeSerializer: typeof(PrototypeIdListSerializer))]
- public List ExplosionDamageTypeIDs = new() { "Piercing", "Heat" };
}
[Serializable, NetSerializable]