mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-05 06:05:58 +01:00
8c1e35e1c0
## About The Pull Request This PR refactors mind language holders into non-existence As a result, `update_atom_languages` is no longer necessary Mind-bound languages are transferred via `/mind/proc/transfer_to` Species changing no longer deletes and re-creates the mob's language holder, allowing them to keep any languages they have. Species languages are sourced from `LANGUAGE_SPECIES` now, meaning they are removed when they change species. If the mob is not a human with a species datum, these are effectively just atom level languages. Makes a bunch of unit tests to ensure language transfer over certain events works as intended ## Why It's Good For The Game Mobs with minds having two independent language holders results in a good few bugs, and simply doesn't make sense when we have sources (`LANGUAGE_MIND`). Instead of tracking two language holders, we can simply use sources better and only track one. This means that the language holder you start with is your language holder, period. It doesn't get deleted or re-instantiated or whatever. ## Changelog 🆑 Melbert refactor: Refactored language holders, making species changes not delete all of your known languages /🆑
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
#define NO_STUTTER 1
|
|
#define TONGUELESS_SPEECH 2
|
|
#define LANGUAGE_HIDE_ICON_IF_UNDERSTOOD 4
|
|
#define LANGUAGE_HIDE_ICON_IF_NOT_UNDERSTOOD 8
|
|
|
|
// LANGUAGE SOURCE DEFINES
|
|
/// For use in full removal only.
|
|
#define LANGUAGE_ALL "all"
|
|
|
|
// Generic language sources.
|
|
/// Language is linked to the movable directly.
|
|
#define LANGUAGE_ATOM "atom"
|
|
/// Language is linked to the mob's mind.
|
|
/// If a mind transfer happens, language follows.
|
|
#define LANGUAGE_MIND "mind"
|
|
/// Language is linked to the mob's species.
|
|
/// If a species change happens, language goes away.
|
|
/// If applied to a non-human (no species) atom, this is effectively the same as [LANGUAGE_ATOM].
|
|
#define LANGUAGE_SPECIES "species"
|
|
|
|
// More specific language sources.
|
|
// Only ever goes away when dismissed directly.
|
|
#define LANGUAGE_ABSORB "absorb"
|
|
#define LANGUAGE_APHASIA "aphasia"
|
|
#define LANGUAGE_CTF "ctf"
|
|
#define LANGUAGE_CULTIST "cultist"
|
|
#define LANGUAGE_CURATOR "curator"
|
|
#define LANGUAGE_GLAND "gland"
|
|
#define LANGUAGE_HAT "hat"
|
|
#define LANGUAGE_QUIRK "quirk"
|
|
#define LANGUAGE_MALF "malf"
|
|
#define LANGUAGE_PIRATE "pirate"
|
|
#define LANGUAGE_MASTER "master"
|
|
#define LANGUAGE_SOFTWARE "software"
|
|
#define LANGUAGE_STONER "stoner"
|
|
#define LANGUAGE_VOICECHANGE "voicechange"
|
|
#define LANGUAGE_RADIOKEY "radiokey"
|
|
#define LANGUAGE_BABEL "babel"
|
|
|
|
// Language flags. Used in granting and removing languages.
|
|
/// This language can be spoken.
|
|
#define SPOKEN_LANGUAGE (1<<0)
|
|
/// This language can be understood.
|
|
#define UNDERSTOOD_LANGUAGE (1<<1)
|