mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[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:
committed by
GitHub
parent
19b8044f61
commit
d8408a2c59
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user