using Content.Shared.Recycling;
using Content.Shared.Sound;
namespace Content.Server.Recycling.Components
{
// TODO: Add sound and safe beep
[RegisterComponent]
[Access(typeof(RecyclerSystem))]
public sealed class RecyclerComponent : Component
[Dependency] private readonly IEntityManager _entMan = default!;
[ViewVariables]
[DataField("enabled")]
public bool Enabled = true;
/// <summary>
/// Whether or not sentient beings will be recycled
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("safe")]
internal bool Safe = true;
/// The percentage of material that will be recovered
[DataField("efficiency")]
internal float Efficiency = 0.25f;
private void Clean()
if (_entMan.TryGetComponent(Owner, out AppearanceComponent? appearance))
appearance.SetData(RecyclerVisuals.Bloody, false);
}
/// Default sound to play when recycling
[ViewVariables(VVAccess.ReadWrite)] [DataField("sound")]
public SoundSpecifier? Sound = new SoundPathSpecifier("/Audio/Effects/saw.ogg");
// Ratelimit sounds to avoid spam
public TimeSpan LastSound;