Skip to content

Commit

Permalink
Cluster grenade refactor and contra markings (space-wizards#31108)
Browse files Browse the repository at this point in the history
* Cluster grenade refactor

* oopsies on the name

* Solve client-side errors

* reviews addressed

* filling scattering grenades is now predicted

* reviews addressed
  • Loading branch information
Plykiya authored and Doctor-Cpu committed Jan 2, 2025
1 parent 38367c6 commit 888e5a9
Show file tree
Hide file tree
Showing 14 changed files with 757 additions and 558 deletions.
8 changes: 8 additions & 0 deletions Content.Client/Explosion/ScatteringGrenadeSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Content.Shared.Explosion.EntitySystems;

namespace Content.Client.Explosion;

public sealed class ScatteringGrenadeSystem : SharedScatteringGrenadeSystem
{

}
117 changes: 0 additions & 117 deletions Content.Server/Explosion/Components/ClusterGrenadeComponent.cs

This file was deleted.

48 changes: 48 additions & 0 deletions Content.Server/Explosion/Components/ProjectileGrenadeComponent.cs
Original file line number Diff line number Diff line change
@@ -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;
}
177 changes: 0 additions & 177 deletions Content.Server/Explosion/EntitySystems/ClusterGrenadeSystem.cs

This file was deleted.

Loading

0 comments on commit 888e5a9

Please sign in to comment.