mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 17:41:50 +00:00
## About The Pull Request Alternative title: "Baby's third pr: surprise say code refactor" While testing sign language I worked out that if the first message sent after toggling sign language involves speaking directly into a radio, it proceeds to use the wrong verb. After several hours of digging through say and telecomms code, I worked out the cause: the `verb_say` on humans is primarily updated to match tongue data during the verb _selection_ method `say_mod()` in `human_say.dm`, and as a consequence this meant the verb wasn't updated to the correct one until far after it had been copied to a virtualspeaker, leading to the incorrect verb being used for the radio message. This pr fixes this by refactoring this verb updating behaviour to be in a new method `update_verbs()`, which we then call _before_ attempting to call `radio()` to avoid wrongful copying and thus fixing the bug. There's theoretically also cases where the previous behaviour would use the wrong verb if one lost or gained a tongue between radio messages, or the wrong verb from those picked from a list for some simple/basic animals, but those are significantly less common. To note, I gave the new `update_verbs()` method the same arguments as the `say_mod()` method it got split out of, but having gone through all instances of it being used for this I don't feel it actually *needs* those arguments. So I'm unsure whether it should keep them or not. Opened as a draft for now for sanity's sake, and also cause, y'know, it touches say code. ## Why It's Good For The Game It was _really_ annoying. ## Changelog 🆑 fix: Signers no longer use the wrong verb when speaking directly into a radio for the first message after toggling sign language. refactor: Moved the updating of verb variables into a new method which is called earlier in living's say, which should avoid this happening for other things which updated their verbs the same way. /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>