[MIRROR] Instrument Update (#11645)

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-14 13:46:26 -07:00
committed by GitHub
parent 19b8044f61
commit d8408a2c59
916 changed files with 1155 additions and 566 deletions

View File

@@ -19,6 +19,10 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
var/static/current_instrument_channels = 0
/// Single cached list for synthesizer instrument ids, so you don't have to have a new list with every synthesizer.
var/static/list/synthesizer_instrument_ids
var/static/list/note_sustain_modes = list(
SUSTAIN_LINEAR,
SUSTAIN_EXPONENTIAL,
)
/datum/controller/subsystem/processing/instruments/Initialize()
initialize_instrument_data()
@@ -32,10 +36,11 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
songs -= S
/datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data()
for(var/datum/instrument/I as anything in subtypesof(/datum/instrument))
if(initial(I.instrument_type) == I)
for(var/path in subtypesof(/datum/instrument))
var/datum/instrument/I = path
if(initial(I.abstract_type) == path)
continue
I = new I
I = new path
I.Initialize()
if(!I.id)
qdel(I)