mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-16 03:56:20 +00:00
## About The Pull Request Fixes #77774 Fixes #77795 There is a problem with `/datum/component/proc/_GetInverseTypeList()`e3a835b960/code/datums/components/_component.dm (L238-L245)Notice after we store the parent type heree3a835b960/code/datums/components/_component.dm (L241)The value is lost inside our while loop here, we go to `current_type` parent value before even adding it to the return liste3a835b960/code/datums/components/_component.dm (L244)And by the time we do add it to the list the parent type is lost and we have the grand parent value insteade3a835b960/code/datums/components/_component.dm (L245)To test this call this proc with the value `datum/component/plumbing/simple_supply` **Expected result.** `datum/component/plumbing/simple_supply` <----- The type of param passed `datum/component/plumbing` <--------------------- The parent type of param passed **Actual result**  This crashes everything plumbing related. The solution is simple just flip the while loop i.e. first add the current value to the list then move to its parent type ``` while (current_type != /datum/component) . += current_type <-----add parent value current_type = type2parent(current_type) <----then move up ``` So you get the correct list here  Broken by #77615 ## Changelog 🆑 fix: plumbing ducts connects to other plumbing machinery again /🆑