mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.
* Missed a few
* Revert changes to pulling
* No
(cherry picked from commit 4a83c36585)
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
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(uid, 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(uid, component);
|
|
}
|
|
|
|
public void SetDistance(EntityUid uid, float maxSoundDistance, ParacusiaComponent? component = null)
|
|
{
|
|
if (!Resolve(uid, ref component))
|
|
{
|
|
return;
|
|
}
|
|
component.MaxSoundDistance = maxSoundDistance;
|
|
Dirty(uid, component);
|
|
}
|
|
}
|