mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* giant protoid cleanup * yml changes * ! --------- Co-authored-by: deltanedas <@deltanedas:goida.zip>
32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using Content.Server.Chat.Systems;
|
|
using Content.Shared.Chat.Prototypes;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Chat;
|
|
|
|
/// <summary>
|
|
/// Causes an entity to automatically emote at a set interval.
|
|
/// </summary>
|
|
[RegisterComponent, Access(typeof(AutoEmoteSystem))]
|
|
public sealed partial class AutoEmoteComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// A set of emotes that the entity will preform.
|
|
/// <see cref="AutoEmotePrototype"/>
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<ProtoId<AutoEmotePrototype>> Emotes = new();
|
|
|
|
/// <summary>
|
|
/// A dictionary storing the time of the next emote attempt for each emote.
|
|
/// Uses AutoEmotePrototype IDs as keys.
|
|
/// <summary>
|
|
[ViewVariables(VVAccess.ReadOnly)] //TODO: make this a datafield and (de)serialize values as time offsets when https://github.com/space-wizards/RobustToolbox/issues/3768 is fixed
|
|
public Dictionary<string, TimeSpan> EmoteTimers = new();
|
|
|
|
/// <summary>
|
|
/// Time of the next emote. Redundant, but avoids having to iterate EmoteTimers each update.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadOnly)]
|
|
public TimeSpan NextEmoteTime = TimeSpan.MaxValue;
|
|
}
|