Guardians (Holoparasites) (#5140)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
CrudeWax
2021-12-29 06:58:48 +03:00
committed by GitHub
parent 277f3320f5
commit 299c4be328
44 changed files with 836 additions and 7 deletions

View File

@@ -0,0 +1,39 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
namespace Content.Server.Guardian
{
/// <summary>
/// Creates a GuardianComponent attached to the user's GuardianHost.
/// </summary>
[RegisterComponent]
[ComponentProtoName("GuardianCreator")]
public sealed class GuardianCreatorComponent : Component
{
/// <summary>
/// Counts as spent upon exhausting the injection
/// </summary>
/// <remarks>
/// We don't mark as deleted as examine depends on this.
/// </remarks>
public bool Used = false;
/// <summary>
/// The prototype of the guardian entity which will be created
/// </summary>
[ViewVariables]
[DataField("guardianProto", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>), required: true)]
public string GuardianProto { get; set; } = default!;
/// <summary>
/// How long it takes to inject someone.
/// </summary>
[DataField("delay")]
public float InjectionDelay = 5f;
public bool Injecting = false;
}
}