diff --git a/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs b/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs
index 133b69c50b..6d68a93653 100644
--- a/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs
+++ b/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs
@@ -53,14 +53,9 @@ namespace Content.IntegrationTests.Tests.Damageable
- TestDamage3b
- TestDamage3c
-- type: resistanceSet
- id: testResistances
-# this space is intentionally left blank
-
# This container should not support TestDamage1 or TestDamage2b
- type: damageContainer
id: testDamageContainer
- defaultResistanceSet: testResistances
supportedGroups:
- TestGroup3
supportedTypes:
@@ -189,9 +184,9 @@ namespace Content.IntegrationTests.Tests.Damageable
Assert.That(sDamageableComponent.TotalDamage, Is.EqualTo(damageToDeal));
Assert.That(sDamageableComponent.DamagePerGroup[group3.ID], Is.EqualTo(damageToDeal));
// integer rounding. In this case, first member gets 1 less than others.
- Assert.That(sDamageableComponent.Damage.DamageDict[type3a.ID], Is.EqualTo(damageToDeal / types.Count()));
+ Assert.That(sDamageableComponent.Damage.DamageDict[type3a.ID], Is.EqualTo(damageToDeal / types.Count()));
Assert.That(sDamageableComponent.Damage.DamageDict[type3b.ID], Is.EqualTo(1 + damageToDeal / types.Count()));
- Assert.That(sDamageableComponent.Damage.DamageDict[type3c.ID], Is.EqualTo(1 + damageToDeal / types.Count()));
+ Assert.That(sDamageableComponent.Damage.DamageDict[type3c.ID], Is.EqualTo(1 + damageToDeal / types.Count()));
// Heal
sDamageableSystem.TryChangeDamage(uid, -damage);
diff --git a/Content.Shared/Damage/Prototypes/ResistanceSetPrototype.cs b/Content.Shared/Damage/DamageModifierSet.cs
similarity index 57%
rename from Content.Shared/Damage/Prototypes/ResistanceSetPrototype.cs
rename to Content.Shared/Damage/DamageModifierSet.cs
index e09d9aa181..2294a7832a 100644
--- a/Content.Shared/Damage/Prototypes/ResistanceSetPrototype.cs
+++ b/Content.Shared/Damage/DamageModifierSet.cs
@@ -1,27 +1,22 @@
-using System;
+using System;
using System.Collections.Generic;
-using Robust.Shared.Prototypes;
+using Content.Shared.Damage.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
-using Robust.Shared.ViewVariables;
-namespace Content.Shared.Damage.Prototypes
+namespace Content.Shared.Damage
{
///
- /// Prototype of damage resistance sets. Can be applied to using . This can be done several times as the
+ /// A set of coefficients or flat modifiers to damage types.. Can be applied to using . This can be done several times as the
/// is passed to it's final target. By default the receiving , will
- /// also apply it's own .
+ /// also apply it's own .
///
- [Prototype("resistanceSet")]
+ [DataDefinition]
[Serializable, NetSerializable]
- public class ResistanceSetPrototype : IPrototype
+ public class DamageModifierSet
{
- [ViewVariables]
- [DataField("id", required: true)]
- public string ID { get; } = default!;
-
[DataField("coefficients", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))]
public Dictionary Coefficients = new();
diff --git a/Content.Shared/Damage/DamageSpecifier.cs b/Content.Shared/Damage/DamageSpecifier.cs
index e1accf899b..50eb06697b 100644
--- a/Content.Shared/Damage/DamageSpecifier.cs
+++ b/Content.Shared/Damage/DamageSpecifier.cs
@@ -41,7 +41,7 @@ namespace Content.Shared.Damage
{
if (_damageDict == null)
DeserializeDamage();
- return _damageDict!;
+ return _damageDict!;
}
set => _damageDict = value;
}
@@ -120,7 +120,7 @@ namespace Content.Shared.Damage
// This can happen if deserialized before prototypes are loaded.
Logger.Error($"Unknown damage group given to DamageSpecifier: {entry.Key}");
continue;
- }
+ }
// Simply distribute evenly (except for rounding).
// We do this by reducing remaining the # of types and damage every loop.
@@ -141,12 +141,12 @@ namespace Content.Shared.Damage
}
///
- /// Reduce (or increase) damages by applying a resistance set.
+ /// Reduce (or increase) damages by applying a damage modifier set.
///
///
/// Only applies resistance to a damage type if it is dealing damage, not healing.
///
- public static DamageSpecifier ApplyResistanceSet(DamageSpecifier damageSpec, ResistanceSetPrototype resistanceSet)
+ public static DamageSpecifier ApplyModifierSet(DamageSpecifier damageSpec, DamageModifierSet modifierSet)
{
// Make a copy of the given data. Don't modify the one passed to this function. I did this before, and weapons became
// duller as you hit walls. Neat, but not intended. And confusing, when you realize your fists don't work no
@@ -159,9 +159,9 @@ namespace Content.Shared.Damage
float newValue = entry.Value;
- if (resistanceSet.FlatReduction.TryGetValue(entry.Key, out var reduction))
+ if (modifierSet.FlatReduction.TryGetValue(entry.Key, out var reduction))
{
- newValue -= reduction;
+ newValue -= reduction;
if (newValue <= 0)
{
// flat reductions cannot heal you
@@ -170,7 +170,7 @@ namespace Content.Shared.Damage
}
}
- if (resistanceSet.Coefficients.TryGetValue(entry.Key, out var coefficient))
+ if (modifierSet.Coefficients.TryGetValue(entry.Key, out var coefficient))
{
// negative coefficients **can** heal you.
newValue = MathF.Round(newValue*coefficient, MidpointRounding.AwayFromZero);
diff --git a/Content.Shared/Damage/DamageableComponent.cs b/Content.Shared/Damage/DamageableComponent.cs
index b4af5437e1..3493c7f3cc 100644
--- a/Content.Shared/Damage/DamageableComponent.cs
+++ b/Content.Shared/Damage/DamageableComponent.cs
@@ -19,7 +19,7 @@ namespace Content.Shared.Damage
///
///
/// The supported damage types are specified using a s. DamageContainers
- /// may also have resistances to certain damage types, defined via a .
+ /// may also have resistances to certain damage types, defined via a .
///
[RegisterComponent]
[NetworkedComponent()]
@@ -36,12 +36,16 @@ namespace Content.Shared.Damage
public string? DamageContainerID;
///
- /// This will be applied to any damage that is dealt to this container,
+ /// This will be applied to any damage that is dealt to this container,
/// unless the damage explicitly ignores resistances.
///
+ ///
+ /// Though DamageModifierSets can be deserialized directly, we only want to use the prototype version here
+ /// to reduce duplication.
+ ///
[ViewVariables(VVAccess.ReadWrite)]
- [DataField("resistanceSet", customTypeSerializer: typeof(PrototypeIdSerializer))]
- public string? ResistanceSetID;
+ [DataField("damageModifierSet", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ public string? DamageModifierSetId;
///
/// All the damage information is stored in this .
@@ -116,14 +120,14 @@ namespace Content.Shared.Damage
public class DamageableComponentState : ComponentState
{
public readonly Dictionary DamageDict;
- public readonly string? ResistanceSetID;
+ public readonly string? ModifierSetId;
public DamageableComponentState(
Dictionary damageDict,
- string? resistanceSetID)
+ string? modifierSetId)
{
DamageDict = damageDict;
- ResistanceSetID = resistanceSetID;
+ ModifierSetId = modifierSetId;
}
}
}
diff --git a/Content.Shared/Damage/DamageableSystem.cs b/Content.Shared/Damage/DamageableSystem.cs
index 6e51ef25c1..a918c16434 100644
--- a/Content.Shared/Damage/DamageableSystem.cs
+++ b/Content.Shared/Damage/DamageableSystem.cs
@@ -25,7 +25,7 @@ namespace Content.Shared.Damage
///
private void DamageableInit(EntityUid uid, DamageableComponent component, ComponentInit _)
{
- if (component.DamageContainerID != null &&
+ if (component.DamageContainerID != null &&
_prototypeManager.TryIndex(component.DamageContainerID,
out var damageContainerPrototype))
{
@@ -118,11 +118,11 @@ namespace Content.Shared.Damage
}
// Apply resistances
- if (!ignoreResistances && damageable.ResistanceSetID != null)
+ if (!ignoreResistances && damageable.DamageModifierSetId != null)
{
- if (_prototypeManager.TryIndex(damageable.ResistanceSetID, out var resistanceSet))
+ if (_prototypeManager.TryIndex(damageable.DamageModifierSetId, out var modifierSet))
{
- damage = DamageSpecifier.ApplyResistanceSet(damage, resistanceSet);
+ damage = DamageSpecifier.ApplyModifierSet(damage, modifierSet);
}
if (damage.Empty)
@@ -174,7 +174,7 @@ namespace Content.Shared.Damage
private void DamageableGetState(EntityUid uid, DamageableComponent component, ref ComponentGetState args)
{
- args.State = new DamageableComponentState(component.Damage.DamageDict, component.ResistanceSetID);
+ args.State = new DamageableComponentState(component.Damage.DamageDict, component.DamageModifierSetId);
}
private void DamageableHandleState(EntityUid uid, DamageableComponent component, ref ComponentHandleState args)
@@ -184,7 +184,7 @@ namespace Content.Shared.Damage
return;
}
- component.ResistanceSetID = state.ResistanceSetID;
+ component.DamageModifierSetId = state.ModifierSetId;
// Has the damage actually changed?
DamageSpecifier newDamage = new() { DamageDict = state.DamageDict };
@@ -202,7 +202,7 @@ namespace Content.Shared.Damage
public class DamageChangedEvent : EntityEventArgs
{
///
- /// This is the component whose damage was changed.
+ /// This is the component whose damage was changed.
///
///
/// Given that nearly every component that cares about a change in the damage, needs to know the
diff --git a/Content.Shared/Damage/Prototypes/DamageModifierSetPrototype.cs b/Content.Shared/Damage/Prototypes/DamageModifierSetPrototype.cs
new file mode 100644
index 0000000000..b79d35c8a7
--- /dev/null
+++ b/Content.Shared/Damage/Prototypes/DamageModifierSetPrototype.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using Robust.Shared.Prototypes;
+using Robust.Shared.Serialization;
+using Robust.Shared.Serialization.Manager.Attributes;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
+using Robust.Shared.ViewVariables;
+
+namespace Content.Shared.Damage.Prototypes
+{
+ ///
+ /// A version of DamageModifierSet that can be serialized as a prototype, but is functionally identical.
+ ///
+ ///
+ /// Done to avoid removing the 'required' tag on the ID and passing around a 'prototype' when we really
+ /// just want normal data to be deserialized.
+ ///
+ [Prototype("damageModifierSet")]
+ public class DamageModifierSetPrototype : DamageModifierSet, IPrototype
+ {
+ [ViewVariables]
+ [DataField("id", required: true)]
+ public string ID { get; } = default!;
+ }
+}
diff --git a/Content.Tests/Shared/DamageTest.cs b/Content.Tests/Shared/DamageTest.cs
index a1f0e89171..f3a877d398 100644
--- a/Content.Tests/Shared/DamageTest.cs
+++ b/Content.Tests/Shared/DamageTest.cs
@@ -11,7 +11,7 @@ namespace Content.Tests.Shared
// Basic tests of various damage prototypes and classes.
[TestFixture]
[TestOf(typeof(DamageSpecifier))]
- [TestOf(typeof(ResistanceSetPrototype))]
+ [TestOf(typeof(DamageModifierSetPrototype))]
[TestOf(typeof(DamageGroupPrototype))]
public class DamageTest : ContentUnitTest
{
@@ -26,7 +26,7 @@ namespace Content.Tests.Shared
static private Dictionary _resistanceReductionDict = new()
{
- { "Blunt", - 5 },
+ { "Blunt", - 5 },
// "missing" piercing entry
{ "Slash", 8 },
{ "Radiation", 0.5f }, // Fractional adjustment
@@ -132,13 +132,13 @@ namespace Content.Tests.Shared
//Check that DamageSpecifier will be properly adjusted by a resistance set
[Test]
- public void ResistanceSetTest()
+ public void ModifierSetTest()
{
// Create a copy of the damage data
DamageSpecifier damageSpec = 10 * new DamageSpecifier(_damageSpec);
- // Create a resistance set
- ResistanceSetPrototype resistanceSet = new()
+ // Create a modifier set
+ DamageModifierSetPrototype modifierSet = new()
{
Coefficients = _resistanceCoefficientDict,
FlatReduction = _resistanceReductionDict
@@ -149,14 +149,14 @@ namespace Content.Tests.Shared
//then multiply by 1 / -2 / 3 / 1.06
// Apply once
- damageSpec = DamageSpecifier.ApplyResistanceSet(damageSpec, resistanceSet);
+ damageSpec = DamageSpecifier.ApplyModifierSet(damageSpec, modifierSet);
Assert.That(damageSpec.DamageDict["Blunt"], Is.EqualTo(25));
Assert.That(damageSpec.DamageDict["Piercing"], Is.EqualTo(-40)); // became healing
Assert.That(damageSpec.DamageDict["Slash"], Is.EqualTo(6));
Assert.That(damageSpec.DamageDict["Radiation"], Is.EqualTo(31)); // would be 32 w/o fraction adjustment
// And again, checking for some other behavior
- damageSpec = DamageSpecifier.ApplyResistanceSet(damageSpec, resistanceSet);
+ damageSpec = DamageSpecifier.ApplyModifierSet(damageSpec, modifierSet);
Assert.That(damageSpec.DamageDict["Blunt"], Is.EqualTo(30));
Assert.That(damageSpec.DamageDict["Piercing"], Is.EqualTo(-40)); // resistances don't apply to healing
Assert.That(!damageSpec.DamageDict.ContainsKey("Slash")); // Reduction reduced to 0, and removed from specifier
@@ -241,7 +241,7 @@ namespace Content.Tests.Shared
damageTypes:
- Cellular
-- type: resistanceSet
+- type: damageModifierSet
id: Metallic
coefficients:
Blunt: 0.7
@@ -251,7 +251,7 @@ namespace Content.Tests.Shared
flatReductions:
Blunt: 5
-- type: resistanceSet
+- type: damageModifierSet
id: Inflatable
coefficients:
Blunt: 0.5
@@ -261,7 +261,7 @@ namespace Content.Tests.Shared
flatReductions:
Blunt: 5
-- type: resistanceSet
+- type: damageModifierSet
id: Glass
coefficients:
Blunt: 0.5
diff --git a/Resources/Prototypes/Damage/resistance_sets.yml b/Resources/Prototypes/Damage/modifier_sets.yml
similarity index 80%
rename from Resources/Prototypes/Damage/resistance_sets.yml
rename to Resources/Prototypes/Damage/modifier_sets.yml
index c04f895830..39dd6fceb5 100644
--- a/Resources/Prototypes/Damage/resistance_sets.yml
+++ b/Resources/Prototypes/Damage/modifier_sets.yml
@@ -1,4 +1,4 @@
-- type: resistanceSet
+- type: damageModifierSet
id: Metallic
coefficients:
Blunt: 0.7
@@ -8,7 +8,7 @@
flatReductions:
Blunt: 5
-- type: resistanceSet
+- type: damageModifierSet
id: Inflatable
coefficients:
Blunt: 0.5
@@ -18,7 +18,7 @@
flatReductions:
Blunt: 5
-- type: resistanceSet
+- type: damageModifierSet
id: Glass
coefficients:
Blunt: 0.5
@@ -27,4 +27,4 @@
Heat: 0
Shock: 0
flatReductions:
- Blunt: 5
\ No newline at end of file
+ Blunt: 5
diff --git a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml
index b363043657..d213d07282 100644
--- a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml
+++ b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml
@@ -126,7 +126,7 @@
- type: Airtight
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml
index 09e59f8359..d0dfcfab5f 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml
@@ -31,7 +31,7 @@
isOpen: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Glass
+ damageModifierSet: Glass
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml b/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml
index 0b792b1874..449418dcfe 100644
--- a/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml
+++ b/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml
@@ -108,7 +108,7 @@
- type: Anchorable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -141,7 +141,7 @@
- type: Anchorable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml b/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml
index bdbff8a78f..799e48d90e 100644
--- a/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml
+++ b/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml
@@ -22,7 +22,7 @@
- SmallImpassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Inflatable
+ damageModifierSet: Inflatable
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Security/barrier.yml b/Resources/Prototypes/Entities/Objects/Specific/Security/barrier.yml
index 8c549eed95..6b80b1a19b 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Security/barrier.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Security/barrier.yml
@@ -27,10 +27,10 @@
- type: Lock
locked: false
lockOnClick: true # toggle lock just by clicking on barrier
- - type: DeployableBarrier
+ - type: DeployableBarrier
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml
index dd9919a7af..688c6a35a5 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml
@@ -46,7 +46,7 @@
fillBaseName: beaker
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Glass
+ damageModifierSet: Glass
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Dispensers/base.yml b/Resources/Prototypes/Entities/Structures/Dispensers/base.yml
index 3eced3a2b7..c07806a810 100644
--- a/Resources/Prototypes/Entities/Structures/Dispensers/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Dispensers/base.yml
@@ -30,7 +30,7 @@
- type: Pullable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml
index c023c30e29..6fd5cb2953 100644
--- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml
+++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml
@@ -27,7 +27,7 @@
anchored: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base.yml
index 316aac7d39..15077a39ec 100644
--- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base.yml
@@ -65,7 +65,7 @@
- type: Occluder
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml
index f4fd87908f..bc40f68f76 100644
--- a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml
+++ b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml
@@ -7,7 +7,7 @@
- type: InteractionOutline
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/frame.yml b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/frame.yml
index aea9aa4f8e..116191168a 100644
--- a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/frame.yml
+++ b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/frame.yml
@@ -13,7 +13,7 @@
- type: InteractionOutline
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Doors/Windoors/assembly.yml b/Resources/Prototypes/Entities/Structures/Doors/Windoors/assembly.yml
index 8dc65919ed..003c64ca64 100644
--- a/Resources/Prototypes/Entities/Structures/Doors/Windoors/assembly.yml
+++ b/Resources/Prototypes/Entities/Structures/Doors/Windoors/assembly.yml
@@ -25,7 +25,7 @@
- type: Rotatable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base.yml b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base.yml
index bb3bddefb8..f4f330b3f0 100644
--- a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base.yml
@@ -39,7 +39,7 @@
- type: ApcPowerReceiver
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Glass
+ damageModifierSet: Glass
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Furniture/Tables/base.yml b/Resources/Prototypes/Entities/Structures/Furniture/Tables/base.yml
index 5d1ea0ea2b..f8979afb05 100644
--- a/Resources/Prototypes/Entities/Structures/Furniture/Tables/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Furniture/Tables/base.yml
@@ -7,7 +7,7 @@
components:
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: PlaceableSurface
- type: Sprite
netsync: false
diff --git a/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml b/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml
index 6c0ac989d1..4e4d3b2c17 100644
--- a/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml
+++ b/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml
@@ -10,7 +10,7 @@
sprite: Structures/Furniture/Tables/frame.rsi
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -43,7 +43,7 @@
sprite: Structures/Furniture/Tables/generic.rsi
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml
index fc39bb4cf1..5b95d8b898 100644
--- a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml
+++ b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml
@@ -25,7 +25,7 @@
rotation: -90
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Furniture/instruments.yml b/Resources/Prototypes/Entities/Structures/Furniture/instruments.yml
index 83a6eae95b..c4b1058eee 100644
--- a/Resources/Prototypes/Entities/Structures/Furniture/instruments.yml
+++ b/Resources/Prototypes/Entities/Structures/Furniture/instruments.yml
@@ -13,7 +13,7 @@
sprite: Structures/Furniture/instruments.rsi
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Furniture/seats.yml b/Resources/Prototypes/Entities/Structures/Furniture/seats.yml
index 6e3f11d2dc..9f2c0178b9 100644
--- a/Resources/Prototypes/Entities/Structures/Furniture/seats.yml
+++ b/Resources/Prototypes/Entities/Structures/Furniture/seats.yml
@@ -25,7 +25,7 @@
- type: Pullable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Machines/Computers/frame.yml b/Resources/Prototypes/Entities/Structures/Machines/Computers/frame.yml
index 11c2368ce7..64460b9d00 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/Computers/frame.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/Computers/frame.yml
@@ -29,7 +29,7 @@
state: 0
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Machines/base.yml b/Resources/Prototypes/Entities/Structures/Machines/base.yml
index 01ee62866d..1085c7fc5f 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/base.yml
@@ -19,7 +19,7 @@
- MobMask
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml
index 5e38efd733..31675fc370 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml
@@ -33,7 +33,7 @@
- MobImpassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Machines/frame.yml b/Resources/Prototypes/Entities/Structures/Machines/frame.yml
index 0b80b0ccf4..dd967e0cab 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/frame.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/frame.yml
@@ -32,7 +32,7 @@
node: missingWires
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -80,7 +80,7 @@
node: machineFrame
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/miners.yml b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/miners.yml
index 12f36e2a14..6e08cf3676 100644
--- a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/miners.yml
+++ b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/miners.yml
@@ -13,7 +13,7 @@
anchored: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/pipes.yml b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/pipes.yml
index f97f2c4582..370f9830b7 100644
--- a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/pipes.yml
+++ b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/pipes.yml
@@ -13,7 +13,7 @@
anchored: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Anchorable
- type: Rotatable
- type: Pullable
diff --git a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml
index 8939bd4011..1b5ba325e5 100644
--- a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml
+++ b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml
@@ -17,7 +17,7 @@
- type: Anchorable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/emitter.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/emitter.yml
index 3b4972bbc2..a7580c92c5 100644
--- a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/emitter.yml
+++ b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/emitter.yml
@@ -46,7 +46,7 @@
nodeGroupID: MVPower
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml
index 54bb3dd6b7..de36ed4ab0 100644
--- a/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml
+++ b/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml
@@ -26,7 +26,7 @@
- SmallImpassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -112,7 +112,7 @@
- SmallImpassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml
index 6735cdc38d..452f1f1f65 100644
--- a/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml
+++ b/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml
@@ -40,7 +40,7 @@
anchored: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -81,7 +81,7 @@
anchored: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -127,7 +127,7 @@
anchored: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml b/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml
index 381a0b0e3d..028921e01c 100644
--- a/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml
+++ b/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml
@@ -22,7 +22,7 @@
anchored: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Power/cables.yml b/Resources/Prototypes/Entities/Structures/Power/cables.yml
index e21a3f2fe1..b3d873de47 100644
--- a/Resources/Prototypes/Entities/Structures/Power/cables.yml
+++ b/Resources/Prototypes/Entities/Structures/Power/cables.yml
@@ -20,7 +20,7 @@
drawdepth: BelowFloor
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Power/debug_power.yml b/Resources/Prototypes/Entities/Structures/Power/debug_power.yml
index fb56873e7e..9a79659914 100644
--- a/Resources/Prototypes/Entities/Structures/Power/debug_power.yml
+++ b/Resources/Prototypes/Entities/Structures/Power/debug_power.yml
@@ -39,7 +39,7 @@
drawRate: 50
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml b/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml
index 4efac92347..cc68a0e4b2 100644
--- a/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml
+++ b/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml
@@ -43,7 +43,7 @@
acts: [ "Destruction" ]
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Physics
bodyType: Dynamic
fixtures:
@@ -364,7 +364,7 @@
acts: [ "Destruction" ]
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: InteractionOutline
- type: Sprite
sprite: Structures/Storage/canister.rsi
diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml
index 50cb140f76..6e28b90d7e 100644
--- a/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml
@@ -41,7 +41,7 @@
placeCentered: true
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml
index 3254423ef0..9bfc9ede80 100644
--- a/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml
@@ -36,7 +36,7 @@
- type: PlaceableSurface
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml
index 2c77192e6b..c0ce44d017 100644
--- a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml
+++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml
@@ -531,7 +531,7 @@
state_closed: livestockcrate_door
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base.yml b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base.yml
index 744176c89f..69f00f72ec 100644
--- a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base.yml
@@ -25,7 +25,7 @@
- SmallImpassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Storage/storage.yml b/Resources/Prototypes/Entities/Structures/Storage/storage.yml
index e36510ee71..e7a0472f6d 100644
--- a/Resources/Prototypes/Entities/Structures/Storage/storage.yml
+++ b/Resources/Prototypes/Entities/Structures/Storage/storage.yml
@@ -27,7 +27,7 @@
- type: Anchorable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base.yml
index 18c4def4ef..938d37f01d 100644
--- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base.yml
@@ -13,7 +13,7 @@
!type:PhysShapeAabb {}
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml
index a004d2cb28..3d1b96d959 100644
--- a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml
+++ b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml
@@ -36,7 +36,7 @@
type: SignalPortSelectorBoundUserInterface
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml b/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml
index 6880d32cae..c1f4c221f4 100644
--- a/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml
+++ b/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml
@@ -11,7 +11,7 @@
state: 0
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Walls/barricades.yml b/Resources/Prototypes/Entities/Structures/Walls/barricades.yml
index 1d8171f9ef..4877f003f7 100644
--- a/Resources/Prototypes/Entities/Structures/Walls/barricades.yml
+++ b/Resources/Prototypes/Entities/Structures/Walls/barricades.yml
@@ -25,7 +25,7 @@
- ExplosivePassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Walls/base.yml b/Resources/Prototypes/Entities/Structures/Walls/base.yml
index 6c1592926b..ab79b00167 100644
--- a/Resources/Prototypes/Entities/Structures/Walls/base.yml
+++ b/Resources/Prototypes/Entities/Structures/Walls/base.yml
@@ -19,7 +19,7 @@
state: full
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Physics
bodyType: Static
fixtures:
diff --git a/Resources/Prototypes/Entities/Structures/Walls/girder.yml b/Resources/Prototypes/Entities/Structures/Walls/girder.yml
index 22e839ce8a..e4a38be23a 100644
--- a/Resources/Prototypes/Entities/Structures/Walls/girder.yml
+++ b/Resources/Prototypes/Entities/Structures/Walls/girder.yml
@@ -29,7 +29,7 @@
- ExplosivePassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Walls/low.yml b/Resources/Prototypes/Entities/Structures/Walls/low.yml
index 5ba591127a..88e753861f 100644
--- a/Resources/Prototypes/Entities/Structures/Walls/low.yml
+++ b/Resources/Prototypes/Entities/Structures/Walls/low.yml
@@ -16,7 +16,7 @@
state: metal
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Windows/plasma.yml b/Resources/Prototypes/Entities/Structures/Windows/plasma.yml
index 3dfbe99d61..73cc09426d 100644
--- a/Resources/Prototypes/Entities/Structures/Windows/plasma.yml
+++ b/Resources/Prototypes/Entities/Structures/Windows/plasma.yml
@@ -10,7 +10,7 @@
sprite: Structures/Windows/plasma_window.rsi
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Glass
+ damageModifierSet: Glass
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/Windows/window.yml b/Resources/Prototypes/Entities/Structures/Windows/window.yml
index 50635b5fcc..712d0c7ba2 100644
--- a/Resources/Prototypes/Entities/Structures/Windows/window.yml
+++ b/Resources/Prototypes/Entities/Structures/Windows/window.yml
@@ -31,7 +31,7 @@
- VaultImpassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Glass
+ damageModifierSet: Glass
- type: Repairable
- type: Destructible
thresholds:
diff --git a/Resources/Prototypes/Entities/Structures/cargo_telepad.yml b/Resources/Prototypes/Entities/Structures/cargo_telepad.yml
index b500c48858..970cd54270 100644
--- a/Resources/Prototypes/Entities/Structures/cargo_telepad.yml
+++ b/Resources/Prototypes/Entities/Structures/cargo_telepad.yml
@@ -20,7 +20,7 @@
drawdepth: FloorObjects
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/meat_spike.yml b/Resources/Prototypes/Entities/Structures/meat_spike.yml
index 8e4b0fb2b7..1a06698b2d 100644
--- a/Resources/Prototypes/Entities/Structures/meat_spike.yml
+++ b/Resources/Prototypes/Entities/Structures/meat_spike.yml
@@ -12,7 +12,7 @@
state: spike
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
diff --git a/Resources/Prototypes/Entities/Structures/soil.yml b/Resources/Prototypes/Entities/Structures/soil.yml
index bb6f10e09c..f6d8e15920 100644
--- a/Resources/Prototypes/Entities/Structures/soil.yml
+++ b/Resources/Prototypes/Entities/Structures/soil.yml
@@ -26,7 +26,7 @@
- SmallImpassable
- type: Damageable
damageContainer: Inorganic
- resistanceSet: Metallic
+ damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger: