Fix up midi stuff, support mild black midis (#1056)
This commit is contained in:
@@ -8,6 +8,13 @@ namespace Content.Shared.GameObjects.Components.Instruments
|
||||
{
|
||||
public class SharedInstrumentComponent : Component
|
||||
{
|
||||
|
||||
// These 2 values are quite high for now, and this could be easily abused. Change this if people are abusing it.
|
||||
public const int MaxMidiEventsPerSecond = 1000;
|
||||
public const int MaxMidiEventsPerBatch = 60;
|
||||
public const int MaxMidiBatchDropped = 1;
|
||||
public const int MaxMidiLaggedBatches = 8;
|
||||
|
||||
public override string Name => "Instrument";
|
||||
public override uint? NetID => ContentNetIDs.INSTRUMENTS;
|
||||
|
||||
@@ -52,12 +59,10 @@ namespace Content.Shared.GameObjects.Components.Instruments
|
||||
public class InstrumentState : ComponentState
|
||||
{
|
||||
public bool Playing { get; }
|
||||
public uint SequencerTick { get; }
|
||||
|
||||
public InstrumentState(bool playing, uint sequencerTick = 0) : base(ContentNetIDs.INSTRUMENTS)
|
||||
{
|
||||
Playing = playing;
|
||||
SequencerTick = sequencerTick;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user