Allow changing instrument style while playing them (#9946)

* Properly dirty changes when calling "SetInstrumentProgram" method

* Allow using swappable instrument verbs even while playing the instrument.
It's funnier this way
This commit is contained in:
Vera Aguilera Puerto
2022-07-24 13:40:05 +02:00
committed by GitHub
parent 16a08a60d0
commit cb5f051be5
2 changed files with 3 additions and 4 deletions

View File

@@ -20,8 +20,10 @@ public abstract class SharedInstrumentSystem : EntitySystem
public void SetInstrumentProgram(SharedInstrumentComponent component, byte program, byte bank)
{
component.InstrumentProgram = program;
component.InstrumentBank = bank;
component.InstrumentProgram = program;
component.DirtyRenderer = true;
Dirty(component);
}
private void OnGetState(EntityUid uid, SharedInstrumentComponent instrument, ref ComponentGetState args)