-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refactor/languages' into ExperimantalLanguage
- Loading branch information
Showing
59 changed files
with
1,396 additions
and
1,112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
using Content.Shared.Language; | ||
|
||
namespace Content.Server.Language; | ||
|
||
/// <summary> | ||
/// Raised in order to determine the language an entity speaks at the current moment, | ||
/// as well as the list of all languages the entity may speak and understand. | ||
/// Raised in order to determine the list of languages the entity can speak and understand at the given moment. | ||
/// Typically raised on an entity after a language agent (e.g. a translator) has been added to or removed from them. | ||
/// </summary> | ||
public sealed class DetermineEntityLanguagesEvent : EntityEventArgs | ||
[ByRefEvent] | ||
public record struct DetermineEntityLanguagesEvent | ||
{ | ||
/// <summary> | ||
/// The default language of this entity. If empty, remain unchanged. | ||
/// This field has no effect if the entity decides to speak in a concrete language. | ||
/// </summary> | ||
public string CurrentLanguage; | ||
/// <summary> | ||
/// The list of all languages the entity may speak. Must NOT be held as a reference! | ||
/// The list of all languages the entity may speak. | ||
/// By default, contains the languages this entity speaks intrinsically. | ||
/// </summary> | ||
public List<string> SpokenLanguages; | ||
public HashSet<string> SpokenLanguages = new(); | ||
|
||
/// <summary> | ||
/// The list of all languages the entity may understand. Must NOT be held as a reference! | ||
/// The list of all languages the entity may understand. | ||
/// By default, contains the languages this entity understands intrinsically. | ||
/// </summary> | ||
public List<string> UnderstoodLanguages; | ||
public HashSet<string> UnderstoodLanguages = new(); | ||
|
||
public DetermineEntityLanguagesEvent(string currentLanguage, List<string> spokenLanguages, List<string> understoodLanguages) | ||
{ | ||
CurrentLanguage = currentLanguage; | ||
SpokenLanguages = spokenLanguages; | ||
UnderstoodLanguages = understoodLanguages; | ||
} | ||
public DetermineEntityLanguagesEvent() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.