Files
tbd-station-14/Content.Server/NPC/Components/NPCJukeComponent.cs
metalgearsloth c31c848afd Shooting NPCs and more (#18042)
* Add pirate shooting

* Shooting working

* Basics working

* Refactor time

* More conversion

* Update primitives

* Update yml

* weh

* Building again

* Draft

* weh

* b

* Start shutdown

* Starting to take form

* Code side done

* is it worky

* Fix prototypes

* stuff

* Shitty working

* Juke events working

* Even more cleanup

* RTX

* Fix interaction combat mode and compquery

* GetAmmoCount relays

* Fix rotation speed

* Juke fixes

* fixes

* weh

* The collision avoidance never ends

* Fixes

* Pause support

* framework

* lazy

* Fix idling

* Fix drip

* goobed

* Fix takeover shutdown bug

* Merge fixes

* shitter

* Fix carpos
2023-08-01 19:48:56 -05:00

34 lines
827 B
C#

using Content.Server.NPC.HTN.PrimitiveTasks.Operators.Combat;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.NPC.Components;
[RegisterComponent]
public sealed class NPCJukeComponent : Component
{
[DataField("jukeType")]
public JukeType JukeType = JukeType.Away;
[DataField("jukeDuration")]
public float JukeDuration = 0.5f;
[DataField("nextJuke", customTypeSerializer:typeof(TimeOffsetSerializer))]
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
}