valid_subtypes proc (#93541)

## About The Pull Request
discussed in #93439, a generic proc for getting a list of all types
minus abstract types.
applies this to most instances of a for loop that currently filters out
abstract types

it SHOULD be a nothing burger for performance, however I have not bench
marked the difference. (also testing, there is a total of 7 calls in
init to it)
This commit is contained in:
FalloutFalcon
2025-10-28 12:49:18 -05:00
committed by GitHub
parent 2a904c2399
commit 060d4a65ba
16 changed files with 41 additions and 46 deletions
@@ -36,10 +36,8 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
songs -= S
/datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data()
for(var/path in subtypesof(/datum/instrument))
for(var/path in valid_subtypesof(/datum/instrument))
var/datum/instrument/I = path
if(initial(I.abstract_type) == path)
continue
I = new path
I.Initialize()
if(!I.id)