forked from unitystation/Godotstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speech verbs & conditional markup modification (#18980)
- Loading branch information
1 parent
5742c4e
commit 7db8c78
Showing
27 changed files
with
252 additions
and
7 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 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; | ||
|
||
namespace Content.Shared.Speech; | ||
|
||
/// <summary> | ||
/// Handles replacing speech verbs and other conditional chat modifications like bolding or font type depending | ||
/// on punctuation or by directly overriding the prototype. | ||
/// </summary> | ||
[Prototype("speechVerb")] | ||
public sealed class SpeechVerbPrototype : IPrototype | ||
{ | ||
[IdDataField] public string ID { get; } = default!; | ||
|
||
/// <summary> | ||
/// Loc strings to be passed to the chat wrapper. 'says', 'states', etc. | ||
/// Picks one at random if there are multiple. | ||
/// </summary> | ||
[DataField("speechVerbStrings", required: true)] | ||
public List<string> SpeechVerbStrings = default!; | ||
|
||
/// <summary> | ||
/// Should use of this speech verb bold the corresponding message? | ||
/// </summary> | ||
[DataField("bold")] | ||
public bool Bold = false; | ||
|
||
/// <summary> | ||
/// What font size should be used for the message contents? | ||
/// </summary> | ||
[DataField("fontSize")] | ||
public int FontSize = 12; | ||
|
||
/// <summary> | ||
/// What font prototype ID should be used for the message contents? | ||
/// </summary> | ||
/// font proto is client only so cant lint this lol sorry | ||
[DataField("fontId")] | ||
public string FontId = "Default"; | ||
|
||
/// <summary> | ||
/// If multiple applicable speech verb protos are found (i.e. through speech suffixes) this will determine | ||
/// which one is picked. Higher = more priority. | ||
/// </summary> | ||
[DataField("priority")] | ||
public int Priority = 0; | ||
} |
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 |
---|---|---|
|
@@ -74,3 +74,5 @@ | |
description: A polymorphed unfortunate. | ||
components: | ||
- type: Cluwne | ||
- type: Speech | ||
speechVerb: Cluwne |
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
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 |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
60: 0.9 | ||
80: 0.7 | ||
- type: Speech | ||
speechVerb: Skeleton | ||
- type: Vocal | ||
sounds: | ||
Male: Skeleton | ||
|
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
Oops, something went wrong.