mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-29 10:31:34 +00:00
* Fix imaginary friend trauma and message range (#83590) ## About The Pull Request So during a previous pr, attaching the imaginary friend to a host and setting up its preferences were moved from initialization to two separate procs. The _smite_ was then updated to account for this, but in the process the brain trauma version was left behind- it even still tried to add a nonexistent parameter when making a new imaginary friend. We first fix this by having those two procs be called during `add_friend(...)`, after finding and assigning a ghost. ```dm /datum/brain_trauma/special/imaginary_friend/proc/add_friend(mob/dead/observer/ghost) if(isnull(ghost)) qdel(src) return friend.key = ghost.key friend.attach_to_owner(owner) //new friend.setup_appearance() //new friend_initialized = TRUE friend.log_message("became [key_name(owner)]'s split personality.", LOG_GAME) message_admins("[ADMIN_LOOKUPFLW(friend)] became [ADMIN_LOOKUPFLW(owner)]'s split personality.") ``` This solves our first issue, where this not being called made every brain trauma imaginary friend get banished to gay baby jail where they do not have an appearance, cannot move from their spot, cannot be heard, and emit runtimes constantly. Testing this brings us to our second issue, where the host couldn't actually hear their imaginary friend unless they were at most one tile away, and would get their message starred if not on the exact same tile. Looking into it, this seemed to be because `Hear(...)` now had a `message_range = 0` parameter which we don't actually set here. Upshot! This seems to let us gut the whisper starring code on our side and just proxy the right message range to `Hear(...)`. So we gut our code a bit and do just that, and this fixes it. ## Why It's Good For The Game Fixes #81138. Fixes imaginary friend brain trauma being non-functional and emitting runtimes like hell. Fixes imaginary friends not being audible to their host beyond a one tile distance. ## Changelog 🆑 fix: Imaginary friend brain trauma works again. fix: Imaginary friends can be heard by their hosts from more than a tile away again. /🆑 * Fix imaginary friend trauma and message range --------- Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>