[feat] bleeding alert, separated chat is default

# Conflicts:
#	Content.Server/Body/Components/BloodstreamComponent.cs
#	Content.Server/Body/Systems/BloodstreamSystem.cs
#	Content.Shared/Alert/AlertType.cs
This commit is contained in:
rhailrake
2023-04-25 01:24:58 +06:00
committed by Remuchi
parent 2f1976a749
commit cfa31be8d4
5 changed files with 24 additions and 1 deletions

View File

@@ -165,5 +165,14 @@ namespace Content.Server.Body.Components
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float StatusTime;
//WD-EDIT
/// <summary>
/// Bool for bleeding alert.
/// </summary>
public bool IsBleeding => BleedAmount > 0;
//WD-EDIT
}
}

View File

@@ -104,6 +104,12 @@ public sealed class BloodstreamSystem : EntitySystem
if (!_solutionContainerSystem.ResolveSolution(uid, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
continue;
//WD-EDIT
if (bloodstream.IsBleeding)
_alertsSystem.ShowAlert(uid, AlertType.Bleed);
else
_alertsSystem.ClearAlert(uid, AlertType.Bleed);
//WD-EDIT
// Adds blood to their blood level if it is below the maximum; Blood regeneration. Must be alive.
if (bloodSolution.Volume < bloodSolution.MaxVolume && !_mobStateSystem.IsDead(uid))

View File

@@ -1513,7 +1513,7 @@ namespace Content.Shared.CCVar
*/
public static readonly CVarDef<string> UILayout =
CVarDef.Create("ui.layout", "Default", CVar.CLIENTONLY | CVar.ARCHIVE);
CVarDef.Create("ui.layout", "Separated", CVar.CLIENTONLY | CVar.ARCHIVE);
public static readonly CVarDef<string> DefaultScreenChatSize =
CVarDef.Create("ui.default_chat_size", "", CVar.CLIENTONLY | CVar.ARCHIVE);

View File

@@ -5,6 +5,7 @@
id: BaseAlertOrder
order:
- category: Health
- alertType: Bleeding
- category: Stamina
- alertType: SuitPower
- category: Internals
@@ -457,3 +458,10 @@
state: critical
name: Debug6
description: Debug
# WD-EDIT
- type: alert
id: Bleeding
icons: [ /Textures/Interface/Alerts/bleeding.png ]
name: alerts-bleeding-name
description: alerts-bleeding-desc

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B