mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-24 08:31:54 +00:00
* Refactors Object Possession into a Component (moar modular, less `/mob` vars) (#80160) ## About The Pull Request We have two verbs that allow any given mob to take control of an object and move it ephemerally, `/proc/possess()` and `/proc/release()`. These ones leveraged two vars present on every `/mob`: `name_archive` and `control_object`. I don't like having vars clog up my VV and this just injected snowflake behavior in a lot of spots - let's just make it a component that'll clean everything else up. This also opens up the ability to have more objects be under mob control without giving someone verbs that spit out to the blackbox as an admin verb + logs + message admins but that's a later thing. This just subs in the behavior in a nice way. Also, since it's a component, I added a small QoL that we can support now: A screen alert that allows you to get out of the possession early without navigating the stat panel for the specific verb. I think it's neat. You can also trigger the aghost keybind if that's something you want as well. Also also, nothing actually ever cleaned up `control_object` by setting it to null. This means that in the old framework, if a mob got qdelled during a possession, that would have triggered a hung ref harddel. That won't happen anymore. ## Why It's Good For The Game Two less variables taking up crud space in the VSC debugger + view variables panel. Better behavior injection that is far more reusable. Component handling this behavior allows for better extensibility of this function in the future.  ## Changelog 🆑 admin: Object Possession has been reworked, please report any potential bugs. qol: Object Possession should now throw a screen alert for you to unpossess the object instead of you having to search the stat-panel for the "release obj" verb. You can still use the verb but it's a lot nicer now. Aghosting will also work now. /🆑 * Refactors Object Possession into a Component (moar modular, less `/mob` vars) * Refactor hydra quirk The name_archive var is gone, let's store it in the quirk instead --------- Co-authored-by: san7890 <the@san7890.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>