* clustergrenades go boom * Small tweaks * Some tweaks and soaplet * clustergrenadesystem changes and launcher types * small tweaks * typo * whitespace * rsi edit * another typo * add containers * Some changes related to merge * Forgot to change name * Made changes based on review * Removed new china lake ammo based on feedback in other PR * Unneeded nested loop moment * Nested loop needed after all moment
59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
using Content.Shared.Damage;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Shared.Projectiles;
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class ProjectileComponent : Component
|
|
{
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("impactEffect", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
public string? ImpactEffect;
|
|
|
|
/// <summary>
|
|
/// User that shot this projectile.
|
|
/// </summary>
|
|
[DataField("shooter"), AutoNetworkedField]
|
|
public EntityUid? Shooter;
|
|
|
|
/// <summary>
|
|
/// Weapon used to shoot.
|
|
/// </summary>
|
|
[DataField("weapon"), AutoNetworkedField]
|
|
public EntityUid? Weapon;
|
|
|
|
[DataField("ignoreShooter"), AutoNetworkedField]
|
|
public bool IgnoreShooter = true;
|
|
|
|
[DataField("damage", required: true)] [ViewVariables(VVAccess.ReadWrite)]
|
|
public DamageSpecifier Damage = new();
|
|
|
|
[DataField("deleteOnCollide")]
|
|
public bool DeleteOnCollide = true;
|
|
|
|
[DataField("canPenetrate")]
|
|
public bool CanPenetrate = false;
|
|
|
|
[DataField("ignoreResistances")]
|
|
public bool IgnoreResistances = false;
|
|
|
|
// Get that juicy FPS hit sound
|
|
[DataField("soundHit")] public SoundSpecifier? SoundHit;
|
|
|
|
[DataField("soundForce")]
|
|
public bool ForceSound = false;
|
|
|
|
/// <summary>
|
|
/// Whether this projectile will only collide with entities if it was shot from a gun (if <see cref="Weapon"/> is not null)
|
|
/// </summary>
|
|
[DataField("onlyCollideWhenShot")]
|
|
public bool OnlyCollideWhenShot = false;
|
|
|
|
/// <summary>
|
|
/// Whether this projectile has already damaged an entity.
|
|
/// </summary>
|
|
public bool DamagedEntity;
|
|
}
|