mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
## About The Pull Request Most of these changes are centered around removing `mod.wearer` references in module function bubble alerts. However, I cleaned up a few other things that I thought were easy fixes. ~~This PR should be testmerged~~ nah send it. I think I did a pretty good job testing, but there might be a bug or two I missed. (debug modsuit should allow conflicting modules and have unlimited complexity btw) ### Track who clicks the activate button * Adds `mob/activator` to `on_select()`, `activate()`, `deactivate()`, `used()`, `on_activation()`, `on_deactivation()` and `on_use()` * `mod_ui` now passes `ui.user`, which is who actually clicked the button in the UI.1 * module action proc now passes the person clicking. * **Alert bubbles:** Modifies many module code bubbles to pass the activation bubble text to `mob/activator` instead of `mob.wearer` so that pAIs get feedback on why clicking the button isn't working. ### Cargo clamp * **Clamp code cleanup:** The cargo clamp now has a variable for the max creature weight it can support, and the logic is changed around a bit to support this. * The cargo clamp uses an `accepted_items` typecache. ### Code cleanup * **Button malfunction chance** is controlled by a `MOD_MALFUNCTION_PROB` define. * **Pathfinder runtime:** `mod_control`'s `GetAccess()` now checks if there is an access before returning it. (This previously caused runtimes when using the pathfinder module if you didn't swipe your ID) * **Pathfinder code tweaks:** Reworks the code for the pathfinder module a bit. Activation logic is now stored in the module instead of the implant. The suit is prevented from being recalled by pAIs, which is controlled by a variable. * Adds `MODULE_ALLOW_UNWORN`, which lets you activate modules in suits that aren't currently being worn. Module activation code now smoothly supports modules being activated while not worn. * Chameleon module now works when unworn. This will probably be a Part 1, with a Part 2 to follow. Actions are kinda funky and could probably be cleaned up a little better. Plus, I want to make selectable modules theoretically usable by the AI, even if I leave it disabled. ## Why It's Good For The Game This PR doesn't contain any balance changes, and I manually disabled any new serious functionality that pAIs might gain. (Such as being able to activate the pathfinder implant) They *can* use the chameleon module with no wearer- but I'm going to consider this a bug that they couldn't before. Paves the way for more pAI modsuit nonsense I'm doing downsteam. ## Changelog 🆑 Stonetear refactor: MODsuit module code now knows who clicked the activation button. /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>