Revert "Refactor Damage to use Protoypes (#4262)"

This reverts commit 20bf5739a9.
This commit is contained in:
Silver
2021-08-24 00:50:39 -06:00
committed by Silver
parent 20bf5739a9
commit e708091518
121 changed files with 711 additions and 10237 deletions

View File

@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Content.Server.Damage;
using Content.Shared.Damage;
using Content.Shared.Damage.Components;
@@ -7,7 +7,6 @@ using NUnit.Framework;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
namespace Content.IntegrationTests.Tests.Commands
{
@@ -21,7 +20,7 @@ namespace Content.IntegrationTests.Tests.Commands
id: DamageableDummy
components:
- type: Damageable
damageContainer: biologicalDamageContainer
damagePrototype: biologicalDamageContainer
- type: MobState
thresholds:
0: !type:NormalMobState {}
@@ -42,7 +41,6 @@ namespace Content.IntegrationTests.Tests.Commands
mapManager.CreateNewMapEntity(MapId.Nullspace);
var entityManager = IoCManager.Resolve<IEntityManager>();
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
var human = entityManager.SpawnEntity("DamageableDummy", MapCoordinates.Nullspace);
@@ -55,7 +53,7 @@ namespace Content.IntegrationTests.Tests.Commands
Assert.That(mobState.IsIncapacitated, Is.False);
// Kill the entity
damageable.TryChangeDamage(prototypeManager.Index<DamageGroupPrototype>("Toxin"), 10000000, true);
damageable.ChangeDamage(DamageClass.Brute, 10000000, true);
// Check that it is dead
Assert.That(mobState.IsAlive, Is.False);