Files
OldThink/Content.Server/Instruments/InstrumentComponent.cs
rhailrake 484c8a8d9b stats (#103)
* OH YES

* хули мне хедкодеру
# Conflicts:
#	Content.Server/Instruments/InstrumentComponent.cs
#	Content.Server/Instruments/InstrumentSystem.cs
#	Content.Shared/Cuffs/SharedCuffableSystem.cs
#	Content.Shared/White/WhiteCVars.cs
#	Resources/Prototypes/tags.yml
2024-01-17 19:13:14 +07:00

31 lines
988 B
C#

using Content.Server.UserInterface;
using Content.Shared.Instruments;
using Robust.Server.GameObjects;
using Robust.Shared.Player;
namespace Content.Server.Instruments;
[RegisterComponent]
public sealed partial class InstrumentComponent : SharedInstrumentComponent
{
[Dependency] private readonly IEntityManager _entMan = default!;
[ViewVariables] public float Timer = 0f;
[ViewVariables] public int BatchesDropped = 0;
[ViewVariables] public int LaggedBatches = 0;
[ViewVariables] public int MidiEventCount = 0;
[ViewVariables] public uint LastSequencerTick = 0;
// TODO Instruments: Make this ECS
public ICommonSession? InstrumentPlayer =>
_entMan.GetComponentOrNull<ActivatableUIComponent>(Owner)?.CurrentSingleUser
?? _entMan.GetComponentOrNull<ActorComponent>(Owner)?.PlayerSession;
public TimeSpan? TimeStartedPlaying { get; set; }
}
[RegisterComponent]
public sealed partial class ActiveInstrumentComponent : Component
{
}