Files
wwdpublic/Content.Server/NPC/Components/NPCJukeComponent.cs
Pieter-Jan Briers e7a3b82a8d Use new ComponentPauseGenerator (#25183)
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.

(cherry picked from commit e00f74505c62310bd15aeaba8d6530f648397074)
2024-03-07 00:57:05 +01:00

35 lines
885 B
C#

using Content.Server.NPC.HTN.PrimitiveTasks.Operators.Combat;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.NPC.Components;
[RegisterComponent, AutoGenerateComponentPause]
public sealed partial class NPCJukeComponent : Component
{
[DataField("jukeType")]
public JukeType JukeType = JukeType.Away;
[DataField("jukeDuration")]
public float JukeDuration = 0.5f;
[DataField("nextJuke", customTypeSerializer:typeof(TimeOffsetSerializer))]
[AutoPausedField]
public TimeSpan NextJuke;
[DataField("targetTile")]
public Vector2i? TargetTile;
}
public enum JukeType : byte
{
/// <summary>
/// Will move directly away from target if applicable.
/// </summary>
Away,
/// <summary>
/// Move to the adjacent tile for the specified duration.
/// </summary>
AdjacentTile
}