mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-19 05:26:28 +00:00
## About The Pull Request As it stands, `_GetInverseTypeList()` (as used in `_JoinParent()` and `_RemoveFromParent()`) has two issues: 1. As described in #76678, it adds duplicated components because even if `current_type` is `/datum/component` AND we've already added it in `. = list(our_type, current_type)`, the final line is outside the while loop and adds it again. 2. Currently every `_datum_components` list has all of it's components listed under the `/datum/component` key. It's used as an all-encompasing list for when all the components an atom has need to be looped through, but I think that's a questionable implementation. Making an entire new list doesn't make much sense, given that accessing elements of an associative list is very cheap, and it nearly doubles the work we do when adding components to `_datum_components`. Doing it with other parents at least removes the need for type checks to get components of a given type, so I think those are fine to stay. ## Why It's Good For The Game Closes #76678. Avoids the questionably useful list of components with `/datum/component` as its key from `_datum_components`. I don't think there's anything player-facing here.