Cluster grenade refactor and contra markings (#31108)
* Cluster grenade refactor * oopsies on the name * Solve client-side errors * reviews addressed * filling scattering grenades is now predicted * reviews addressed
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Explosion.Components;
|
||||
/// <summary>
|
||||
/// Grenades that, when triggered, explode into projectiles
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(ProjectileGrenadeSystem))]
|
||||
public sealed partial class ProjectileGrenadeComponent : Component
|
||||
{
|
||||
public Container Container = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The kind of projectile that the prototype is filled with.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public EntProtoId? FillPrototype;
|
||||
|
||||
/// <summary>
|
||||
/// If we have a pre-fill how many more can we spawn.
|
||||
/// </summary>
|
||||
public int UnspawnedCount;
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of projectiles
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public int Capacity = 3;
|
||||
|
||||
/// <summary>
|
||||
/// Should the angle of the projectiles be uneven?
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool RandomAngle = false;
|
||||
|
||||
/// <summary>
|
||||
/// The minimum speed the projectiles may come out at
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float MinVelocity = 2f;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum speed the projectiles may come out at
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float MaxVelocity = 6f;
|
||||
}
|
||||
Reference in New Issue
Block a user