Files
tbd-station-14/Content.Server/StationEvents/Components/MassHallucinationsRuleComponent.cs
Aiden 4997f92e18 MassHallucinationsRule Minor Refactor (#28748)
* Update MassHallucinationsRule.

* Update Content.Server/StationEvents/Events/MassHallucinationsRule.cs

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>

* Update Content.Server/StationEvents/Events/MassHallucinationsRule.cs

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>

* Update Content.Server/StationEvents/Events/MassHallucinationsRule.cs

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>

* MGS Change

* Update Content.Server/StationEvents/Events/MassHallucinationsRule.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Update Content.Server/StationEvents/Events/MassHallucinationsRule.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Move affectedentities to component, remove masshallucinationscomponent as its no longer needed to track entities.

* Apply suggested changes.

* No double checks

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-07-20 15:53:57 +10:00

31 lines
1.0 KiB
C#

using Content.Server.StationEvents.Events;
using Robust.Shared.Audio;
using Robust.Shared.Collections;
namespace Content.Server.StationEvents.Components;
[RegisterComponent, Access(typeof(MassHallucinationsRule))]
public sealed partial class MassHallucinationsRuleComponent : Component
{
/// <summary>
/// The maximum time between incidents in seconds
/// </summary>
[DataField("maxTimeBetweenIncidents", required: true), ViewVariables(VVAccess.ReadWrite)]
public float MaxTimeBetweenIncidents;
/// <summary>
/// The minimum time between incidents in seconds
/// </summary>
[DataField("minTimeBetweenIncidents", required: true), ViewVariables(VVAccess.ReadWrite)]
public float MinTimeBetweenIncidents;
[DataField("maxSoundDistance", required: true), ViewVariables(VVAccess.ReadWrite)]
public float MaxSoundDistance;
[DataField("sounds", required: true)]
public SoundSpecifier Sounds = default!;
[DataField, ViewVariables(VVAccess.ReadOnly)]
public List<EntityUid> AffectedEntities = new();
}