CatStation/Content.Shared/Guardian/Components/GuardianCreatorComponent.cs
ThatGuyUSA 5e5e61768e
Predict Holoparasites and their injectors (#43519)
* save station

* save

* save station

* free howdoicode working 2026

* final push before presentation

* comments addressed, but need to fix PredictedSpawn

* save

* kill me again, im beggin on my knees

* ok wait i apparently forgot half of these reviews

* actually made everything work now

* this has been a learning experience

* formatting, removed unused namespace

* dehardcode man

* fixed it fr

* no more null, only default

* dollar store port, holy

* error error go away

* i removed these from being null, i swear

* formatting and minor fixes

* fixes 2

* Update guardian_activators.yml

* comm

* oops

* oops 2

* Update GuardianSystem.cs

---------

Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>
2026-06-29 21:08:09 +00:00

57 lines
1.7 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Guardian.Components;
/// <summary>
/// Creates a GuardianComponent attached to the user's GuardianHost.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial 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>
[DataField, AutoNetworkedField]
public bool Used;
/// <summary>
/// Sound played when a mob obtains a guardian.
/// </summary>
[DataField]
public SoundSpecifier UsedSound = new SoundPathSpecifier("/Audio/Effects/guardian_inject.ogg");
/// <summary>
/// Popup shown when the creator has already been used and cannot create a guardian.
/// </summary>
[DataField]
public LocId EmptyPopup = "guardian-injector-empty-invalid-creation";
/// <summary>
/// Examine text shown for an exhausted creator.
/// </summary>
[DataField]
public LocId EmptyExamine = "guardian-injector-empty-examine";
/// <summary>
/// Text shown to the host indicating the guardian creation was successful.
/// </summary>
[DataField]
public LocId GuardianHauntedPopup = "guardian-created";
/// <summary>
/// The prototype of the guardian entity which will be created
/// </summary>
[DataField(required: true)]
public EntProtoId? GuardianProto { get; set; }
/// <summary>
/// How long it takes to inject someone.
/// </summary>
[DataField("delay")]
public float InjectionDelay = 5f;
}