Adds playable instruments, IDropped, IHandSelected and IHandDese… (#368)
* Instrument test. * Midi stuff * Some more work * This actually works now! * update * Midi Audio works! * Lots of stuff, and cool interfaces for items * Update * Fix a few things * It just works * Move textures to another folder, remove placeholder description from instruments * Fix warning * Use renderer enum * Instruments now use DisposeRenderer method, and send MidiEvents as they receive them. Deletes InstrumentSystem whoo. * Fix incorrect sprite paths * Instruments take midi file size check into account when enabling/disabling midi playback buttons * Fix crash when pressing drop on empty hand. * Use new renderer return values for midi/input * Xylophones are no longer handheld instruments, fix their sprites. * Use new API * Remove nfluidsynth from solution * Timing information * Use IGameTiming.CurTime for timestamps instead
69
Resources/Prototypes/Entities/buildings/instruments.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
- type: entity
|
||||
name: BaseInstrument
|
||||
id: BaseInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
handheld: false
|
||||
|
||||
- type: Clickable
|
||||
|
||||
- type: Collidable
|
||||
shapes:
|
||||
- !type:PhysShapeAabb
|
||||
mask: 19
|
||||
layer: 16
|
||||
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
|
||||
- type: Damageable
|
||||
- type: Destructible
|
||||
thresholdvalue: 50
|
||||
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
- key: enum.InstrumentUiKey.Key
|
||||
type: InstrumentBoundUserInterface
|
||||
|
||||
- type: entity
|
||||
name: Piano
|
||||
parent: BaseInstrument
|
||||
id: PianoInstrument
|
||||
description: Play Needles Piano Now.
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 1
|
||||
- type: Sprite
|
||||
sprite: Objects/Instruments/musician.rsi
|
||||
state: piano
|
||||
- type: Icon
|
||||
sprite: Objects/Instruments/musician.rsi
|
||||
state: piano
|
||||
|
||||
- type: entity
|
||||
name: Minimoog
|
||||
parent: BaseInstrument
|
||||
id: MinimoogInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 7
|
||||
- type: Sprite
|
||||
sprite: Objects/Instruments/musician.rsi
|
||||
state: minimoog
|
||||
- type: Icon
|
||||
sprite: Objects/Instruments/musician.rsi
|
||||
state: minimoog
|
||||
|
||||
- type: entity
|
||||
name: Xylophone
|
||||
parent: BaseInstrument
|
||||
id: XylophoneInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 13
|
||||
- type: Sprite
|
||||
sprite: Objects/Instruments/musician.rsi
|
||||
state: xylophone
|
||||
- type: Icon
|
||||
sprite: Objects/Instruments/musician.rsi
|
||||
state: xylophone
|
||||
131
Resources/Prototypes/Entities/items/Instruments.yml
Normal file
@@ -0,0 +1,131 @@
|
||||
- type: entity
|
||||
name: BaseHandheldInstrument
|
||||
parent: BaseItem
|
||||
id: BaseHandheldInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
handheld: true
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
- key: enum.InstrumentUiKey.Key
|
||||
type: InstrumentBoundUserInterface
|
||||
|
||||
- type: entity
|
||||
name: Synthesizer
|
||||
parent: BaseHandheldInstrument
|
||||
id: SynthesizerInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 2
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/h_synthesizer.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/h_synthesizer.png
|
||||
|
||||
- type: entity
|
||||
name: Violin
|
||||
parent: BaseHandheldInstrument
|
||||
id: ViolinInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 40
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/violin.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/violin.png
|
||||
|
||||
- type: entity
|
||||
name: Trumpet
|
||||
parent: BaseHandheldInstrument
|
||||
id: TrumpetInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 56
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/trumpet.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/trumpet.png
|
||||
|
||||
- type: entity
|
||||
name: Electric Guitar
|
||||
parent: BaseHandheldInstrument
|
||||
id: ElectricGuitarInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 27
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/eguitar.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/eguitar.png
|
||||
|
||||
- type: entity
|
||||
name: Accordion
|
||||
parent: BaseHandheldInstrument
|
||||
id: AccordionInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 21
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/accordion.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/accordion.png
|
||||
|
||||
- type: entity
|
||||
name: Harmonica
|
||||
parent: BaseHandheldInstrument
|
||||
id: HarmonicaInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 22
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/harmonica.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/harmonica.png
|
||||
|
||||
- type: entity
|
||||
name: Recorder
|
||||
parent: BaseHandheldInstrument
|
||||
id: RecorderInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 74
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/recorder.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/recorder.png
|
||||
|
||||
- type: entity
|
||||
name: Trombone
|
||||
parent: BaseHandheldInstrument
|
||||
id: TromboneInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 57
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/trombone.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/trombone.png
|
||||
|
||||
- type: entity
|
||||
name: Saxophone
|
||||
parent: BaseHandheldInstrument
|
||||
id: SaxophoneInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 67
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/saxophone.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/saxophone.png
|
||||
|
||||
- type: entity
|
||||
name: Glockenspiel
|
||||
parent: BaseHandheldInstrument
|
||||
id: GlockenspielInstrument
|
||||
components:
|
||||
- type: Instrument
|
||||
program: 9
|
||||
- type: Sprite
|
||||
texture: Objects/Instruments/musician.rsi/glockenspiel.png
|
||||
- type: Icon
|
||||
texture: Objects/Instruments/musician.rsi/glockenspiel.png
|
||||
|
After Width: | Height: | Size: 772 B |
|
After Width: | Height: | Size: 411 B |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/drum.png
Normal file
|
After Width: | Height: | Size: 550 B |
|
After Width: | Height: | Size: 518 B |
|
After Width: | Height: | Size: 520 B |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/eguitar.png
Normal file
|
After Width: | Height: | Size: 808 B |
|
After Width: | Height: | Size: 551 B |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/guitar.png
Normal file
|
After Width: | Height: | Size: 926 B |
|
After Width: | Height: | Size: 565 B |
|
After Width: | Height: | Size: 780 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/vgstation-coders/vgstation13 at 8d9c91e19cb52713c7f7f1804c2b6f7203f8d331", "states": [{"name": "accordion", "directions": 1, "delays": [[1.0]]}, {"name": "bike_horn", "directions": 1, "delays": [[1.0]]}, {"name": "drum", "directions": 1, "delays": [[1.0]]}, {"name": "drum_bongo", "directions": 1, "delays": [[1.0]]}, {"name": "drum_makeshift", "directions": 1, "delays": [[1.0]]}, {"name": "glockenspiel", "directions": 1, "delays": [[1.0]]}, {"name": "guitar", "directions": 1, "delays": [[1.0]]}, {"name": "harmonica", "directions": 1, "delays": [[1.0]]}, {"name": "minimoog", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "minimoog-broken", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "piano", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "piano-broken", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "recorder", "directions": 1, "delays": [[1.0]]}, {"name": "saxophone", "directions": 1, "delays": [[1.0]]}, {"name": "trombone", "directions": 1, "delays": [[1.0]]}, {"name": "violin", "directions": 1, "delays": [[1.0]]}, {"name": "xylophone", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "xylophone-broken", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]}
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/minimoog.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/piano.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/recorder.png
Normal file
|
After Width: | Height: | Size: 414 B |
|
After Width: | Height: | Size: 707 B |
|
After Width: | Height: | Size: 779 B |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/trombone.png
Normal file
|
After Width: | Height: | Size: 373 B |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/trumpet.png
Normal file
|
After Width: | Height: | Size: 965 B |
BIN
Resources/Textures/Objects/Instruments/musician.rsi/violin.png
Normal file
|
After Width: | Height: | Size: 389 B |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |