2025-04-23 19:29:49 -04:00
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
|
2021-12-29 06:58:48 +03:00
|
|
|
namespace Content.Server.Guardian
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Given to guardians to monitor their link with the host
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class GuardianComponent : Component
|
2021-12-29 06:58:48 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The guardian host entity
|
|
|
|
|
/// </summary>
|
2023-11-07 14:16:32 +11:00
|
|
|
[DataField]
|
|
|
|
|
public EntityUid? Host;
|
2021-12-29 06:58:48 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Percentage of damage reflected from the guardian to the host
|
|
|
|
|
/// </summary>
|
2023-11-07 14:16:32 +11:00
|
|
|
[DataField]
|
2023-04-25 23:52:07 -07:00
|
|
|
public float DamageShare { get; set; } = 0.65f;
|
2021-12-29 06:58:48 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum distance the guardian can travel before it's forced to recall, use YAML to set
|
|
|
|
|
/// </summary>
|
2023-11-07 14:16:32 +11:00
|
|
|
[DataField]
|
2021-12-29 06:58:48 +03:00
|
|
|
public float DistanceAllowed { get; set; } = 5f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If the guardian is currently manifested
|
|
|
|
|
/// </summary>
|
2023-11-07 14:16:32 +11:00
|
|
|
[DataField]
|
|
|
|
|
public bool GuardianLoose;
|
2021-12-29 06:58:48 +03:00
|
|
|
|
2025-04-23 19:29:49 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Sound played when a mob starts hosting the guardian.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier InjectSound = new SoundPathSpecifier("/Audio/Effects/guardian_inject.ogg");
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound played when the guardian enters critical state.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier CriticalSound = new SoundPathSpecifier("/Audio/Effects/guardian_warn.ogg");
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound played when the guardian dies.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier DeathSound = new SoundPathSpecifier("/Audio/Voice/Human/malescream_guardian.ogg", AudioParams.Default.WithVariation(0.2f));
|
|
|
|
|
|
2021-12-29 06:58:48 +03:00
|
|
|
}
|
|
|
|
|
}
|