Revert "Refactor Damage to use Protoypes (#4262)"
This reverts commit 20bf5739a9.
This commit is contained in:
@@ -9,10 +9,8 @@ using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Projectiles.Components
|
||||
{
|
||||
@@ -27,96 +25,33 @@ namespace Content.Server.Projectiles.Components
|
||||
public override string Name => "Hitscan";
|
||||
public CollisionGroup CollisionMask => (CollisionGroup) _collisionMask;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< refs/remotes/origin/master
|
||||
public override string Name => "Hitscan";
|
||||
public CollisionGroup CollisionMask => (CollisionGroup) _collisionMask;
|
||||
=======
|
||||
>>>>>>> Bring refactor-damageablecomponent branch up-to-date with master (#4510)
|
||||
=======
|
||||
>>>>>>> refactor-damageablecomponent
|
||||
|
||||
[DataField("layers")] //todo WithFormat.Flags<CollisionLayer>()
|
||||
private int _collisionMask = (int) CollisionGroup.Opaque;
|
||||
|
||||
public float Damage
|
||||
{
|
||||
get => _damage;
|
||||
set => _damage = value;
|
||||
}
|
||||
[DataField("damage")]
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< refs/remotes/origin/master
|
||||
private float _damage = 10f;
|
||||
public DamageType DamageType => _damageType;
|
||||
[DataField("damageType")]
|
||||
private DamageType _damageType = DamageType.Heat;
|
||||
public float MaxLength => 20.0f;
|
||||
=======
|
||||
public float Damage { get; set; } = 10f;
|
||||
public float MaxLength => 20.0f;
|
||||
>>>>>>> refactor-damageablecomponent
|
||||
|
||||
<<<<<<< refs/remotes/origin/master
|
||||
private TimeSpan _startTime;
|
||||
private TimeSpan _deathTime;
|
||||
=======
|
||||
[DataField("damageType", required: true)]
|
||||
private string _damageTypeID = default!;
|
||||
|
||||
private DamageTypePrototype _damageType => _prototypeManager.Index<DamageTypePrototype>(_damageTypeID);
|
||||
>>>>>>> update damagecomponent across shared and server
|
||||
=======
|
||||
public float Damage { get; set; } = 10f;
|
||||
<<<<<<< refs/remotes/origin/master
|
||||
>>>>>>> Refactor damageablecomponent update (#4406)
|
||||
|
||||
public float ColorModifier { get; set; } = 1.0f;
|
||||
<<<<<<< HEAD
|
||||
[DataField("spriteName")]
|
||||
=======
|
||||
public float MaxLength => 20.0f;
|
||||
|
||||
private TimeSpan _startTime;
|
||||
private TimeSpan _deathTime;
|
||||
|
||||
public float ColorModifier { get; set; } = 1.0f;
|
||||
[DataField("spriteName")]
|
||||
>>>>>>> Bring refactor-damageablecomponent branch up-to-date with master (#4510)
|
||||
=======
|
||||
[DataField("spriteName")]
|
||||
>>>>>>> refactor-damageablecomponent
|
||||
private string _spriteName = "Objects/Weapons/Guns/Projectiles/laser.png";
|
||||
[DataField("muzzleFlash")]
|
||||
private string? _muzzleFlash;
|
||||
[DataField("impactFlash")]
|
||||
private string? _impactFlash;
|
||||
[DataField("soundHitWall")]
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< refs/remotes/origin/master
|
||||
<<<<<<< refs/remotes/origin/master
|
||||
private SoundSpecifier _soundHitWall = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg");
|
||||
=======
|
||||
private string _soundHitWall = "/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg";
|
||||
[DataField("spriteName")]
|
||||
private string _spriteName = "Objects/Weapons/Guns/Projectiles/laser.png";
|
||||
=======
|
||||
private SoundSpecifier _soundHitWall = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg");
|
||||
>>>>>>> Bring refactor-damageablecomponent branch up-to-date with master (#4510)
|
||||
=======
|
||||
private SoundSpecifier _soundHitWall = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg");
|
||||
>>>>>>> refactor-damageablecomponent
|
||||
|
||||
|
||||
// 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 = "Piercing";
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public DamageTypePrototype DamageType = default!;
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
DamageType = IoCManager.Resolve<IPrototypeManager>().Index<DamageTypePrototype>(_damageTypeID);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> update damagecomponent across shared and server
|
||||
=======
|
||||
>>>>>>> refactor-damageablecomponent
|
||||
|
||||
public void FireEffects(IEntity user, float distance, Angle angle, IEntity? hitEntity = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user