Goes in-game now

This commit is contained in:
Vera Aguilera Puerto
2021-12-06 15:34:46 +01:00
parent af4eb3c7cd
commit c57b07a4d0
43 changed files with 129 additions and 130 deletions

View File

@@ -94,7 +94,10 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
if (!EntityManager.TryGetComponent(uid, out InstrumentComponent? instrument))
return;
if (!instrument.Playing || args.SenderSession != instrument.InstrumentPlayer || instrument.InstrumentPlayer == null)
if (!instrument.Playing
|| args.SenderSession != instrument.InstrumentPlayer
|| instrument.InstrumentPlayer == null
|| args.SenderSession.AttachedEntity is not {} attached)
return;
var send = true;
@@ -108,11 +111,11 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
{
if (instrument.LaggedBatches == (int) (MaxMidiLaggedBatches * (1 / 3d) + 1))
{
instrument.InstrumentPlayer.AttachedEntity.PopupMessage(
attached.PopupMessage(
Loc.GetString("instrument-component-finger-cramps-light-message"));
} else if (instrument.LaggedBatches == (int) (MaxMidiLaggedBatches * (2 / 3d) + 1))
{
instrument.InstrumentPlayer.AttachedEntity.PopupMessage(
attached.PopupMessage(
Loc.GetString("instrument-component-finger-cramps-serious-message"));
}
}