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:
Plykiya
2024-12-16 04:08:07 -08:00
committed by GitHub
parent 1266b05b02
commit a4d6f09a4f
14 changed files with 757 additions and 558 deletions

View File

@@ -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;
}