Mass hallucinations event (#17321)
* paracusia component auto comp state * it works * rule component config
This commit is contained in:
@@ -1,8 +1,38 @@
|
||||
using Content.Shared.Traits.Assorted;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Traits.Assorted;
|
||||
|
||||
public sealed class ParacusiaSystem : SharedParacusiaSystem
|
||||
{
|
||||
public void SetSounds(EntityUid uid, SoundSpecifier sounds, ParacusiaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
{
|
||||
return;
|
||||
}
|
||||
component.Sounds = sounds;
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
public void SetTime(EntityUid uid, float minTime, float maxTime, ParacusiaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
{
|
||||
return;
|
||||
}
|
||||
component.MinTimeBetweenIncidents = minTime;
|
||||
component.MaxTimeBetweenIncidents = maxTime;
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
public void SetDistance(EntityUid uid, float maxSoundDistance, ParacusiaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
{
|
||||
return;
|
||||
}
|
||||
component.MaxSoundDistance = maxSoundDistance;
|
||||
Dirty(component);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user