mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* may god have mercy upon my soul
* stuff
* Revert "Always raise MobStateChanged on client (#45103)"
This reverts commit 1951b00875.
* keep the cleanup
* fuck you though
* review
* Update Content.Shared/DamageOverlay/SharedDamageOverlaySystem.cs
Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
* deltas
* queries
---------
Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using Content.Shared.Mobs;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.DamageOverlay;
|
|
|
|
/// <summary>
|
|
/// A component to add overlays to the screen of the controlling player depending on the damage the entity has taken.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(raiseAfterAutoHandleState: true, fieldDeltas: true)]
|
|
[Access(typeof(SharedDamageOverlaySystem))]
|
|
public sealed partial class DamageOverlayComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The mobstate the overlay currently shows.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public MobState CurrentState = MobState.Alive;
|
|
|
|
/// <summary>
|
|
/// Controls the red vignette around the screen, which closes in as you take damage.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float PainLevel;
|
|
|
|
/// <summary>
|
|
/// Controls the white vignette around the screen, which closes the closer you are to death.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float CritLevel;
|
|
|
|
/// <summary>
|
|
/// Used for lerping the white overlay from <see cref="CritLevel"/> when the entity dies.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float DeadLevel;
|
|
|
|
/// <summary>
|
|
/// Darkens your screen around the edges based on how much asphyxiation damage you have.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float OxygenLevel;
|
|
}
|