* permission changes * super matter changes * NT backpack energy dome * energy dome is contraband * fix singularity * upd * upd supermatter * reflector * upd * upd * add meta.json * fix announcement * upd * fix rsi * fix ids * return checking for double actions * fix hydro assembly * fix x2 hydroponics and chemistry airlock * upd * У всех хардсьютов временно забран пнв(переработка хардсьютов под пнв момент) * peace parts * clown parts * upd parts meta * akms bigger price * fix * fix x2 * add clown, peace parts --------- Co-authored-by: darkrell <rc-alh@outlook.com>
41 lines
1.3 KiB
C#
41 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
|
|
/// Uses <c>ItemToggleComponent</c> to control reflection.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class ReflectComponent : Component
|
|
{
|
|
/// <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("overrideAngle"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
|
public Angle? OverrideAngle = null;
|
|
|
|
[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,
|
|
}
|