mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
# Description This improves the random barks by: - Fully moving the random barks to localization files, with the ability to re-use existing types - Adding many new (english) random bark types - Making the random bark system add a random punctuation mark at the end of a random bark - Adjusting some existing random bark configs This also reparents MobSecurityDog to MobCorgi and MobArcticFox to MobFox because for some reason delta-v decided to copy the original mobs instead of using inheritance??? Either way, laika and siobhan will now also have random barks, can be carried, etc. <details><summary><h1>Media</h1></summary> <p>     </p> </details> # Changelog 🆑 - add: Animals now have more unique things to say when not controlled by a player. --------- Signed-off-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Co-authored-by: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com>
52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
namespace Content.Server.Speech.Components;
|
|
|
|
/// <summary>
|
|
/// Sends a random message from a list with a provided min/max time.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed partial class RandomBarkComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Should the message be sent to the chat log?
|
|
/// </summary>
|
|
[DataField]
|
|
public bool ChatLog = false;
|
|
|
|
/// <summary>
|
|
/// Minimum time an animal will go without speaking
|
|
/// </summary>
|
|
[DataField]
|
|
public int MinTime = 45;
|
|
|
|
/// <summary>
|
|
/// Maximum time an animal will go without speaking
|
|
/// </summary>
|
|
[DataField]
|
|
public int MaxTime = 350;
|
|
|
|
/// <summary>
|
|
/// Accumulator for counting time since the last bark
|
|
/// </summary>
|
|
[DataField]
|
|
public float BarkAccumulator = 8f;
|
|
|
|
/// <summary>
|
|
/// Multiplier applied to the random time. Good for changing the frequency without having to specify exact values
|
|
/// </summary>
|
|
[DataField]
|
|
public float BarkMultiplier = 1f;
|
|
|
|
/// <summary>
|
|
/// Bark type, for use in locales. Locale keys follow the format "bark-{type}-{index between 1 and BarkLocaleCount}".
|
|
/// </summary>
|
|
[DataField]
|
|
public string BarkType = "default";
|
|
|
|
/// <summary>
|
|
/// Number of bark locales. If not specified, then it will be figured out by fetching the locale string
|
|
/// with the key "bark-{type}-count" and parsing it as an integer.
|
|
/// </summary>
|
|
[DataField]
|
|
public int? BarkLocaleCount = null;
|
|
}
|