mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* init * fixes, ghosting * i dont know man * popups, slight rework, actually works now * review * failn't * partial review * new sprites * cleanup * fix * fix multiple gasps, allow stasis when dead * typo * yeah * yeah * wuh * merge master part 2 * sub attribute * first try? * renames * network * identity * fix ts * fix imports * applying state check * temp * may god have mercy upon my soul * stuff * Revert "stuff" This reverts commit de7ec9cb9f761f5cd954921a0efa495388634d30. * Revert "may god have mercy upon my soul" This reverts commit 3e1aa567d47e0576daa6ed420dad29b80c112a31. * Revert "temp" This reverts commit 501dd6d4f6fd22c466e4abb2a284212636123c4a. * Revert "applying state check" This reverts commit 3c211f0a54812797987c7ab93a9b140f66a9088d. * fix --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
65 lines
2.2 KiB
C#
65 lines
2.2 KiB
C#
using Content.Shared.Changeling.Systems;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Changeling.Components;
|
|
|
|
/// <summary>
|
|
/// Component responsible for Changelings Regenerative Stasis.
|
|
/// Allows the user to fake "death" and heal afterwards.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
[Access(typeof(RegenerativeStasisSystem))]
|
|
public sealed partial class RegenerativeStasisActionComponent : Component
|
|
{
|
|
// TODO: Will need small behaviour tweaks once we get biomass/chemicals.
|
|
|
|
/// <summary>
|
|
/// Whether this entity is currently in stasis.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool IsInStasis;
|
|
|
|
/// <summary>
|
|
/// Whether the entity can ghost out during their stasis.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool AllowGhosting;
|
|
|
|
/// <summary>
|
|
/// Minimum time the entity has to be in stasis before they are allowed to get up.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan MinStasisCooldown = TimeSpan.FromSeconds(30);
|
|
|
|
/// <summary>
|
|
/// Maximum time the entity has to be in stasis before they are allowed to get up, based on the entity's sustained damage and CooldownBonusPerDamage.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan MaxStasisCooldown = TimeSpan.FromSeconds(60);
|
|
|
|
/// <summary>
|
|
/// The amount of bonus cooldown time to add on top of <see cref="MinStasisCooldown"/> for each unit of damage.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan BonusCooldownPerDamage = TimeSpan.FromSeconds(30d / 200d); // at 200 damage, the cooldown should be 60s
|
|
|
|
/// <summary>
|
|
/// The sound to play when the entity exits stasis.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public SoundSpecifier? ExitSound = new SoundPathSpecifier("/Audio/Magic/rumble.ogg");
|
|
|
|
/// <summary>
|
|
/// The name this entity's action started with.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public string? InitialName;
|
|
|
|
/// <summary>
|
|
/// The description this entity's action started with.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public string? InitialDescription;
|
|
}
|