Immovable rod (#8306)
This commit is contained in:
48
Content.Server/ImmovableRod/ImmovableRodComponent.cs
Normal file
48
Content.Server/ImmovableRod/ImmovableRodComponent.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Content.Shared.Sound;
|
||||
|
||||
namespace Content.Server.ImmovableRod;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class ImmovableRodComponent : Component
|
||||
{
|
||||
public int MobCount = 0;
|
||||
|
||||
[DataField("hitSound")]
|
||||
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Effects/bang.ogg");
|
||||
|
||||
[DataField("hitSoundProbability")]
|
||||
public float HitSoundProbability = 0.1f;
|
||||
|
||||
/// <summary>
|
||||
/// The rod will be automatically cleaned up after this time.
|
||||
/// </summary>
|
||||
[DataField("lifetime")]
|
||||
public TimeSpan Lifetime = TimeSpan.FromSeconds(30);
|
||||
|
||||
[DataField("minSpeed")]
|
||||
public float MinSpeed = 10f;
|
||||
|
||||
[DataField("maxSpeed")]
|
||||
public float MaxSpeed = 35f;
|
||||
|
||||
/// <remarks>
|
||||
/// Stuff like wizard rods might want to set this to false, so that they can set the velocity themselves.
|
||||
/// </remarks>
|
||||
[DataField("randomizeVelocity")]
|
||||
public bool RandomizeVelocity = true;
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the random direction for an immovable rod.
|
||||
/// </summary>
|
||||
[DataField("directionOverride")]
|
||||
public Angle DirectionOverride = Angle.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// With this set to true, rods will automatically set the tiles under them to space.
|
||||
/// </summary>
|
||||
[DataField("destroyTiles")]
|
||||
public bool DestroyTiles = true;
|
||||
|
||||
[DataField("accumulator")]
|
||||
public float Accumulator = 0f;
|
||||
}
|
||||
Reference in New Issue
Block a user