Revert "Refactor Damage to use Protoypes (#4262)"
This reverts commit 20bf5739a9.
This commit is contained in:
@@ -3,9 +3,6 @@ using Content.Shared.Damage;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Damage.Components
|
||||
{
|
||||
@@ -17,14 +14,8 @@ namespace Content.Server.Damage.Components
|
||||
{
|
||||
public override string Name => "DamageOnHighSpeedImpact";
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< refs/remotes/origin/master
|
||||
[DataField("damage")]
|
||||
public DamageType Damage { get; set; } = DamageType.Blunt;
|
||||
=======
|
||||
>>>>>>> Refactor damageablecomponent update (#4406)
|
||||
=======
|
||||
>>>>>>> refactor-damageablecomponent
|
||||
[DataField("minimumSpeed")]
|
||||
public float MinimumSpeed { get; set; } = 20f;
|
||||
[DataField("baseDamage")]
|
||||
@@ -43,17 +34,5 @@ namespace Content.Server.Damage.Components
|
||||
public float DamageCooldown { get; set; } = 2f;
|
||||
|
||||
internal TimeSpan LastHit = TimeSpan.Zero;
|
||||
|
||||
// TODO PROTOTYPE Replace this datafield variable with prototype references, once they are supported.
|
||||
// Also remove Initialize override, if no longer needed.
|
||||
[DataField("damageType")]
|
||||
private readonly string _damageTypeID = "Blunt";
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public DamageTypePrototype DamageType = default!;
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
DamageType = IoCManager.Resolve<IPrototypeManager>().Index<DamageTypePrototype>(_damageTypeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user