Респрайты алертов (#526)
* bleed alert respire + remove hardcoded shit from bloodstreamSystem * resprite thirst icons * ensnared alert meme resprite
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Content.Server.Body.Components
|
||||
public static string DefaultChemicalsSolutionName = "chemicals";
|
||||
public static string DefaultBloodSolutionName = "bloodstream";
|
||||
public static string DefaultBloodTemporarySolutionName = "bloodstreamTemporary";
|
||||
public readonly string BloodAlertPrototypeID = "Bleed";
|
||||
|
||||
/// <summary>
|
||||
/// The next time that blood level will be updated and bloodloss damage dealt.
|
||||
|
||||
@@ -413,7 +413,13 @@ public sealed class BloodstreamSystem : EntitySystem
|
||||
_alertsSystem.ClearAlert(uid, AlertType.Bleed);
|
||||
else
|
||||
{
|
||||
var severity = (short) Math.Clamp(Math.Round(component.BleedAmount, MidpointRounding.ToZero), 0, 10);
|
||||
if (!_prototypeManager.TryIndex<AlertPrototype>(component.BloodAlertPrototypeID, out var alertPrototype))
|
||||
return false;
|
||||
|
||||
var severity = (short) Math.Clamp(Math.Round(component.BleedAmount, MidpointRounding.ToZero),
|
||||
alertPrototype.MinSeverity,
|
||||
alertPrototype.MaxSeverity);
|
||||
|
||||
_alertsSystem.ShowAlert(uid, AlertType.Bleed, severity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user