Instruments have a property for enabling/disabling MIDI limits.

- Added unlimited super synth that doesn't respect MIDI limits! Adminbuse it to your heart's content and blast your epic MIDIs, fellow badmins.
This commit is contained in:
Vera Aguilera Puerto
2020-12-20 01:43:29 +01:00
parent c0a0547b39
commit c9e9d9f4dd
4 changed files with 54 additions and 16 deletions

View File

@@ -11,11 +11,21 @@ namespace Content.Shared.GameObjects.Components.Instruments
public override string Name => "Instrument";
public override uint? NetID => ContentNetIDs.INSTRUMENTS;
[ViewVariables(VVAccess.ReadWrite)]
public virtual byte InstrumentProgram { get; set; }
[ViewVariables(VVAccess.ReadWrite)]
public virtual byte InstrumentBank { get; set; }
[ViewVariables(VVAccess.ReadWrite)]
public virtual bool AllowPercussion { get; set; }
[ViewVariables(VVAccess.ReadWrite)]
public virtual bool AllowProgramChange { get ; set; }
[ViewVariables(VVAccess.ReadWrite)]
public virtual bool RespectMidiLimits { get; set; }
public virtual void Update(float delta)
{
}
@@ -61,14 +71,16 @@ namespace Content.Shared.GameObjects.Components.Instruments
public byte InstrumentBank { get; }
public bool AllowPercussion { get; }
public bool AllowProgramChange { get; }
public bool RespectMidiLimits { get; }
public InstrumentState(bool playing, byte instrumentProgram, byte instrumentBank, bool allowPercussion, bool allowProgramChange, uint sequencerTick = 0) : base(ContentNetIDs.INSTRUMENTS)
public InstrumentState(bool playing, byte instrumentProgram, byte instrumentBank, bool allowPercussion, bool allowProgramChange, bool respectMidiLimits, uint sequencerTick = 0) : base(ContentNetIDs.INSTRUMENTS)
{
Playing = playing;
InstrumentProgram = instrumentProgram;
InstrumentBank = instrumentBank;
AllowPercussion = allowPercussion;
AllowProgramChange = allowProgramChange;
RespectMidiLimits = respectMidiLimits;
}
}