Skip to content

Commit

Permalink
Language Refactor 3 (#937)
Browse files Browse the repository at this point in the history
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>

-->

No cl

---------

Co-authored-by: VMSolidus <[email protected]>
(cherry picked from commit 8c5faf3)
  • Loading branch information
Peptide90 committed Nov 11, 2024
1 parent c1861c3 commit 1cbf75b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 60 deletions.
24 changes: 0 additions & 24 deletions Content.Shared/Language/Components/LanguageKnowledgeComponent.cs

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions Content.Shared/Language/Events/LanguagesUpdatedMessage.cs

This file was deleted.

10 changes: 0 additions & 10 deletions Content.Shared/Language/Events/RequestLanguagesMessage.cs

This file was deleted.

0 comments on commit 1cbf75b

Please sign in to comment.