mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-15 03:31:30 +01:00
Allow admins to change instrument values with VV.
Just set DirtyRenderer to true after your changes are done, on the server.
This commit is contained in:
@@ -149,6 +149,12 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
|
||||
|
||||
foreach (var instrument in EntityManager.EntityQuery<InstrumentComponent>(true))
|
||||
{
|
||||
if (instrument.DirtyRenderer)
|
||||
{
|
||||
instrument.Dirty();
|
||||
instrument.DirtyRenderer = false;
|
||||
}
|
||||
|
||||
if ((instrument.BatchesDropped >= MaxMidiBatchesDropped
|
||||
|| instrument.LaggedBatches >= MaxMidiLaggedBatches)
|
||||
&& instrument.InstrumentPlayer != null && instrument.RespectMidiLimits)
|
||||
|
||||
@@ -20,19 +20,19 @@ public class SharedInstrumentComponent : Component
|
||||
[ViewVariables]
|
||||
public uint LastSequencerTick { get; set; }
|
||||
|
||||
[DataField("program")]
|
||||
[DataField("program"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public byte InstrumentProgram { get; set; }
|
||||
|
||||
[DataField("bank")]
|
||||
[DataField("bank"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public byte InstrumentBank { get; set; }
|
||||
|
||||
[DataField("allowPercussion")]
|
||||
[DataField("allowPercussion"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool AllowPercussion { get; set; }
|
||||
|
||||
[DataField("allowProgramChange")]
|
||||
[DataField("allowProgramChange"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool AllowProgramChange { get ; set; }
|
||||
|
||||
[DataField("respectMidiLimits")]
|
||||
[DataField("respectMidiLimits"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool RespectMidiLimits { get; set; }
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
|
||||
Reference in New Issue
Block a user