2022-12-24 23:28:21 -05:00
|
|
|
using Content.Shared.Damage;
|
|
|
|
|
using Robust.Shared.Audio;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2022-07-09 13:46:11 +10:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2020-07-02 23:24:27 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Projectiles
|
2020-07-02 23:24:27 +02:00
|
|
|
{
|
2022-12-24 23:28:21 -05:00
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
|
|
|
public sealed class ProjectileComponent : Component
|
2020-07-02 23:24:27 +02:00
|
|
|
{
|
2022-07-09 13:46:11 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("impactEffect", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
public string? ImpactEffect;
|
|
|
|
|
|
|
|
|
|
public EntityUid Shooter { get; set; }
|
2020-07-02 23:24:27 +02:00
|
|
|
|
2022-12-28 03:58:53 +11:00
|
|
|
public bool IgnoreShooter = true;
|
2022-12-24 23:28:21 -05:00
|
|
|
|
|
|
|
|
[DataField("damage", required: true)]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public DamageSpecifier Damage = default!;
|
|
|
|
|
|
|
|
|
|
[DataField("deleteOnCollide")]
|
|
|
|
|
public bool DeleteOnCollide { get; } = true;
|
|
|
|
|
|
|
|
|
|
[DataField("ignoreResistances")]
|
|
|
|
|
public bool IgnoreResistances { get; } = false;
|
|
|
|
|
|
|
|
|
|
// Get that juicy FPS hit sound
|
|
|
|
|
[DataField("soundHit")] public SoundSpecifier? SoundHit;
|
|
|
|
|
|
|
|
|
|
[DataField("soundForce")]
|
|
|
|
|
public bool ForceSound = false;
|
|
|
|
|
|
|
|
|
|
public bool DamagedEntity;
|
2020-07-02 23:24:27 +02:00
|
|
|
}
|
|
|
|
|
}
|