Files
wwdpublic/Content.Server/Speech/Components/RandomBarkComponent.cs
Mnemotechnican 4d222b98b3 Random Bark Revamp (#1003)
# 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>


![image](https://github.com/user-attachments/assets/2f429d8d-fa3a-4ac1-8f04-0eefa2541de3)

![image](https://github.com/user-attachments/assets/84a2bf32-07a5-4b7b-9afc-d077333ee620)

![image](https://github.com/user-attachments/assets/b4b099c3-4c59-444b-b2f8-f13d11d93f30)

![image](https://github.com/user-attachments/assets/f9d8de0d-06ff-4f9a-8358-e5dd38e9571d)


</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>
2024-10-19 13:41:34 +07:00

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;
}