Commit Graph

3 Commits

Author SHA1 Message Date
Mnemotechnican
82cbea2aef Language Refactor 3 (#937)
# Description
This significantly improves the quality of the language system by fixing
the mistakes I've made almost a year ago while developing it.

Mainly, this throws away the old half-broken way of networking in favor
of the component state system provided by RT. Language speaker comp is
now shared with SendOnlyToOwner = true, and its state is handled
manually.

In addition to that, this brings the following changes:
- UniversalLanguageSpeaker and LanguageKnowledge are now server-side
- DetermineLanguagesEvent and LanguagesUpdateEvent are now shared (so
that future systems can be built in shared, if needed)
- Everything now uses the ProtoId<LanguagePrototype> type instead of raw
strings (god, I hated those so much)
- The server-side language system now accepts Entity<T?> arguments
instead of EntityUid + T
- UniversalLanguageSpeaker is now based on DetermineEntityLanguagesEvent
and gets an Enabled field, which allows to turn it off. This may have
some use in the future.
- Some minor cleanup

<!--
TODO MEDIA

<details><summary><h1>Media</h1></summary>
<p>

![Example Media Embed](https://example.com/thisimageisntreal.png)

</p>
</details>

-->

# Changelog
No cl

---------

Co-authored-by: VMSolidus <evilexecutive@gmail.com>
2024-10-19 13:41:35 +07:00
VMSolidus
19ca517509 Non-Destructive Universal Language (#899)
# Description

UniversalLanguageSpeakerComponent has NUMEROUS issues, which previously
were easy to ignore since it was a language only obtainable by Admins.
But now that it's both a Psionic Power(And a trait that adds said
power), the issues with it have been highlighted. Here's just a FEW

1. UniversalLanguageSpeaker overwrites all known languages, preventing
you from speaking anything else
2. It overwrites the ability to use sign language.
3. It also overwrites the Mute trait.

To fix that, I've made it follow *MOSTLY* the logic all the other
languages use, so that it's less of a special snowflake case. Now if you
have access to it, it will appear in your language list alongside other
languages, rather than fully replacing the entire list. That way you can
intentionally choose not to speak in a language understood by all.

Fuck it, I also added the ability for the TraitSystem to just call
LanguageSystem and directly add arbitrarily any desired language, rather
than needing a component to do so.

# Changelog

🆑
- fix: UniversalLanguageSpeaker(And Xenoglossy by extension) will now
appear in your language menu alongside other known languages, rather
than replace all known languages. You can effectively now choose whether
or not to speak it, or to use a normal language.
- add: Traits can now add Languages directly.
- add: Traits can now remove Languages directly.

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com>
Co-authored-by: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
2024-10-19 13:08:20 +07:00
Mnemotechnican
6084740437 Foreigner Traits (#525)
# Description
Adds two negative traits, foreigner and its light version. Both of them
make you unable to speak galactic common and give you a translator that
lets you speak/understand GC, and also requires you to know one of the
non-GC languages your entity normally speaks in order to work. The
translator starts with a high-capacity power cell to compensate for the
usual scarcity of publicly accessible chargers on most stations.

The light version of the trait only makes you unable to speak GC. The
heavy version also makes you unable to understand others when they speak
it.

This PR also makes you able to wear translator in the neck slot for
convenience and transparency, and rewamps the examination menu of
translators to provide more useful info.

One little known issue (as seen in the screenshots below) is that, since
the system chooses the first language in the list of languages your
entity can speak, it can sometimes pick wrong if your species speaks
more than two language, but it won't prevent you from using the
translator normally.

Also, the name of the light version of the trait is subject to change. I
just couldn't think of anything more creative for it.

# Why

Although supposedly trystan or others have a language menu in mind, it's
still not even being worked on yet. At the same time, I've already seen
some people roleplay as though their characters do not speak galactic
common.

<details><summary><h1>Media</h1></summary>
<p>


![image](https://github.com/Simple-Station/Einstein-Engines/assets/69920617/42984284-3a70-40bb-ad48-b11218cd5c5b)


![image](https://github.com/Simple-Station/Einstein-Engines/assets/69920617/f3d26cef-a908-49e7-84e0-cb50d5d98c0d)


![image](https://github.com/Simple-Station/Einstein-Engines/assets/69920617/6f44b3cc-5906-402b-ae5c-a3f0ad743bc6)


![image](https://github.com/Simple-Station/Einstein-Engines/assets/69920617/4edfe7ce-1633-4e6a-94ca-5db0dff88eb0)


![image](https://github.com/Simple-Station/Einstein-Engines/assets/69920617/ec5b3da0-b400-41f3-90c1-e5dc6b5af7c5)

</p>
</details>

---

# Changelog

🆑
- add: Added two new foreigner traits that make your character unable to
speak Galactic Common and give you a translator instead.
- tweak: Translators can now be equipped in the neck slot and display
useful info when examined.
2024-07-11 21:19:09 -04:00