InstrumentSystem.CVars.cs 789 B

12345678910111213141516171819
  1. using Content.Shared.CCVar;
  2. namespace Content.Server.Instruments;
  3. public sealed partial class InstrumentSystem
  4. {
  5. public int MaxMidiEventsPerSecond { get; private set; }
  6. public int MaxMidiEventsPerBatch { get; private set; }
  7. public int MaxMidiBatchesDropped { get; private set; }
  8. public int MaxMidiLaggedBatches { get; private set; }
  9. private void InitializeCVars()
  10. {
  11. Subs.CVar(_cfg, CCVars.MaxMidiEventsPerSecond, obj => MaxMidiEventsPerSecond = obj, true);
  12. Subs.CVar(_cfg, CCVars.MaxMidiEventsPerBatch, obj => MaxMidiEventsPerBatch = obj, true);
  13. Subs.CVar(_cfg, CCVars.MaxMidiBatchesDropped, obj => MaxMidiBatchesDropped = obj, true);
  14. Subs.CVar(_cfg, CCVars.MaxMidiLaggedBatches, obj => MaxMidiLaggedBatches = obj, true);
  15. }
  16. }