Cleans up chemical reaction & reagent look up code (#95281)

## About The Pull Request
- Removed global list `fake_reagent_blacklist` in favour of
`abstract_type`. Saved memory
- Removed proc `get_chemical_reaction()` in favor of
`GLOB.chemical_reaction_list`. No proc overhead and faster access
- Remove unused proc `remove_chemical_reaction()`
- Removed proc `find_reagent()` in favour of
`GLOB.chemical_reagents_list`. No proc overhead and faster access
- Directly access name of reagents via `::` operator from typepaths
instead of looking up the datum in global chemical reagents list for
some operations. Faster variable access
- Removed unit test `reagent_id_typos`. The typepaths will error at
compile time because they aren't strings so there's no need for this
test

## Changelog
🆑
code: cleaned up code pertaining to reagent & reaction lookup
/🆑
This commit is contained in:
SyncIt21
2026-03-07 15:09:20 +05:30
committed by GitHub
parent 875a035bb6
commit 56212d2712
19 changed files with 52 additions and 121 deletions
@@ -13,8 +13,6 @@ PROCESSING_SUBSYSTEM_DEF(reagents)
/datum/controller/subsystem/processing/reagents/Initialize()
//So our first step isn't insane
previous_world_time = world.time
///Blacklists these reagents from being added to the master list. the exact type only. Children are not blacklisted.
GLOB.fake_reagent_blacklist = list(/datum/reagent/medicine/c2, /datum/reagent/medicine, /datum/reagent/reaction_agent)
//Build GLOB lists - see holder.dm
build_chemical_reactions_lists()
return SS_INIT_SUCCESS