mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
Uses the following Cherry-Picks: https://github.com/space-wizards/space-station-14/pull/26994 https://github.com/space-wizards/space-station-14/pull/26518 https://github.com/space-wizards/space-station-14/pull/26279 https://github.com/space-wizards/space-station-14/pull/24946 https://github.com/space-wizards/space-station-14/pull/27188 Requires: https://github.com/Simple-Station/Einstein-Engines/pull/535 https://github.com/Simple-Station/Einstein-Engines/pull/534 --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Co-authored-by: Jake Huxell <JakeHuxell@pm.me> Co-authored-by: Tayrtahn <tayrtahn@gmail.com> Co-authored-by: 0x6273 <0x40@keemail.me> Co-authored-by: DEATHB4DEFEAT <zachcaffee@outlook.com>
28 lines
900 B
C#
28 lines
900 B
C#
using Content.Server.UserInterface;
|
|
using Content.Shared.Instruments;
|
|
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;
|
|
}
|
|
|
|
[RegisterComponent]
|
|
public sealed partial class ActiveInstrumentComponent : Component
|
|
{
|
|
}
|