Files
tbd-station-14/Content.Shared/Weapons/Reflect/ReflectComponent.cs
metalgearsloth 0546c9bf64 Revert "Weapon Reflection Movement Mechanic (#27219)" (#29326)
* Revert "Weapon Reflection Movement Mechanic (#27219)"

This reverts commit b90373356e.

# Conflicts:
#	Content.Shared/Alert/AlertType.cs
#	Content.Shared/Weapons/Reflect/ReflectSystem.cs

* Add myself to codeowners

* Add myself to codeowners

* Also the alerts
2024-06-22 22:16:08 -04:00

44 lines
1.3 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Weapons.Reflect;
/// <summary>
/// Entities with this component have a chance to reflect projectiles and hitscan shots
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ReflectComponent : Component
{
/// <summary>
/// Can only reflect when enabled
/// </summary>
[DataField("enabled"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public bool Enabled = true;
/// <summary>
/// What we reflect.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("reflects")]
public ReflectType Reflects = ReflectType.Energy | ReflectType.NonEnergy;
/// <summary>
/// Probability for a projectile to be reflected.
/// </summary>
[DataField("reflectProb"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public float ReflectProb = 0.25f;
[DataField("spread"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public Angle Spread = Angle.FromDegrees(45);
[DataField("soundOnReflect")]
public SoundSpecifier? SoundOnReflect = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg");
}
[Flags]
public enum ReflectType : byte
{
None = 0,
NonEnergy = 1 << 0,
Energy = 1 << 1,
}