Merge branch 'master' into 2020-04-28-tool-component
# Conflicts: # Content.Server/GameObjects/Components/AnchorableComponent.cs # Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs # Content.Server/GameObjects/Components/Interactable/Tools/CrowbarComponent.cs # Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs # Content.Server/GameObjects/Components/WiresComponent.cs # Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs # Resources/Prototypes/Entities/Items/tools.yml
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Content.Shared.BodySystem;
|
||||
using Robust.Shared.Audio.Midi;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -9,6 +10,10 @@ namespace Content.Shared.GameObjects.Components.Instruments
|
||||
{
|
||||
public override string Name => "Instrument";
|
||||
public override uint? NetID => ContentNetIDs.INSTRUMENTS;
|
||||
|
||||
public virtual void Update(float delta)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,19 +25,39 @@ namespace Content.Shared.GameObjects.Components.Instruments
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This message is sent to the client to start the synth.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public class InstrumentStartMidiMessage : ComponentMessage
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This message carries a MidiEvent to be played on clients.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public class InstrumentMidiEventMessage : ComponentMessage
|
||||
{
|
||||
public MidiEvent MidiEvent;
|
||||
public double Timestamp;
|
||||
public MidiEvent[] MidiEvent;
|
||||
|
||||
public InstrumentMidiEventMessage(MidiEvent midiEvent, double timestamp)
|
||||
public InstrumentMidiEventMessage(MidiEvent[] midiEvent)
|
||||
{
|
||||
MidiEvent = midiEvent;
|
||||
Timestamp = timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class InstrumentState : ComponentState
|
||||
{
|
||||
public bool Playing { get; }
|
||||
public uint SequencerTick { get; }
|
||||
|
||||
public InstrumentState(bool playing, uint sequencerTick = 0) : base(ContentNetIDs.INSTRUMENTS)
|
||||
{
|
||||
Playing = playing;
|
||||
SequencerTick = sequencerTick;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user