CVars for MIDI instrument limits (#2632)

* CVars for MIDI instruments limits!

* Localize this

* Cache CVars in instrument systems

* better naming

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Víctor Aguilera Puerto
2020-11-27 17:12:45 +01:00
committed by GitHub
parent 6bb1e9fa5d
commit cec722e19e
6 changed files with 114 additions and 22 deletions

View File

@@ -8,13 +8,6 @@ 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;