Instruments respect MIDI limits by default again.
Cleans up the limit stun.
This commit is contained in:
@@ -155,20 +155,20 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
|
||||
instrument.DirtyRenderer = false;
|
||||
}
|
||||
|
||||
if ((instrument.BatchesDropped >= MaxMidiBatchesDropped
|
||||
|| instrument.LaggedBatches >= MaxMidiLaggedBatches)
|
||||
&& instrument.InstrumentPlayer != null && instrument.RespectMidiLimits)
|
||||
if (instrument.RespectMidiLimits && instrument.InstrumentPlayer != null &&
|
||||
(instrument.BatchesDropped >= MaxMidiBatchesDropped
|
||||
|| instrument.LaggedBatches >= MaxMidiLaggedBatches))
|
||||
{
|
||||
// Just in case
|
||||
Clean((instrument).Owner);
|
||||
instrument.UserInterface?.CloseAll();
|
||||
|
||||
if (instrument.InstrumentPlayer.AttachedEntity is {Valid: true} mob)
|
||||
if (instrument.InstrumentPlayer?.AttachedEntity is {Valid: true} mob)
|
||||
{
|
||||
_stunSystem.TryParalyze(mob, TimeSpan.FromSeconds(1), true);
|
||||
|
||||
instrument.Owner.PopupMessage(mob, "instrument-component-finger-cramps-max-message");
|
||||
instrument.Owner.PopupMessage(mob, Loc.GetString("instrument-component-finger-cramps-max-message"));
|
||||
}
|
||||
|
||||
// Just in case
|
||||
Clean((instrument).Owner);
|
||||
instrument.UserInterface?.CloseAll();
|
||||
}
|
||||
|
||||
instrument.Timer += frameTime;
|
||||
|
||||
Reference in New Issue
Block a user