14 Commits

Author SHA1 Message Date
lew 11a9a2d644 Multi-Languages: a complete Saycode rewrite (#22637)
Rewrites Saycode and Langchat to add support for multiple languages in
one message, including audible emotes.

<img width="1139" height="338" alt="image"
src="https://github.com/user-attachments/assets/25e26932-7a6e-4c54-ab74-56fffb92ecad"
/>

Here's some samples to explain how to mix languages.

<img width="422" height="26" alt="image"
src="https://github.com/user-attachments/assets/e1b176cc-8625-4dc9-83c8-a053d3f310e6"
/>

`Languages ,2 can be mixed ,3 like this.`

<img width="540" height="21" alt="image"
src="https://github.com/user-attachments/assets/19156c67-4670-4d7a-84d7-26e527de2676"
/>

`!explains, ,2Emotes work too. ,0The text will get auto-quoted.`

<img width="592" height="18" alt="image"
src="https://github.com/user-attachments/assets/cfc31c5c-2383-41c8-82be-b36836339321"
/>

`,3Most languages ,0can be ,2mixed ,1arbitrarily, ,3any number of
,0times.`

<img width="636" height="20" alt="image"
src="https://github.com/user-attachments/assets/388b4f9d-192a-4374-ac31-bbd4e4e5dfe4"
/>

`,2Emotes. ,eAnd he nods. ,3They don't have to come first anymore.`

There are some exceptions. The exceptions are currently anything with
any of the flags `SIGNLANG`, `HIVEMIND`, `PRESSUREPROOF`,
`KNOWONLYHEAR`. Exceptions work the same as current languages do: they
must be the first language in the message. If so, they prevent switching
into any other language mid-message; if they're not first, they just
wont trigger.

They're exceptions currently because there's not really a clean way that
I or the people I asked for help on this one to make them look nice.
`SIGNLANG` for example doesn't scramble text, it shows it's own `
gestures a lengthy message.` text for those that don't understand. Could
we just replace every instance of sign language with that if somebody
doesn't understand? Probably. It would look pretty awful though. e.g.
`Alina Eskelinen says, "Hello." Alina Eskelinen gestures a short
message.`

This definitely needs testmerging because it more or less rewrites the
entire pipeline surrounding `say`. The `say` code itself had to be
rewritten to support the multiple languages, as well as all the existing
plumbing for listeners receiving messages. In return though, it's
significantly more straightforward and hopefully by extension easier for
people to add to in the future.

Primarily, instead of having four different `hear_say`, `hear_radio`,
`hear_sleep`, etc., routes for messages to come through, every single
audible message is received by `hear_message`, which is responsible for
figuring out how clear the message is (is the radio damaged? is it a
whisper we're eavesdropping on?), who needs to receive it in their
chatbox, formatting it correctly for each listener, and finally if any
npc or object within range needs to react to it in some way, like a
parrot or a mech.

changelog:
- rscadd: "Adds code-switching: you can now speak in multiple languages
in the same message."
- rscadd: "Adds audible emotes to the language list. They can be
triggered with ,e."
  - rscdel: "Removes SSrunechat."
- refactor: "Rewrote langchat in order to support multiple languages and
partial comprehension."
- refactor: "Rewrote a vast majority of all saycode and the code
responsible for displaying saytext to clients."
- bugfix: "Sleeping mobs are no longer able to understand all
languages."
- bugfix: "Langchat now correctly shows the appropriate comprehension
for all viewers rather than all viewers sharing the comprehension of the
last viewer."
- bugfix: "Languages which are supposed to be invisible when not
understood no longer appear as scrambled overhead text."

Forgive me whoever has to review this. Biggest areas that have room for
error is stuff like a borer inside someone's head, and Dionae stuff. Old
langchat had odd exceptions for those and I was forced to rewrite it
entirely, but I think I got it all back to how it was working before.
2026-06-11 10:47:26 +00:00
Fluffy b3a4aa501f Life changes (#19560)
Refactored Life() to receive seconds per tick and times fired as
parameters.
Life() now cannot be slept in, turned various sleepings into async calls
procs.
Optimized mob AI subsystems, gave them new priorities levels and flags.
Grab upgrades are now elaborated asynchronously, tweaked them to avoid
stacking multiple upgrades.
Fixed plains tyrants keeping sending messages about stomping even if
dead.
2024-07-08 12:48:18 +00:00
Ben 2e3b21ec41 Autohiss/Stutter Repeat Fix (#19335)
Autohiss/stutter no longer procs twice when using `say :w` to whisper

**PLEASE TESTMERGE THIS BEFORE MERGE**. Say proc is spaghetti so had to
touch alot of things to get this to work.

Co-authored-by: Ben10083 <Ben10083@users.noreply.github.com>
2024-06-14 14:19:45 +00:00
Fluffy d46ea07125 Fixed Srom not working properly (#19357)
Fixed srom not working properly.
Fixed a runtime with translators implants.
Aligned runechat correctly in srom mobs.
Turned the srom entry points into a GLOB list.

Fixes #19207
2024-06-08 16:39:33 +00:00
Fluffy 3dc4cce9c2 Minor span refactoring (#19177)
Minor span refactoring
2024-05-19 16:37:29 +00:00
Matt Atlas 25fd3ba098 Stops shuttles from bringing background turfs with them. (#15580) 2023-01-20 14:52:01 +01:00
Matt Atlas d7074a64f0 Adds an accent tag for Srom speakers. (#14095) 2022-05-30 16:42:49 +02:00
Llywelwyn be2d9ffed7 Srom no longer crashes you on death (#13893) 2022-05-14 03:41:50 +02:00
Geeves 1df88da53d Whispering Refactor (#12755) 2021-12-27 22:44:57 +01:00
Geeves a19e92a61c Remote Listening Stuff (#11667) 2021-05-08 12:09:04 +02:00
Geeves ca8ef1ea71 Skrell Srom Health Indicator (#10686) 2020-12-22 15:45:40 +01:00
Matt Atlas 0414572b30 Psychics can into Srom + Srom neural suppressor fix. (#8158)
Psychics can now utilize the Srom and other commune procs.
Being under the effects of a neural suppressor should no longer spam-slam you into the Srom and back into the mortal world.
2020-02-04 14:35:09 +01:00
Mykhailo Bykhovtsev 12ba33c5b7 wake up, sleepy princess (#5949)
Okay, a big update kinda.

* Shaking, punching, grabbing, pushing, throwing objects, shooting, attacking any carbon mobs while they are willingfully asleep wakes them up instantly. ISkrell in a shared dream will recieve a message if their physical body is being disturbed, message will be different depending on severity of disturbance. If their health is below 50% and they are being attacked/shot/thrown stuff at, they will be forcefully woken up.
* Skrell are no longer displayed as an SSD when while in shared dream. Fixes #5759
* Examining skrell who are in shared dream will display if their astral body is AFK/ghosted.
2019-02-10 00:23:15 +02:00
William Lemon d9450e5dab Adds Skrell Shared Dreaming (#5707)
Implements skrell shared dreaming.

Whilst Unconscious and alive, skrell will enter the Srom, aka Dream, in which they telepathically link to one another.
In game, they will appear in a custom area, able to communicate with one another.
Whilst in Srom, skrell find it very hard to keep their own secrets, if not impossible, and will often 'mumble' important information.
2018-12-11 11:44:28 +02:00