mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Content update for UI refactor
* Big update
* Sharing
* Remaining content updates
* First big update
* Prototype updates
* AUGH
* Fix UI comp ref
* Cleanup
- Fix predicted message, fix item slots, fix interaction range check.
* Fix regressions
* Make this predictive
idk why it wasn't.
* Fix slime merge
* Merge conflict
* Fix merge
(cherry picked from commit 5896e68752)
29 lines
994 B
C#
29 lines
994 B
C#
using Content.Server.UserInterface;
|
|
using Content.Shared.Instruments;
|
|
using Robust.Shared.Player;
|
|
using ActivatableUIComponent = Content.Shared.UserInterface.ActivatableUIComponent;
|
|
|
|
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 EntityUid? InstrumentPlayer =>
|
|
_entMan.GetComponentOrNull<ActivatableUIComponent>(Owner)?.CurrentSingleUser
|
|
?? _entMan.GetComponentOrNull<ActorComponent>(Owner)?.PlayerSession.AttachedEntity;
|
|
}
|
|
|
|
[RegisterComponent]
|
|
public sealed partial class ActiveInstrumentComponent : Component
|
|
{
|
|
}
|